示例#1
0
function rcms_show_element($element, $parameters = '')
{
    global $system;
    switch ($element) {
        case 'title':
            if (!@$system->config['hide_title']) {
                echo $system->config['title'];
                if (!empty($system->config['pagename'])) {
                    echo ' - ';
                }
            }
            echo !empty($system->config['pagename']) ? $system->config['pagename'] : '';
            break;
        case 'menu_point':
            list($point, $template) = explode('@', $parameters);
            if (is_file(CUR_SKIN_PATH . 'skin.' . $template . '.php')) {
                $tpl_path = CUR_SKIN_PATH . 'skin.' . $template . '.php';
            } elseif (is_file(MODULES_TPL_PATH . $template . '.php')) {
                $tpl_path = MODULES_TPL_PATH . $template . '.php';
            }
            if (!empty($tpl_path) && !empty($system->output['menus'][$point])) {
                foreach ($system->output['menus'][$point] as $module) {
                    $system->showWindow($module[0], $module[1], $module[2], $tpl_path);
                }
            }
            break;
        case 'main_point':
            foreach ($system->output['modules'] as $module) {
                $system->showWindow($module[0], $module[1], $module[2], CUR_SKIN_PATH . 'skin.' . substr(strstr($parameters, '@'), 1) . '.php');
            }
            break;
        case 'navigation':
            $dyna = parse_ini_file(CONFIG_PATH . 'dynamik.ini', true);
            if (isset($dyna['use'])) {
                echo rcms_parse_dynamik_menu($parameters);
                break;
            }
            echo rcms_parse_menu($parameters);
            break;
        case 'meta':
            readfile(DATA_PATH . 'meta_tags.html');
            echo '<meta http-equiv="Content-Type" content="text/html; charset=' . $system->config['encoding'] . '" />' . "\r\n";
            if (!empty($system->config['enable_rss'])) {
                foreach ($system->feeds as $module => $d) {
                    echo '<link rel="alternate" type="application/xml" title="RSS ' . $d[0] . '" href="./rss.php?m=' . $module . '" />' . "\r\n";
                }
            }
            if (!empty($system->config['meta'])) {
                echo $system->config['meta'];
            }
            break;
        case 'copyright':
            if (!defined('RCMS_COPYRIGHT_SHOWED') || !RCMS_COPYRIGHT_SHOWED) {
                echo RCMS_POWERED . ' ' . RCMS_VERSION_A . '.' . RCMS_VERSION_B . '.' . RCMS_VERSION_C . RCMS_VERSION_SUFFIX . ' ' . RCMS_COPYRIGHT . '<br /> ';
            }
            break;
    }
}
示例#2
0
<?php

