From e5e7238d0f83789217950441aefb4c70e47eac1c Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Sun, 4 Mar 2012 20:43:05 -0800 Subject: Pulls river js out into external file --- views/default/core/river/filter.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'views') diff --git a/views/default/core/river/filter.php b/views/default/core/river/filter.php index 87380b561..9b7fadaa8 100644 --- a/views/default/core/river/filter.php +++ b/views/default/core/river/filter.php @@ -34,17 +34,5 @@ if ($selector) { $params['value'] = $selector; } echo elgg_view('input/dropdown', $params); -?> - - + +elgg_load_js('elgg.ui.river'); -- cgit v1.2.3 From 7c0215018897bfb578e6116ef9d36e5edc1fe5cf Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Wed, 16 May 2012 11:27:25 -0400 Subject: Fixes #2411: Show message when upload exceeds PHP limits, and show limits in Server Info --- engine/lib/actions.php | 15 +++++++++++++-- languages/en.php | 4 ++++ views/default/admin/statistics/server/php.php | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/engine/lib/actions.php b/engine/lib/actions.php index c6613e6d6..3a7c02488 100644 --- a/engine/lib/actions.php +++ b/engine/lib/actions.php @@ -273,8 +273,19 @@ function validate_action_token($visibleerrors = TRUE, $token = NULL, $ts = NULL) } else if ($visibleerrors) { register_error(elgg_echo('actiongatekeeper:tokeninvalid')); } - } else if ($visibleerrors) { - register_error(elgg_echo('actiongatekeeper:missingfields')); + } else { + if (! empty($_SERVER['CONTENT_LENGTH']) && empty($_POST)) { + // The size of $_POST or uploaded file has exceed the size limit + $error_msg = elgg_trigger_plugin_hook('action_gatekeeper:upload_exceeded_msg', 'all', array( + 'post_size' => $_SERVER['CONTENT_LENGTH'], + 'visible_errors' => $visibleerrors, + ), elgg_echo('actiongatekeeper:uploadexceeded')); + } else { + $error_msg = elgg_echo('actiongatekeeper:missingfields'); + } + if ($visibleerrors) { + register_error($error_msg); + } } return FALSE; diff --git a/languages/en.php b/languages/en.php index 7b51b0c7d..ff730a018 100644 --- a/languages/en.php +++ b/languages/en.php @@ -741,6 +741,9 @@ $english = array( 'admin:server:label:mem_avail' => 'Memory available', 'admin:server:label:mem_used' => 'Memory used', 'admin:server:error_log' => "Web server's error log", + 'admin:server:label:post_max_size' => 'POST maximum size', + 'admin:server:label:upload_max_filesize' => 'Upload maximum size', + 'admin:server:warning:post_max_too_small' => '(Note: post_max_size must be larger than this value to support uploads of this size)', 'admin:user:label:search' => "Find users:", 'admin:user:label:searchbutton' => "Search", @@ -1171,6 +1174,7 @@ You cannot reply to this email.", 'actiongatekeeper:tokeninvalid' => "We encountered an error (token mismatch). This probably means that the page you were using expired.", 'actiongatekeeper:timeerror' => 'The page you were using has expired. Please refresh and try again.', 'actiongatekeeper:pluginprevents' => 'A extension has prevented this form from being submitted.', + 'actiongatekeeper:uploadexceeded' => 'The size of file(s) uploaded exceeded the limit set by your site administrator', /** diff --git a/views/default/admin/statistics/server/php.php b/views/default/admin/statistics/server/php.php index 4a59b95fb..7c6a51383 100644 --- a/views/default/admin/statistics/server/php.php +++ b/views/default/admin/statistics/server/php.php @@ -8,6 +8,15 @@ if (!$php_log) { $php_log = elgg_echo('admin:server:error_log'); } +$post_max_size = elgg_get_ini_setting_in_bytes('post_max_size'); +$upload_max_filesize = elgg_get_ini_setting_in_bytes('upload_max_filesize'); + +$post_max_size_warning = ''; +if ($upload_max_filesize > $post_max_size) { + // @todo show a link to something like http://nigel.mcnie.name/blog/uploadmaxfilesizepostmaxsize-experimentation ? + $post_max_size_warning = elgg_echo('admin:server:warning:post_max_too_small'); +} + ?> @@ -30,4 +39,12 @@ if (!$php_log) { + + + + + + + +
:
:
:
-- cgit v1.2.3 From f848e3ada3e29c17cc5028d7d9edad8035706334 Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 17 May 2012 13:48:57 +0200 Subject: Refs #4396. No revert, remove. --- actions/avatar/remove.php | 34 ++++++++++++++++++++++++++++++++++ actions/avatar/revert.php | 34 ---------------------------------- engine/lib/users.php | 2 +- languages/en.php | 7 ++++--- views/default/core/avatar/upload.php | 12 ++++++------ 5 files changed, 45 insertions(+), 44 deletions(-) create mode 100644 actions/avatar/remove.php delete mode 100644 actions/avatar/revert.php (limited to 'views') diff --git a/actions/avatar/remove.php b/actions/avatar/remove.php new file mode 100644 index 000000000..cd38e456a --- /dev/null +++ b/actions/avatar/remove.php @@ -0,0 +1,34 @@ + $size_info) { + $file = new ElggFile(); + $file->owner_guid = $guid; + $file->setFilename("profile/{$guid}{$name}.jpg"); + $filepath = $file->getFilenameOnFilestore(); + if (!$file->delete()) { + elgg_log("Avatar file remove failed. Remove $filepath manually, please.", 'WARNING'); + } + } + + // Remove crop coords + unset($user->x1); + unset($user->x2); + unset($user->y1); + unset($user->y2); + + // Remove icon + unset($user->icontime); + system_message(elgg_echo('avatar:remove:success')); +} else { + register_error(elgg_echo('avatar:remove:fail')); +} + +forward(REFERER); diff --git a/actions/avatar/revert.php b/actions/avatar/revert.php deleted file mode 100644 index bc84e9298..000000000 --- a/actions/avatar/revert.php +++ /dev/null @@ -1,34 +0,0 @@ - $size_info) { - $file = new ElggFile(); - $file->owner_guid = $guid; - $file->setFilename("profile/{$guid}{$name}.jpg"); - $filepath = $file->getFilenameOnFilestore(); - if (!$file->delete()) { - elgg_log("Avatar file revert failed. Remove $filepath manually, please.", 'WARNING'); - } - } - - // Revert crop coords - unset($user->x1); - unset($user->x2); - unset($user->y1); - unset($user->y2); - - // Revert icon - unset($user->icontime); - system_message(elgg_echo('avatar:revert:success')); -} else { - register_error(elgg_echo('avatar:revert:fail')); -} - -forward(REFERER); diff --git a/engine/lib/users.php b/engine/lib/users.php index e209f2c38..7d427e743 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1556,7 +1556,7 @@ function users_init() { elgg_register_action('friends/remove'); elgg_register_action('avatar/upload'); elgg_register_action('avatar/crop'); - elgg_register_action('avatar/revert'); + elgg_register_action('avatar/remove'); elgg_register_action('profile/edit'); elgg_register_action('friends/collections/add'); diff --git a/languages/en.php b/languages/en.php index 7b51b0c7d..4fa7506e8 100644 --- a/languages/en.php +++ b/languages/en.php @@ -367,7 +367,7 @@ $english = array( 'avatar:preview' => 'Preview', 'avatar:upload' => 'Upload a new avatar', 'avatar:current' => 'Current avatar', - 'avatar:revert' => 'Revert your avatar to the default icon', + 'avatar:remove' => 'Remove your avatar and set the default icon', 'avatar:crop:title' => 'Avatar cropping tool', 'avatar:upload:instructions' => "Your avatar is displayed throughout the site. You can change it as often as you'd like. (File formats accepted: GIF, JPG or PNG)", 'avatar:create:instructions' => 'Click and drag a square below to match how you want your avatar cropped. A preview will appear in the box on the right. When you are happy with the preview, click \'Create your avatar\'. This cropped version will be used throughout the site as your avatar.', @@ -376,8 +376,8 @@ $english = array( 'avatar:resize:fail' => 'Resize of the avatar failed', 'avatar:crop:success' => 'Cropping the avatar succeeded', 'avatar:crop:fail' => 'Avatar cropping failed', - 'avatar:revert:success' => 'Reverting the avatar succeeded', - 'avatar:revert:fail' => 'Avatar revert failed', + 'avatar:remove:success' => 'Removing the avatar succeeded', + 'avatar:remove:fail' => 'Avatar remove failed', 'profile:edit' => 'Edit profile', 'profile:aboutme' => "About me", @@ -861,6 +861,7 @@ $english = array( 'new' => 'New', 'add' => 'Add', 'create' => 'Create', + 'remove' => 'Remove', 'revert' => 'Revert', 'site' => 'Site', diff --git a/views/default/core/avatar/upload.php b/views/default/core/avatar/upload.php index 29aa59c9c..6f9124192 100644 --- a/views/default/core/avatar/upload.php +++ b/views/default/core/avatar/upload.php @@ -12,12 +12,12 @@ $user_avatar = elgg_view('output/img', array( $current_label = elgg_echo('avatar:current'); -$revert_button = ''; +$remove_button = ''; if ($vars['entity']->icontime) { - $revert_button = elgg_view('output/url', array( - 'text' => elgg_echo('revert'), - 'title' => elgg_echo('avatar:revert'), - 'href' => 'action/avatar/revert?guid=' . elgg_get_page_owner_guid(), + $remove_button = elgg_view('output/url', array( + 'text' => elgg_echo('remove'), + 'title' => elgg_echo('avatar:remove'), + 'href' => 'action/avatar/remove?guid=' . elgg_get_page_owner_guid(), 'is_action' => true, 'class' => 'elgg-button elgg-button-cancel mll', )); @@ -39,7 +39,7 @@ $image = <<$current_label
$user_avatar -$revert_button +$remove_button HTML; $body = << Date: Sat, 2 Jun 2012 14:54:44 -0400 Subject: Fixes #4437 allowing plugins to pass tag HTML to the view object/elements/summary --- views/default/object/elements/summary.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index 22db03f51..c0f3ad340 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -13,7 +13,7 @@ * @uses $vars['title'] Title link (optional) false = no title, '' = default * @uses $vars['metadata'] HTML for entity menu and metadata (optional) * @uses $vars['subtitle'] HTML for the subtitle (optional) - * @uses $vars['tags'] HTML for the tags (optional) + * @uses $vars['tags'] HTML for the tags (default is tags on entity, pass false for no tags) * @uses $vars['content'] HTML for the entity content (optional) */ @@ -39,7 +39,7 @@ $subtitle = elgg_extract('subtitle', $vars, ''); $content = elgg_extract('content', $vars, ''); $tags = elgg_extract('tags', $vars, ''); -if ($tags !== false) { +if ($tags === '') { $tags = elgg_view('output/tags', array('tags' => $entity->tags)); } -- cgit v1.2.3 From 30452bdc98cbc7eb913d5790ffb53ecd51615747 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 2 Jun 2012 17:08:42 -0400 Subject: Fixes #4498 special check for admin pages that are throwing 404 errors - this won't be needed once we get rid of the admin context reminder. We may want to use the admin page shell for the 404 errors then. --- views/default/page/default.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/page/default.php b/views/default/page/default.php index 892069fad..3724bffd8 100644 --- a/views/default/page/default.php +++ b/views/default/page/default.php @@ -14,7 +14,9 @@ // backward compatability support for plugins that are not using the new approach // of routing through admin. See reportedcontent plugin for a simple example. if (elgg_get_context() == 'admin') { - elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8); + if (get_input('handler') != 'admin') { + elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8); + } elgg_admin_add_plugin_settings_menu(); elgg_unregister_css('elgg'); echo elgg_view('page/admin', $vars); -- cgit v1.2.3 From a333c200e30fc85c2c4b43f7b665561146a61334 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 2 Jun 2012 18:21:46 -0400 Subject: Fixes #4539 debrand ajax spinner --- _graphics/ajax_loader.gif | Bin 4421 -> 2608 bytes _graphics/ajax_loader_bw.gif | Bin 3394 -> 2608 bytes views/default/css/elements/icons.php | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/_graphics/ajax_loader.gif b/_graphics/ajax_loader.gif index 5a9af96d2..b55e148bb 100644 Binary files a/_graphics/ajax_loader.gif and b/_graphics/ajax_loader.gif differ diff --git a/_graphics/ajax_loader_bw.gif b/_graphics/ajax_loader_bw.gif index 95bad9128..e195e1fd8 100644 Binary files a/_graphics/ajax_loader_bw.gif and b/_graphics/ajax_loader_bw.gif differ diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php index f7c789e33..9b12e0a57 100644 --- a/views/default/css/elements/icons.php +++ b/views/default/css/elements/icons.php @@ -288,8 +288,8 @@ .elgg-ajax-loader { background: white url(_graphics/ajax_loader_bw.gif) no-repeat center center; - min-height: 33px; - min-width: 33px; + min-height: 31px; + min-width: 31px; } /* *************************************** -- cgit v1.2.3 From 81dac97890197658e5446e464604c2bc15903e5a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 15 Jun 2012 22:28:46 -0400 Subject: Fixes #4582 using output/url for links in pagination --- views/default/navigation/pagination.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php index e0d355327..04044c51c 100644 --- a/views/default/navigation/pagination.php +++ b/views/default/navigation/pagination.php @@ -113,7 +113,12 @@ foreach ($pages->items as $page) { } else { $page_offset = (($page - 1) * $limit); $url = elgg_http_add_url_query_elements($base_url, array($offset_key => $page_offset)); - echo "
  • $page
  • "; + $link = elgg_view('output/url', array( + 'href' => $url, + 'text' => $page, + 'is_trusted' => true, + )); + echo "
  • $link
  • "; } } -- cgit v1.2.3 From 7d8064039f17059c4d87112dd107f828cf6c661a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 16 Jun 2012 12:33:57 -0400 Subject: Fixes #3463 not showing edit icon for widgets when nothing to edit --- views/default/object/widget/elements/controls.php | 4 +--- views/default/object/widget/elements/settings.php | 14 +++++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'views') diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php index d1d630c4f..57a935f62 100644 --- a/views/default/object/widget/elements/controls.php +++ b/views/default/object/widget/elements/controls.php @@ -8,9 +8,7 @@ echo elgg_view_menu('widget', array( 'entity' => elgg_extract('widget', $vars), - 'params' => array( - 'show_edit' => elgg_extract('show_edit', $vars, true) - ), + 'show_edit' => elgg_extract('show_edit', $vars, true), 'sort_by' => 'priority', 'class' => 'elgg-menu-hz', )); diff --git a/views/default/object/widget/elements/settings.php b/views/default/object/widget/elements/settings.php index 5afe56ed8..25cda58c9 100644 --- a/views/default/object/widget/elements/settings.php +++ b/views/default/object/widget/elements/settings.php @@ -6,8 +6,20 @@ */ $widget = elgg_extract('widget', $vars); + +// not using elgg_view_form() so that we can detect if the form is empty +$form_body = elgg_view('forms/widgets/save', $vars); +if (!$form_body) { + return true; +} + +$form = elgg_view('input/form', array( + 'action' => 'action/widgets/save', + 'body' => $form_body, + 'class' => 'elgg-form-widgets-save', +)); ?>
    - +
    -- cgit v1.2.3 From b6daeeff44535de77f81396d6690f6eedbf57708 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 16 Jun 2012 13:16:21 -0400 Subject: Fixes #4502 selected menu items maintain plugin provided classes --- views/default/navigation/menu/elements/item.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php index 22383ce0b..fd9738826 100644 --- a/views/default/navigation/menu/elements/item.php +++ b/views/default/navigation/menu/elements/item.php @@ -13,7 +13,8 @@ $item = $vars['item']; $link_class = 'elgg-menu-closed'; if ($item->getSelected()) { - $item->setItemClass('elgg-state-selected'); + // @todo switch to addItemClass when that is implemented + //$item->setItemClass('elgg-state-selected'); $link_class = 'elgg-menu-opened'; } @@ -24,6 +25,9 @@ if ($children) { } $item_class = $item->getItemClass(); +if ($item->getSelected()) { + $item_class = "$item_class elgg-state-selected"; +} if (isset($vars['item_class']) && $vars['item_class']) { $item_class .= ' ' . $vars['item_class']; } -- cgit v1.2.3 From f817ef90978ba19aee2273872ff2d75c4b4c2c65 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 17 Jun 2012 08:26:21 -0400 Subject: Fixes #4383 hard codes bundled plugin list and also removes really ugly color for highlighting them in plugin list --- engine/classes/ElggPluginManifest.php | 14 ++++++++++++++ views/default/css/admin.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php index 7aa702d47..7e79c15c8 100644 --- a/engine/classes/ElggPluginManifest.php +++ b/engine/classes/ElggPluginManifest.php @@ -319,12 +319,26 @@ class ElggPluginManifest { * @return array */ public function getCategories() { + $bundled_plugins = array('blog', 'bookmarks', 'categories', + 'custom_index', 'dashboard', 'developers', 'diagnostics', + 'embed', 'externalpages', 'file', 'garbagecollector', + 'groups', 'htmlawed', 'invitefriends', 'likes', + 'logbrowser', 'logrotate', 'members', 'messageboard', + 'messages', 'notifications', 'oauth_api', 'pages', 'profile', + 'reportedcontent', 'search', 'tagcloud', 'thewire', 'tinymce', + 'twitter', 'twitter_api', 'uservalidationbyemail', 'zaudio', + ); + $cats = $this->parser->getAttribute('category'); if (!$cats) { $cats = array(); } + if (in_array('bundled', $cats) && !in_array($this->getPluginID(), $bundled_plugins)) { + unset($cats[array_search('bundled', $cats)]); + } + return $cats; } diff --git a/views/default/css/admin.php b/views/default/css/admin.php index e3205ca4e..65797172f 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -1267,7 +1267,7 @@ ul.elgg-plugin-categories, ul.elgg-plugin-categories > li { } .elgg-plugin-category-bundled { border-width: 2px; - border-color: #DAA520; + border-color: #0054A7; } /**************************************** -- cgit v1.2.3 From cfd0169e52aa9dcbfde5148ad3d6b89684e6bb28 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 17 Jun 2012 09:34:47 -0400 Subject: Fixes #4422 pulling in Ismayil's changes so that we use the module view for settings --- languages/en.php | 2 +- .../core/settings/account/default_access.php | 24 +++------ views/default/core/settings/account/email.php | 24 +++------ views/default/core/settings/account/language.php | 29 ++++------ views/default/core/settings/account/name.php | 29 +++++----- .../core/settings/account/notifications.php | 45 ++++++---------- views/default/core/settings/account/password.php | 54 ++++++++----------- .../core/settings/statistics/numentities.php | 63 ++++++++++------------ views/default/core/settings/statistics/online.php | 48 +++++++++++------ 9 files changed, 137 insertions(+), 181 deletions(-) (limited to 'views') diff --git a/languages/en.php b/languages/en.php index ae874a550..e9c333041 100644 --- a/languages/en.php +++ b/languages/en.php @@ -452,7 +452,7 @@ $english = array( * Notifications */ 'notifications:usersettings' => "Notification settings", - 'notifications:methods' => "Please specify which methods you want to permit.", + 'notifications:methods' => "Select your notification methods.", 'notification:method:email' => 'Email', 'notifications:usersettings:save:ok' => "Your notification settings were successfully saved.", diff --git a/views/default/core/settings/account/default_access.php b/views/default/core/settings/account/default_access.php index e33211460..690f2714a 100644 --- a/views/default/core/settings/account/default_access.php +++ b/views/default/core/settings/account/default_access.php @@ -12,22 +12,14 @@ if (elgg_get_config('allow_user_default_access')) { if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) { $default_access = elgg_get_config('default_access'); } -?> -
    -
    -

    -
    -
    -

    - : - 'default_access', 'value' => $default_access)); + $title = elgg_echo('default_access:settings'); + $content = elgg_echo('default_access:label') . ': '; + $content .= elgg_view('input/access', array( + 'name' => 'default_access', + 'value' => $default_access, + )); - ?> -

    -
    -
    - -
    -
    -

    -
    -
    -

    - : - 'email', 'value' => $user->email)); - ?> -

    -
    -
    - 'email', + 'value' => $user->email, + )); + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php index 3a992966f..b36057422 100644 --- a/views/default/core/settings/account/language.php +++ b/views/default/core/settings/account/language.php @@ -9,23 +9,12 @@ $user = elgg_get_page_owner_entity(); if ($user) { -?> -
    -
    -

    -
    -
    -

    - : - 'language', - 'value' => $user->language, - 'options_values' => get_installed_translations() - )); - ?> -

    -
    -
    - 'language', + 'value' => $user->language, + 'options_values' => get_installed_translations() + )); + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php index f719a84de..e356146a3 100644 --- a/views/default/core/settings/account/name.php +++ b/views/default/core/settings/account/name.php @@ -7,20 +7,15 @@ */ $user = elgg_get_page_owner_entity(); -?> -
    -
    -

    -
    -
    -

    - : - 'name', 'value' => $user->name)); - ?> -

    -
    -
    - 'guid', 'value' => $user->guid)); +if ($user) { + $title = elgg_echo('user:name:label'); + $content = elgg_echo('name') . ': '; + $content .= elgg_view('input/text', array( + 'name' => 'name', + 'value' => $user->name, + )); + echo elgg_view_module('info', $title, $content); + + // need the user's guid to make sure the correct user gets updated + echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $user->guid)); +} diff --git a/views/default/core/settings/account/notifications.php b/views/default/core/settings/account/notifications.php index 51292b2c9..c212b3886 100644 --- a/views/default/core/settings/account/notifications.php +++ b/views/default/core/settings/account/notifications.php @@ -9,33 +9,20 @@ global $NOTIFICATION_HANDLERS; $notification_settings = get_user_notification_settings(elgg_get_page_owner_guid()); -?> -
    -
    -

    -
    -
    +$title = elgg_echo('notifications:usersettings'); -

    +$rows = ''; - - $v) { -?> - - - - - - -
    : - $v) { if ($notification_settings->$k) { $val = "yes"; } else { $val = "no"; } - - echo elgg_view('input/radio', array( + + $radio = elgg_view('input/radio', array( 'name' => "method[$k]", 'value' => $val, 'options' => array( @@ -44,12 +31,14 @@ $notification_settings = get_user_notification_settings(elgg_get_page_owner_guid ), )); -?> -
    -

    -
    \ No newline at end of file + $cells = '' . elgg_echo("notification:method:$k") . ': '; + $cells .= "$radio"; + + $rows .= "$cells"; +} + + +$content = elgg_echo('notifications:methods'); +$content .= "$rows
    "; + +echo elgg_view_module('info', $title, $content); diff --git a/views/default/core/settings/account/password.php b/views/default/core/settings/account/password.php index a80f3df6b..4857034b2 100644 --- a/views/default/core/settings/account/password.php +++ b/views/default/core/settings/account/password.php @@ -1,45 +1,33 @@ -
    -
    -

    -
    -
    - guid == elgg_get_logged_in_user_guid()) { - ?> -

    - : - 'current_password')); - ?> -

    - + $title = elgg_echo('user:set:password'); -

    - : - 'password')); - ?> -

    + // only make the admin user enter current password for changing his own password. + $admin = ''; + if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) { + $admin .= elgg_echo('user:current_password:label') . ': '; + $admin .= elgg_view('input/password', array('name' => 'current_password')); + $admin = "

    $admin

    "; + } -

    - : 'password2')); - ?> -

    -
    -
    - 'password')); + $password = "

    $password

    "; + + $password2 = elgg_echo('user:password2:label') . ': '; + $password2 .= elgg_view('input/password', array('name' => 'password2')); + $password2 = "

    $password2

    "; + + $content = $admin . $password . $password2; + + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/statistics/numentities.php b/views/default/core/settings/statistics/numentities.php index 245fd67be..ce1705a2e 100644 --- a/views/default/core/settings/statistics/numentities.php +++ b/views/default/core/settings/statistics/numentities.php @@ -10,42 +10,35 @@ $entity_stats = get_entity_statistics(elgg_get_logged_in_user_guid()); if ($entity_stats) { -?> -
    -
    -

    -
    -
    - - $entry) { - foreach ($entry as $a => $b) { + $rows = ''; + foreach ($entity_stats as $k => $entry) { + foreach ($entry as $a => $b) { - //This function controls the alternating class - $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + // This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - if ($a == "__base__") { - $a = elgg_echo("item:{$k}"); - if (empty($a)) { - $a = $k; - } - } else { - $a = elgg_echo("item:{$k}:{$a}"); - if (empty($a)) { - $a = "$k $a"; - } - } - echo <<< END - - - - -END; + if ($a == "__base__") { + $a = elgg_echo("item:{$k}"); + if (empty($a)) { + $a = $k; + } + } else { + $a = elgg_echo("item:{$k}:{$a}"); + if (empty($a)) { + $a = "$k $a"; } } - ?> -
    {$a}:{$b}
    -
    -
    - + {$a}: + {$b} + +END; + } + } + + $title = elgg_echo('usersettings:statistics:label:numentities'); + $content = "$rows
    "; + + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/statistics/online.php b/views/default/core/settings/statistics/online.php index 65db42cb1..ce7ff35fb 100644 --- a/views/default/core/settings/statistics/online.php +++ b/views/default/core/settings/statistics/online.php @@ -1,6 +1,6 @@ time_created; } -?> -
    -
    -

    -
    -
    - - - - - -
    name; ?>
    email; ?>
    time_created); ?>
    -
    -
    \ No newline at end of file +$label_name = elgg_echo('usersettings:statistics:label:name'); +$label_email = elgg_echo('usersettings:statistics:label:email'); +$label_member_since = elgg_echo('usersettings:statistics:label:membersince'); +$label_last_login = elgg_echo('usersettings:statistics:label:lastlogin'); + +$time_created = date("r", $user->time_created); +$last_login = date("r", $logged_in); + +$title = elgg_echo('usersettings:statistics:yourdetails'); + +$content = <<<__HTML + + + + + + + + + + + + + + + + + +
    $label_name$user->name
    $label_email$user->email
    $label_member_since$time_created
    $label_last_login$last_login
    +__HTML; + +echo elgg_view_module('info', $title, $content); -- cgit v1.2.3 From 3ad8110fdb13925292cfbebc672bb4bbae992ed5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Mon, 18 Jun 2012 17:45:08 -0400 Subject: fixed a language string for installer --- views/installation/forms/install/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/installation/forms/install/template.php b/views/installation/forms/install/template.php index 385168fe4..a01914f12 100644 --- a/views/installation/forms/install/template.php +++ b/views/installation/forms/install/template.php @@ -23,7 +23,7 @@ foreach ($variables as $field => $params) { } $submit_params = array( - 'value' => elgg_echo('next'), + 'value' => elgg_echo('install:next'), ); $form_body .= elgg_view('input/submit', $submit_params); -- cgit v1.2.3