From e9f261e51adcaa80429fe14b04ee277ab3124ce9 Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 6 Aug 2009 14:17:37 +0000 Subject: removed all main plugins from core - they now live in the plugins svn git-svn-id: https://code.elgg.org/elgg/trunk@3422 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/notifications/actions/groupsave.php | 44 --- mod/notifications/actions/save.php | 42 --- .../graphics/icon_notifications_email.gif | Bin 1416 -> 0 bytes mod/notifications/groups.php | 42 --- mod/notifications/index.php | 39 --- mod/notifications/languages/en.php | 29 -- mod/notifications/manifest.xml | 10 - mod/notifications/start.php | 47 --- .../views/default/notifications/css.php | 78 ----- .../notifications/settings/usersettings.php | 3 - .../notifications/subscriptions/collections.php | 141 --------- .../default/notifications/subscriptions/form.php | 35 --- .../notifications/subscriptions/forminternals.php | 315 --------------------- .../notifications/subscriptions/groupsform.php | 97 ------- .../notifications/subscriptions/jsfuncs.php | 54 ---- .../notifications/subscriptions/personal.php | 63 ----- 16 files changed, 1039 deletions(-) delete mode 100644 mod/notifications/actions/groupsave.php delete mode 100644 mod/notifications/actions/save.php delete mode 100644 mod/notifications/graphics/icon_notifications_email.gif delete mode 100644 mod/notifications/groups.php delete mode 100644 mod/notifications/index.php delete mode 100644 mod/notifications/languages/en.php delete mode 100644 mod/notifications/manifest.xml delete mode 100644 mod/notifications/start.php delete mode 100644 mod/notifications/views/default/notifications/css.php delete mode 100644 mod/notifications/views/default/notifications/settings/usersettings.php delete mode 100644 mod/notifications/views/default/notifications/subscriptions/collections.php delete mode 100644 mod/notifications/views/default/notifications/subscriptions/form.php delete mode 100644 mod/notifications/views/default/notifications/subscriptions/forminternals.php delete mode 100644 mod/notifications/views/default/notifications/subscriptions/groupsform.php delete mode 100644 mod/notifications/views/default/notifications/subscriptions/jsfuncs.php delete mode 100644 mod/notifications/views/default/notifications/subscriptions/personal.php (limited to 'mod/notifications') diff --git a/mod/notifications/actions/groupsave.php b/mod/notifications/actions/groupsave.php deleted file mode 100644 index 8a0ebd24b..000000000 --- a/mod/notifications/actions/groupsave.php +++ /dev/null @@ -1,44 +0,0 @@ -guid,false,'group','',0,'',9999)) { - foreach($groupmemberships as $groupmembership) - $groups[] = $groupmembership->guid; - } - - foreach($NOTIFICATION_HANDLERS as $method => $foo) { - $subscriptions[$method] = get_input($method.'subscriptions'); - $personal[$method] = get_input($method.'personal'); - $collections[$method] = get_input($method.'collections'); - if (!empty($groups)) - foreach($groups as $group) - if (in_array($group,$subscriptions[$method])) { - add_entity_relationship($SESSION['user']->guid,'notify'.$method,$group); - } else { - remove_entity_relationship($SESSION['user']->guid,'notify'.$method,$group); - } - } - - system_message(elgg_echo('notifications:subscriptions:success')); - - forward($_SERVER['HTTP_REFERER']); - -?> \ No newline at end of file diff --git a/mod/notifications/actions/save.php b/mod/notifications/actions/save.php deleted file mode 100644 index 112b1a74c..000000000 --- a/mod/notifications/actions/save.php +++ /dev/null @@ -1,42 +0,0 @@ - $foo) { - $subscriptions[$method] = get_input($method.'subscriptions'); - $personal[$method] = get_input($method.'personal'); - $collections[$method] = get_input($method.'collections'); - - $metaname = 'collections_notifications_preferences_' . $method; - $_SESSION['user']->$metaname = $collections[$method]; - set_user_notification_setting($_SESSION['user']->guid, $method, ($personal[$method] == '1') ? true : false); - remove_entity_relationships($SESSION['user']->guid,'notify' . $method, false, 'user'); - } - - // Add new ones - foreach($subscriptions as $key => $subscription) - if (is_array($subscription) && !empty($subscription)) { - foreach($subscription as $subscriptionperson) { - add_entity_relationship($_SESSION['user']->guid, 'notify' . $key, $subscriptionperson); - } - } - - system_message(elgg_echo('notifications:subscriptions:success')); - - forward($_SERVER['HTTP_REFERER']); - -?> \ No newline at end of file diff --git a/mod/notifications/graphics/icon_notifications_email.gif b/mod/notifications/graphics/icon_notifications_email.gif deleted file mode 100644 index 038d6e651..000000000 Binary files a/mod/notifications/graphics/icon_notifications_email.gif and /dev/null differ diff --git a/mod/notifications/groups.php b/mod/notifications/groups.php deleted file mode 100644 index 97adebb82..000000000 --- a/mod/notifications/groups.php +++ /dev/null @@ -1,42 +0,0 @@ -guid,false,'group','',0,'',9999); - - $body = elgg_view('input/form',array( - 'body' => elgg_view('notifications/subscriptions/groupsform',array( - 'groups' => $groupmemberships - )), - 'method' => 'post', - 'action' => $CONFIG->wwwroot . 'action/notificationsettings/groupsave' - )); - - // Insert it into the correct canvas layout - $body = elgg_view_layout('two_column_left_sidebar','',$body); - - // Draw the page - page_draw(elgg_echo('notifications:subscriptions:changesettings:groups'),$body); - -?> \ No newline at end of file diff --git a/mod/notifications/index.php b/mod/notifications/index.php deleted file mode 100644 index a4d3ef880..000000000 --- a/mod/notifications/index.php +++ /dev/null @@ -1,39 +0,0 @@ -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 - 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 deleted file mode 100644 index 69b69b492..000000000 --- a/mod/notifications/languages/en.php +++ /dev/null @@ -1,29 +0,0 @@ - 'All friends', - - 'notifications:subscriptions:personal:description' => 'Receive notifications when actions are performed on your content', - 'notifications:subscriptions:personal:title' => 'Personal notifications', - - 'notifications:subscriptions:collections:title' => 'Toggle friends collections', - 'notifications:subscriptions:collections:description' => 'To toggle settings for members of your friends collections, use the icons below. This will affect the corresponding users in the main notification settings panel at the bottom of the page. ', - 'notifications:subscriptions:collections:edit' => 'To edit your friends collections, click here.', - - 'notifications:subscriptions:changesettings' => 'Notifications', - 'notifications:subscriptions:changesettings:groups' => 'Group notifications', - 'notification:method:email' => 'Email', - - 'notifications:subscriptions:title' => 'Notifications per user', - 'notifications:subscriptions:description' => 'To receive notifications from your friends when they create new content, find them below and select the notification method you would like to use.', - - 'notifications:subscriptions:groups:description' => 'To receive notifications when new content is added to a group you are a member of, find it below and select the notification method you would like to use.', - - 'notifications:subscriptions:success' => 'Your notifications settings have been saved.', - - ); - - add_translation("en",$english); - -?> \ No newline at end of file diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml deleted file mode 100644 index 267b686e7..000000000 --- a/mod/notifications/manifest.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/mod/notifications/start.php b/mod/notifications/start.php deleted file mode 100644 index cdbe78cc1..000000000 --- a/mod/notifications/start.php +++ /dev/null @@ -1,47 +0,0 @@ -wwwroot . "mod/notifications/"); - if (is_plugin_enabled('groups')) - add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), $CONFIG->wwwroot . "mod/notifications/groups.php"); - } - } - - function notifications_plugin_init() { - extend_view('css','notifications/css'); - global $CONFIG; - - // Unset the default user settings hook - if (isset($CONFIG->hooks['usersettings:save']['user'])) - foreach($CONFIG->hooks['usersettings:save']['user'] as $key => $function) { - if ($function == 'notification_user_settings_save') - unset($CONFIG->hooks['usersettings:save']['user'][$key]); - } - } - - register_elgg_event_handler('pagesetup','system','notifications_plugin_pagesetup',1000); - register_elgg_event_handler('init','system','notifications_plugin_init',1000); - - // Register action - global $CONFIG; - register_action("notificationsettings/save",false,$CONFIG->pluginspath . "notifications/actions/save.php"); - register_action("notificationsettings/groupsave",false,$CONFIG->pluginspath . "notifications/actions/groupsave.php"); - -?> \ No newline at end of file diff --git a/mod/notifications/views/default/notifications/css.php b/mod/notifications/views/default/notifications/css.php deleted file mode 100644 index 164586b3c..000000000 --- a/mod/notifications/views/default/notifications/css.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - */ - -?> - -#notificationstable td.namefield { - width:250px; - text-align: left; - vertical-align: middle; -} -#notificationstable td.namefield p { - margin:0; - vertical-align: middle; - line-height: 1.1em; - padding:5px 0 5px 0; -} -#notificationstable td.namefield img { - padding:6px 10px 6px 3px; - float:left; -} -#notificationstable td.namefield p.namefieldlink { - margin:9px 0 0 0; -} -#notificationstable td.emailtogglefield, -#notificationstable td.smstogglefield { - width:50px; - text-align: center; - vertical-align: middle; -} -#notificationstable td.spacercolumn { - width:30px; -} -#notificationstable td { - border-bottom: 1px solid silver; -} -#notificationstable td.emailtogglefield input { - margin-right:36px; - margin-top:5px; -} -#notificationstable td.emailtogglefield a { - width:46px; - height:24px; - cursor: pointer; - display: block; - outline: none; -} -#notificationstable td.emailtogglefield a.emailtoggleOff { - background: url(mod/notifications/graphics/icon_notifications_email.gif) no-repeat right 2px; -} -#notificationstable td.emailtogglefield a.emailtoggleOn { - background: url(mod/notifications/graphics/icon_notifications_email.gif) no-repeat right -36px; -} - -.notification_collections, -.notification_personal { - margin-bottom: 25px; -} - -.settings_form .friendsPicker_container h3 { - color:#999999; - font-size:3em; - margin:0 0 20px; - text-align:left; - background: none; - border-bottom: none; -} - - - diff --git a/mod/notifications/views/default/notifications/settings/usersettings.php b/mod/notifications/views/default/notifications/settings/usersettings.php deleted file mode 100644 index 0165eb215..000000000 --- a/mod/notifications/views/default/notifications/settings/usersettings.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php deleted file mode 100644 index cf6ce95de..000000000 --- a/mod/notifications/views/default/notifications/subscriptions/collections.php +++ /dev/null @@ -1,141 +0,0 @@ - - - -