if (!defined('HIDE_NAVIGATION') || !HIDE_NAVIGATION) {
    show_window(__('Navigation'), rcms_parse_menu('<a href="{link}" class="{class}">{icon}  {title}</a><br />'));
}
示例#3
0
function rcms_show_element($element, $parameters = '')
{
    global $system, $lightbox_config;
    switch ($element) {
        case 'title':
            if (empty($system->config['hide_title'])) {
                echo $system->config['title'];
            }
            echo !empty($system->config['pagename']) ? ' - ' . $system->config['pagename'] : '';
            break;
        case 'slogan':
            if (!empty($system->config['slogan'])) {
                echo $system->config['slogan'];
            }
            break;
        case 'menu_point':
            list($point, $template) = explode('@', $parameters);
            if (is_file(CUR_SKIN_PATH . 'skin.' . $template . '.php')) {
                $tpl_path = CUR_SKIN_PATH . 'skin.' . $template . '.php';
            } elseif (is_file(MODULES_TPL_PATH . $template . '.php')) {
                $tpl_path = MODULES_TPL_PATH . $template . '.php';
            }
            if (!empty($tpl_path) && !empty($system->output['menus'][$point])) {
                foreach ($system->output['menus'][$point] as $module) {
                    $system->showWindow($module[0], $module[1], $module[2], $tpl_path);
                }
            }
            break;
        case 'main_point':
            foreach ($system->output['modules'] as $module) {
                $system->showWindow($module[0], $module[1], $module[2], CUR_SKIN_PATH . 'skin.' . substr(strstr($parameters, '@'), 1) . '.php');
            }
            break;
        case 'navigation':
            $nav = rcms_parse_menu($parameters);
            $nav = str_replace('id="{id}"', '', $nav);
            echo $nav;
            break;
        case 'meta':
            if (!function_exists('rcms_loadAdminLib')) {
                @readfile(DATA_PATH . 'meta_tags.html');
            }
            echo '<meta http-equiv="Content-Type" content="text/html; charset=' . $system->config['encoding'] . '" />' . "\r\n";
            if (!empty($system->config['enable_rss'])) {
                foreach ($system->feeds as $module => $d) {
                    echo '<link rel="alternate" type="application/rss+xml" title="RSS ' . $d[0] . '" href="' . RCMS_ROOT_PATH . 'rss.php?m=' . $module . '" />' . "\r\n";
                }
            }
            echo '
<link type="text/css" href="' . SKIN_PATH . 'main.css" rel="stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>window.jQuery || document.write("<script src=\\"' . RCMS_ROOT_PATH . 'tools/js/vendor/jquery.1.8.3.min.js\\"><\\/script>");</script>
<link rel="stylesheet" href="' . RCMS_ROOT_PATH . 'tools/js/vendor/jquery-ui.base.1.9.2.css">
<script src="' . RCMS_ROOT_PATH . 'tools/js/vendor/jquery-ui.1.9.2.min.js"></script>
<script type="text/javascript" src="' . RCMS_ROOT_PATH . 'tools/js/ajaxupload.js"></script>
<script type="text/javascript" src="' . RCMS_ROOT_PATH . 'tools/js/editor.js"></script>
';
            if (!empty($lightbox_config['code'])) {
                echo $lightbox_config['code'];
            }
            echo '<script type="text/javascript" src="tools/js/limit.js"></script>' . "\r\n";
            //  Limit post addon
            echo '<script type="text/javascript" src="tools/js/tiny_mce/tiny_mce.js"></script>';
            if (!empty($system->config['meta'])) {
                echo $system->config['meta'];
            }
            break;
        case 'copyright':
            if (!defined('RCMS_COPYRIGHT_SHOWED') || !RCMS_COPYRIGHT_SHOWED) {
                echo RCMS_POWERED . ' ' . RCMS_VERSION_A . '.' . RCMS_VERSION_B . '.' . RCMS_VERSION_C . RCMS_VERSION_SUFFIX . '<br />' . RCMS_COPYRIGHT;
            }
            break;
    }
}
function rcms_show_element($element, $parameters = '')
{
    global $lang, $REDIRECTION, $TEMPLATE, $system;
    switch ($element) {
        case 'title':
            echo $system->config['title'] . (!empty($system->config['pagename']) ? ' - ' . $system->config['pagename'] : '');
            break;
        case 'menu_point':
            list($point, $template) = explode('@', $parameters);
            if (!empty($system->output['menus'][$point])) {
                foreach ($system->output['menus'][$point] as $module) {
                    $system->showWindow($module[0], $module[1], $module[2], CUR_SKIN_PATH . 'skin.' . $template . '.php');
                }
            }
            break;
        case 'main_point':
            foreach ($system->output['modules'] as $module) {
                $system->showWindow($module[0], $module[1], $module[2], CUR_SKIN_PATH . 'skin.' . substr(strstr($parameters, '@'), 1) . '.php');
            }
            break;
        case 'navigation':
            echo rcms_parse_menu($parameters);
            break;
        case 'meta':
            readfile(DATA_PATH . 'meta_tags.html');
            echo '<meta http-equiv="Content-Type" content="text/html; charset=' . $lang['options']['encoding'] . '" />' . "\r\n";
            global $rss_cfg;
            if (@$rss_cfg['enable']) {
                $allowed = explode(' ', @$rss_cfg['bases']);
                foreach ($allowed as $feed) {
                    $name = !empty($lang['rss']['feeds'][$feed]) ? $lang['rss']['feeds'][$feed] : $feed;
                    echo '<link rel="alternate" type="application/xml" title="RSS ' . $name . '" href="./index.php?rss=' . $feed . '" />' . "\r\n";
                }
            }
            if (!empty($system->config['meta'])) {
                echo $system->config['meta'];
            }
            break;
        case 'header':
            readfile(DATA_PATH . 'top.html');
            break;
        case 'copyright':
            if (!defined('RCMS_COPYRIGHT_SHOWED') || !RCMS_COPYRIGHT_SHOWED) {
                echo '<a href="http://sourceforge.net/projects/reloadcms">' . $lang['copyright']['powered'] . '</a> ' . RCMS_VERSION_BRANCH . '.' . RCMS_VERSION_SECOND . '-' . RCMS_VERSION_SUFFIX . '@' . RCMS_VERSION_REVIS . '<br>&copy; 2004-2005 ReloadCMS Team';
            }
            break;
    }
}