本文整理汇总了PHP中e107::getMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::getMenu方法的具体用法?PHP e107::getMenu怎么用?PHP e107::getMenu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类e107
的用法示例。
在下文中一共展示了e107::getMenu方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plugin_shortcode
function plugin_shortcode($parm = '')
{
$tp = e107::getParser();
@(list($menu, $parms) = explode('|', $parm . '|', 2));
$path = $tp->toDB(dirname($menu));
$name = $tp->toDB(basename($menu));
//BC Fix for v2.x
$changeMenuPaths = array(array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'compliance_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'powered_by_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'counter_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'latestnews_menu'), array('oldpath' => 'compliance_menu', 'newpath' => 'siteinfo', 'menu' => 'compliance_menu'), array('oldpath' => 'powered_by_menu', 'newpath' => 'siteinfo', 'menu' => 'powered_by_menu'), array('oldpath' => 'sitebutton_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'), array('oldpath' => 'counter_menu', 'newpath' => 'siteinfo', 'menu' => 'counter_menu'), array('oldpath' => 'usertheme_menu', 'newpath' => 'user_menu', 'menu' => 'usertheme_menu'), array('oldpath' => 'userlanguage_menu', 'newpath' => 'user_menu', 'menu' => 'userlanguage_menu'), array('oldpath' => 'lastseen_menu', 'newpath' => 'online', 'menu' => 'lastseen_menu'), array('oldpath' => 'other_news_menu', 'newpath' => 'news', 'menu' => 'other_news_menu'), array('oldpath' => 'other_news_menu', 'newpath' => 'news', 'menu' => 'other_news2_menu'));
foreach ($changeMenuPaths as $k => $v) {
if ($v['oldpath'] == $path && $v['menu'] == $name) {
$path = $v['newpath'];
continue;
}
}
if ($path == '.') {
$path = $menu;
}
/**
* @todo check if plugin is installed when installation required
*/
/**
* fixed todo: $mode is provided by the menu itself, return is always true, added optional menu parameters
*/
return e107::getMenu()->renderMenu($path, $name, trim($parms, '|'), true);
}
示例2: __construct
function __construct()
{
$this->forumObj = new e107forum();
$this->plugPref = e107::pref('forum');
// general forum preferences.
$this->menuPref = e107::getMenu()->pref();
// ie. popup config details from within menu-manager.
$this->render();
}
示例3: plugin_shortcode
function plugin_shortcode($parm = '')
{
$tp = e107::getParser();
@(list($menu, $parms) = explode('|', $parm . '|', 2));
$path = $tp->toDB(dirname($menu));
$name = $tp->toDB(basename($menu));
if ($path == '.') {
$path = $menu;
}
/**
* @todo check if plugin is installed when installation required
*/
/**
* fixed todo: $mode is provided by the menu itself, return is always true, added optional menu parameters
*/
return e107::getMenu()->renderMenu($path, $name, trim($parms, '|'), true);
}
示例4: menu_shortcode
function menu_shortcode($parm, $mode = '')
{
if (is_array($parm)) {
list($plugin, $menu) = explode("/", $parm['path'], 2);
if ($menu == '') {
$menu = $plugin;
}
unset($parm['path']);
return e107::getMenu()->renderMenu($plugin, $menu . "_menu", http_build_query($parm, '&'));
} else {
$path = $parm;
if (is_numeric($path)) {
return e107::getMenu()->renderArea($parm);
} else {
list($plugin, $menu) = explode("/", $path, 2);
if ($menu == '') {
$menu = $plugin;
}
return e107::getMenu()->renderMenu($plugin, $menu . "_menu");
}
}
}
示例5: sc_cpagemenu
function sc_cpagemenu()
{
$parm = $this->var['page_id'];
return e107::getMenu()->renderMenu($parm, true, false, true);
}
示例6: define
if ($def) {
define("THEME_LAYOUT", $def);
} else {
$deflayout = !isset($user_pref['sitetheme_deflayout']) ? varset($pref['sitetheme_deflayout']) : $user_pref['sitetheme_deflayout'];
/**
* @ignore
*/
define("THEME_LAYOUT", $deflayout);
// default layout.
}
unset($def, $lyout, $cusPagePref, $menus_equery, $deflayout);
}
// -----------------------------------------------------------------------
$sql->db_Mark_Time('Start: Get menus');
if (!isset($_E107['no_menus'])) {
e107::getMenu()->init();
}
// here we USE the theme
if (e_ADMIN_AREA) {
if (file_exists(THEME . 'admin_theme.php') && strpos(e_SELF . '?' . e_QUERY, $ADMIN_DIRECTORY . 'menus.php?configure') === FALSE) {
require_once THEME . 'admin_theme.php';
} else {
require_once THEME . 'theme.php';
}
} else {
require_once THEME . 'theme.php';
if (isset($SC_WRAPPER)) {
e107::scStyle($SC_WRAPPER);
}
}
//----------------------------
示例7: menu_shortcode
function menu_shortcode($parm)
{
return e107::getMenu()->renderArea($parm);
}
示例8:
<?php
/*
* e107 website system
*
* 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)
*
* Related configuration module - News
*
*
*/
if (!defined('e107_INIT')) {
exit;
}
if (USER_AREA && e107::getMenu()->isLoaded('news_carousel')) {
e107::css('news', 'news_carousel.css');
}
示例9: upgradeLegacyPrefs
/**
* Check for legacy Prefernces and upgrade if neccessary.
*/
public function upgradeLegacyPrefs()
{
e107::getMessage()->addDebug("Legacy Forum Menu Pref Detected. Upgrading..");
$legacyMenuPrefs = array('newforumposts_caption' => 'caption', 'newforumposts_display' => 'display', 'newforumposts_maxage' => 'maxage', 'newforumposts_characters' => 'chars', 'newforumposts_postfix' => 'postfix', 'newforumposts_title' => 'title');
if ($newPrefs = e107::getConfig('menu')->migrateData($legacyMenuPrefs, true)) {
if (e107::getMenu()->setParms('forum', 'newforumposts_menu', $newPrefs) !== false) {
e107::getMessage()->addDebug("Sucessfully Migrated newforumposts prefs from core to menu table. ");
} else {
e107::getMessage()->addDebug("Legacy Forum Menu Pref Detected. Upgrading..");
}
}
}
示例10: sc_cmenu
/**
* New in v2.x. eg. {CMENU=feature-1} Renders a menu called 'feature-1' as found in the e107_page table See admin Pages/Menus .
*/
function sc_cmenu($parm = '')
{
return e107::getMenu()->renderMenu($parm, false, false, true);
}