Example #1
0
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);
}
Example #2
0
 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();
 }
Example #3
0
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);
}
Example #4
0
File: menu.php Project: armpit/e107
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");
        }
    }
}
Example #5
0
 function sc_cpagemenu()
 {
     $parm = $this->var['page_id'];
     return e107::getMenu()->renderMenu($parm, true, false, true);
 }
Example #6
0
    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);
    }
}
//----------------------------
Example #7
0
File: menu.php Project: notzen/e107
function menu_shortcode($parm)
{
    return e107::getMenu()->renderArea($parm);
}
Example #8
0
<?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');
}
Example #9
0
 /**
  *  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..");
         }
     }
 }
Example #10
0
 /**
  *  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);
 }