From a9fef31a326f35c9a1504ee58486a35c9b58dc92 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Sun, 4 Sep 2011 17:28:23 -0700 Subject: Fixes #3720. Using correctly filters for tabs on group landing page. --- mod/groups/lib/groups.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/groups') diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 12a22deb4..86e6f018e 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -17,7 +17,7 @@ function groups_handle_all_page() { $selected_tab = get_input('filter', 'newest'); switch ($selected_tab) { - case 'pop': + case 'popular': $content = elgg_list_entities_from_relationship_count(array( 'type' => 'group', 'relationship' => 'member', @@ -25,7 +25,7 @@ function groups_handle_all_page() { 'full_view' => false, )); break; - case 'active': + case 'discussion': $content = elgg_list_entities(array( 'type' => 'object', 'subtype' => 'groupforumtopic', @@ -198,7 +198,7 @@ function groups_handle_invitations_page() { elgg_push_breadcrumb($title); // @todo temporary workaround for exts #287. - $invitations = groups_get_invited_groups($user->getGUID()); + $invitations = groups_get_invited_groups(elgg_get_logged_in_user_guid()); $content = elgg_view('groups/invitationrequests', array('invitations' => $invitations)); $params = array( -- cgit v1.2.3 From e5eb0c827671e7d0a4983839c30c5da0156ee231 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 10 Sep 2011 20:15:57 -0400 Subject: Fixes #3752 corrected URL for group membership requests --- mod/groups/actions/groups/membership/join.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/groups') diff --git a/mod/groups/actions/groups/membership/join.php b/mod/groups/actions/groups/membership/join.php index 210e285a5..b4f4e280c 100644 --- a/mod/groups/actions/groups/membership/join.php +++ b/mod/groups/actions/groups/membership/join.php @@ -10,6 +10,8 @@ * @package ElggGroups */ +global $CONFIG; + $user_guid = get_input('user_guid', elgg_get_logged_in_user_guid()); $group_guid = get_input('group_guid'); @@ -45,7 +47,7 @@ if (($user instanceof ElggUser) && ($group instanceof ElggGroup)) { add_entity_relationship($user->guid, 'membership_request', $group->guid); // Notify group owner - $url = "{$CONFIG->url}mod/groups/membershipreq.php?group_guid={$group->guid}"; + $url = "{$CONFIG->url}groups/requests/$group->guid"; $subject = elgg_echo('groups:request:subject', array( $user->name, $group->name, -- cgit v1.2.3 From 50aa0ce357fd307ac2623e96f22d7c0f973b22ff Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 13 Sep 2011 08:07:14 -0400 Subject: Fixes #3803 fixed groups more link in widget --- mod/groups/views/default/widgets/a_users_groups/content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/groups') diff --git a/mod/groups/views/default/widgets/a_users_groups/content.php b/mod/groups/views/default/widgets/a_users_groups/content.php index 81d355442..114fd7565 100644 --- a/mod/groups/views/default/widgets/a_users_groups/content.php +++ b/mod/groups/views/default/widgets/a_users_groups/content.php @@ -21,7 +21,7 @@ $content = elgg_list_entities_from_relationship($options); echo $content; if ($content) { - $url = "group/member/" . elgg_get_page_owner_entity()->username; + $url = "groups/member/" . elgg_get_page_owner_entity()->username; $more_link = elgg_view('output/url', array( 'href' => $url, 'text' => elgg_echo('groups:more'), -- cgit v1.2.3 From 65158f8d0796108ef5534a91b6ee34bf55d29223 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 17 Sep 2011 11:27:12 -0400 Subject: Fixes #2990 updated the bundled plugins to use the new plugin/user settings structure --- .../default/plugins/garbagecollector/settings.php | 28 ++++++++++++ .../default/settings/garbagecollector/edit.php | 28 ------------ .../views/default/plugins/groups/settings.php | 22 ++++++++++ mod/groups/views/default/settings/groups/edit.php | 22 ---------- .../views/default/plugins/logrotate/settings.php | 48 +++++++++++++++++++++ .../views/default/settings/logrotate/edit.php | 48 --------------------- .../views/default/plugins/twitter_api/settings.php | 50 ++++++++++++++++++++++ .../default/plugins/twitter_api/usersettings.php | 29 +++++++++++++ .../views/default/settings/twitter_api/edit.php | 50 ---------------------- .../default/usersettings/twitter_api/edit.php | 29 ------------- 10 files changed, 177 insertions(+), 177 deletions(-) create mode 100644 mod/garbagecollector/views/default/plugins/garbagecollector/settings.php delete mode 100644 mod/garbagecollector/views/default/settings/garbagecollector/edit.php create mode 100644 mod/groups/views/default/plugins/groups/settings.php delete mode 100644 mod/groups/views/default/settings/groups/edit.php create mode 100644 mod/logrotate/views/default/plugins/logrotate/settings.php delete mode 100644 mod/logrotate/views/default/settings/logrotate/edit.php create mode 100644 mod/twitter_api/views/default/plugins/twitter_api/settings.php create mode 100644 mod/twitter_api/views/default/plugins/twitter_api/usersettings.php delete mode 100644 mod/twitter_api/views/default/settings/twitter_api/edit.php delete mode 100644 mod/twitter_api/views/default/usersettings/twitter_api/edit.php (limited to 'mod/groups') diff --git a/mod/garbagecollector/views/default/plugins/garbagecollector/settings.php b/mod/garbagecollector/views/default/plugins/garbagecollector/settings.php new file mode 100644 index 000000000..3ade780f9 --- /dev/null +++ b/mod/garbagecollector/views/default/plugins/garbagecollector/settings.php @@ -0,0 +1,28 @@ +period; +if (!$period) { + $period = 'monthly'; +} + +?> +
+ + + 'params[period]', + 'options_values' => array( + 'weekly' => elgg_echo('garbagecollector:weekly'), + 'monthly' => elgg_echo('garbagecollector:monthly'), + 'yearly' => elgg_echo('garbagecollector:yearly'), + ), + 'value' => $period + )); + ?> +
diff --git a/mod/garbagecollector/views/default/settings/garbagecollector/edit.php b/mod/garbagecollector/views/default/settings/garbagecollector/edit.php deleted file mode 100644 index 3ade780f9..000000000 --- a/mod/garbagecollector/views/default/settings/garbagecollector/edit.php +++ /dev/null @@ -1,28 +0,0 @@ -period; -if (!$period) { - $period = 'monthly'; -} - -?> -
- - - 'params[period]', - 'options_values' => array( - 'weekly' => elgg_echo('garbagecollector:weekly'), - 'monthly' => elgg_echo('garbagecollector:monthly'), - 'yearly' => elgg_echo('garbagecollector:yearly'), - ), - 'value' => $period - )); - ?> -
diff --git a/mod/groups/views/default/plugins/groups/settings.php b/mod/groups/views/default/plugins/groups/settings.php new file mode 100644 index 000000000..7197dcb37 --- /dev/null +++ b/mod/groups/views/default/plugins/groups/settings.php @@ -0,0 +1,22 @@ +hidden_groups)) { + $vars['entity']->hidden_groups = 'no'; +} + +echo '
'; +echo elgg_echo('groups:allowhiddengroups'); +echo ' '; +echo elgg_view('input/dropdown', array( + 'name' => 'params[hidden_groups]', + 'options_values' => array( + 'no' => elgg_echo('option:no'), + 'yes' => elgg_echo('option:yes') + ), + 'value' => $vars['entity']->hidden_groups, +)); +echo '
'; diff --git a/mod/groups/views/default/settings/groups/edit.php b/mod/groups/views/default/settings/groups/edit.php deleted file mode 100644 index 7197dcb37..000000000 --- a/mod/groups/views/default/settings/groups/edit.php +++ /dev/null @@ -1,22 +0,0 @@ -hidden_groups)) { - $vars['entity']->hidden_groups = 'no'; -} - -echo '
'; -echo elgg_echo('groups:allowhiddengroups'); -echo ' '; -echo elgg_view('input/dropdown', array( - 'name' => 'params[hidden_groups]', - 'options_values' => array( - 'no' => elgg_echo('option:no'), - 'yes' => elgg_echo('option:yes') - ), - 'value' => $vars['entity']->hidden_groups, -)); -echo '
'; diff --git a/mod/logrotate/views/default/plugins/logrotate/settings.php b/mod/logrotate/views/default/plugins/logrotate/settings.php new file mode 100644 index 000000000..64c7bf743 --- /dev/null +++ b/mod/logrotate/views/default/plugins/logrotate/settings.php @@ -0,0 +1,48 @@ +period; +$time = $vars['entity']->time; +if (!$period) { + $period = 'monthly'; +} + +if (!$time) { + $time = 'monthly'; +} +?> +
+ + + 'params[period]', + 'options_values' => array( + 'weekly' => elgg_echo('logrotate:weekly'), + 'monthly' => elgg_echo('logrotate:monthly'), + 'yearly' => elgg_echo('logrotate:yearly'), + ), + 'value' => $period + )); + ?> + +
'); ?> + + + + 'params[time]', + 'options_values' => array( + 'weekly' => elgg_echo('logrotate:week'), + 'monthly' => elgg_echo('logrotate:month'), + 'yearly' => elgg_echo('logrotate:year'), + ), + 'value' => $time + )); + ?> +
diff --git a/mod/logrotate/views/default/settings/logrotate/edit.php b/mod/logrotate/views/default/settings/logrotate/edit.php deleted file mode 100644 index 64c7bf743..000000000 --- a/mod/logrotate/views/default/settings/logrotate/edit.php +++ /dev/null @@ -1,48 +0,0 @@ -period; -$time = $vars['entity']->time; -if (!$period) { - $period = 'monthly'; -} - -if (!$time) { - $time = 'monthly'; -} -?> -
- - - 'params[period]', - 'options_values' => array( - 'weekly' => elgg_echo('logrotate:weekly'), - 'monthly' => elgg_echo('logrotate:monthly'), - 'yearly' => elgg_echo('logrotate:yearly'), - ), - 'value' => $period - )); - ?> - -
'); ?> - - - - 'params[time]', - 'options_values' => array( - 'weekly' => elgg_echo('logrotate:week'), - 'monthly' => elgg_echo('logrotate:month'), - 'yearly' => elgg_echo('logrotate:year'), - ), - 'value' => $time - )); - ?> -
diff --git a/mod/twitter_api/views/default/plugins/twitter_api/settings.php b/mod/twitter_api/views/default/plugins/twitter_api/settings.php new file mode 100644 index 000000000..0b9afd4cf --- /dev/null +++ b/mod/twitter_api/views/default/plugins/twitter_api/settings.php @@ -0,0 +1,50 @@ + 'params[consumer_key]', + 'value' => $vars['entity']->consumer_key, + 'class' => 'elgg-input-thin', +)); + +$consumer_secret_string = elgg_echo('twitter_api:consumer_secret'); +$consumer_secret_view = elgg_view('input/text', array( + 'name' => 'params[consumer_secret]', + 'value' => $vars['entity']->consumer_secret, + 'class' => 'elgg-input-thin', +)); + +$sign_on_with_twitter_string = elgg_echo('twitter_api:login'); +$sign_on_with_twitter_view = elgg_view('input/dropdown', array( + 'name' => 'params[sign_on]', + 'options_values' => array( + 'yes' => elgg_echo('option:yes'), + 'no' => elgg_echo('option:no'), + ), + 'value' => $vars['entity']->sign_on ? $vars['entity']->sign_on : 'no', +)); + +$new_users_with_twitter = elgg_echo('twitter_api:new_users'); +$new_users_with_twitter_view = elgg_view('input/dropdown', array( + 'name' => 'params[new_users]', + 'options_values' => array( + 'yes' => elgg_echo('option:yes'), + 'no' => elgg_echo('option:no'), + ), + 'value' => $vars['entity']->new_users ? $vars['entity']->new_users : 'no', +)); + +$settings = <<<__HTML +

