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


PHP e107::getNav方法代码示例

本文整理汇总了PHP中e107::getNav方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::getNav方法的具体用法?PHP e107::getNav怎么用?PHP e107::getNav使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在e107的用法示例。


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

示例1: navigation_shortcode

function navigation_shortcode($parm = '')
{
    $types = array('main' => 1, 'side' => 2, 'footer' => 3, 'alt' => 4, 'alt5' => 5, 'alt6' => 6);
    $category = varset($types[$parm], 1);
    $tmpl = vartrue($parm, 'main');
    $nav = e107::getNav();
    $template = e107::getCoreTemplate('navigation', $tmpl);
    $data = $nav->initData($category);
    //	$data 			= $nav->collection($category);
    return $nav->render($data, $template);
}
开发者ID:armpit,项目名称:e107,代码行数:11,代码来源:navigation.php

示例2: admin_list_config_adminmenu

/**
 * Display admin menu
 *
 * @return string menu
 */
function admin_list_config_adminmenu()
{
    $act = "";
    unset($var);
    $var = array();
    //$var['general']['text'] = LIST_ADMIN_OPT_1;
    $var['list-new-recent-page']['text'] = LIST_ADMIN_OPT_2;
    $var['list-new-recent-menu']['text'] = LIST_ADMIN_OPT_3;
    $var['list-new-new-page']['text'] = LIST_ADMIN_OPT_4;
    $var['list-new-new-menu']['text'] = LIST_ADMIN_OPT_5;
    e107::getNav()->admin(LIST_ADMIN_OPT_6 . '--id--list_new', 'list-new-recent-page', $var);
}
开发者ID:armpit,项目名称:e107,代码行数:17,代码来源:admin_list_config.php

示例3: sc_page_navigation

 /**
  * Page Navigation
  * @example {PAGE_NAVIGATION: template=navdoc&auto=1} in your Theme template. 
  */
 function sc_page_navigation($parm = '')
 {
     //	$parm = eHelper::scParams($parm);
     $tmpl = e107::getCoreTemplate('chapter', vartrue($parm['template'], 'nav'), true, true);
     // always merge
     $template = $tmpl['showPage'];
     $request = $this->request;
     if ($request && is_array($request)) {
         switch ($request['action']) {
             case 'listBooks':
                 $parm['cbook'] = 'all';
                 $template = $tmpl['listBooks'];
                 if (e107::getPref('listBooks', false) == false) {
                     return false;
                 }
                 break;
             case 'listChapters':
                 $parm['cbook'] = $request['id'];
                 $template = $tmpl['listChapters'];
                 break;
             case 'listPages':
                 $parm['cchapter'] = $request['id'];
                 $template = $tmpl['listPages'];
                 break;
             case 'showPage':
                 $parm['cpage'] = $request['id'];
                 break;
         }
     }
     if ($parm) {
         $parm = http_build_query($parm, null, '&');
     } else {
         $parm = '';
     }
     $links = e107::getAddon('page', 'e_sitelink');
     $data = $links->pageNav($parm);
     if (isset($data['title']) && !vartrue($template['noAutoTitle'])) {
         // use chapter title
         $template['caption'] = $data['title'];
         $data = $data['body'];
     }
     if (empty($data)) {
         return;
     }
     return e107::getNav()->render($data, $template);
 }
开发者ID:armpit,项目名称:e107,代码行数:50,代码来源:e_shortcode.php

示例4: db_adminmenu

function db_adminmenu()
{
    global $st;
    foreach ($st->_options as $key => $val) {
        $var[$key]['text'] = $val['label'];
        $var[$key]['link'] = e_SELF . "?mode=" . $key;
    }
    e107::getNav()->admin(DBLAN_10, $_GET['mode'], $var);
}
开发者ID:JBeezygit,项目名称:e107,代码行数:9,代码来源:db.php

示例5: admin_content_config_adminmenu

