当前位置: 首页>>代码示例>>PHP>>正文


PHP elgg_admin_add_plugin_settings_menu函数代码示例

本文整理汇总了PHP中elgg_admin_add_plugin_settings_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_admin_add_plugin_settings_menu函数的具体用法?PHP elgg_admin_add_plugin_settings_menu怎么用?PHP elgg_admin_add_plugin_settings_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了elgg_admin_add_plugin_settings_menu函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($page)
 {
     admin_gatekeeper();
     global $CONFIG;
     $cshop = new stdClass();
     $this->controller = GLOBAL_IZAP_CURRENT_CONTROLLER;
     $this->action = 'action' . ucfirst($page[0]);
     $this->_page = $page;
     $this->url_vars = $this->_page;
     $this->page_layout = $this->page_shell = 'admin';
     $cshop->view = $this->_view = 'admin/' . implode('/', $page);
     $this->page_elements['title'] = elgg_echo("admin:{$page[0]}");
     if (count($page) > 1) {
         $this->page_elements['title'] .= ' : ' . elgg_echo('admin:' . implode(':', $page));
     }
     if (method_exists($this, $this->action)) {
         elgg_admin_add_plugin_settings_menu();
         elgg_set_context('admin');
         elgg_unregister_css('elgg');
         $url = elgg_get_simplecache_url('js', 'admin');
         elgg_register_js('elgg.admin', $url);
         elgg_load_js('elgg.admin');
         elgg_register_js('jquery.jeditable', 'vendors/jquery/jquery.jeditable.mini.js');
         elgg_load_js('jquery.jeditable');
     }
     $CONFIG->cshop = $cshop;
 }
开发者ID:socialweb,项目名称:PiGo,代码行数:27,代码来源:IzapAdminController.php

示例2: importUsersPageHandler

function importUsersPageHandler($page)
{
    admin_gatekeeper();
    elgg_admin_add_plugin_settings_menu();
    elgg_set_context('admin');
    elgg_unregister_css('elgg');
    elgg_load_js('elgg.admin');
    elgg_load_js('jquery.jeditable');
    $vars = array('page' => $page);
    $view = 'import/' . implode('/', $page);
    $title = "Import Users";
    $content = elgg_view($view);
    $body = elgg_view_layout('admin', array('content' => $content, 'title' => $title));
    echo elgg_view_page($title, $body, 'admin');
    return true;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:16,代码来源:start.php

示例3: elgg_deprecated_notice

 * The standard HTML page shell that everything else fits into
 *
 * @package Elgg
 * @subpackage Core
 *
 * @uses $vars['title']       The page title
 * @uses $vars['body']        The main content of the page
 * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
 */
// backward compatability support for plugins that are not using the new approach
// of routing through admin. See reportedcontent plugin for a simple example.
if (elgg_get_context() == 'admin') {
    if (get_input('handler') != 'admin') {
        elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8);
    }
    elgg_admin_add_plugin_settings_menu();
    elgg_unregister_css('elgg');
    echo elgg_view('page/admin', $vars);
    return true;
}
// render content before head so that JavaScript and CSS can be loaded. See #4032
$topbar = elgg_view('page/elements/topbar', $vars);
$messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
$header = elgg_view('page/elements/header', $vars);
$body = elgg_view('page/elements/body', $vars);
$footer = elgg_view('page/elements/footer', $vars);
// Set the content type
header("Content-type: text/html; charset=UTF-8");
$lang = get_current_language();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
开发者ID:Twizanex,项目名称:Basic-Light,代码行数:31,代码来源:default.php

示例4: admin_page_handler

/**
 * Handle admin pages.  Expects corresponding views as admin/section/subsection
 *
 * @param array $page Array of pages
 *
 * @return bool
 * @access private
 */
function admin_page_handler($page)
{
    admin_gatekeeper();
    elgg_admin_add_plugin_settings_menu();
    elgg_set_context('admin');
    elgg_unregister_css('elgg');
    elgg_load_js('elgg.admin');
    elgg_load_js('jquery.jeditable');
    // default to dashboard
    if (!isset($page[0]) || empty($page[0])) {
        $page = array('dashboard');
    }
    // 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);
    }
    $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") || elgg_view_exists("plugins/{$page[1]}/settings"))) {
        $view = 'admin/plugin_settings';
        $plugin = elgg_get_plugin_from_id($page[1]);
        $vars['plugin'] = $plugin;
        $title = elgg_echo("admin:{$page[0]}");
    } else {
        $view = 'admin/' . implode('/', $page);
        $title = elgg_echo("admin:{$page[0]}");
        if (count($page) > 1) {
            $title .= ' : ' . elgg_echo('admin:' . implode(':', $page));
        }
    }
    // gets content and prevents direct access to 'components' 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_layout('admin', array('content' => $content, 'title' => $title));
    echo elgg_view_page($title, $body, 'admin');
    return true;
}
开发者ID:duanhv,项目名称:mdg-social,代码行数:48,代码来源:admin.php

示例5: userManagementPageHandler

function userManagementPageHandler($page)
{
    switch ($page[0]) {
        case 'users':
            include elgg_get_plugins_path() . 'userManagement/pages/users.php';
            break;
        case 'deactivate':
            $userMgmt = new UserManagement();
            $userMgmt->getInactiveUsers();
            $userMgmt->deactivateUsers();
            break;
            //activate account form
        //activate account form
        case 'activate':
            $userMgmt = new UserManagement();
            //check if user doesnt have forces email send them to different form
            if ($userMgmt->validEmail(get_input('email'))) {
                include elgg_get_plugins_path() . 'userManagement/pages/activate.php';
            } else {
                include elgg_get_plugins_path() . 'userManagement/pages/changeEmail.php';
            }
            break;
            //activate account action
        //activate account action
        case 'activation':
            $userMgmt = new UserManagement();
            $userGuid = get_input('u');
            $code = get_input('c');
            $user = get_entity($userGuid);
            if (!$user) {
                register_error(elgg_echo('activate:error'));
                forward(REFERER);
            }
            $userMgmt->setUser($user);
            if (!$userMgmt->validateCode($code)) {
                register_error(elgg_echo('activate:error'));
                forward(REFERER);
            }
            //activate user
            if ($userMgmt->activateUser()) {
                system_message(elgg_echo('activate:success'));
                forward(REFERER);
            }
            break;
        case 'import':
            admin_gatekeeper();
            elgg_admin_add_plugin_settings_menu();
            elgg_set_context('admin');
            elgg_unregister_css('elgg');
            elgg_load_js('elgg.admin');
            elgg_load_js('jquery.jeditable');
            $vars = array('page' => $page);
            $view = 'usermanagement/' . implode('/', $page);
            $title = "Import Users";
            $content = elgg_view($view);
            $body = elgg_view_layout('admin', array('content' => $content, 'title' => $title));
            echo elgg_view_page($title, $body, 'admin');
            break;
        case 'resetPassword':
            set_input('guid', $_SESSION['userId']);
            include elgg_get_plugins_path() . "userManagement/pages/resetPassword.php";
            break;
        case 'registerEmails':
            include elgg_get_plugins_path() . "userManagement/pages/registerEmails.php";
            break;
        case 'admin':
            if ($page[1] == activate) {
                include elgg_get_plugins_path() . "userManagement/pages/admin/activate.php";
            }
            break;
        default:
            return false;
    }
    return true;
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:75,代码来源:start.php


注:本文中的elgg_admin_add_plugin_settings_menu函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。