From 7184453089f95216643ab697930b020890c65006 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 17 Oct 2008 15:46:16 +0000 Subject: Closes #335: Marcus Povey : * Per user tools settings now present again (only displays if there are settings present AND the plugin is enabled - needs skinning accordingly) * Re-jigged the settings code to behave like a proper page handler. * Minor tweak to language git-svn-id: https://code.elgg.org/elgg/trunk@2279 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/usersettings/plugins.php | 14 ++------------ views/default/usersettings/plugins_opt/plugin.php | 18 ++++++++---------- 2 files changed, 10 insertions(+), 22 deletions(-) (limited to 'views/default/usersettings') diff --git a/views/default/usersettings/plugins.php b/views/default/usersettings/plugins.php index 3daf16733..321f377ce 100644 --- a/views/default/usersettings/plugins.php +++ b/views/default/usersettings/plugins.php @@ -16,7 +16,6 @@ $limit = get_input('limit', 10); $offset = get_input('offset', 0); - // Get the installed plugins $installed_plugins = $vars['installed_plugins']; $count = count($installed_plugins); @@ -25,19 +24,10 @@ $n = 0; foreach ($installed_plugins as $plugin => $data) { - if (($n>=$offset) && ($n < $offset+$limit)) + if (is_plugin_enabled($plugin)) echo elgg_view("usersettings/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data)); - $n++; } - // Diplay nav - if ($count) - { - echo elgg_view('navigation/pagination',array( - 'baseurl' => $_SERVER['REQUEST_URI'], - 'offset' => $offset, - 'count' => $count, - )); - } + ?> \ No newline at end of file diff --git a/views/default/usersettings/plugins_opt/plugin.php b/views/default/usersettings/plugins_opt/plugin.php index 51948b41f..1c02ff97a 100644 --- a/views/default/usersettings/plugins_opt/plugin.php +++ b/views/default/usersettings/plugins_opt/plugin.php @@ -22,21 +22,19 @@ $user_guid = $details['user_guid']; if ($user_guid) $user_guid = $_SESSION['user']->guid; + + if (elgg_view("usersettings/{$plugin}/edit")) { ?> -
"> +

-
-
-
- -
- $plugin, 'entity' => find_plugin_usersettings($plugin, $user_guid), 'prefix' => 'user')) ?> -
- -
\ No newline at end of file +
+ $plugin, 'entity' => find_plugin_usersettings($plugin, $user_guid), 'prefix' => 'user')) ?> +
+
+ \ No newline at end of file -- cgit v1.2.3