From 52a6050d1b4a7fae752019570bf2af521f4e2f6c Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 23 Jan 2009 14:33:12 +0000 Subject: Added notification subscriptions page. git-svn-id: https://code.elgg.org/elgg/trunk@2608 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/notifications/index.php | 39 ++++++++++++++++++++++ mod/notifications/languages/en.php | 14 ++++++++ mod/notifications/start.php | 30 +++++++++++++++++ .../default/notifications/subscriptions/form.php | 36 ++++++++++++++++++++ 4 files changed, 119 insertions(+) create mode 100644 mod/notifications/index.php create mode 100644 mod/notifications/languages/en.php create mode 100644 mod/notifications/start.php create mode 100644 mod/notifications/views/default/notifications/subscriptions/form.php (limited to 'mod') diff --git a/mod/notifications/index.php b/mod/notifications/index.php new file mode 100644 index 000000000..670265753 --- /dev/null +++ b/mod/notifications/index.php @@ -0,0 +1,39 @@ +guid,false,'user','',0,'',99999)) { + foreach($people_ents as $ent) + $people[] = $ent->guid; + } + $body = elgg_view('notifications/subscriptions/form',array( + 'people' => $people + )); + + // Insert it into the correct canvas layout + $body = elgg_view_layout('two_column_left_sidebar','',$body); + + // Draw the page + echo page_draw(elgg_echo('notifications:subscriptions:changesettings'),$body); + +?> \ No newline at end of file diff --git a/mod/notifications/languages/en.php b/mod/notifications/languages/en.php new file mode 100644 index 000000000..ecf2dba97 --- /dev/null +++ b/mod/notifications/languages/en.php @@ -0,0 +1,14 @@ + 'Change your content subscriptions', + 'notifications:subscriptions:description' => 'Content subscriptions allow you to be notified when one of your friends creates new content. To receive these notifications from your friends, make sure they are selected in the list below:', + + 'notifications:subscriptions:success' => 'Your subscriptions have been saved.', + + ); + + add_translation("en",$english); + +?> \ No newline at end of file diff --git a/mod/notifications/start.php b/mod/notifications/start.php new file mode 100644 index 000000000..d7d1c87ea --- /dev/null +++ b/mod/notifications/start.php @@ -0,0 +1,30 @@ +wwwroot . "mod/notifications/",'notifications'); + } + + register_elgg_event_handler('pagesetup','system','notifications_plugin_pagesetup',1000); + + // Register action + global $CONFIG; + register_action("notificationsettings/save",false,$CONFIG->pluginspath . "notifications/actions/save.php"); + +?> \ No newline at end of file diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php new file mode 100644 index 000000000..3533a6ac3 --- /dev/null +++ b/mod/notifications/views/default/notifications/subscriptions/form.php @@ -0,0 +1,36 @@ + +

+ +

+ 'subscriptions', + 'entities' => get_user_friends($vars['user']->guid,'',9999,0), + 'value' => $people, + 'formtarget' => $vars['url'] . 'action/notificationsettings/save' + )); + +?> \ No newline at end of file -- cgit v1.2.3