/** * Get some information about the plugins installed on the system. * * @param unknown_type $hook * @param unknown_type $entity_type * @param unknown_type $returnvalue * @param unknown_type $params */ function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params) { $returnvalue .= sprintf(elgg_echo('diagnostics:report:plugins'), print_r(get_installed_plugins(), true)); return $returnvalue; }
/** * Enable plugin action. * * @package Elgg * @subpackage Core * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd * @copyright Curverider Ltd 2008-2009 * @link http://elgg.org/ */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; // block non-admin users admin_gatekeeper(); // Validate the action action_gatekeeper(); $plugins = get_installed_plugins(); foreach ($plugins as $p => $data) { // Enable if (enable_plugin($p)) { system_message(sprintf(elgg_echo('admin:plugins:enable:yes'), $p)); } else { register_error(sprintf(elgg_echo('admin:plugins:enable:no'), $p)); } } // Regen view cache elgg_view_regenerate_simplecache(); // Regen paths cache $cache = elgg_get_filepath_cache(); $cache->delete('view_paths'); forward($_SERVER['HTTP_REFERER']); exit;
<?php /** * Elgg administration plugin system index * This is a special page that permits the configuration of plugins in a standard way. * * @package Elgg * @subpackage Core * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd * @copyright Curverider Ltd 2008-2009 * @link http://elgg.org/ */ // Get the Elgg framework require_once dirname(dirname(__FILE__)) . "/engine/start.php"; // Make sure only valid admin users can see this admin_gatekeeper(); // Set admin user for user block //set_page_owner($_SESSION['guid']); // Regenerate plugin list regenerate_plugin_list(); // Display main admin menu page_draw(elgg_echo("admin:plugins"), elgg_view_layout("two_column_left_sidebar", '', elgg_view_title(elgg_echo('admin:plugins')) . elgg_view("admin/plugins", array('installed_plugins' => get_installed_plugins()))));
<?php /** * Elgg user settings functions. * * @package Elgg * @subpackage Core * @author Curverider Ltd * @link http://elgg.org/ */ // Get the Elgg framework require_once dirname(dirname(__FILE__)) . "/engine/start.php"; // Make sure only valid users can see this gatekeeper(); // Make sure we don't open a security hole ... if (!page_owner_entity() || !page_owner_entity()->canEdit()) { set_page_owner($_SESSION['guid']); } // Display main admin menu page_draw(elgg_echo("usersettings:plugins"), elgg_view_layout('one_column_with_sidebar', elgg_view_title(elgg_echo("usersettings:plugins")) . elgg_view("usersettings/plugins", array('installed_plugins' => get_installed_plugins()))));
<?php /** * Elgg administration plugin system index * This is a special page that permits the configuration of plugins in a standard way. * * @package Elgg * @subpackage Core * @author Curverider Ltd * @link http://elgg.org/ */ // Get the Elgg framework require_once dirname(dirname(__FILE__)) . "/engine/start.php"; // Make sure only valid admin users can see this admin_gatekeeper(); // Regenerate plugin list regenerate_plugin_list(); // Display main admin menu $vars = array('installed_plugins' => get_installed_plugins()); $title = elgg_view_title(elgg_echo('admin:plugins')); $main_box = elgg_view("admin/plugins", $vars); $content = elgg_view_layout("two_column_left_sidebar", '', $title . $main_box); page_draw(elgg_echo('admin:plugins'), $content);