From ff31226fdeb972aac2f37f0098240cb366a9bb26 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 5 May 2010 19:14:48 +0000 Subject: Merged 18_new_admin branch to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@5977 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/admin/plugins/disable.php | 2 +- actions/admin/plugins/disableall.php | 2 +- actions/admin/plugins/enable.php | 6 +- actions/admin/plugins/enableall.php | 4 +- actions/admin/plugins/reorder.php | 5 +- actions/admin/plugins/simple_update_states.php | 41 ++++ actions/admin/site/update_advanced.php | 74 ++++++ actions/admin/site/update_basic.php | 88 ++------ actions/login.php | 7 +- actions/plugins/settings/save.php | 50 +++- actions/register.php | 16 +- actions/systemsettings/install.php | 28 ++- admin/index.php | 2 +- admin/menu_items.php | 21 -- admin/plugins.php | 49 ---- admin/site.php | 23 -- admin/statistics.php | 23 -- admin/user.php | 34 --- engine/lib/actions.php | 13 ++ engine/lib/admin.php | 251 +++++++++++++++------ engine/lib/plugins.php | 80 ++++++- engine/lib/sessions.php | 7 - languages/en.php | 51 +++-- mod/blog/manifest.xml | 16 +- mod/blog/views/default/blog/forms/edit.php | 6 +- mod/bookmarks/manifest.xml | 16 +- mod/captcha/manifest.xml | 1 + mod/categories/actions/save.php | 5 +- mod/categories/languages/en.php | 21 +- mod/categories/manifest.xml | 18 +- mod/categories/settings.php | 35 --- mod/categories/start.php | 49 ++-- mod/categories/views/default/categories/css.php | 26 +-- .../views/default/categories/settings.php | 24 -- .../views/default/categories/settingsform.php | 7 - .../views/default/settings/categories/edit.php | 28 +++ mod/crontrigger/manifest.xml | 3 +- mod/custom_index/manifest.xml | 15 +- mod/defaultwidgets/manifest.xml | 14 +- mod/diagnostics/manifest.xml | 3 +- mod/ecml/manifest.xml | 2 + mod/ecml/start.php | 4 +- mod/ecml/views/default/ecml/admin/ecml_admin.php | 143 ------------ mod/ecml/views/default/settings/ecml/edit.php | 137 +++++++++++ mod/embed/manifest.xml | 2 + mod/externalpages/manifest.xml | 16 +- mod/file/manifest.xml | 15 +- mod/friends/manifest.xml | 1 + mod/garbagecollector/manifest.xml | 4 +- mod/groups/manifest.xml | 2 + mod/htmlawed/manifest.xml | 6 +- mod/invitefriends/manifest.xml | 15 +- mod/logbrowser/manifest.xml | 4 +- mod/logrotate/manifest.xml | 4 +- mod/members/manifest.xml | 16 +- mod/messageboard/manifest.xml | 16 +- mod/messages/manifest.xml | 12 +- mod/notifications/manifest.xml | 15 +- mod/pages/manifest.xml | 1 + mod/profile/manifest.xml | 20 +- mod/reportedcontent/manifest.xml | 2 + mod/riverdashboard/manifest.xml | 3 +- mod/search/manifest.xml | 4 +- mod/sitepages/manifest.xml | 1 + mod/tagcloud/manifest.xml | 15 +- mod/thewire/manifest.xml | 17 +- mod/tinymce/manifest.xml | 2 + mod/twitter/manifest.xml | 15 +- mod/uservalidationbyemail/manifest.xml | 2 + mod/walledgarden/manifest.xml | 1 + mod/zaudio/manifest.xml | 16 +- views/default/admin/appearance/menu_items.php | 89 ++++++++ .../default/admin/components/admin_page_layout.php | 36 +++ views/default/admin/components/plugin.php | 155 +++++++++++++ views/default/admin/components/plugin_settings.php | 21 ++ views/default/admin/components/sidemenu.php | 105 +++++++++ views/default/admin/main.php | 12 - views/default/admin/main_opt/plugins.php | 17 -- views/default/admin/main_opt/site.php | 15 -- views/default/admin/main_opt/statistics.php | 15 -- views/default/admin/main_opt/user.php | 15 -- views/default/admin/menu_items.php | 89 -------- views/default/admin/overview.php | 80 +++++++ views/default/admin/overview/numentities.php | 9 + views/default/admin/overview/online.php | 24 ++ views/default/admin/plugins.php | 85 ------- views/default/admin/plugins/advanced.php | 106 +++++++++ views/default/admin/plugins/simple.php | 96 ++++++++ views/default/admin/plugins_opt/plugin.php | 159 ------------- views/default/admin/site.php | 16 -- views/default/admin/site/advanced.php | 50 ++++ views/default/admin/site/basic.php | 30 +++ views/default/admin/statistics.php | 11 - views/default/admin/statistics_opt/basic.php | 35 --- views/default/admin/statistics_opt/numentities.php | 51 ----- views/default/admin/statistics_opt/online.php | 24 -- views/default/admin/user.php | 21 -- views/default/admin/user_opt/adduser.php | 0 views/default/admin/user_opt/search.php | 25 -- views/default/admin/users/add.php | 6 + views/default/admin/users/find.php | 25 ++ views/default/admin/users/online.php | 14 ++ views/default/css.php | 59 ++++- views/default/object/admin_notice.php | 11 + 104 files changed, 1831 insertions(+), 1352 deletions(-) create mode 100644 actions/admin/plugins/simple_update_states.php create mode 100644 actions/admin/site/update_advanced.php delete mode 100644 admin/menu_items.php delete mode 100644 admin/plugins.php delete mode 100644 admin/site.php delete mode 100644 admin/statistics.php delete mode 100644 admin/user.php delete mode 100644 mod/categories/settings.php delete mode 100644 mod/categories/views/default/categories/settings.php delete mode 100644 mod/categories/views/default/categories/settingsform.php create mode 100644 mod/categories/views/default/settings/categories/edit.php delete mode 100644 mod/ecml/views/default/ecml/admin/ecml_admin.php create mode 100644 mod/ecml/views/default/settings/ecml/edit.php create mode 100644 views/default/admin/appearance/menu_items.php create mode 100644 views/default/admin/components/admin_page_layout.php create mode 100644 views/default/admin/components/plugin.php create mode 100644 views/default/admin/components/plugin_settings.php create mode 100644 views/default/admin/components/sidemenu.php delete mode 100644 views/default/admin/main.php delete mode 100644 views/default/admin/main_opt/plugins.php delete mode 100644 views/default/admin/main_opt/site.php delete mode 100644 views/default/admin/main_opt/statistics.php delete mode 100644 views/default/admin/main_opt/user.php delete mode 100644 views/default/admin/menu_items.php create mode 100644 views/default/admin/overview.php create mode 100644 views/default/admin/overview/numentities.php create mode 100644 views/default/admin/overview/online.php delete mode 100644 views/default/admin/plugins.php create mode 100644 views/default/admin/plugins/advanced.php create mode 100644 views/default/admin/plugins/simple.php delete mode 100644 views/default/admin/plugins_opt/plugin.php delete mode 100644 views/default/admin/site.php create mode 100644 views/default/admin/site/advanced.php create mode 100644 views/default/admin/site/basic.php delete mode 100644 views/default/admin/statistics.php delete mode 100644 views/default/admin/statistics_opt/basic.php delete mode 100644 views/default/admin/statistics_opt/numentities.php delete mode 100644 views/default/admin/statistics_opt/online.php delete mode 100644 views/default/admin/user.php delete mode 100644 views/default/admin/user_opt/adduser.php delete mode 100644 views/default/admin/user_opt/search.php create mode 100644 views/default/admin/users/add.php create mode 100644 views/default/admin/users/find.php create mode 100644 views/default/admin/users/online.php create mode 100644 views/default/object/admin_notice.php diff --git a/actions/admin/plugins/disable.php b/actions/admin/plugins/disable.php index d5042e2bf..ac80d46e3 100644 --- a/actions/admin/plugins/disable.php +++ b/actions/admin/plugins/disable.php @@ -21,6 +21,7 @@ foreach ($plugin as $p) { // Disable if (disable_plugin($p)) { system_message(sprintf(elgg_echo('admin:plugins:disable:yes'), $p)); + elgg_delete_admin_notice('first_installation_plugin_reminder'); } else { register_error(sprintf(elgg_echo('admin:plugins:disable:no'), $p)); } @@ -30,4 +31,3 @@ elgg_view_regenerate_simplecache(); elgg_filepath_cache_reset(); forward($_SERVER['HTTP_REFERER']); -exit; diff --git a/actions/admin/plugins/disableall.php b/actions/admin/plugins/disableall.php index 70a945ee4..80553e9d1 100644 --- a/actions/admin/plugins/disableall.php +++ b/actions/admin/plugins/disableall.php @@ -16,6 +16,7 @@ $plugins = get_installed_plugins(); foreach ($plugins as $p => $data) { // Disable if (disable_plugin($p)) { + elgg_delete_admin_notice('first_installation_plugin_reminder'); system_message(sprintf(elgg_echo('admin:plugins:disable:yes'), $p)); } else { register_error(sprintf(elgg_echo('admin:plugins:disable:no'), $p)); @@ -26,4 +27,3 @@ elgg_view_regenerate_simplecache(); elgg_filepath_cache_reset(); forward($_SERVER['HTTP_REFERER']); -exit; diff --git a/actions/admin/plugins/enable.php b/actions/admin/plugins/enable.php index b5286336b..053fbc556 100644 --- a/actions/admin/plugins/enable.php +++ b/actions/admin/plugins/enable.php @@ -11,8 +11,8 @@ // block non-admin users admin_gatekeeper(); -// Get the plugin $plugin = get_input('plugin'); + if (!is_array($plugin)) { $plugin = array($plugin); } @@ -20,6 +20,7 @@ if (!is_array($plugin)) { foreach ($plugin as $p) { // Disable if (enable_plugin($p)) { + elgg_delete_admin_notice('first_installation_plugin_reminder'); system_message(sprintf(elgg_echo('admin:plugins:enable:yes'), $p)); } else { register_error(sprintf(elgg_echo('admin:plugins:enable:no'), $p)); @@ -29,5 +30,4 @@ foreach ($plugin as $p) { elgg_view_regenerate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']); -exit; +forward($_SERVER['HTTP_REFERER']); \ No newline at end of file diff --git a/actions/admin/plugins/enableall.php b/actions/admin/plugins/enableall.php index ea4b48f95..d1758a4b3 100644 --- a/actions/admin/plugins/enableall.php +++ b/actions/admin/plugins/enableall.php @@ -16,6 +16,7 @@ $plugins = get_installed_plugins(); foreach ($plugins as $p => $data) { // Enable if (enable_plugin($p)) { + elgg_delete_admin_notice('first_installation_plugin_reminder'); system_message(sprintf(elgg_echo('admin:plugins:enable:yes'), $p)); } else { register_error(sprintf(elgg_echo('admin:plugins:enable:no'), $p)); @@ -26,5 +27,4 @@ foreach ($plugins as $p => $data) { elgg_view_regenerate_simplecache(); elgg_filepath_cache_reset(); -forward($_SERVER['HTTP_REFERER']); -exit; +forward($_SERVER['HTTP_REFERER']); \ No newline at end of file diff --git a/actions/admin/plugins/reorder.php b/actions/admin/plugins/reorder.php index 6050a585f..6423dc14c 100644 --- a/actions/admin/plugins/reorder.php +++ b/actions/admin/plugins/reorder.php @@ -13,8 +13,8 @@ admin_gatekeeper(); // Get the plugin $mod = get_input('plugin'); -$mod = str_replace('.','',$mod); -$mod = str_replace('/','',$mod); +$mod = str_replace('.', '', $mod); +$mod = str_replace('/', '', $mod); // Get the new order $order = (int) get_input('order'); @@ -35,6 +35,7 @@ if ($key = array_search($mod, $plugins)) { // Disable if (regenerate_plugin_list($plugins)) { + elgg_delete_admin_notice('first_installation_plugin_reminder'); system_message(sprintf(elgg_echo('admin:plugins:reorder:yes'), $plugin)); } else { register_error(sprintf(elgg_echo('admin:plugins:reorder:no'), $plugin)); diff --git a/actions/admin/plugins/simple_update_states.php b/actions/admin/plugins/simple_update_states.php new file mode 100644 index 000000000..197f183f9 --- /dev/null +++ b/actions/admin/plugins/simple_update_states.php @@ -0,0 +1,41 @@ + $info) { + // this is only for simple plugins. + if (!isset($info['manifest']['admin_interface']) || $info['manifest']['admin_interface'] != 'simple') { + continue; + } + + $plugin_enabled = is_plugin_enabled($plugin); + + // only effect changes to plugins not already in that state. + if ($plugin_enabled && !in_array($plugin, $enabled_plugins)) { + $success = $success && disable_plugin($plugin); + } elseif (!$plugin_enabled && in_array($plugin, $enabled_plugins)) { + $success = $success && enable_plugin($plugin); + } +} + +if ($success) { + elgg_delete_admin_notice('first_installation_plugin_reminder'); + system_message(elgg_echo('admin:plugins:simple_simple_success')); +} else { + register_error(elgg_echo('admins:plugins:simple_simple_fail')); +} + +forward($_SERVER['HTTP_REFERER']); \ No newline at end of file diff --git a/actions/admin/site/update_advanced.php b/actions/admin/site/update_advanced.php new file mode 100644 index 000000000..c9b78c261 --- /dev/null +++ b/actions/admin/site/update_advanced.php @@ -0,0 +1,74 @@ +url = get_input('wwwroot'); + + datalist_set('path', sanitise_filepath(get_input('path'))); + datalist_set('dataroot', sanitise_filepath(get_input('dataroot'))); + + if (get_input('simplecache_enabled')) { + elgg_view_enable_simplecache(); + } else { + elgg_view_disable_simplecache(); + } + + if (get_input('viewpath_cache_enabled')) { + elgg_enable_filepath_cache(); + } else { + elgg_disable_filepath_cache(); + } + + set_config('default_access', get_input('default_access', ACCESS_PRIVATE), $site->getGUID()); + + $user_default_access = (get_input('allow_user_default_access')) ? 1 : 0; + set_config('allow_user_default_access', $user_default_access, $site->getGUID()); + + set_config('view', get_input('view'), $site->getGUID()); + + $debug = get_input('debug'); + if ($debug) { + set_config('debug', $debug, $site->getGUID()); + } else { + unset_config('debug', $site->getGUID()); + } + + $https_login = get_input('https_login'); + if ($https_login) { + set_config('https_login', 1, $site->getGUID()); + } else { + unset_config('https_login', $site->getGUID()); + } + + $api = get_input('api'); + if ($api) { + unset_config('disable_api', $site->getGUID()); + } else { + set_config('disable_api', 'disabled', $site->getGUID()); + } + + if ($site->save()) { + system_message(elgg_echo("admin:configuration:success")); + } else { + register_error(elgg_echo("admin:configuration:fail")); + } + + forward($_SERVER['HTTP_REFERER']); +} \ No newline at end of file diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index d9fa8f367..5914ab0b5 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -11,83 +11,21 @@ * @link http://elgg.org/ */ -global $CONFIG; - -// block non-admin users admin_gatekeeper(); -if (get_input('settings') == 'go') { - if (datalist_get('default_site')) { - $site = get_entity(datalist_get('default_site')); - if (!($site instanceof ElggSite)) { - throw new InstallationException(elgg_echo('InvalidParameterException:NonElggSite')); - } - - $site->description = get_input('sitedescription'); - $site->name = get_input('sitename'); - $site->email = get_input('siteemail'); - $site->url = get_input('wwwroot'); - - datalist_set('path',sanitise_filepath(get_input('path'))); - datalist_set('dataroot',sanitise_filepath(get_input('dataroot'))); - if (get_input('simplecache_enabled')) { - elgg_view_enable_simplecache(); - } else { - elgg_view_disable_simplecache(); - } - if (get_input('viewpath_cache_enabled')) { - elgg_enable_filepath_cache(); - } else { - elgg_disable_filepath_cache(); - } - - set_config('language', get_input('language'), $site->getGUID()); - - set_config('default_access', get_input('default_access'), $site->getGUID()); - - if (get_input('allow_user_default_access')) { - set_config('allow_user_default_access', 1, $site->getGUID()); - } else { - set_config('allow_user_default_access', 0, $site->getGUID()); - } - - set_config('view', get_input('view'), $site->getGUID()); - - $debug = get_input('debug'); - if ($debug) { - set_config('debug', $debug, $site->getGUID()); - } else { - unset_config('debug', $site->getGUID()); - } - - $https_login = get_input('https_login'); - if ($https_login) { - set_config('https_login', 1, $site->getGUID()); - } else { - unset_config('https_login', $site->getGUID()); - } - - $usage = get_input('usage'); - if ($usage) { - unset_config('ping_home', $site->getGUID()); - } else { - set_config('ping_home', 'disabled', $site->getGUID()); - } +if (datalist_get('default_site')) { + $site = get_entity(datalist_get('default_site')); + if (!($site instanceof ElggSite)) { + throw new InstallationException(elgg_echo('InvalidParameterException:NonElggSite')); + } - $api = get_input('api'); - if ($api) { - unset_config('disable_api', $site->getGUID()); - } else { - set_config('disable_api', 'disabled', $site->getGUID()); - } + $site->description = get_input('sitedescription'); + $site->name = get_input('sitename'); + $site->email = get_input('siteemail'); + $site->save(); - if ($site->save()) { - system_message(elgg_echo("admin:configuration:success")); - } else { - register_error(elgg_echo("admin:configuration:fail")); - } + set_config('language', get_input('language'), $site->getGUID()); - forward($_SERVER['HTTP_REFERER']); - exit; - } -} + forward($_SERVER['HTTP_REFERER']); + exit; +} \ No newline at end of file diff --git a/actions/login.php b/actions/login.php index fed45fbc5..ef6b0b898 100644 --- a/actions/login.php +++ b/actions/login.php @@ -35,12 +35,7 @@ if ($result) { unset($_SESSION['last_forward_from']); forward($forward_url); } else { - if ((isadminloggedin()) && (!datalist_get('first_admin_login'))) { - system_message(elgg_echo('firstadminlogininstructions')); - datalist_set('first_admin_login', time()); - - forward('pg/admin/plugins'); - } else if (get_input('returntoreferer')) { + if (get_input('returntoreferer')) { forward($_SERVER['HTTP_REFERER']); } else { // forward to index for front page overrides. diff --git a/actions/plugins/settings/save.php b/actions/plugins/settings/save.php index bbbb6a367..6aa47b60e 100644 --- a/actions/plugins/settings/save.php +++ b/actions/plugins/settings/save.php @@ -10,22 +10,52 @@ $params = get_input('params'); $plugin = get_input('plugin'); +if (!$plugin_info = load_plugin_manifest($plugin)) { + register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin)); + forward($_SERVER['HTTP_REFERER']); +} + +$plugin_name = $plugin_info['name']; -gatekeeper(); +admin_gatekeeper(); $result = false; -foreach ($params as $k => $v) { - // Save - $result = set_plugin_setting($k, $v, $plugin); +$options = array( + 'plugin' => $plugin, + 'manifest' => $plugin_info, + 'settings' => $params +); - // Error? - if (!$result) { - register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin)); - forward($_SERVER['HTTP_REFERER']); - exit; +// allow a plugin to override the save action for their settings +if (elgg_action_exist("settings/$plugin/save")) { + action("settings/$plugin/save"); +} else { + foreach ($params as $k => $v) { + if (!$result = set_plugin_setting($k, $v, $plugin)) { + register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin_name)); + forward($_SERVER['HTTP_REFERER']); + exit; + } } } -system_message(sprintf(elgg_echo('plugins:settings:save:ok'), $plugin)); +system_message(sprintf(elgg_echo('plugins:settings:save:ok'), $plugin_name)); forward($_SERVER['HTTP_REFERER']); +// +//$trigger = trigger_plugin_hook('plugin:save_settings', $plugin, $options, NULL); +//if ($trigger === NULL) { +// foreach ($params as $k => $v) { +// if (!$result = set_plugin_setting($k, $v, $plugin)) { +// register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin_name)); +// forward($_SERVER['HTTP_REFERER']); +// exit; +// } +// } +//} elseif ($trigger === FALSE) { +// register_error(sprintf(elgg_echo('plugins:settings:save:fail'), $plugin_name)); +// forward($_SERVER['HTTP_REFERER']); +//} +// +//system_message(sprintf(elgg_echo('plugins:settings:save:ok'), $plugin_name)); +//forward($_SERVER['HTTP_REFERER']); \ No newline at end of file diff --git a/actions/register.php b/actions/register.php index efbc3def3..081a4e454 100644 --- a/actions/register.php +++ b/actions/register.php @@ -53,7 +53,21 @@ if (!$CONFIG->disable_registration) { system_message(sprintf(elgg_echo("registerok"),$CONFIG->sitename)); // Forward on success, assume everything else is an error... - forward(); + // If just registered admin user, login the user in and forward to the + // plugins simple settings page. + if (!datalist_get('first_admin_login')) { + login($new_user); + // remove the "you've registered!" system_message(); + $_SESSION['msg']['messages'] = array(); + + // remind users to enable / disable desired tools + elgg_add_admin_notice('first_installation_plugin_reminder', elgg_echo('firstadminlogininstructions')); + + datalist_set('first_admin_login', time()); + forward('pg/admin/plugins/simple'); + } else { + forward(); + } } else { register_error(elgg_echo("registerbad")); } diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php index 18440c62d..589e3a06c 100644 --- a/actions/systemsettings/install.php +++ b/actions/systemsettings/install.php @@ -10,8 +10,11 @@ * @link http://elgg.org/ */ +global $CONFIG; define('INSTALLING', TRUE); -elgg_set_viewtype('failsafe'); // Set failsafe again incase we get an exception thrown + +// Set failsafe again in case we get an exception thrown +elgg_set_viewtype('failsafe'); if (is_installed()) { forward(); @@ -43,7 +46,6 @@ if (get_input('settings') == 'go') { $site->name = get_input('sitename'); $site->url = $url; $site->description = get_input('sitedescription'); - $site->email = get_input('siteemail'); $site->access_id = ACCESS_PUBLIC; $guid = $site->save(); @@ -51,6 +53,12 @@ if (get_input('settings') == 'go') { throw new InstallationException(sprintf(elgg_echo('InstallationException:CantCreateSite'), get_input('sitename'), get_input('wwwroot'))); } + $site->email = get_input('siteemail'); + + // this is needed to grab plugins + $CONFIG->site_guid = $guid; + $CONFIG->site = $site; + datalist_set('installed',time()); datalist_set('path', $path); datalist_set('dataroot', $dataroot); @@ -94,16 +102,18 @@ if (get_input('settings') == 'go') { enable_plugin(trim($plugin), $site->getGUID()); } } else { - enable_plugin('profile', $site->getGUID()); - enable_plugin('logbrowser', $site->getGUID()); - enable_plugin('diagnostics', $site->getGUID()); - enable_plugin('uservalidationbyemail', $site->getGUID()); - enable_plugin('htmlawed', $site->getGUID()); - enable_plugin('search', $site->getGUID()); + // activate plugins with manifest.xml: elgg_install_state = enabled + $plugins = get_plugin_list(); + foreach ($plugins as $plugin) { + if ($manifest = load_plugin_manifest($plugin)) { + if (isset($manifest['elgg_install_state']) && $manifest['elgg_install_state'] == 'enabled') { + enable_plugin($plugin); + } + } + } } // reset the views path in case of installing over an old data dir. - // @todo should this warn / error first? $dataroot = datalist_get('dataroot'); $cache = new ElggFileCache($dataroot); $cache->delete('view_paths'); diff --git a/admin/index.php b/admin/index.php index 4ee190213..1d41306b6 100644 --- a/admin/index.php +++ b/admin/index.php @@ -13,4 +13,4 @@ require_once(dirname(dirname(__FILE__)) . "/engine/start.php"); // Make sure only valid admin users can see this admin_gatekeeper(); -forward('pg/admin/statistics/'); \ No newline at end of file +forward('pg/admin/overview/'); \ No newline at end of file diff --git a/admin/menu_items.php b/admin/menu_items.php deleted file mode 100644 index 5642957e1..000000000 --- a/admin/menu_items.php +++ /dev/null @@ -1,21 +0,0 @@ - get_register('menu') -); - -$main_box = elgg_view("admin/menu_items", $vars); -$content = elgg_view_layout("one_column_with_sidebar", $main_box); - -page_draw(elgg_echo('admin:plugins'), $content); \ No newline at end of file diff --git a/admin/plugins.php b/admin/plugins.php deleted file mode 100644 index 39478f153..000000000 --- a/admin/plugins.php +++ /dev/null @@ -1,49 +0,0 @@ - $plugin) { - $plugin_categories = $plugin['manifest']['category']; - - // handle plugins that don't declare categories - if ((!$plugin_categories && $show_category) || ($show_category && !in_array($show_category, $plugin_categories))) { - unset($installed_plugins[$i]); - } - - foreach ($plugin_categories as $category) { - if (!array_key_exists($category, $categories)) { - $categories[$category] = elgg_echo("admin:plugins:label:moreinfo:categories:$category"); - } - } -} - -// Display main admin menu -$vars = array( - 'installed_plugins' => $installed_plugins, - 'categories' => $categories, - 'show_category' => $show_category -); - -$main_box = elgg_view("admin/plugins", $vars); -$content = elgg_view_layout("one_column_with_sidebar", $main_box); - -page_draw(elgg_echo('admin:plugins'), $content); diff --git a/admin/site.php b/admin/site.php deleted file mode 100644 index aed952318..000000000 --- a/admin/site.php +++ /dev/null @@ -1,23 +0,0 @@ -".elgg_list_entities(array('type' => 'user', 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE)).""; - -set_context('admin'); - -// Display main admin menu -page_draw(elgg_echo("admin:user"), - elgg_view_layout("one_column_with_sidebar", $title . elgg_view("admin/user") . $result)); diff --git a/engine/lib/actions.php b/engine/lib/actions.php index 7e8e43f40..304179828 100644 --- a/engine/lib/actions.php +++ b/engine/lib/actions.php @@ -236,5 +236,18 @@ function get_site_secret() { return $secret; } +/** + * Check if an action is registered and its file exists. + * + * @param string $action + * @return BOOL + * @since 1.8 + */ +function elgg_action_exist($action) { + global $CONFIG; + + return (isset($CONFIG->actions[$action]) && file_exists($CONFIG->actions[$action]['file'])); +} + // Register some actions *************************************************** register_elgg_event_handler("init","system","actions_init"); diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 8d9ffeba0..73e891332 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -28,53 +28,108 @@ * @param string $view The view to extend, by default this is 'admin/main'. * @param int $priority Optional priority to govern the appearance in the list. */ -function extend_elgg_admin_page( $new_admin_view, $view = 'admin/main', $priority = 500) { - return elgg_extend_view($view, $new_admin_view, $priority); +function extend_elgg_admin_page($new_admin_view, $view = 'admin/main', $priority = 500) { + elgg_deprecated_notice('extend_elgg_admin_page() does nothing now. Extend admin views manually. See http://docs.elgg.org/', 1.8); + //return elgg_extend_view($view, $new_admin_view, $priority); } /** - * Initialise the admin page. + * Add an admin area section or child section (aka tab). + * + * Used in conjuction with http://elgg.org/admin/section/child_section style + * page handler. + * + * @param string $section_id Globally unique section id. + * @param string $section_title Human readable section title. + * @param string $parent_id If a child section, the parent section id. Cannot have grandchildren. */ -function admin_init() { - // Add plugin main menu option (last) - extend_elgg_admin_page('admin/main_opt/statistics', 'admin/main'); - extend_elgg_admin_page('admin/main_opt/site', 'admin/main'); - extend_elgg_admin_page('admin/main_opt/user', 'admin/main'); - extend_elgg_admin_page('admin/main_opt/plugins', 'admin/main', 999); // Always last - - register_action('admin/user/ban', false, "", true); - register_action('admin/user/unban', false, "", true); - register_action('admin/user/delete', false, "", true); - register_action('admin/user/resetpassword', false, "", true); - register_action('admin/user/makeadmin', false, "", true); - register_action('admin/user/removeadmin', false, "", true); - register_action('admin/site/update_basic', false, "", true); - register_action('admin/menu_items', false, "", true); - - - // Page handler - register_page_handler('admin', 'admin_settings_page_handler'); +function elgg_add_admin_section($section_id, $section_title, $parent_id = NULL) { + global $CONFIG; + + if (!isset($CONFIG->admin_sections)) { + $CONFIG->admin_sections = array(); + } + + // have to support adding a child section to a missing parent + // because of plugin order problems. A plugin can extend + // an admin section added by different plugin lower in the load priority. + if ($parent_id) { + if (!isset($CONFIG->admin_sections[$parent_id])) { + $CONFIG->admin_sections[$parent_id] = array('children' => array()); + } + + if (!isset($CONFIG->admin_sections[$parent_id][$section_id])) { + $CONFIG->admin_sections[$parent_id]['children'][$section_id] = array('title' => $section_title); + return TRUE; + } else { + return FALSE; + } + } else { + // children can be defined before parents + if (!isset($CONFIG->admin_sections[$section_id])) { + $CONFIG->admin_sections[$section_id] = array( + 'title' => $section_title, + 'children' => array() + ); + return TRUE; + } else { + // allow to define this since children can be defined before the parent. + $CONFIG->admin_sections[$section_id] = array( + 'title' => $section_title + ); + } + } } /** - * Add submenu items for admin page. - * - * @return unknown_type + * Initialise the admin page. */ -function admin_pagesetup() { - if (get_context() == 'admin') { - global $CONFIG; - - add_submenu_item(elgg_echo('admin:statistics'), $CONFIG->wwwroot . 'pg/admin/statistics/'); - add_submenu_item(elgg_echo('admin:site'), $CONFIG->wwwroot . 'pg/admin/site/'); - add_submenu_item(elgg_echo('admin:user'), $CONFIG->wwwroot . 'pg/admin/user/'); - add_submenu_item(elgg_echo('admin:plugins'), $CONFIG->wwwroot . 'pg/admin/plugins/'); - add_submenu_item(elgg_echo('admin:menu_items'), $CONFIG->wwwroot . 'pg/admin/menu_items/'); - } +function admin_init() { + register_action('admin/user/ban', FALSE, "", TRUE); + register_action('admin/user/unban', FALSE, "", TRUE); + register_action('admin/user/delete', FALSE, "", TRUE); + register_action('admin/user/resetpassword', FALSE, "", TRUE); + register_action('admin/user/makeadmin', FALSE, "", TRUE); + register_action('admin/user/removeadmin', FALSE, "", TRUE); + + register_action('admin/site/update_basic', FALSE, "", TRUE); + register_action('admin/site/update_advanced', FALSE, "", TRUE); + + register_action('admin/menu_items', FALSE, "", TRUE); + + register_action('admin/plugins/simple_update_states', FALSE, '', TRUE); + + + // admin area overview and basic site settings + elgg_add_admin_section('overview', elgg_echo('admin:overview')); + elgg_add_admin_section('site', elgg_echo('admin:site')); + elgg_add_admin_section('basic', elgg_echo('admin:site:basic'), 'site'); + elgg_add_admin_section('advanced', elgg_echo('admin:site:advanced'), 'site'); + + // appearance + elgg_add_admin_section('appearance', elgg_echo('admin:appearance')); + //elgg_add_admin_section('basic', elgg_echo('admin:appearance'), 'appearance'); + elgg_add_admin_section('menu_items', elgg_echo('admin:menu_items'), 'appearance'); + + // users + elgg_add_admin_section('users', elgg_echo('admin:users')); + elgg_add_admin_section('online', elgg_echo('admin:users:online'), 'users'); + elgg_add_admin_section('add', elgg_echo('admin:users:add'), 'users'); + elgg_add_admin_section('find', elgg_echo('admin:users:find'), 'users'); + + // plugins + elgg_add_admin_section('plugins', elgg_echo('admin:plugins')); + elgg_add_admin_section('simple', elgg_echo('admin:plugins:simple'), 'plugins'); + elgg_add_admin_section('advanced', elgg_echo('admin:plugins:advanced'), 'plugins'); + + // handled in the admin sidemenu so we don't have to generate this on every page load. + //elgg_add_admin_section('plugin_settings', elgg_echo('admin:plugin_settings')); + + register_page_handler('admin', 'admin_settings_page_handler'); } /** - * Handle admin pages. + * Handle admin pages. Expects corresponding views as admin/section/subsection * * @param $page * @return unknown_type @@ -82,72 +137,124 @@ function admin_pagesetup() { function admin_settings_page_handler($page) { global $CONFIG; - $path = $CONFIG->path . "admin/index.php"; + admin_gatekeeper(); - if ($page[0]) { - switch ($page[0]) { - case 'user' : $path = $CONFIG->path . "admin/user.php"; break; - case 'statistics' : $path = $CONFIG->path . "admin/statistics.php"; break; - case 'plugins' : $path = $CONFIG->path . "admin/plugins.php"; break; - case 'site' : $path = $CONFIG->path . "admin/site.php"; break; - case 'menu_items' : $path = $CONFIG->path . 'admin/menu_items.php'; break; - } + // default to overview + if (!isset($page[0]) || empty($page[0])) { + $page = array('overview'); } - if ($page[1]) { - set_input('username', $page[1]); + // was going to fix this in the page_handler() function but + // it's commented to explicitly return a string if there's a trailing / + if (empty($page[count($page)-1])) { + array_pop($page); } - include($path); + $vars = array('page' => $page); + + // special page for plugin settings since we create the form for them + if ($page[0] == 'plugin_settings' && isset($page[1]) && elgg_view_exists("settings/{$page[1]}/edit")) { + $view = '/admin/components/plugin_settings'; + $vars['plugin'] = $page[1]; + $vars['entity'] = find_plugin_settings($page[1]); + $title = elgg_echo("admin:plugin_settings:{$page[1]}"); + } else { + $view = 'admin/' . implode('/', $page); + $title = elgg_echo('admin:' . implode(':', $page)); + } + + // allow a place to store helper views outside of the web-accessible views + if ($page[0] == 'components' || !($content = elgg_view($view, $vars))) { + $title = elgg_echo('admin:unknown_section'); + $content = elgg_echo('admin:unknown_section'); + } + + $body = elgg_view('admin/components/admin_page_layout', array('content' => $content, 'page' => $page)); + page_draw($title, $body); } /** - * Write a persistent message to the administrator's notification window. + * Write a persistent message to the admin view. + * Useful to alert the admin to take a certain action. + * The id is a unique ID that can be cleared once the admin + * completes the action. * - * Currently this writes a message to the admin store, we may want to come up with another way at some point. + * eg: add_admin_notice('twitter_service_no_api', + * 'Before your users can use Twitter services on this site, you must set up + * the Twitter API key in the Twitter Services Settings'); * - * @param string $subject Subject of the message + * @param string $id A unique ID that your plugin can remember * @param string $message Body of the message */ -function send_admin_message($subject, $message) { - $subject = sanitise_string($subject); - $message = sanitise_string($message); - - if (($subject) && ($message)) { - $admin_message = new ElggObject(); - $admin_message->subtype = 'admin_message'; - $admin_message->access_id = ACCESS_PUBLIC; - $admin_message->title = $subject; - $admin_message->description = $message; - - return $admin_message->save(); +function elgg_add_admin_notice($id, $message) { + if ($id && $message) { + $admin_notice = new ElggObject(); + $admin_notice->subtype = 'admin_notice'; + // admins can see ACCESS_PRIVATE but no one else can. + $admin_notice->access_id = ACCESS_PRIVATE; + $admin_notice->admin_notice_id = $id; + $admin_notice->description = $message; + + return $admin_notice->save(); } return false; } + +/** + * Remove an admin notice by ID. + * + * eg In actions/twitter_service/save_settings: + * if (is_valid_twitter_api_key()) { + * delete_admin_notice('twitter_services_no_api'); + * } + * + * @param string $id The unique ID assigned in add_admin_notice() + */ +function elgg_delete_admin_notice($id) { + if (!$id) { + return FALSE; + } + $result = TRUE; + if ($notices = elgg_get_entities_from_metadata(array('metadata_name' => 'admin_notice_id', 'metadata_value' => $id))) { + // in case a bad plugin adds many, let it remove them all at once. + foreach ($notices as $notice) { + $result = ($result && $notice->delete()); + } + return $result; + } + return FALSE; +} + /** * List all admin messages. * * @param int $limit Limit */ -function list_admin_messages($limit = 10) { - return elgg_list_entities(array( +function elgg_get_admin_notices($limit = 10) { + return elgg_get_entities_from_metadata(array( 'type' => 'object', - 'subtype' => 'admin_message', + 'subtype' => 'admin_notice', 'limit' => $limit )); } /** - * Remove an admin message. - * - * @param int $guid The + * Check if an admin notice is currently active. + * @param string $id The unique ID used to register the notice. */ -function clear_admin_message($guid) { - return delete_entity($guid); +function elgg_admin_notice_exists($id) { + $notice = elgg_get_entities_from_metadata(array( + 'type' => 'object', + 'subtype' => 'admin_notice', + 'metadata_name_value_pair' => array('name' => 'admin_notice_id', 'value' => $id) + )); + + return ($notice) ? TRUE : FALSE; } -/// Register init functions + +// Register init functions register_elgg_event_handler('init', 'system', 'admin_init'); register_elgg_event_handler('pagesetup', 'system', 'admin_pagesetup'); diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 0e62914e2..b365585c8 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -354,6 +354,11 @@ function load_plugin_manifest($plugin) { } } + // handle plugins that don't define a name + if (!isset($elements['name'])) { + $elements['name'] = ucwords($plugin); + } + return $elements; } @@ -677,6 +682,10 @@ function enable_plugin($plugin, $site_guid = 0) { throw new InvalidClassException(sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $site_guid, "ElggSite")); } + if (!$plugin_info = load_plugin_manifest($plugin)) { + return FALSE; + } + // getMetadata() doesn't return an array if only one plugin is enabled if ($enabled = $site->enabled_plugins) { if (!is_array($enabled)) { @@ -689,8 +698,42 @@ function enable_plugin($plugin, $site_guid = 0) { $enabled[] = $plugin; $enabled = array_unique($enabled); - $return = $site->setMetaData('enabled_plugins', $enabled); - $ENABLED_PLUGINS_CACHE = $enabled; + if ($return = $site->setMetaData('enabled_plugins', $enabled)) { + + // for other plugins that want to hook into this. + if ($return && !trigger_elgg_event('enable', 'plugin', array('plugin' => $plugin, 'manifest' => $plugin_info))) { + $return = FALSE; + } + + // for this plugin's on_enable + if ($return && isset($plugin_info['on_enable'])) { + // pull in the actual plugin's start so the on_enable function is callabe + // NB: this will not run re-run the init hooks! + $start = "{$CONFIG->pluginspath}$plugin/start.php"; + if (!file_exists($start) || !include($start)) { + $return = FALSE; + } + + // need language files for the messages + $translations = "{$CONFIG->pluginspath}$plugin/languages/"; + register_translations($translations); + if (!is_callable($plugin_info['on_enable'])) { + $return = FALSE; + } else { + $on_enable = call_user_func($plugin_info['on_enable']); + // allow null to mean "I don't care" like other subsystems + $return = ($on_disable === FALSE) ? FALSE : TRUE; + } + } + + // disable the plugin if the on_enable or trigger results failed + if (!$return) { + array_pop($enabled); + $site->setMetaData('enabled_plugins', $enabled); + } + + $ENABLED_PLUGINS_CACHE = $enabled; + } return $return; } @@ -721,6 +764,10 @@ function disable_plugin($plugin, $site_guid = 0) { throw new InvalidClassException(sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $site_guid, "ElggSite")); } + if (!$plugin_info = load_plugin_manifest($plugin)) { + return FALSE; + } + // getMetadata() doesn't return an array if only one plugin is enabled if ($enabled = $site->enabled_plugins) { if (!is_array($enabled)) { @@ -730,6 +777,8 @@ function disable_plugin($plugin, $site_guid = 0) { $enabled = array(); } + $old_enabled = $enabled; + // remove the disabled plugin from the array if (FALSE !== $i = array_search($plugin, $enabled)) { unset($enabled[$i]); @@ -738,7 +787,32 @@ function disable_plugin($plugin, $site_guid = 0) { // if we're unsetting all the plugins, this will return an empty array. // it will fail with FALSE, though. $return = (FALSE === $site->enabled_plugins = $enabled) ? FALSE : TRUE; - $ENABLED_PLUGINS_CACHE = $enabled; + + if ($return) { + // for other plugins that want to hook into this. + if ($return && !trigger_elgg_event('disable', 'plugin', array('plugin' => $plugin, 'manifest' => $plugin_info))) { + $return = FALSE; + } + + // for this plugin's on_disable + if ($return && isset($plugin_info['on_disable'])) { + if (!is_callable($plugin_info['on_disable'])) { + $return = FALSE; + } else { + $on_disable = call_user_func($plugin_info['on_disable']); + // allow null to mean "I don't care" like other subsystems + $return = ($on_disable === FALSE) ? FALSE : TRUE; + } + } + + // disable the plugin if the on_enable or trigger results failed + if (!$return) { + $site->enabled_plugins = $old_enabled; + $ENABLED_PLUGINS_CACHE = $old_enabled; + } else { + $ENABLED_PLUGINS_CACHE = $enabled; + } + } return $return; } diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php index f4b1fc69b..b5b68ebe0 100644 --- a/engine/lib/sessions.php +++ b/engine/lib/sessions.php @@ -417,13 +417,6 @@ function login(ElggUser $user, $persistent = false) { set_last_login($_SESSION['guid']); reset_login_failure_count($user->guid); // Reset any previous failed login attempts - // Set admin shortcut flag if this is an admin -// if (isadminloggedin()) { -// //@todo REMOVE THIS. -// global $is_admin; -// $is_admin = true; -// } - return true; } diff --git a/languages/en.php b/languages/en.php index aab05c8f4..83a7c5159 100644 --- a/languages/en.php +++ b/languages/en.php @@ -382,7 +382,7 @@ To remove a widget drag it back to the Widget gallery.", 'registerbad' => "Your registration was unsuccessful. The username may already exist, your passwords might not match, or your username or password may be too short.", 'registerdisabled' => "Registration has been disabled by the system administrator", - 'firstadminlogininstructions' => 'Your new Elgg site has been successfully installed and your administrator account created. You can now configure your site further by enabling various installed plugin tools.', + 'firstadminlogininstructions' => "Enable and disable plugins to customize your new Elgg site! (Remember to hit 'Save' when you're done.)", 'registration:notemail' => 'The email address you provided does not appear to be a valid email address.', 'registration:userexists' => 'That username already exists', @@ -436,19 +436,29 @@ To remove a widget drag it back to the Widget gallery.", 'admin:configuration:success' => "Your settings have been saved.", 'admin:configuration:fail' => "Your settings could not be saved.", + 'admin:unknown_section' => 'Invalid Admin Section.', + 'admin' => "Administration", 'admin:description' => "The admin panel allows you to control all aspects of the system, from user management to how plugins behave. Choose an option below to get started.", - 'admin:user' => "User Administration", - 'admin:user:description' => "This admin panel allows you to control user settings for your site. Choose an option below to get started.", - 'admin:user:adduser:label' => "Click here to add a new user...", - 'admin:user:opt:linktext' => "Configure users...", - 'admin:user:opt:description' => "Configure users and account information. ", + 'admin:overview' => 'Overview', + + 'admin:appearance' => 'Appearance', + + 'admin:users' => "Users", + 'admin:users:online' => 'Currently Online', + 'admin:users:add' => 'Add', + 'admin:users:description' => "This admin panel allows you to control user settings for your site. Choose an option below to get started.", + 'admin:users:adduser:label' => "Click here to add a new user...", + 'admin:users:opt:linktext' => "Configure users...", + 'admin:users:opt:description' => "Configure users and account information. ", + 'admin:users:find' => 'Find', - 'admin:site' => "Site Administration", + 'admin:site' => "Site Settings", + 'admin:site:basic' => 'Basic', + 'admin:site:advanced' => 'Advanced', 'admin:site:description' => "This admin panel allows you to control global settings for your site. Choose an option below to get started.", 'admin:site:opt:linktext' => "Configure site...", - 'admin:site:opt:description' => "Configure the site technical and non-technical settings. ", 'admin:site:access:warning' => "Changing the access setting only affects the permissions on content created in the future.", /** @@ -460,7 +470,7 @@ To remove a widget drag it back to the Widget gallery.", 'plugins:usersettings:save:fail' => "There was a problem saving user settings for the %s plugin.", 'item:object:plugin' => 'Plugin configuration settings', - 'admin:plugins' => "Tool Administration", + 'admin:plugins' => "Plugins", 'admin:plugins:description' => "This admin panel allows you to control and configure tools installed on your site.", 'admin:plugins:opt:linktext' => "Configure tools...", 'admin:plugins:opt:description' => "Configure the tools installed on the site. ", @@ -481,6 +491,14 @@ To remove a widget drag it back to the Widget gallery.", 'admin:plugins:enable:yes' => "Plugin %s was enabled successfully.", 'admin:plugins:enable:no' => "Plugin %s could not be enabled.", 'admin:plugins:categories:all' => 'All categories', + 'admin:plugins:plugin_website' => 'Plugin website', + 'admin:plugins:author' => '%s', + 'admin:plugins:version' => 'Version %s', + 'admin:plugins:simple' => 'Simple', + 'admin:plugins:advanced' => 'Advanced', + 'admin:plugin_settings' => 'Plugin Settings', + 'admin:plugins:simple_simple_fail' => 'Could not save settings.', + 'admin:plugins:simple_simple_success' => 'Settings saved.', 'admin:statistics' => "Statistics", 'admin:statistics:description' => "This is an overview of statistics on your site. If you need more detailed statistics, a professional administration feature is available.", @@ -555,6 +573,7 @@ To remove a widget drag it back to the Widget gallery.", */ 'save' => "Save", + 'reset' => 'Reset', 'publish' => "Publish", 'cancel' => "Cancel", 'saving' => "Saving ...", @@ -742,12 +761,12 @@ Alternatively, you can enter your database settings below and we will try and do 'installation:settings:dbwizard:savefail' => "We were unable to save the new settings.php. Please save the following file as engine/settings.php using a text editor.", - 'installation:sitename' => "The name of your site (eg \"My social networking site\"):", - 'installation:sitedescription' => "Short description of your site (optional)", - 'installation:wwwroot' => "The site URL, followed by a trailing slash:", - 'installation:path' => "The full path to your site root on your disk, followed by a trailing slash:", - 'installation:dataroot' => "The full path to the directory where uploaded files will be stored, followed by a trailing slash:", - 'installation:dataroot:warning' => "You must create this directory manually. It should sit in a different directory to your Elgg installation.", + 'installation:sitename' => "The name of your site:", + 'installation:sitedescription' => "Short description of your site (optional):", + 'installation:wwwroot' => "The site URL:", + 'installation:path' => "The full path of the Elgg installation:", + 'installation:dataroot' => "The full path the data directory:", + 'installation:dataroot:warning' => "You must create this directory manually. It should be in a different directory to your Elgg installation.", 'installation:sitepermissions' => "The default access permissions:", 'installation:language' => "The default language for your site:", 'installation:debug' => "Debug mode provides extra information which can be used to diagnose faults. However, it can slow your system down so should only be used if you are having problems:", @@ -759,7 +778,7 @@ Alternatively, you can enter your database settings below and we will try and do 'installation:httpslogin:label' => "Enable HTTPS logins", 'installation:view' => "Enter the view which will be used as the default for your site or leave this blank for the default view (if in doubt, leave as default):", - 'installation:siteemail' => "Site email address (used when sending system emails)", + 'installation:siteemail' => "Site email address (used when sending system emails):", 'installation:disableapi' => "The RESTful API is a flexible and extensible interface that enables applications to use certain Elgg features remotely.", 'installation:disableapi:label' => "Enable the RESTful API", diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml index 483e83fab..d88eaa994 100644 --- a/mod/blog/manifest.xml +++ b/mod/blog/manifest.xml @@ -1,10 +1,12 @@ - - - - - - - + + + + + + + + + diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php index bb900e311..2b3366e48 100644 --- a/mod/blog/views/default/blog/forms/edit.php +++ b/mod/blog/views/default/blog/forms/edit.php @@ -147,6 +147,8 @@ $publish_date_input = elgg_view('input/datetime', array( 'value' => $values['publish_date'] )); +$categories_input = elgg_view('categories', $vars); + // hidden inputs //$container_guid_input = elgg_view('input/hidden', array('internalname' => 'container_guid', 'value' => $values['container_guid'])); $guid_input = elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $values['guid'])); @@ -202,13 +204,13 @@ $body_input $access_input

- -

$status_input

+$categories_input + $guid_input $container_guid_input $forward_input diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml index 687b62a7e..eab7ba9c6 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -1,10 +1,12 @@ - - - - - - - + + + + + + + + + diff --git a/mod/captcha/manifest.xml b/mod/captcha/manifest.xml index ef8b66775..60b7e2551 100644 --- a/mod/captcha/manifest.xml +++ b/mod/captcha/manifest.xml @@ -7,4 +7,5 @@ + diff --git a/mod/categories/actions/save.php b/mod/categories/actions/save.php index 21602f659..3e93b6325 100644 --- a/mod/categories/actions/save.php +++ b/mod/categories/actions/save.php @@ -1,5 +1,4 @@ site; $site->categories = $categories; system_message(elgg_echo("categories:save:success")); -forward($_SERVER['HTTP_REFERER']); +elgg_delete_admin_notice('categories_admin_notice_no_categories'); +forward($_SERVER['HTTP_REFERER']); \ No newline at end of file diff --git a/mod/categories/languages/en.php b/mod/categories/languages/en.php index 588c194e4..cbe5a608f 100644 --- a/mod/categories/languages/en.php +++ b/mod/categories/languages/en.php @@ -1,15 +1,12 @@ 'Categories', - 'categories:settings' => 'Set site categories', - 'categories:explanation' => 'To set some predefined site-wide categories that will be used throughout your system, enter them below, separated with commas. Compatible tools will then display them when the user creates or edits content.', - 'categories:save:success' => 'Site categories were successfully saved.', - 'categories:results' => "Results for the site category: %s", - - ); - - add_translation("en",$english); +$english = array( + 'categories' => 'Categories', + 'categories:settings' => 'Set site categories', + 'categories:explanation' => 'To set some predefined site-wide categories that will be used throughout your system, enter them below, separated with commas. Compatible tools will then display them when the user creates or edits content.', + 'categories:save:success' => 'Site categories were successfully saved.', + 'categories:results' => "Results for the site category: %s", + 'categories:on_enable_reminder' => "You haven't added any categories yet! Add categories now.", +); -?> \ No newline at end of file +add_translation("en",$english); \ No newline at end of file diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml index 443872e57..635543ee3 100644 --- a/mod/categories/manifest.xml +++ b/mod/categories/manifest.xml @@ -1,10 +1,14 @@ - - - - - - - + + + + + + + + + + + diff --git a/mod/categories/settings.php b/mod/categories/settings.php deleted file mode 100644 index 260b057c3..000000000 --- a/mod/categories/settings.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - -// Load engine and restrict to admins -require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php'); -admin_gatekeeper(); - -// Set context -set_context('admin'); - -// Get site and categories -global $CONFIG; -$site = $CONFIG->site; -$categories = $site->categories; - -if (empty($categories)) { - $categories = array(); -} - -// Load category save view -$body = elgg_view('categories/settings',array('categories' => $categories)); - - -$body = elgg_view_layout('two_column_left_sidebar', '', $body); - -page_draw(elgg_echo('categories:settings'), $body); diff --git a/mod/categories/start.php b/mod/categories/start.php index dd6da16d5..60ee01065 100644 --- a/mod/categories/start.php +++ b/mod/categories/start.php @@ -15,52 +15,39 @@ * */ function categories_init() { - global $CONFIG; elgg_extend_view('css', 'categories/css'); - register_action('categories/save',false,$CONFIG->pluginspath . 'categories/actions/save.php',true); + register_action('settings/categories/save', FALSE, $CONFIG->pluginspath . 'categories/actions/save.php', TRUE); register_page_handler('categories', 'categories_page_handler'); + register_elgg_event_handler('update','all','categories_save'); + register_elgg_event_handler('create','all','categories_save'); } -/** - * Set up admin menu item - * - */ -function categories_pagesetup() { - if (get_context() == 'admin' && isadminloggedin()) { - global $CONFIG; - add_submenu_item(elgg_echo('categories:settings'), $CONFIG->wwwroot . 'mod/categories/settings.php'); - } -} /** * Page handler * */ function categories_page_handler() { - include(dirname(__FILE__) . "/listing.php"); - return true; + return TRUE; } /** - * Save site categories + * Save site categories to and object upon save / edit * */ function categories_save($event, $object_type, $object) { - if ($object instanceof ElggEntity) { - $marker = get_input('universal_category_marker'); if ($marker == 'on') { - $categories = get_input('universal_categories_list'); - + if (empty($categories)) { $categories = array(); } @@ -68,12 +55,26 @@ function categories_save($event, $object_type, $object) { $object->universal_categories = $categories; } } + return TRUE; +} - return true; +/** + * Add a reminder to set default categories. + */ +function categories_on_enable() { + if (!$site->categories) { + global $CONFIG; + $message = sprintf(elgg_echo('categories:on_enable_reminder'), "{$CONFIG->url}pg/admin/plugin_settings/categories"); + elgg_add_admin_notice('categories_admin_notice_no_categories', $message); + } + return TRUE; } +/** + * Clean up admin notices on disable. + */ +function categories_on_disable() { + elgg_delete_admin_notice('categories_admin_notice_no_categories'); +} -register_elgg_event_handler('init','system','categories_init'); -register_elgg_event_handler('pagesetup','system','categories_pagesetup'); -register_elgg_event_handler('update','all','categories_save'); -register_elgg_event_handler('create','all','categories_save'); +register_elgg_event_handler('init','system','categories_init'); \ No newline at end of file diff --git a/mod/categories/views/default/categories/css.php b/mod/categories/views/default/categories/css.php index d2cf5a8a8..6dfe60047 100644 --- a/mod/categories/views/default/categories/css.php +++ b/mod/categories/views/default/categories/css.php @@ -1,11 +1,11 @@ .categories .input-checkboxes { @@ -25,13 +25,13 @@ } #two_column_left_sidebar_maincontent .contentWrapper .categories { border:1px solid #CCCCCC; - -webkit-border-radius: 4px; + -webkit-border-radius: 4px; -moz-border-radius: 4px; padding:5px; - margin:0 0 15px 0; + margin:0 0 15px 0; } #two_column_left_sidebar_maincontent .contentWrapper .categories p { - margin:0; + margin:0; } #two_column_left_sidebar_maincontent .contentWrapper .blog_post .categories { border:none; @@ -41,10 +41,10 @@ #two_column_left_sidebar .blog_categories { background:white; - -webkit-border-radius: 8px; + -webkit-border-radius: 8px; -moz-border-radius: 8px; - padding:10px; - margin:0 10px 10px 10px; + padding:10px; + margin:0 10px 10px 10px; } #two_column_left_sidebar .blog_categories h2 { background:none; diff --git a/mod/categories/views/default/categories/settings.php b/mod/categories/views/default/categories/settings.php deleted file mode 100644 index 7f38b6579..000000000 --- a/mod/categories/views/default/categories/settings.php +++ /dev/null @@ -1,24 +0,0 @@ - - -
-