- -

-
-

- - -

- - - - $foo) { - if ($i > 0) - echo ""; -?> - - - - -guid,'',9999,0)) { - foreach($friends as $friend) - $members[] = $friend->guid; - } - $memberno = sizeof($members); - $members = implode(',',$members); - -?> - - - $foo) { - $metaname = 'collections_notifications_preferences_' . $method; - if ($collections_preferences = $vars['user']->$metaname) { - if (!empty($collections_preferences) && !is_array($collections_preferences)) - $collections_preferences = array($collections_preferences); - if (is_array($collections_preferences)) - if (in_array(-1,$collections_preferences)) { - $collectionschecked[$method] = 'checked="checked"'; - } else { - $collectionschecked[$method] = ''; - } - } - if ($i > 0) $fields .= ""; - $fields .= <<< END - -END; - $i++; - } - echo $fields; - -?> - - -guid)) { - foreach($collections as $collection) { - $members = get_members_of_access_collection($collection->id, true); - $memberno = sizeof($members); - $members = implode(',',$members); - -?> - - - - $foo) { - $metaname = 'collections_notifications_preferences_' . $method; - if ($collections_preferences = $vars['user']->$metaname) { - if (!empty($collections_preferences) && !is_array($collections_preferences)) - $collections_preferences = array($collections_preferences); - if (is_array($collections_preferences)) - if (in_array($collection->id,$collections_preferences)) { - $collectionschecked[$method] = 'checked="checked"'; - } else { - $collectionschecked[$method] = ''; - } - } - if ($i > 0) $fields .= ""; - $fields .= <<< END - -END; - $i++; - } - echo $fields; - -?> - - - - -
   
-

- () -

-
  - -  
-

- name; ?> () -

- -
  - -  
-
diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php deleted file mode 100644 index 07e5287fd..000000000 --- a/mod/notifications/views/default/notifications/subscriptions/form.php +++ /dev/null @@ -1,35 +0,0 @@ - -
-
- elgg_view('notifications/subscriptions/personal') . - elgg_view('notifications/subscriptions/collections') . - elgg_view('notifications/subscriptions/forminternals'), - 'method' => 'post', - 'action' => $vars['url'] . 'action/notificationsettings/save', - )); - -?> -
-
\ No newline at end of file diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php deleted file mode 100644 index c87bb4b79..000000000 --- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php +++ /dev/null @@ -1,315 +0,0 @@ -

