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


PHP add_submenu_item函数代码示例

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


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

示例1: vazco_avatar_init

function vazco_avatar_init()
{
    global $CONFIG;
    define('VAZCO_AVATAR_PATH', 'vazco_avatars');
    //set admin user ID to 2 - the default admin. TODO: do it cleaner.
    // Since we use ElggFile here, the ID has to belong to the user that is in the system all the time.
    define('VAZCO_AVATAR_ADMIN', 2);
    extend_view('profile/editicon', 'vazco_avatar/select', 601);
    extend_view('css', 'vazco_avatar/css', 601);
    register_action("vazco_avatar/upload", false, $CONFIG->pluginspath . "vazco_avatar/actions/upload.php");
    register_action("vazco_avatar/select", false, $CONFIG->pluginspath . "vazco_avatar/actions/select.php");
    register_action("vazco_avatar/delete", false, $CONFIG->pluginspath . "vazco_avatar/actions/delete.php");
    register_plugin_hook('action', 'profile/cropicon', 'vazco_avatar_cropicon', 600);
    if (isadminloggedin() && get_context() == 'admin' || get_context() == 'vazco_avatar') {
        add_submenu_item(elgg_echo('vazco_avatar:menu'), $CONFIG->wwwroot . 'pg/vazco_avatar/edit');
    }
    if (isadminloggedin() && get_context() == 'vazco_avatar') {
        add_submenu_item(elgg_echo('avatars:upload'), $CONFIG->wwwroot . 'pg/vazco_avatar/upload');
    }
    if (isloggedin()) {
        //update current user's avatar for topbar and edit icon page
        setUserIcon($_SESSION['user'], 'topbar');
        setUserIcon($_SESSION['user'], 'medium');
    }
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:25,代码来源:start.php

示例2: messages_init

/**
 * Messages initialisation
 *
 * These parameters are required for the event API, but we won't use them:
 * 
 * @param unknown_type $event
 * @param unknown_type $object_type
 * @param unknown_type $object
 */
function messages_init()
{
    // Load system configuration
    global $CONFIG;
    //add submenu options
    if (get_context() == "messages") {
        add_submenu_item(elgg_echo('messages:compose'), $CONFIG->wwwroot . "mod/messages/send.php");
        add_submenu_item(elgg_echo('messages:inbox'), $CONFIG->wwwroot . "pg/messages/" . $_SESSION['user']->username);
        add_submenu_item(elgg_echo('messages:sentmessages'), $CONFIG->wwwroot . "mod/messages/sent.php");
    }
    // Extend system CSS with our own styles, which are defined in the shouts/css view
    extend_view('css', 'messages/css');
    // Extend the elgg topbar
    extend_view('elgg_topbar/extend', 'messages/topbar');
    // Register a page handler, so we can have nice URLs
    register_page_handler('messages', 'messages_page_handler');
    // Register a URL handler for shouts posts
    register_entity_url_handler('messages_url', 'object', 'messages');
    // Extend hover-over and profile menu
    extend_view('profile/menu/links', 'messages/menu');
    // Register a notification handler for site messages
    register_notification_handler("site", "messages_site_notify_handler");
    register_plugin_hook('notify:entity:message', 'object', 'messages_notification_msg');
    if (is_callable('register_notification_object')) {
        register_notification_object('object', 'messages', elgg_echo('messages:new'));
    }
    // Shares widget
    //  add_widget_type('messages',elgg_echo("messages:recent"),elgg_echo("messages:widget:description"));
    // Override metadata permissions
    register_plugin_hook('permissions_check:metadata', 'object', 'messages_can_edit_metadata');
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:40,代码来源:start.php

示例3: vazco_topbar_submenus

function vazco_topbar_submenus()
{
    global $CONFIG;
    if (isadminloggedin() && get_context() == 'admin' || get_context() == 'vazco_topbar') {
        add_submenu_item(elgg_echo('vazco_topbar:menu:short'), $CONFIG->wwwroot . 'mod/vazco_topbar/edit.php');
    }
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:7,代码来源:start.php

示例4: collaboration_pagesetup

function collaboration_pagesetup()
{
    global $CONFIG;
    if (get_context() == 'admin' && isadminloggedin()) {
        add_submenu_item('Manage external sites', $CONFIG->wwwroot . 'pg/collaboration/admin');
    }
}
开发者ID:rkvsraman,项目名称:elgg_external_sites,代码行数:7,代码来源:start.php

示例5: ckeditor_pagesetup

function ckeditor_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('ckeditor:admin_title'), $CONFIG->wwwroot . 'mod/CKEditor/admin.php');
    }
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:7,代码来源:start.php

示例6: tasks_pagesetup

function tasks_pagesetup()
{
    global $CONFIG;
    // Set up menu for logged in users
    //add submenu options
    if (get_context() == "tasks") {
        if (isloggedin()) {
            if (page_owner()) {
                $page_owner = page_owner_entity();
                add_submenu_item('table of tasks', $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/table");
                add_submenu_item(sprintf(elgg_echo('tasks:read'), $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items");
                add_submenu_item(sprintf('open tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/open");
                add_submenu_item(sprintf('assigned tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/assigned");
                add_submenu_item(sprintf('need more info tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/info");
                add_submenu_item(sprintf('in progress tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/progress");
                add_submenu_item(sprintf('ready for testing tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/testing");
                add_submenu_item(sprintf('closed tasks', $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . "/items/closed");
            }
        }
        if (!$page_owner instanceof ElggGroup) {
            add_submenu_item(elgg_echo('tasks:everyone'), $CONFIG->wwwroot . "mod/tasks/everyone.php");
        }
        if (isloggedin() && page_owner() && can_write_to_container(0, page_owner())) {
            $page_owner = page_owner_entity();
            // Ajout de Fx pour créer des tasks vierges
            add_submenu_item(sprintf(elgg_echo("tasks:add"), $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . '/add' . '?container_guid=' . $page_owner->getGUID());
        }
    }
    $page_owner = page_owner_entity();
    if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
        if ($page_owner->tasks_enable != "no") {
            add_submenu_item(sprintf(elgg_echo("tasks:group"), $page_owner->name), $CONFIG->wwwroot . "pg/tasks/" . $page_owner->username . '/items');
        }
    }
}
开发者ID:eokyere,项目名称:elgg,代码行数:35,代码来源:start.php

示例7: bookmarks_pagesetup

function bookmarks_pagesetup()
{
    global $CONFIG;
    // Set up menu for logged in users
    //add submenu options
    if (get_context() == "bookmarks") {
        if (isloggedin()) {
            add_submenu_item(elgg_echo('bookmarks:inbox'), $CONFIG->wwwroot . "pg/bookmarks/" . $_SESSION['user']->username . "/inbox");
            if (page_owner()) {
                $page_owner = page_owner_entity();
                add_submenu_item(sprintf(elgg_echo('bookmarks:read'), $page_owner->name), $CONFIG->wwwroot . "pg/bookmarks/" . $page_owner->username . "/items");
            }
            if (!$page_owner instanceof ElggGroup) {
                add_submenu_item(elgg_echo('bookmarks:friends'), $CONFIG->wwwroot . "pg/bookmarks/" . $_SESSION['user']->username . "/friends");
            }
        }
        //if(!$page_owner instanceof ElggGroup)
        //	add_submenu_item(elgg_echo('bookmarks:everyone'),$CONFIG->wwwroot."mod/bookmarks/everyone.php");
        // Bookmarklet
        if (isloggedin() && page_owner() && can_write_to_container(0, page_owner())) {
            $page_owner = page_owner_entity();
            $bmtext = elgg_echo('bookmarks:bookmarklet');
            if ($page_owner instanceof ElggGroup) {
                $bmtext = elgg_echo('bookmarks:bookmarklet:group');
            }
            add_submenu_item($bmtext, $CONFIG->wwwroot . "pg/bookmarks/{$page_owner->username}/bookmarklet");
        }
    }
    $page_owner = page_owner_entity();
    if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
        if ($page_owner->bookmarks_enable != "no") {
            add_submenu_item(sprintf(elgg_echo("bookmarks:group"), $page_owner->name), $CONFIG->wwwroot . "pg/bookmarks/" . $page_owner->username . '/items');
        }
    }
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:35,代码来源:start.php

示例8: categories_pagesetup

/**
 * Set up menu items
 *
 */
function categories_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('categories:settings'), $CONFIG->wwwroot . 'mod/categories/settings.php');
    }
}
开发者ID:eokyere,项目名称:elgg,代码行数:11,代码来源:start.php

示例9: removewidget_pagesetup

function removewidget_pagesetup()
{
    global $CONFIG;
    if (get_context() == 'admin' && isadminloggedin()) {
        add_submenu_item(elgg_echo('remove_widgets'), $CONFIG->wwwroot . 'pg/removewidget/');
    }
}
开发者ID:CashElgg,项目名称:remove_widget,代码行数:7,代码来源:start.php

示例10: dreamfish_admin_pagesetup

function dreamfish_admin_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('dreamfish_admin:admin_title'), $CONFIG->wwwroot . 'mod/dreamfish_admin/admintasks.php');
    }
}
开发者ID:eokyere,项目名称:elgg,代码行数:7,代码来源:start.php

示例11: reportedcontent_pagesetup

/**
 * Adding the reported content to the admin menu
 *
 */
function reportedcontent_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('reportedcontent'), $CONFIG->wwwroot . 'pg/reportedcontent/');
    }
}
开发者ID:eokyere,项目名称:elgg,代码行数:11,代码来源:start.php

示例12: elgg_dev_tools_pagesetup

/**
 * Add admin menu item
 */
function elgg_dev_tools_pagesetup()
{
    if (get_context() == 'admin') {
        global $CONFIG;
        add_submenu_item(elgg_echo('elgg_dev_tools:adminlink'), $CONFIG->wwwroot . 'pg/elgg_dev_tools/');
    }
}
开发者ID:CashElgg,项目名称:elgg-developer-tools,代码行数:10,代码来源:start.php

示例13: logbrowser_pagesetup

/**
 * Adding the log browser to the admin menu
 *
 */
function logbrowser_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('logbrowser'), $CONFIG->wwwroot . 'pg/logbrowser/');
    }
}
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:11,代码来源:start.php

示例14: theme_editable_pagesetup

/**
 * Set up menu items
 */
function theme_editable_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('theme_editable:settings'), $CONFIG->wwwroot . 'mod/theme_editable/settings.php');
    }
}
开发者ID:psndcsrv,项目名称:theme_editable,代码行数:10,代码来源:start.php

示例15: diagnostics_pagesetup

/**
 * Adding the diagnostics to the admin menu
 *
 */
function diagnostics_pagesetup()
{
    if (get_context() == 'admin' && isadminloggedin()) {
        global $CONFIG;
        add_submenu_item(elgg_echo('diagnostics'), $CONFIG->wwwroot . 'pg/diagnostics/');
    }
}
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:11,代码来源:start.php


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