- -

- - - $vars['url'] . 'action/categories/save', - 'method' => 'post', - 'body' => elgg_view('categories/settingsform',$vars) - ) - ); - - ?> - -
\ No newline at end of file diff --git a/mod/categories/views/default/categories/settingsform.php b/mod/categories/views/default/categories/settingsform.php deleted file mode 100644 index 044f01dcd..000000000 --- a/mod/categories/views/default/categories/settingsform.php +++ /dev/null @@ -1,7 +0,0 @@ - $vars['categories'], - 'internalname' => 'categories')); - -?> - \ No newline at end of file diff --git a/mod/categories/views/default/settings/categories/edit.php b/mod/categories/views/default/settings/categories/edit.php new file mode 100644 index 000000000..3742fd1e6 --- /dev/null +++ b/mod/categories/views/default/settings/categories/edit.php @@ -0,0 +1,28 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ + +// Get site and categories +$site = $CONFIG->site; +$categories = $site->categories; + +if (empty($categories)) { + $categories = array(); +} + +?> +
+

+ +

+ $categories, 'internalname' => 'categories')); + ?> +
\ No newline at end of file diff --git a/mod/crontrigger/manifest.xml b/mod/crontrigger/manifest.xml index 3728534b5..8058ebb1e 100644 --- a/mod/crontrigger/manifest.xml +++ b/mod/crontrigger/manifest.xml @@ -7,4 +7,5 @@ - \ No newline at end of file + + diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml index 2fb36cf22..16e648f54 100644 --- a/mod/custom_index/manifest.xml +++ b/mod/custom_index/manifest.xml @@ -1,10 +1,11 @@ - - - - - - - + + + + + + + + diff --git a/mod/defaultwidgets/manifest.xml b/mod/defaultwidgets/manifest.xml index 8388e5803..2fa825d6c 100644 --- a/mod/defaultwidgets/manifest.xml +++ b/mod/defaultwidgets/manifest.xml @@ -1,9 +1,11 @@ - - - - - - + + + + + + + + diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml index f9a725966..1e1df8881 100644 --- a/mod/diagnostics/manifest.xml +++ b/mod/diagnostics/manifest.xml @@ -7,4 +7,5 @@ - \ No newline at end of file + + diff --git a/mod/ecml/manifest.xml b/mod/ecml/manifest.xml index f74c78de0..77ece69de 100644 --- a/mod/ecml/manifest.xml +++ b/mod/ecml/manifest.xml @@ -11,4 +11,6 @@ + + diff --git a/mod/ecml/start.php b/mod/ecml/start.php index 4ea50766e..c0ce1d4d6 100644 --- a/mod/ecml/start.php +++ b/mod/ecml/start.php @@ -36,7 +36,7 @@ function ecml_init() { elgg_extend_view('css', 'ecml/admin/css'); // admin action to save permissions - register_action('ecml/save_permissions', FALSE, dirname(__FILE__) . '/actions/save_permissions.php', TRUE); + register_action('settings/ecml/save', FALSE, dirname(__FILE__) . '/actions/save_permissions.php', TRUE); // show ECML-enabled icon on free-text input areas elgg_extend_view('input/longtext', 'ecml/input_ext', 0); @@ -78,7 +78,7 @@ function ecml_init() { function ecml_pagesetup(){ if (get_context() == 'admin' && isadminloggedin()) { global $CONFIG; - add_submenu_item(elgg_echo('ecml'), $CONFIG->wwwroot . 'pg/ecml_admin'); + } } diff --git a/mod/ecml/views/default/ecml/admin/ecml_admin.php b/mod/ecml/views/default/ecml/admin/ecml_admin.php deleted file mode 100644 index b7038b54c..000000000 --- a/mod/ecml/views/default/ecml/admin/ecml_admin.php +++ /dev/null @@ -1,143 +0,0 @@ -ecml_parse_views; -$keywords = $vars['config']->ecml_keywords; -$perms = $vars['config']->ecml_permissions; - -ksort($views); -ksort($keywords); - -echo elgg_view_title(elgg_echo('ecml:admin')); -echo '

' . elgg_echo('ecml:admin:instruction') . '

'; - -// yes I'm using a table because this is table. -$form_body = <<<___END - - - -___END; - -foreach ($views as $view => $view_desc) { - $form_body .= ""; - $n++; -} -$form_body .= ''; - -$odd = 'odd'; -foreach ($keywords as $keyword => $keyword_info) { - $keyword_desc = $keyword_info['description']; - if (isset($keyword_info['restricted'])) { - $restricted = elgg_echo('ecml:admin:restricted'); - $form_body .= " - - - "; - } else { - $form_body .= " - - - "; - } - foreach ($views as $view => $view_info) { - // if this is restricted and we're not on the specified view don't allow changes - // since we don't save this, no need to pass a name - if (isset($keyword_info['restricted'])) { - $checked = (in_array($view, $keyword_info['restricted'])) ? 'checked="checked"' : ''; - $form_body .= ""; - } else { - $checked = (!in_array($keyword, $perms[$view])) ? 'checked="checked"' : ''; - - // ooook. input/checkboxes isn't overly useful. - // do it ourself. - $form_body .= ""; - } - } - $form_body .= ''; - - $odd = ($odd == 'odd') ? 'even' : 'odd'; -} - -$form_body .= '
 $view_desc
$keyword ($restricted)
$keyword
'; -$form_body .= elgg_view('input/submit', array('value' => elgg_echo('submit'))); -$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'class' => 'cancel_button')); - -echo elgg_view('input/form', array( - 'body' => $form_body, - 'action' => $vars['url'] . 'action/ecml/save_permissions' -)); - -?> - diff --git a/mod/ecml/views/default/settings/ecml/edit.php b/mod/ecml/views/default/settings/ecml/edit.php new file mode 100644 index 000000000..1ad88aa9b --- /dev/null +++ b/mod/ecml/views/default/settings/ecml/edit.php @@ -0,0 +1,137 @@ +ecml_parse_views; +$keywords = $vars['config']->ecml_keywords; +$perms = $vars['config']->ecml_permissions; + +ksort($views); +ksort($keywords); + +echo '

' . elgg_echo('ecml:admin:instruction') . '

'; + +// yes I'm using a table because this is table. +$form_body = <<<___END + + + +___END; + +foreach ($views as $view => $view_desc) { + $form_body .= ""; + $n++; +} +$form_body .= ''; + +$odd = 'odd'; +foreach ($keywords as $keyword => $keyword_info) { + $keyword_desc = $keyword_info['description']; + if (isset($keyword_info['restricted'])) { + $restricted = elgg_echo('ecml:admin:restricted'); + $form_body .= " + + + "; + } else { + $form_body .= " + + + "; + } + foreach ($views as $view => $view_info) { + // if this is restricted and we're not on the specified view don't allow changes + // since we don't save this, no need to pass a name + if (isset($keyword_info['restricted'])) { + $checked = (in_array($view, $keyword_info['restricted'])) ? 'checked="checked"' : ''; + $form_body .= ""; + } else { + $checked = (!in_array($keyword, $perms[$view])) ? 'checked="checked"' : ''; + + // ooook. input/checkboxes isn't overly useful. + // do it ourself. + $form_body .= ""; + } + } + $form_body .= ''; + + $odd = ($odd == 'odd') ? 'even' : 'odd'; +} + +$form_body .= '
 $view_desc
$keyword ($restricted)
$keyword
'; + +echo $form_body; + +?> + diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index a14e99b4b..f0f82a699 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -7,4 +7,6 @@ + + diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index 3793d7803..52da20256 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -1,10 +1,12 @@ - - - - - - - + + + + + + + + + diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml index f3f44d3bf..444d2ac80 100644 --- a/mod/file/manifest.xml +++ b/mod/file/manifest.xml @@ -1,10 +1,11 @@ - - - - - - - + + + + + + + + diff --git a/mod/friends/manifest.xml b/mod/friends/manifest.xml index faed8ce63..8cdd8c6bd 100644 --- a/mod/friends/manifest.xml +++ b/mod/friends/manifest.xml @@ -7,4 +7,5 @@ + diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml index 805cce48e..a806dd916 100644 --- a/mod/garbagecollector/manifest.xml +++ b/mod/garbagecollector/manifest.xml @@ -7,4 +7,6 @@ - \ No newline at end of file + + + diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml index 86a7dfa1d..523b060ac 100644 --- a/mod/groups/manifest.xml +++ b/mod/groups/manifest.xml @@ -7,4 +7,6 @@ + + diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml index e71e614d0..045a9a670 100644 --- a/mod/htmlawed/manifest.xml +++ b/mod/htmlawed/manifest.xml @@ -2,9 +2,11 @@ - + - \ No newline at end of file + + + diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml index 4e17a5d27..cf039ee13 100644 --- a/mod/invitefriends/manifest.xml +++ b/mod/invitefriends/manifest.xml @@ -1,10 +1,11 @@ - - - - - - - + + + + + + + + diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml index e47d7bb37..4ec2cdf44 100644 --- a/mod/logbrowser/manifest.xml +++ b/mod/logbrowser/manifest.xml @@ -7,4 +7,6 @@ - \ No newline at end of file + + + diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml index 02f461815..cfbb14d8c 100644 --- a/mod/logrotate/manifest.xml +++ b/mod/logrotate/manifest.xml @@ -7,4 +7,6 @@ - \ No newline at end of file + + + diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml index 2248f8853..37959b66e 100644 --- a/mod/members/manifest.xml +++ b/mod/members/manifest.xml @@ -1,10 +1,12 @@ - - - - - - - + + + + + + + + + diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index 4c89bdc40..f66f0dd59 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -1,10 +1,12 @@ - - - - - - - + + + + + + + + + diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index c903c7658..0c8731e76 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -1,8 +1,10 @@ - - - - - + + + + + + + diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml index d76abc6ae..6e1f73b9c 100644 --- a/mod/notifications/manifest.xml +++ b/mod/notifications/manifest.xml @@ -1,10 +1,11 @@ - - - - - - - + + + + + + + + diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml index 7e9b2c5e4..0445ed0c8 100644 --- a/mod/pages/manifest.xml +++ b/mod/pages/manifest.xml @@ -7,4 +7,5 @@ + diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml index 902292379..a1307f24d 100644 --- a/mod/profile/manifest.xml +++ b/mod/profile/manifest.xml @@ -1,12 +1,14 @@ - - - - - - - - - + + + + + + + + + + + diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index 1d127cde3..e5a34ba99 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -7,4 +7,6 @@ + + diff --git a/mod/riverdashboard/manifest.xml b/mod/riverdashboard/manifest.xml index 24133b7d4..6082cf5ec 100644 --- a/mod/riverdashboard/manifest.xml +++ b/mod/riverdashboard/manifest.xml @@ -6,4 +6,5 @@ - \ No newline at end of file + + diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml index b54744903..0041325ad 100644 --- a/mod/search/manifest.xml +++ b/mod/search/manifest.xml @@ -7,4 +7,6 @@ - \ No newline at end of file + + + diff --git a/mod/sitepages/manifest.xml b/mod/sitepages/manifest.xml index 1ed844b9e..55affc96f 100644 --- a/mod/sitepages/manifest.xml +++ b/mod/sitepages/manifest.xml @@ -10,4 +10,5 @@ + diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index 7f08072b9..6338debaf 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -1,10 +1,11 @@ - - - - - - - + + + + + + + + diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml index a4239313a..a0384b7ce 100644 --- a/mod/thewire/manifest.xml +++ b/mod/thewire/manifest.xml @@ -1,11 +1,12 @@ - - - - - - - - + + + + + + + + + diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml index 139d5b7a4..a7a039c48 100644 --- a/mod/tinymce/manifest.xml +++ b/mod/tinymce/manifest.xml @@ -7,4 +7,6 @@ + + diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml index 5439409db..d5fecbcb5 100644 --- a/mod/twitter/manifest.xml +++ b/mod/twitter/manifest.xml @@ -1,10 +1,11 @@ - - - - - - - + + + + + + + + diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml index 944c870fb..8e29a1bbf 100644 --- a/mod/uservalidationbyemail/manifest.xml +++ b/mod/uservalidationbyemail/manifest.xml @@ -7,4 +7,6 @@ + + diff --git a/mod/walledgarden/manifest.xml b/mod/walledgarden/manifest.xml index 1f4b28a1b..e81af202f 100644 --- a/mod/walledgarden/manifest.xml +++ b/mod/walledgarden/manifest.xml @@ -7,4 +7,5 @@ + diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml index 6db4cbf47..7af57d6d9 100644 --- a/mod/zaudio/manifest.xml +++ b/mod/zaudio/manifest.xml @@ -1,10 +1,12 @@ - - - - - - - + + + + + + + + + diff --git a/views/default/admin/appearance/menu_items.php b/views/default/admin/appearance/menu_items.php new file mode 100644 index 000000000..0f2637ba6 --- /dev/null +++ b/views/default/admin/appearance/menu_items.php @@ -0,0 +1,89 @@ + $info) { + $menu_sorted[$info->name] = $info->value->url; +} + +ksort($menu_sorted); + +$pulldown_values = array_flip($menu_sorted); +$pulldown_values[''] = elgg_echo('none'); + +echo elgg_view_title(elgg_echo('admin:menu_items')); +echo ""; \ No newline at end of file diff --git a/views/default/admin/components/admin_page_layout.php b/views/default/admin/components/admin_page_layout.php new file mode 100644 index 000000000..4f2a67d48 --- /dev/null +++ b/views/default/admin/components/admin_page_layout.php @@ -0,0 +1,36 @@ + + + diff --git a/views/default/admin/components/plugin.php b/views/default/admin/components/plugin.php new file mode 100644 index 000000000..e56cdd4ef --- /dev/null +++ b/views/default/admin/components/plugin.php @@ -0,0 +1,155 @@ + 10) { + $top_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=1&__elgg_token=$token&__elgg_ts=$ts"; + $top_link = '' . elgg_echo('top') . ''; + + $order = $vars['order'] - 11; + + $up_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $up_link = '' . elgg_echo('up') . ''; +} + +if ($vars['order'] < $vars['maxorder']) { + $order = $vars['order'] + 11; + $down_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $down_link = '' . elgg_echo('down') . ''; + + $order = $vars['maxorder'] + 11; + $bottom_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $bottom_link = '' . elgg_echo('bottom') . ''; +} + +if ($active) { + $url = "{$vars['url']}action/admin/plugins/disable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; + $enable_disable = '' . elgg_echo('disable') . ''; +} else { + $url = "{$vars['url']}action/admin/plugins/enable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; + $enable_disable = '' . elgg_echo('enable') . ''; +} + + +$categories_list = ''; +if ($manifest['category']) { + $categories_arr = array(); + $base_url = "{$vars['url']}pg/admin/plugins?category="; + + foreach($manifest['category'] as $category) { + $url = $base_url . urlencode($category); + $categories_arr[] = "" . htmlspecialchars($category) . ''; + } + + $categories_list = implode(', ', $categories_arr); +} + +$screenshots = ''; +if ($manifest['screenshot']) { + $base_url = "{$vars['url']}mod/"; + + $limit = 4; + foreach ($manifest['screenshot'] as $screenshot) { + if ($limit <= 0) { + break; + } + + $screenshot_src = $base_url . $plugin . "/$screenshot"; + $screenshots .= "
  • "; + + $limit--; + } +} + +?> + +
    +
    + +
    + +
    + + [". elgg_echo('settings') ."]"; + } + ?> +

    + +
    $manifest['description'])); ?>
    +
    : ". htmlspecialchars($manifest['author']) ?>
    +
    : ". htmlspecialchars($manifest['version']) ?>
    + +

    + + +
    \ No newline at end of file diff --git a/views/default/admin/components/plugin_settings.php b/views/default/admin/components/plugin_settings.php new file mode 100644 index 000000000..22544e45f --- /dev/null +++ b/views/default/admin/components/plugin_settings.php @@ -0,0 +1,21 @@ + 'plugin', 'value' => $plugin)); +$form_body .= '

    ' . elgg_view('input/submit', array('value' => elgg_echo('save'))); +$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'))) . '

    '; + +echo elgg_view_title($plugin_info['name']); + +echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/plugins/settings/save")); \ No newline at end of file diff --git a/views/default/admin/components/sidemenu.php b/views/default/admin/components/sidemenu.php new file mode 100644 index 000000000..4e02eecd9 --- /dev/null +++ b/views/default/admin/components/sidemenu.php @@ -0,0 +1,105 @@ +admin_sections; +$current_section = $vars['page'][0]; +$child_section = (isset($vars['page'][1])) ? $vars['page'][1] : NULL; + +// "Plugin Settings" is a special sidemenu item that is added automatically +// it's calculated here instead of in admin_init() because of preformance concerns. +$installed_plugins = get_installed_plugins(); +$plugin_settings_children = $sort = array(); +foreach ($installed_plugins as $plugin_id => $info) { + if (!$info['active']) { + continue; + } + + // @todo might not need to check if plugin is enabled here because + // this view wouldn't exist if it's not. right? + if (is_plugin_enabled($plugin_id) && elgg_view_exists("settings/{$plugin_id}/edit")) { + $plugin_settings_children[$plugin_id] = array( + 'title' => $info['manifest']['name'] + ); + $sort[] = elgg_strtolower($info['manifest']['name']); + } +} + +array_multisort($sort, SORT_ASC, SORT_STRING, $plugin_settings_children); + +if ($plugin_settings_children) { + // merge in legacy support with new support. + if (!isset($sections['plugin_settings'])) { + $sections['plugin_settings'] = array( + 'title' => elgg_echo('admin:plugin_settings'), + 'children' => $plugin_settings_children + ); + } else { + $sections['plugin_settings']['title'] = elgg_echo('admin:plugin_settings'); + if (isset($sections['plugin_settings']['children'])) { + $children = array_merge($plugin_settings_children, $sections['plugin_settings']['children']); + $sections['plugin_settings']['children'] = $children; + } + } +} + +?> + + + + \ No newline at end of file diff --git a/views/default/admin/main.php b/views/default/admin/main.php deleted file mode 100644 index e345f56d6..000000000 --- a/views/default/admin/main.php +++ /dev/null @@ -1,12 +0,0 @@ - elgg_echo("admin:description"))); diff --git a/views/default/admin/main_opt/plugins.php b/views/default/admin/main_opt/plugins.php deleted file mode 100644 index b8ae611d3..000000000 --- a/views/default/admin/main_opt/plugins.php +++ /dev/null @@ -1,17 +0,0 @@ - - \ No newline at end of file diff --git a/views/default/admin/main_opt/site.php b/views/default/admin/main_opt/site.php deleted file mode 100644 index e21dcc3fe..000000000 --- a/views/default/admin/main_opt/site.php +++ /dev/null @@ -1,15 +0,0 @@ - - \ No newline at end of file diff --git a/views/default/admin/main_opt/statistics.php b/views/default/admin/main_opt/statistics.php deleted file mode 100644 index 5b063b82e..000000000 --- a/views/default/admin/main_opt/statistics.php +++ /dev/null @@ -1,15 +0,0 @@ - - diff --git a/views/default/admin/main_opt/user.php b/views/default/admin/main_opt/user.php deleted file mode 100644 index f1dc28e5e..000000000 --- a/views/default/admin/main_opt/user.php +++ /dev/null @@ -1,15 +0,0 @@ - - \ No newline at end of file diff --git a/views/default/admin/menu_items.php b/views/default/admin/menu_items.php deleted file mode 100644 index 2bf71f083..000000000 --- a/views/default/admin/menu_items.php +++ /dev/null @@ -1,89 +0,0 @@ - $info) { - $menu_sorted[$info->name] = $info->value->url; -} - -ksort($menu_sorted); - -$pulldown_values = array_flip($menu_sorted); -$pulldown_values[''] = elgg_echo('none'); - -echo elgg_view_title(elgg_echo('admin:menu_items')); -echo ""; \ No newline at end of file diff --git a/views/default/admin/overview.php b/views/default/admin/overview.php new file mode 100644 index 000000000..6fe0bcd45 --- /dev/null +++ b/views/default/admin/overview.php @@ -0,0 +1,80 @@ + +
    +

    + + + + + + + + + + +
    : - , -
    : /
    +
    + + +
    +

    + + $entry) { + arsort($entry); + foreach ($entry as $a => $b) { + + //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 { + if (empty($a)) { + $a = elgg_echo("item:{$k}"); + } else { + $a = elgg_echo("item:{$k}:{$a}"); + } + + if (empty($a)) { + $a = "$k $a"; + } + } + echo <<< END + + + + +END; + } + } + ?> +
    {$a}:{$b}
    +
    \ No newline at end of file diff --git a/views/default/admin/overview/numentities.php b/views/default/admin/overview/numentities.php new file mode 100644 index 000000000..0d0e1b83b --- /dev/null +++ b/views/default/admin/overview/numentities.php @@ -0,0 +1,9 @@ + + +
    +

    + +
    + \ No newline at end of file diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php deleted file mode 100644 index 5a5d37f8c..000000000 --- a/views/default/admin/plugins.php +++ /dev/null @@ -1,85 +0,0 @@ - elgg_echo('admin:plugins:categories:all')), $vars['categories']); - -$category_pulldown = elgg_view('input/pulldown', array( - 'internalname' => 'category', - 'options_values' => $categories, - 'value' => $vars['show_category'] -)); - -$category_button = elgg_view('input/button', array( - 'value' => elgg_echo('filter'), - 'class' => 'action_button' -)); - -$category_form = elgg_view('input/form', array( - 'body' => $category_pulldown . $category_button -)); - -// Page Header elements -$title = elgg_view_title(elgg_echo('admin:plugins')); - -// @todo Until "en/disable all" means "All plugins on this page" hide when not looking at all. -if (!isset($vars['show_category']) || empty($vars['show_category'])) { - $buttons = "url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')." url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')." "; - $buttons .= "

    "; -} else { - $buttons = ''; -} - -$buttons .= $category_form; - -// construct page header -?> -
    -
    -
    -
    - elgg_echo("admin:plugins:description"))); - -$limit = get_input('limit', 10); -$offset = get_input('offset', 0); - -// Get the installed plugins -$installed_plugins = $vars['installed_plugins']; -$count = count($installed_plugins); - -$plugin_list = get_plugin_list(); -$max = 0; -foreach($plugin_list as $key => $foo) { - if ($key > $max) $max = $key; -} - -// Display list of plugins -$n = 0; -foreach ($installed_plugins as $plugin => $data) { - echo elgg_view("admin/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data, 'maxorder' => $max, 'order' => array_search($plugin, $plugin_list))); - $n++; -} - -?> - - diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php new file mode 100644 index 000000000..d5def1eb1 --- /dev/null +++ b/views/default/admin/plugins/advanced.php @@ -0,0 +1,106 @@ + $plugin) { + $plugin_categories = $plugin['manifest']['category']; + + // handle plugins that don't declare categories + if ((!$plugin_categories && $show_category) || ($show_category && !in_array($show_category, $plugin_categories))) { + unset($installed_plugins[$id]); + } + + foreach ($plugin_categories as $category) { + if (!array_key_exists($category, $categories)) { + $categories[$category] = elgg_echo("admin:plugins:label:moreinfo:categories:$category"); + } + } +} + +$ts = time(); +$token = generate_action_token($ts); +$categories = array_merge(array('' => elgg_echo('admin:plugins:categories:all')), $categories); + +$category_pulldown = elgg_view('input/pulldown', array( + 'internalname' => 'category', + 'options_values' => $categories, + 'value' => $show_category +)); + +$category_button = elgg_view('input/button', array( + 'value' => elgg_echo('filter'), + 'class' => 'action_button' +)); + +$category_form = elgg_view('input/form', array( + 'body' => $category_pulldown . $category_button +)); + +// Page Header elements +$title = elgg_view_title(elgg_echo('admin:plugins')); + +// @todo Until "en/disable all" means "All plugins on this page" hide when not looking at all. +if (!isset($show_category) || empty($show_category)) { + $buttons = "url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')." url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')." "; + $buttons .= "

    "; +} else { + $buttons = ''; +} + +$buttons .= $category_form; + +// construct page header +?> +
    +
    +
    +
    +
    + $foo) { + if ($key > $max) $max = $key; +} + +// Display list of plugins +$n = 0; +foreach ($installed_plugins as $plugin => $data) { + echo elgg_view('admin/components/plugin', array( + 'plugin' => $plugin, + 'details' => $data, + 'maxorder' => $max, + 'order' => array_search($plugin, $plugin_list) + )); + $n++; +} +?> + \ No newline at end of file diff --git a/views/default/admin/plugins/simple.php b/views/default/admin/plugins/simple.php new file mode 100644 index 000000000..ad85f9ce0 --- /dev/null +++ b/views/default/admin/plugins/simple.php @@ -0,0 +1,96 @@ + $plugin) { + if (!isset($plugin['manifest']['admin_interface']) || $plugin['manifest']['admin_interface'] == 'advanced') { + continue; + } + + $plugin['installed_name'] = $installed_name; + + $plugin_list[$plugin['manifest']['name']] = $plugin; +} + +ksort($plugin_list); +$form_body .= <<<___END +
    +
    $title
    +
    +
      +___END; + +foreach ($plugin_list as $name => $info) { + $manifest = $info['manifest']; + $version_valid = (isset($manifest['elgg_version'])) ? check_plugin_compatibility($manifest['elgg_version']) : FALSE; + if ($info['active']) { + $active_class = 'active'; + $checked = 'checked="checked"'; + } else { + $active_class = 'not_active'; + $checked = ''; + } + + $author = $link = $version = $settings = ''; + + if (isset($manifest['author'])) { + $author = sprintf(elgg_echo('admin:plugins:author'), $manifest['author']); + } + + if (isset($manifest['version'])) { + $version = ' | ' . sprintf(elgg_echo('admin:plugins:version'), $manifest['version']); + } + + if (isset($manifest['website'])) { + $link = " | " . elgg_echo('admin:plugins:plugin_website') . ''; + } + + if (elgg_view_exists("settings/{$info['installed_name']}/edit")) { + $settings_href = "{$vars['url']}pg/admin/plugin_settings/{$info['installed_name']}"; + $settings = " | ". elgg_echo('settings') .""; + } + + $form_body .= <<<___END +
    • + + + + + + + + {$manifest['description']} + + + +
    • +___END; +} + +$form_body .= '
    '; +$form_body .= elgg_view('input/submit', array('value' => elgg_echo('save'))); +$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'class' => 'action_button disabled')); + +echo elgg_view('input/form', array( + 'action' => "{$vars['url']}action/admin/plugins/simple_update_states", + 'body' => $form_body, + 'class' => 'admin_plugins_simpleview' +)); \ No newline at end of file diff --git a/views/default/admin/plugins_opt/plugin.php b/views/default/admin/plugins_opt/plugin.php deleted file mode 100644 index 61a197043..000000000 --- a/views/default/admin/plugins_opt/plugin.php +++ /dev/null @@ -1,159 +0,0 @@ - 10) { - $top_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=1&__elgg_token=$token&__elgg_ts=$ts"; - $top_link = '' . elgg_echo('top') . ''; - - $order = $vars['order'] - 11; - - $up_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; - $up_link = '' . elgg_echo('up') . ''; -} - -if ($vars['order'] < $vars['maxorder']) { - $order = $vars['order'] + 11; - $down_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; - $down_link = '' . elgg_echo('down') . ''; - - $order = $vars['maxorder'] + 11; - $bottom_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; - $bottom_link = '' . elgg_echo('bottom') . ''; -} - -if ($active) { - $url = "{$vars['url']}action/admin/plugins/disable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; - $enable_disable = '' . elgg_echo('disable') . ''; -} else { - $url = "{$vars['url']}action/admin/plugins/enable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; - $enable_disable = '' . elgg_echo('enable') . ''; -} - - -$categories_list = ''; -if ($manifest['category']) { - $categories_arr = array(); - $base_url = "{$vars['url']}pg/admin/plugins?category="; - - foreach($manifest['category'] as $category) { - $url = $base_url . urlencode($category); - $categories_arr[] = "" . htmlspecialchars($category) . ''; - } - - $categories_list = implode(', ', $categories_arr); -} - -$screenshots = ''; -if ($manifest['screenshot']) { - $base_url = "{$vars['url']}mod/"; - - $limit = 4; - foreach ($manifest['screenshot'] as $screenshot) { - if ($limit <= 0) { - break; - } - - $screenshot_src = $base_url . $plugin . "/$screenshot"; - $screenshots .= "
  • "; - - $limit--; - } -} - -?> - -
    -
    - -
    - -
    - - [". elgg_echo('settings') ."]"; - - $settings_panel = ""; - } - ?> -

    - -
    $manifest['description'])); ?>
    -
    : ". htmlspecialchars($manifest['author']) ?>
    -
    : ". htmlspecialchars($manifest['version']) ?>
    - -

    - - -
    \ No newline at end of file diff --git a/views/default/admin/site.php b/views/default/admin/site.php deleted file mode 100644 index 2c2775ad0..000000000 --- a/views/default/admin/site.php +++ /dev/null @@ -1,16 +0,0 @@ -".elgg_view('output/longtext', array('value' => elgg_echo("admin:site:description"))).""; - -echo elgg_view("settings/system",array("action" => $CONFIG->wwwroot."action/admin/site/update_basic")); // Always want to do this first. \ No newline at end of file diff --git a/views/default/admin/site/advanced.php b/views/default/admin/site/advanced.php new file mode 100644 index 000000000..da7b98a1a --- /dev/null +++ b/views/default/admin/site/advanced.php @@ -0,0 +1,50 @@ +"; + $form_body .= elgg_echo('installation:' . $field) . "
    "; + $warning = elgg_echo('installation:warning:' . $field); + if ($warning != 'installation:warning:' . $field) echo "" . $warning . "
    "; + $value = $vars['config']->$field; + $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value)); + $form_body .= "

    "; +} + +$form_body .= "

    " . elgg_echo('admin:site:access:warning') . "
    "; +$form_body .= elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => $vars['config']->default_access)) . "

    "; +$form_body .= "

    " . elgg_echo('installation:allow_user_default_access:description') . "
    " .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:allow_user_default_access:label')), 'internalname' => 'allow_user_default_access', 'value' => ($vars['config']->allow_user_default_access ? elgg_echo('installation:allow_user_default_access:label') : "") )) . "

    "; +$form_body .= "

    " . elgg_echo('installation:simplecache:description') . "
    " .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:simplecache:label')), 'internalname' => 'simplecache_enabled', 'value' => ($vars['config']->simplecache_enabled ? elgg_echo('installation:simplecache:label') : "") )) . "

    "; +$form_body .= "

    " . elgg_echo('installation:viewpathcache:description') . "
    " .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:viewpathcache:label')), 'internalname' => 'viewpath_cache_enabled', 'value' => (($vars['config']->viewpath_cache_enabled) ? elgg_echo('installation:viewpathcache:label') : "") )) . "

    "; + +$debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice')); +$form_body .= "

    " . elgg_echo('installation:debug'); +$form_body .= elgg_view('input/pulldown', array('options_values' => $debug_options, 'internalname' => 'debug', 'value' => $vars['config']->debug)); +$form_body .= '

    '; + +$form_body .= "

    " . elgg_echo('installation:httpslogin') . "
    " .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "

    "; + +$form_body .= "

    " . elgg_echo('installation:disableapi') . "
    "; +$on = elgg_echo('installation:disableapi:label'); +if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true)) { + $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label')); +} +$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on )); +$form_body .= "

    "; + +$form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go')); + +$form_body .= "
    ".elgg_view('input/submit', array('value' => elgg_echo("save"))); +$form_body = "
    ".$form_body."
    "; +echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); diff --git a/views/default/admin/site/basic.php b/views/default/admin/site/basic.php new file mode 100644 index 000000000..104823a28 --- /dev/null +++ b/views/default/admin/site/basic.php @@ -0,0 +1,30 @@ +"; + $form_body .= elgg_echo('installation:' . $field) . "
    "; + $warning = elgg_echo('installation:warning:' . $field); + if ($warning != 'installation:warning:' . $field) echo "" . $warning . "
    "; + $value = $vars['config']->$field; + $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value)); + $form_body .= "

    "; +} + +$languages = get_installed_translations(); +$form_body .= "

    " . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "

    "; + +$form_body .= "
    ".elgg_view('input/submit', array('value' => elgg_echo("save"))); +$form_body = "
    ".$form_body."
    "; +echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); diff --git a/views/default/admin/statistics.php b/views/default/admin/statistics.php deleted file mode 100644 index 7c987a607..000000000 --- a/views/default/admin/statistics.php +++ /dev/null @@ -1,11 +0,0 @@ - -
    -

    - - - - - - - - - - -
    : - , -
    : /
    -
    \ No newline at end of file diff --git a/views/default/admin/statistics_opt/numentities.php b/views/default/admin/statistics_opt/numentities.php deleted file mode 100644 index 4336c5a82..000000000 --- a/views/default/admin/statistics_opt/numentities.php +++ /dev/null @@ -1,51 +0,0 @@ - -
    -

    - - $entry) { - arsort($entry); - foreach ($entry as $a => $b) { - - //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 { - if (empty($a)) { - $a = elgg_echo("item:{$k}"); - } else { - $a = elgg_echo("item:{$k}:{$a}"); - } - - if (empty($a)) { - $a = "$k $a"; - } - } - echo <<< END - - - - -END; - } - } - ?> -
    {$a}:{$b}
    -
    \ No newline at end of file diff --git a/views/default/admin/statistics_opt/online.php b/views/default/admin/statistics_opt/online.php deleted file mode 100644 index 6485a3bac..000000000 --- a/views/default/admin/statistics_opt/online.php +++ /dev/null @@ -1,24 +0,0 @@ - - -
    -

    - -
    - \ No newline at end of file diff --git a/views/default/admin/user.php b/views/default/admin/user.php deleted file mode 100644 index ba7eb3d4a..000000000 --- a/views/default/admin/user.php +++ /dev/null @@ -1,21 +0,0 @@ -".elgg_view('output/longtext', array('value' => elgg_echo("admin:user:description"))).""; -//echo elgg_view("admin/user_opt/adduser"); -// add a new user form -echo elgg_view('account/forms/useradd', array('show_admin'=>true)); -// search for a user -echo elgg_view("admin/user_opt/search"); - -if ($vars['list']) { - echo $vars['list']; -} \ No newline at end of file diff --git a/views/default/admin/user_opt/adduser.php b/views/default/admin/user_opt/adduser.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/views/default/admin/user_opt/search.php b/views/default/admin/user_opt/search.php deleted file mode 100644 index f853dcf3c..000000000 --- a/views/default/admin/user_opt/search.php +++ /dev/null @@ -1,25 +0,0 @@ - - - \ No newline at end of file diff --git a/views/default/admin/users/add.php b/views/default/admin/users/add.php new file mode 100644 index 000000000..4275b27e1 --- /dev/null +++ b/views/default/admin/users/add.php @@ -0,0 +1,6 @@ +true)); \ No newline at end of file diff --git a/views/default/admin/users/find.php b/views/default/admin/users/find.php new file mode 100644 index 000000000..9684cb88c --- /dev/null +++ b/views/default/admin/users/find.php @@ -0,0 +1,25 @@ + + + \ No newline at end of file diff --git a/views/default/admin/users/online.php b/views/default/admin/users/online.php new file mode 100644 index 000000000..22b183da8 --- /dev/null +++ b/views/default/admin/users/online.php @@ -0,0 +1,14 @@ + + +
    +

    + +
    +description; + echo "

    $message

    "; +} + -- cgit v1.2.3