- -

-

- -

-guid,'',9999,0); - - global $NOTIFICATION_HANDLERS; - foreach($NOTIFICATION_HANDLERS as $method => $foo) { - $subsbig[$method] = get_entities_from_relationship('notify' . $method,$vars['user']->guid,false,'user','',0,'',99999); - } - - $subs = array(); - foreach($subsbig as $method => $big) { - if (is_array($subsbig[$method]) && sizeof($subsbig[$method])) { - foreach($subsbig[$method] as $u) { $subs[$method][] = $u->guid; } - } - } - - // Let the system know that the friends picker is in use - global $pickerinuse; - $pickerinuse = true; - $chararray = elgg_echo('friendspicker:chararray'); - - // Initialise internalname - if (!isset($vars['internalname'])) { - $internalname = "friend"; - } else { - $internalname = $vars['internalname']; - } - - // Initialise values - if (!isset($vars['value'])) { - $vars['value'] = array(); - } else { - if (!is_array($vars['value'])) { - $vars['value'] = (int) $vars['value']; - $vars['value'] = array($vars['value']); - } - } - - // Initialise whether we're calling back or not - if (isset($vars['callback'])) { - $callback = $vars['callback']; - } else { - $callback = false; - } - - // We need to count the number of friends pickers on the page. - if (!isset($vars['friendspicker'])) { - global $friendspicker; - if (!isset($friendspicker)) $friendspicker = 0; - $friendspicker++; - } else { - $friendspicker = $vars['friendspicker']; - } - - $users = array(); - $activeletters = array(); - - // Are we displaying form tags and submit buttons? - // (If we've been given a target, then yes! Otherwise, no.) - if (isset($vars['formtarget'])) { - $formtarget = $vars['formtarget']; - } else { - $formtarget = false; - } - - // Sort users by letter - if (is_array($friends) && sizeof($friends)) - foreach($friends as $user) { - - if (is_callable('mb_substr')) - $letter = strtoupper(mb_substr($user->name,0,1)); - else - $letter = strtoupper(substr($user->name,0,1)); - if (!substr_count($chararray,$letter)) { - $letter = "*"; - } - if (!isset($users[$letter])) { - $users[$letter] = array(); - } - $users[$letter][$user->name] = $user; - - } - - if (!$callback) { - -?> - -
- - - -
- - - - - - - - -
-
-
- -
-
-