function admin_content_config_adminmenu()
{
    global $pref;
    if (!isset($pref['plug_installed']['content'])) {
        return '';
    }
    global $sql, $plugintable, $aa;
    //toggle to show categories in admin right hand menu
    $showadmincat = TRUE;
    if (e_QUERY) {
        $qs = explode(".", e_QUERY);
    }
    if (isset($qs[0]) && $qs[0] == "cat" && isset($qs[1]) && $qs[1] == "create") {
        $act = $qs[0] . "." . $qs[1];
    } elseif (isset($qs[0]) && $qs[0] == "content" && isset($qs[1]) && $qs[1] == "create") {
        $act = $qs[0] . "." . $qs[1];
    } else {
        $act = isset($qs[0]) ? $qs[0] : "";
    }
    if ($act == "") {
        $act = "content";
    }
    $var['content']['text'] = CONTENT_ADMIN_MENU_LAN_0;
    $var['content']['link'] = e_SELF;
    $var['content.create']['text'] = CONTENT_ADMIN_MENU_LAN_1;
    $var['content.create']['link'] = e_SELF . "?content.create";
    $var['cat']['text'] = CONTENT_ADMIN_MENU_LAN_2;
    $var['cat']['link'] = e_SELF . "?cat";
    $var['cat.create']['text'] = CONTENT_ADMIN_MENU_LAN_3;
    $var['cat.create']['link'] = e_SELF . "?cat.create";
    $var['order']['text'] = CONTENT_ADMIN_MENU_LAN_15;
    $var['order']['link'] = e_SELF . "?order";
    $var['option']['text'] = CONTENT_ADMIN_MENU_LAN_6;
    $var['option']['link'] = e_SELF . "?options";
    if (getperms("0")) {
        $var['manager']['text'] = CONTENT_ADMIN_MENU_LAN_17;
        $var['manager']['link'] = e_SELF . "?manager";
    }
    if ($submittedcontents = $sql->db_Count($plugintable, "(*)", "WHERE content_refer ='sa' ")) {
        $var['submitted']['text'] = CONTENT_ADMIN_MENU_LAN_4 . " (" . $submittedcontents . ")";
        $var['submitted']['link'] = e_SELF . "?submitted";
    }
    $mainmenuact = $act;
    $mainmenuvar = $var;
    /*  THIS IS ONLY WAY I FOUND TO BE ABLE USE SEPARATE MENUS WITH ITS OWN HASHES */
    $E_OPTIONS_MENU['start'] = '<ul id="admin-ui-nav-menu" class="plugin-navigation-options nav nav-list">';
    $E_OPTIONS_MENU['button'] = '<li><a class="link{LINK_CLASS}" href="{LINK_URL}"{ID}{ONCLICK}>&nbsp;{LINK_TEXT}</a>{SUB_MENU}</li>';
    $E_OPTIONS_MENU['button_active'] = '<li class="active"><a class="link-active{LINK_CLASS}" href="{LINK_URL}"{ID}{ONCLICK}>&nbsp;{LINK_TEXT}</a>{SUB_MENU}</li>';
    $E_OPTIONS_MENU['start_sub'] = '<ul class="plugin-navigation-sub{SUB_CLASS}"{SUB_ID}>';
    $E_OPTIONS_MENU['button_sub'] = '<li><a class="link" href="{LINK_URL}">&nbsp;{LINK_TEXT}</a>{SUB_MENU}</li>';
    $E_OPTIONS_MENU['button_active_sub'] = '<li><a class="link-active" href="{LINK_URL}">&nbsp;{LINK_TEXT}</a>{SUB_MENU}</li>';
    $E_OPTIONS_MENU['end_sub'] = '</ul>';
    $E_OPTIONS_MENU['end'] = '</ul>';
    $E_OPTIONS_MENU['divider'] = '<li role="separator" class="divider"></li>';
    $E_PAGES_MENU = $E_OPTIONS_MENU;
    $E_PAGES_MENU['start'] = '<ul id="admin-ui-nav-menu" class="plugin-navigation-pages nav nav-list">';
    if (isset($qs[0]) && $qs[0] == "options" && isset($qs[1])) {
        unset($var);
        $var = array();
        $act = "";
        $var['creation']['text'] = CONTENT_ADMIN_MENU_LAN_7;
        //$text_creation
        $var['catcreation']['text'] = CONTENT_ADMIN_MENU_LAN_23;
        //$text_catcreation
        $var['submission']['text'] = CONTENT_ADMIN_MENU_LAN_8;
        //$text_submission
        $var['paththeme']['text'] = CONTENT_ADMIN_MENU_LAN_9;
        //$text_paththeme
        $var['general']['text'] = CONTENT_ADMIN_MENU_LAN_10;
        //$text_general
        $var['menu']['text'] = CONTENT_ADMIN_MENU_LAN_14;
        //$text_menu
        $var['recentpages']['text'] = CONTENT_ADMIN_MENU_LAN_11;
        //$text_recentpages
        $var['catpages']['text'] = CONTENT_ADMIN_MENU_LAN_12;
        //$text_catpages
        $var['contentpages']['text'] = CONTENT_ADMIN_MENU_LAN_13;
        //$text_contentpages
        $var['authorpage']['text'] = CONTENT_ADMIN_MENU_LAN_18;
        //$text_authorpage
        $var['archivepage']['text'] = CONTENT_ADMIN_MENU_LAN_16;
        //$text_archivepage
        $var['toppage']['text'] = CONTENT_ADMIN_MENU_LAN_20;
        //$text_toppage
        $var['scorepage']['text'] = CONTENT_ADMIN_MENU_LAN_22;
        //$text_scorepage
        $sql = new db();
        $sql = e107::getDb();
        $content_heading = $sql->retrieve($plugintable, "content_heading", "content_id='" . $qs[1] . "' ");
        e107::getNav()->admin(CONTENT_ADMIN_MENU_LAN_6 . ": " . $content_heading . "", 'creation', $var, $E_OPTIONS_MENU);
    }
    show_admin_menu(CONTENT_ADMIN_MENU_LAN_6, $mainmenuact, $mainmenuvar);
    if ($showadmincat) {
        $sql2 = new db();
        if ($category_total = $sql2->db_Select($plugintable, "content_id, content_heading", "content_parent='0' ")) {
            while ($row = $sql2->db_Fetch()) {
                unset($var);
                $var = array();
                $array = $aa->getCategoryTree("", $row['content_id'], FALSE);
                //get all categories from each main parent
//.........这里部分代码省略.........
开发者ID:Jimmi08,项目名称:content,代码行数:101,代码来源:admin_content_config.php

示例6: render_links

function render_links($link, $title, $description, $perms, $icon = FALSE, $mode = FALSE)
{
    return e107::getNav()->renderAdminButton($link, $title, $description, $perms, $icon, $mode);
}
开发者ID:gitye,项目名称:e107,代码行数:4,代码来源:admin.php

示例7: show_admin_menu

 function show_admin_menu($title, $active_page, $e107_vars, $js = FALSE, $sub_link = FALSE, $sortlist = FALSE)
 {
     return e107::getNav()->admin($title, $active_page, $e107_vars, false, false, $sortlist);
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:4,代码来源:boot.php

示例8: renderMenu

 /**
  * Generic Admin Menu Generator
  * @return string
  */
 function renderMenu()
 {
     $tp = e107::getParser();
     $var = array();
     $selected = false;
     foreach ($this->adminMenu as $key => $val) {
         if (isset($val['perm']) && $val['perm'] !== '' && !getperms($val['perm'])) {
             continue;
         }
         $tmp = explode('/', trim($key, '/'), 3);
         // sync with mode/route access
         if (!$this->checkModeAccess($tmp[0]) || !$this->checkRouteAccess($tmp[0] . '/' . $tmp[1])) {
             continue;
         }
         // custom 'selected' check
         if (isset($val['selected']) && $val['selected']) {
             $selected = $val['selected'] === true ? $key : $val['selected'];
         }
         foreach ($val as $k => $v) {
             switch ($k) {
                 case 'caption':
                     $k2 = 'text';
                     $v = defset($v, $v);
                     break;
                 case 'url':
                     $k2 = 'link';
                     $v = $tp->replaceConstants($v, 'abs') . '?mode=' . $tmp[0] . '&amp;action=' . $tmp[1];
                     break;
                 case 'uri':
                     $k2 = 'link';
                     $v = $tp->replaceConstants($v, 'abs');
                     break;
                 default:
                     $k2 = $k;
                     break;
             }
             $var[$key][$k2] = $v;
         }
         // TODO slide down menu options?
         if (!vartrue($var[$key]['link'])) {
             $var[$key]['link'] = e_SELF . '?mode=' . $tmp[0] . '&amp;action=' . $tmp[1];
             // FIXME - URL based on $modes, remove url key
         }
         if (varset($val['tab'])) {
             $var[$key]['link'] .= "&amp;tab=" . $val['tab'];
         }
         /*$var[$key]['text'] = $val['caption'];
         		$var[$key]['link'] = (vartrue($val['url']) ? $tp->replaceConstants($val['url'], 'abs') : e_SELF).'?mode='.$tmp[0].'&action='.$tmp[1];
         		$var[$key]['perm'] = $val['perm'];	*/
         if (!empty($val['modal'])) {
             $var[$key]['link_class'] = ' e-modal';
             if (!empty($val['modal-caption'])) {
                 $var[$key]['link_data'] = array('data-modal-caption' => $val['modal-caption']);
             }
         }
     }
     if (empty($var)) {
         return '';
     }
     $request = $this->getRequest();
     if (!$selected) {
         $selected = $request->getMode() . '/' . $request->getAction();
     }
     $selected = vartrue($this->adminMenuAliases[$selected], $selected);
     return e107::getNav()->admin($this->menuTitle, $selected, $var);
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:70,代码来源:admin_ui.php

示例9: admin_banner_adminmenu

function admin_banner_adminmenu()
{
    $qry = e_QUERY;
    $act = vartrue($qry, 'main');
    $var['main']['text'] = LAN_MANAGE;
    $var['main']['link'] = e_SELF;
    $var['create']['text'] = LAN_CREATE;
    $var['create']['link'] = e_SELF . "?create";
    $var['menu']['text'] = BNRLAN_35;
    $var['menu']['link'] = e_SELF . "?menu";
    e107::getNav()->admin(LAN_PLUGIN_BANNER_NAME, $act, $var);
}
开发者ID:hgz5w,项目名称:e107,代码行数:12,代码来源:admin_banner.php

示例10: render2

 function render2()
 {
     $mes = e107::getMessage();
     $admin_cat = e107::getNav()->adminCats();
     $text = "<div class='center'>\n        \t   \n        \t\t\t<ul class='nav nav-tabs'>";
     foreach ($admin_cat['id'] as $cat_key => $cat_id) {
         // $text .= "<li id='tab-main_".$cat_key."' ><span style='white-space:nowrap'><img class='icon S16' src='".$admin_cat['img'][$cat_key]."' alt='' style='margin-right:3px' /><a href='#core-main_".$cat_key."'>".$admin_cat['title'][$cat_key]."</a></span></li>";
         $text .= "<li id='tab-main_" . $cat_key . "' ><a data-toggle='tab' href='#core-main_" . $cat_key . "'>" . $admin_cat['title'][$cat_key] . "</a></li>";
     }
     $text .= "</ul>";
     $text .= "<div id='tab-content'>";
     print_a($admin_cat);
     foreach ($admin_cat['id'] as $cat_key => $cat_id) {
         $text_check = FALSE;
         $text_cat = "";
         if ($cat_key != 5) {
             foreach ($newarray as $key => $funcinfo) {
                 if ($funcinfo[4] == $cat_key) {
                     $text_rend = e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], 'div');
                     if ($text_rend) {
                         $text_check = TRUE;
                     }
                     $text_cat .= $text_rend;
                 }
             }
         } else {
             $text_rend = e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "div");
             if ($text_rend) {
                 $text_check = TRUE;
             }
             $text_cat .= $text_rend;
         }
         //$text_cat .= render_clean();
         if ($text_check) {
             $text .= "<div class='tab-pane adminform' id='core-main_" . $cat_key . "'>\n";
             $text .= " <div class='main_caption bevel'><b>" . $admin_cat['title'][$cat_key] . "</b></div>";
             $text .= $text_cat;
             $text .= "</div><!-- End tab-pane -->";
         }
     }
     $text .= "</div></div>";
     $ns->tablerender(ADLAN_47 . " " . ADMINNAME, $mes->render() . $text);
 }
开发者ID:armpit,项目名称:e107,代码行数:43,代码来源:tabbed.php

示例11: search_adminmenu

function search_adminmenu()
{
    $query = e_QUERY;
    $action = vartrue($query, 'main');
    $var['main']['text'] = SEALAN_41;
    $var['main']['link'] = e_SELF;
    $var['settings']['text'] = LAN_PREFS;
    $var['settings']['link'] = e_SELF . "?settings";
    e107::getNav()->admin(SEALAN_40, $action, $var);
}
开发者ID:gitye,项目名称:e107,代码行数:10,代码来源:search.php

示例12: prefs_adminmenu

function prefs_adminmenu()
{
    $var['core-prefs-main']['text'] = PRFLAN_1;
    $var['core-prefs-email']['text'] = PRFLAN_254;
    $var['core-prefs-registration']['text'] = PRFLAN_28;
    $var['core-prefs-signup']['text'] = PRFLAN_19;
    //	$var['core-prefs-sociallogin']['text'] = "Social Options"; // Moved into plugin.
    $var['core-prefs-comments']['text'] = PRFLAN_210;
    $var['core-prefs-uploads']['text'] = PRFLAN_255;
    $var['core-prefs-header1']['header'] = PRFLAN_256;
    $var['core-prefs-display']['text'] = PRFLAN_13;
    $var['core-prefs-admindisp']['text'] = PRFLAN_77;
    $var['core-prefs-textpost']['text'] = PRFLAN_101;
    $var['core-prefs-security']['text'] = PRFLAN_47;
    $var['core-prefs-date']['text'] = PRFLAN_21;
    $var['core-prefs-javascript']['text'] = PRFLAN_257;
    $var['core-prefs-advanced']['text'] = PRFLAN_149;
    e107::getNav()->admin("Basic " . LAN_OPTIONS . '--id--prev_nav', 'core-prefs-main', $var);
}
开发者ID:8moustapha8,项目名称:e107,代码行数:19,代码来源:prefs.php

示例13: fileinspector_adminmenu

function fileinspector_adminmenu()
{
    $var['setup']['text'] = "Setup";
    $var['setup']['link'] = e_SELF . "?mode=setup";
    $var['run']['text'] = "Results";
    $var['run']['link'] = e_SELF . "?mode=run";
    e107::getNav()->admin(FC_LAN_1, $_GET['mode'], $var);
}
开发者ID:armpit,项目名称:e107,代码行数:8,代码来源:fileinspector.php

示例14: render_admin_links

 * Copyright (C) 2008-2014 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 * Administration menu
 *
*/
if (!defined('e107_INIT')) {
    exit;
}
if (ADMIN == TRUE) {
    e107::lan('core', 'admin', true);
    // We're not in admin - load generic admin phrases
    $tp = e107::getParser();
    $pref = e107::getPref();
    $ns = e107::getRender();
    $nav = e107::getNav();
    $array_functions = $nav->adminLinks();
    $amtext = "<div class='text-center' style='text-align:center'>\n\t<select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox form-control'>\n\t<option>" . LAN_SELECT . "</option>\n";
    foreach ($array_functions as $link_value) {
        $amtext .= render_admin_links($link_value['link'], $link_value['title'], $link_value['perms']);
    }
    $amtext .= "</select>\n\t</div>";
    $ns->tablerender(LAN_ADMIN, $amtext, 'admin_menu');
}
function render_admin_links($link, $title, $perms)
{
    if (getperms($perms)) {
        return "<option value='" . $link . "'>" . $title . "</option>";
    }
}
开发者ID:armpit,项目名称:e107,代码行数:31,代码来源:admin_menu.php

示例15: admin_log_adminmenu

function admin_log_adminmenu()
{
    if (e_QUERY) {
        $tmp = explode(".", e_QUERY);
        $action = $tmp[0];
    }
    if ($action == "") {
        $action = "adminlog";
    }
    $var['adminlog']['text'] = RL_LAN_030;
    $var['adminlog']['link'] = "admin_log.php?adminlog";
    $var['auditlog']['text'] = RL_LAN_062;
    $var['auditlog']['link'] = "admin_log.php?auditlog";
    $var['rolllog']['text'] = RL_LAN_002;
    $var['rolllog']['link'] = "admin_log.php?rolllog";
    $var['downlog']['text'] = RL_LAN_067;
    $var['downlog']['link'] = "admin_log.php?downlog";
    $var['detailed']['text'] = RL_LAN_091;
    $var['detailed']['link'] = "admin_log.php?detailed";
    // Deprecated by Comments Manager.
    /*
    	$var['comments']['text'] = 'Comments';
    	$var['comments']['link'] = "admin_log.php?comments";
    */
    $var['config']['text'] = LAN_OPTIONS;
    $var['config']['link'] = "admin_log.php?config";
    /* XXX - why?!
    	if($action == 'comments')
    	{
    		$var['users']['text'] = RL_LAN_115;
    		$var['users']['link'] = "users.php";
    	}
    	*/
    e107::getNav()->admin(RL_LAN_005, $action, $var);
}
开发者ID:gitter-badger,项目名称:e107,代码行数:35,代码来源:admin_log.php


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