$instructions

+

$consumer_key_view
+

$consumer_secret_view
+
$sign_on_with_twitter_string $sign_on_with_twitter_view
+
$new_users_with_twitter $new_users_with_twitter_view
+__HTML; + +echo $settings; diff --git a/mod/twitter_api/views/default/plugins/twitter_api/usersettings.php b/mod/twitter_api/views/default/plugins/twitter_api/usersettings.php new file mode 100644 index 000000000..acb8d9af5 --- /dev/null +++ b/mod/twitter_api/views/default/plugins/twitter_api/usersettings.php @@ -0,0 +1,29 @@ +getGUID(); +$twitter_name = get_plugin_usersetting('twitter_name', $user_guid, 'twitter_api'); +$access_key = get_plugin_usersetting('access_key', $user_guid, 'twitter_api'); +$access_secret = get_plugin_usersetting('access_secret', $user_guid, 'twitter_api'); + +$site_name = elgg_get_site_entity()->name; +echo '
' . elgg_echo('twitter_api:usersettings:description', array($site_name)) . '
'; + +if (!$access_key || !$access_secret) { + // send user off to validate account + $request_link = twitter_api_get_authorize_url(null, false); + echo '
' . elgg_echo('twitter_api:usersettings:request', array($request_link, $site_name)) . '
'; +} else { + // if this user logged in through twitter and never set up an email address, don't + // let them disassociate their account. + if ($user->email) { + $url = elgg_get_site_url() . "twitter_api/revoke"; + echo ''; + echo '
' . sprintf(elgg_echo('twitter_api:usersettings:revoke'), $url) . '
'; + } else { + echo elgg_echo('twitter_api:usersettings:cannot_revoke', array(elgg_normalize_url('twitter_api/interstitial'))); + } +} diff --git a/mod/twitter_api/views/default/settings/twitter_api/edit.php b/mod/twitter_api/views/default/settings/twitter_api/edit.php deleted file mode 100644 index 0b9afd4cf..000000000 --- a/mod/twitter_api/views/default/settings/twitter_api/edit.php +++ /dev/null @@ -1,50 +0,0 @@ - 'params[consumer_key]', - 'value' => $vars['entity']->consumer_key, - 'class' => 'elgg-input-thin', -)); - -$consumer_secret_string = elgg_echo('twitter_api:consumer_secret'); -$consumer_secret_view = elgg_view('input/text', array( - 'name' => 'params[consumer_secret]', - 'value' => $vars['entity']->consumer_secret, - 'class' => 'elgg-input-thin', -)); - -$sign_on_with_twitter_string = elgg_echo('twitter_api:login'); -$sign_on_with_twitter_view = elgg_view('input/dropdown', array( - 'name' => 'params[sign_on]', - 'options_values' => array( - 'yes' => elgg_echo('option:yes'), - 'no' => elgg_echo('option:no'), - ), - 'value' => $vars['entity']->sign_on ? $vars['entity']->sign_on : 'no', -)); - -$new_users_with_twitter = elgg_echo('twitter_api:new_users'); -$new_users_with_twitter_view = elgg_view('input/dropdown', array( - 'name' => 'params[new_users]', - 'options_values' => array( - 'yes' => elgg_echo('option:yes'), - 'no' => elgg_echo('option:no'), - ), - 'value' => $vars['entity']->new_users ? $vars['entity']->new_users : 'no', -)); - -$settings = <<<__HTML -