- - - - - - - $foo) { - if ($i > 0) - echo ""; -?> - - - - - - 0) - foreach($users[$letter] as $friend) { - if ($friend instanceof ElggUser ) { - - if (!in_array($letter,$activeletters)) - $activeletters[] = $letter; - - $method = array(); - $fields = ''; - $i = 0; - - foreach($NOTIFICATION_HANDLERS as $method => $foo) { - if (in_array($friend->guid,$subs[$method])) { - $checked[$method] = 'checked="checked"'; - } else { - $checked[$method] = ''; - } - if ($i > 0) $fields .= ""; - $fields .= <<< END - -END; - $i++; - } -?> - - - - - - - - - - - -
   
  - -
- $friend, 'size' => 'tiny', 'override' => true)); -?> -  
- - - -
-
- -
-
-
- - - -
-
- - - - - - - - - - - - -
-
- -
- - - \ No newline at end of file diff --git a/mod/notifications/views/default/notifications/subscriptions/groupsform.php b/mod/notifications/views/default/notifications/subscriptions/groupsform.php deleted file mode 100644 index 25bdd1be9..000000000 --- a/mod/notifications/views/default/notifications/subscriptions/groupsform.php +++ /dev/null @@ -1,97 +0,0 @@ - $foo) { - $subsbig[$method] = get_entities_from_relationship('notify' . $method,$vars['user']->guid,false,'group','',0,'',99999); - $tmparray = array(); - foreach($subsbig[$method] as $tmpent) { - $tmparray[] = $tmpent->guid; - } - $subsbig[$method] = $tmparray; - } - -?> - -
-
- - - -

- -

- - - - - $foo) { - if ($i > 0) - echo ""; -?> - - - - - $foo) { - if (in_array($group->guid,$subsbig[$method])) { - $checked[$method] = 'checked="checked"'; - } else { - $checked[$method] = ''; - } - if ($i > 0) $fields .= ""; - $fields .= <<< END - -END; - $i++; - } - -?> - - - - - - -
   
  - -
-

- name; ?> -

-
 
- - - -
-
\ No newline at end of file diff --git a/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php b/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php deleted file mode 100644 index 401851ac5..000000000 --- a/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php +++ /dev/null @@ -1,54 +0,0 @@ - - - \ No newline at end of file diff --git a/mod/notifications/views/default/notifications/subscriptions/personal.php b/mod/notifications/views/default/notifications/subscriptions/personal.php deleted file mode 100644 index e6959f739..000000000 --- a/mod/notifications/views/default/notifications/subscriptions/personal.php +++ /dev/null @@ -1,63 +0,0 @@ - -
-
-

- -

-
- - - - $foo) { - if ($i > 0) - echo ""; -?> - - - - - - - - $foo) { - if ($notification_settings = get_user_notification_settings($vars['user']->guid)) { - if ($notification_settings->$method) { - $personalchecked[$method] = 'checked="checked"'; - } else { - $personalchecked[$method] = ''; - } - } - if ($i > 0) $fields .= ""; - $fields .= <<< END - -END; - $i++; - } - echo $fields; - -?> - - - -
   
-

- -

- -
  - -  
-
\ No newline at end of file -- cgit v1.2.3