$instructions

-

$consumer_key_view
-

$consumer_secret_view
-
$sign_on_with_twitter_string $sign_on_with_twitter_view
-
$new_users_with_twitter $new_users_with_twitter_view
-__HTML; - -echo $settings; diff --git a/mod/twitter_api/views/default/usersettings/twitter_api/edit.php b/mod/twitter_api/views/default/usersettings/twitter_api/edit.php deleted file mode 100644 index acb8d9af5..000000000 --- a/mod/twitter_api/views/default/usersettings/twitter_api/edit.php +++ /dev/null @@ -1,29 +0,0 @@ -getGUID(); -$twitter_name = get_plugin_usersetting('twitter_name', $user_guid, 'twitter_api'); -$access_key = get_plugin_usersetting('access_key', $user_guid, 'twitter_api'); -$access_secret = get_plugin_usersetting('access_secret', $user_guid, 'twitter_api'); - -$site_name = elgg_get_site_entity()->name; -echo '
' . elgg_echo('twitter_api:usersettings:description', array($site_name)) . '
'; - -if (!$access_key || !$access_secret) { - // send user off to validate account - $request_link = twitter_api_get_authorize_url(null, false); - echo '
' . elgg_echo('twitter_api:usersettings:request', array($request_link, $site_name)) . '
'; -} else { - // if this user logged in through twitter and never set up an email address, don't - // let them disassociate their account. - if ($user->email) { - $url = elgg_get_site_url() . "twitter_api/revoke"; - echo ''; - echo '
' . sprintf(elgg_echo('twitter_api:usersettings:revoke'), $url) . '
'; - } else { - echo elgg_echo('twitter_api:usersettings:cannot_revoke', array(elgg_normalize_url('twitter_api/interstitial'))); - } -} -- cgit v1.2.3 From 1a44b71e0cd65a009c0fb54ca11825b75528a327 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Wed, 28 Sep 2011 22:25:24 -0700 Subject: Fixes #3879. Removed some instances of deprecated views / functions. --- mod/groups/views/default/groups/invitationrequests.php | 2 +- mod/groups/views/default/groups/membershiprequests.php | 2 +- mod/profile/views/default/profile/owner_block.php | 2 +- views/default/core/avatar/upload.php | 2 +- views/default/forms/avatar/crop.php | 2 +- views/default/icon/user/default.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mod/groups') diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php index 788788324..9c2df8b9c 100644 --- a/mod/groups/views/default/groups/invitationrequests.php +++ b/mod/groups/views/default/groups/invitationrequests.php @@ -10,7 +10,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) { echo '
    '; foreach ($vars['invitations'] as $group) { if ($group instanceof ElggGroup) { - $icon = elgg_view_entity_icon($group, 'tiny', array('override' => 'true')); + $icon = elgg_view_entity_icon($group, 'tiny', array('hover' => 'true')); $group_title = elgg_view('output/url', array( 'href' => $group->getURL(), diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php index 4d1c78c8c..7f33b83e0 100644 --- a/mod/groups/views/default/groups/membershiprequests.php +++ b/mod/groups/views/default/groups/membershiprequests.php @@ -11,7 +11,7 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) { echo '
      '; foreach ($vars['requests'] as $user) { if ($user instanceof ElggUser) { - $icon = elgg_view_entity_icon($user, 'tiny', array('override' => 'true')); + $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => 'true')); $user_title = elgg_view('output/url', array( 'href' => $user->getURL(), diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php index 5a65a3a26..05cb41a14 100644 --- a/mod/profile/views/default/profile/owner_block.php +++ b/mod/profile/views/default/profile/owner_block.php @@ -11,7 +11,7 @@ if (!$user) { return TRUE; } -$icon = elgg_view_entity_icon($user, 'large', array('override' => 'true')); +$icon = elgg_view_entity_icon($user, 'large', array('hover' => 'true')); // grab the actions and admin menu items from user hover $menu = elgg_trigger_plugin_hook('register', "menu:user_hover", array('entity' => $user), array()); diff --git a/views/default/core/avatar/upload.php b/views/default/core/avatar/upload.php index 6887eab5c..11902cf4a 100644 --- a/views/default/core/avatar/upload.php +++ b/views/default/core/avatar/upload.php @@ -5,7 +5,7 @@ * @uses $vars['entity'] */ -$user_avatar = $vars['entity']->getIcon('medium'); +$user_avatar = $vars['entity']->getIconUrl('medium'); $current_label = elgg_echo('avatar:current'); diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php index dc5e3d77f..9fcae25c4 100644 --- a/views/default/forms/avatar/crop.php +++ b/views/default/forms/avatar/crop.php @@ -5,7 +5,7 @@ * @uses $vars['entity'] */ -$master_image = $vars['entity']->getIcon('master'); +$master_image = $vars['entity']->getIconUrl('master'); ?>
      diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php index 2970f1858..aca03521f 100644 --- a/views/default/icon/user/default.php +++ b/views/default/icon/user/default.php @@ -38,7 +38,7 @@ $js = elgg_extract('js', $vars, ''); $hover = elgg_extract('hover', $vars, true); if (isset($vars['override'])) { - elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8); + elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8, 5); $hover = false; } -- cgit v1.2.3