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


PHP ZLanguage::getThemeDomain方法代码示例

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


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

示例1: smarty_function_bt_usersublinks

/**
 * BlankTheme plugin to display the user navigation submenu.
 *
 * Available parameters:
 *  - id           (string) ID of the wrapper div (default: 'nav_main')
 *  - current      (string) Current screen ID (.ini current value or module name) (optional)
 *  - currentclass (string) CSS class name of the current tab, list item (default: 'current')
 *  - span         (bool)   Flag to enable SPAN wrappers on the links text, useful for sliding doors (default: false)
 *
 * Example:
 *  {bt_usersublinks id='nav' current='home' currentclass='myActiveClass'}
 *
 * @author Mateo Tibaquirá
 * @since  19/06/11
 *
 * @param array             $params All parameters passed to this function from the template.
 * @param Zikula_View_Theme &$view  Reference to the View_Theme object.
 *
 * @return string User submenu output.
 */
function smarty_function_bt_usersublinks($params, Zikula_View_Theme &$view)
{
    $dom = ZLanguage::getThemeDomain('BlankTheme');

    $id = isset($params['id']) ? $params['id'] : 'nav_sub';
    if (!isset($params['current'])) {
        $current = $view->getTplVar('current') ? $view->getTplVar('current') : $view->getToplevelmodule();
    } else {
        $current = $params['current'];
    }
    $currentclass = isset($params['currentclass']) ? $params['currentclass'] : 'current';
    $span = isset($params['span']) ? (bool)$params['span'] : false;

    $currentsub = $current.'-'.$view->getTplVar('type').'-'.$view->getTplVar('func');

    /*** Build the submenu-array ***/
    $menu = array();

    // dummy example links
    $menu['home'][] = array(
                          '',                       // page id : current-type-func
                          __('Home Sublink', $dom), // translatable title
                          '',                       // translatable description
                          '#'                       // link
                      );

    $menu['home'][] = array(
                          '',
                          __('Second Sublink', $dom),
                          '',
                          '#'
                      );

    // render the submenu
    $output = '';

    if (isset($menu[$current])) {
        $output .= '<div id="'.$id.'"><ul>';
        foreach ($menu[$current] as $option) {
            $output .= bt_usersublinks_drawmenu($option, $currentsub, $currentclass, $span);
        }
        $output .= '</ul></div>';
    }

    return $output;
}
开发者ID:projectesIF,项目名称:Sirius,代码行数:66,代码来源:function.bt_usersublinks.php

示例2: smarty_function_bt_userlinks

/**
 * BlankTheme plugin to display the user navigation menu.
 *
 * Available parameters:
 *  - id           (string) ID of the wrapper div (default: 'nav_main')
 *  - current      (string) Current screen ID (.ini current value or module name) (optional)
 *  - currentclass (string) CSS class name of the current tab, list item (default: 'current')
 *  - span         (bool)   Flag to enable SPAN wrappers on the links text, useful for sliding doors (default: false)
 *  - desc         (bool)   Flag to put the parent links descriptions inside SPAN.bt_desc instead the link title (default: false)
 *
 * Example:
 *  {bt_userlinks id='myId' current='home' currentclass='myActiveClass'}
 *
 * @author Mateo Tibaquirá
 * @since  08/11/07
 *
 * @param array             $params All parameters passed to this function from the template.
 * @param Zikula_View_Theme &$view  Reference to the View_Theme object.
 *
 * @return string User menu output.
 */
function smarty_function_bt_userlinks($params, Zikula_View_Theme &$view)
{
    $dom = ZLanguage::getThemeDomain('BlankTheme');

    $id = isset($params['id']) ? $params['id'] : 'nav_main';
    if (!isset($params['current'])) {
        $current = $view->getTplVar('current') ? $view->getTplVar('current') : $view->getToplevelmodule();
    } else {
        $current = $params['current'];
    }
    $currentclass = isset($params['currentclass']) ? $params['currentclass'] : 'current';
    $span = isset($params['span']) ? (bool)$params['span'] : false;
    $desc = isset($params['desc']) ? (bool)$params['desc'] : false;

    /*** Build the menu-array ***/
    $menu   = array();
    $menu[] = array(
                  'home',                      // page id / module name
                  __('Home', $dom),            // translatable title
                  __('Go to home page', $dom), // translatable description
                  System::getHomepageUrl(),    // link
                  null                         // array of sublinks (optional)
              );

    if (ModUtil::available('News')) {
        $menu[] = array(
                      'News',
                      __('News', $dom),
                      __('Articles index', $dom),
                      ModUtil::url('News', 'user', 'main')
                  );
    }

    if (ModUtil::available('Pages')) {
        $menu[] = array(
                      'Pages',
                      __('Pages', $dom),
                      __('Content section', $dom),
                      ModUtil::url('Pages', 'user', 'main')
                  );
    }

    if (ModUtil::available('Dizkus')) {
        $menu[] = array(
                      'Dizkus',
                      __('Forums', $dom),
                      __('Discuss area', $dom),
                      ModUtil::url('Dizkus', 'user', 'main')
                  );
    }

    if (ModUtil::available('FAQ')) {
        $menu[] = array(
                      'FAQ',
                      __('FAQ', $dom),
                      __('Frequent questions', $dom),
                      ModUtil::url('FAQ', 'user', 'main')
                  );
    }

    if (ModUtil::available('Wikula')) {
        $menu[] = array(
                      'Wikula',
                      __('Wiki', $dom),
                      __('Documents', $dom),
                      ModUtil::url('Wikula', 'user', 'main')
                  );
    }

    if (ModUtil::available('TimeIt')) {
        $menu[] = array(
                      'TimeIt',
                      __('Calendar', $dom),
                      __('List of events', $dom),
                      ModUtil::url('TimeIt', 'user', 'main')
                  );
    }

    if (ModUtil::available('crpCalendar')) {
//.........这里部分代码省略.........
开发者ID:projectesIF,项目名称:Sirius,代码行数:101,代码来源:function.bt_userlinks.php

示例3: __construct

 /**
  * Constructor.
  *
  * @param Zikula_ServiceManager $serviceManager ServiceManager.
  * @param string                $themeName      Theme name.
  */
 public function __construct(Zikula_ServiceManager $serviceManager, $themeName)
 {
     // store our theme information
     $this->themeinfo = ThemeUtil::getInfo(ThemeUtil::getIDFromName($themeName));
     // prevents any case mismatch
     $themeName = $this->themeinfo['name'];
     foreach (array('name', 'directory', 'version', 'state', 'xhtml') as $key) {
         $this->{$key} = $this->themeinfo[$key];
     }
     parent::__construct($serviceManager);
     if ($this->themeinfo['i18n']) {
         ZLanguage::bindThemeDomain($this->name);
         // property for {gt} template plugin to detect language domain
         $this->domain = ZLanguage::getThemeDomain($this->name);
     } else {
         $this->domain = null;
     }
     EventUtil::attachCustomHandlers("themes/{$themeName}/EventHandlers");
     EventUtil::attachCustomHandlers("themes/{$themeName}/lib/{$themeName}/EventHandlers");
     $event = new \Zikula\Core\Event\GenericEvent($this);
     $this->eventManager->dispatch('theme.preinit', $event);
     // change some base settings from our parent class
     // template compilation
     $this->compile_dir = CacheUtil::getLocalDir('Theme_compiled');
     $this->compile_check = ModUtil::getVar('ZikulaThemeModule', 'compile_check');
     $this->force_compile = ModUtil::getVar('ZikulaThemeModule', 'force_compile');
     // template caching
     $this->cache_dir = CacheUtil::getLocalDir('Theme_cache');
     $this->caching = (int) ModUtil::getVar('ZikulaThemeModule', 'enablecache');
     //if ($this->caching) {
     //    $this->cache_modified_check = true;
     //}
     // if caching and is not an admin controller
     if ($this->caching && strpos($this->type, 'admin') !== 0) {
         $modulesnocache = array_filter(explode(',', ModUtil::getVar('ZikulaThemeModule', 'modulesnocache')));
         if (in_array($this->toplevelmodule, $modulesnocache)) {
             $this->caching = Zikula_View::CACHE_DISABLED;
         }
     } else {
         $this->caching = Zikula_View::CACHE_DISABLED;
     }
     // halt caching for write operations to prevent strange things happening
     if (isset($_POST) && count($_POST) != 0) {
         $this->caching = Zikula_View::CACHE_DISABLED;
     }
     // and also for GET operations with csrftoken/authkey
     if (isset($_GET['csrftoken']) || isset($_GET['authkey'])) {
         $this->caching = Zikula_View::CACHE_DISABLED;
     }
     $this->cache_lifetime = ModUtil::getVar('ZikulaThemeModule', 'cache_lifetime');
     if (!$this->homepage) {
         $this->cache_lifetime = ModUtil::getVar('ZikulaThemeModule', 'cache_lifetime_mods');
     }
     // assign all our base template variables
     $this->_base_vars();
     // define the plugin directories
     $this->_plugin_dirs();
     // load the theme configuration
     $this->load_config();
     // check for cached output
     // turn on caching, check for cached output and then disable caching
     // to prevent blocks from being cached
     if ($this->caching && $this->is_cached($this->themeconfig['page'], $this->cache_id)) {
         $this->display($this->themeconfig['page'], $this->cache_id);
         System::shutdown();
     }
     // register page vars output filter
     $this->load_filter('output', 'pagevars');
     // register short urls output filter
     if (System::getVar('shorturls')) {
         $this->load_filter('output', 'shorturls');
     }
     // register trim whitespace output filter if requried
     if (ModUtil::getVar('ZikulaThemeModule', 'trimwhitespace')) {
         $this->load_filter('output', 'trimwhitespace');
     }
     $this->load_filter('output', 'asseturls');
     $event = new \Zikula\Core\Event\GenericEvent($this);
     $this->eventManager->dispatch('theme.init', $event);
     $this->startOutputBuffering();
 }
开发者ID:rmaiwald,项目名称:core,代码行数:87,代码来源:Theme.php

示例4: smarty_function_bt_htmloutput

/**
 * BlankTheme plugin to centralize important outputs.
 *
 * Available parameters:
 *  - section (string) Name of the output section to return.
 *  - noempty (bool)   Flag to disable the "bt-empty" CSS class for the classesinnerpage section.
 *
 * Example:
 *  {bt_htmloutput section='head'}
 *  {bt_htmloutput section='topnavlinks'}
 *
 * @author Mateo Tibaquirá
 * @since  05/07/08
 *
 * @param array             $params All parameters passed to this function from the template.
 * @param Zikula_View_Theme &$view  Reference to the View_Theme object.
 *
 * @return string Output of the requested section.
 */
function smarty_function_bt_htmloutput($params, Zikula_View_Theme &$view)
{
    $dom = ZLanguage::getThemeDomain('BlankTheme');

    // section parameter check
    if (!isset($params['section']) || empty($params['section'])) {
        return '';
    }

    // blanktheme vars
    $body      = $view->getTplVar('body');
    $layout    = $view->getTplVar('layout');
    $btconfig  = $view->getTplVar('btconfig');
    $btcssbody = $view->getTplVar('btcssbody');

    // check for the current variable
    if ($view->getTplVar('current')) {
        $current = $view->getTplVar('current');
    } else {
        $current = $view->getToplevelmodule();
        $view->assign('current', $current);
    }

    // process the respective output
    $output = '';

    switch ($params['section'])
    {
        case 'topnavlinks':
            // build the menu list
            // option: {id, translatable link text, link}
            $menu = array();
            if (UserUtil::isLoggedIn()) {
                if ($view->getTplVar('type') != 'admin' && SecurityUtil::checkPermission('::', '::', ACCESS_ADMIN)) {
                    $menu[] = array('admin', __('Admin', $dom), ModUtil::url('Admin', 'admin', 'adminpanel'));
                }
                $profileModule = System::getVar('profilemodule', '');
                if (!empty($profileModule) && ModUtil::available($profileModule)) {
                    $menu[] = array('account', __('Your account', $dom), ModUtil::url($profileModule, 'user', 'main'));
                }
                $menu[] = array('logout', __('Log out', $dom), ModUtil::url('Users', 'user', 'logout'));
            } else {
                $menu[] = array('register', __('Register', $dom), ModUtil::url('Users', 'user', 'register'));
                $menu[] = array('login', __('Login', $dom), ModUtil::url('Users', 'user', 'login'));
            }
            // render the menu
            $count   = count($menu) - 1;
            $output  = '<div id="bt_topnavlinks"><ul>';
            foreach ($menu as $k => $option) {
                $class = '';
                if (count($menu) == 1) {
                    $class = 'unique';
                } elseif ($k == 0) {
                    $class = 'first';
                } elseif ($k == $count) {
                    $class = 'last';
                }
                $output .= '<li '.($class ? ' class="bt_'.$class.'"' : '').'>';
                if (!empty($option[2])) {
                    $output .= '<a title="'. DataUtil::formatForDisplay($option[1]). '" href="'.DataUtil::formatForDisplay($option[2]).'"><span>'. DataUtil::formatForDisplay($option[1]). '</span></a>';
                } else {
                    $output .= '<span>'. DataUtil::formatForDisplay($option[1]). '</span>';
                }
                $output .= '</li>';
            }
            $output .= '</ul></div>';
            break;

        case 'fontresize':
            if ($btconfig['fontresize'] != '1') {
                break;
            }
            // font resize based in the efa script
            PageUtil::addVar('javascript', $view->getScriptpath().'/efa/efa_fontsize_packed.js');
            //PageUtil::addVar('javascript', $view->getScriptpath().'/efa/efa_fontsize.js');
            $output = '<script type="text/javascript">
                         // <![CDATA[
                         if (efa_fontSize) {
                           var efalang_zoomIn = "'.__('Increase font size', $dom).'";
                           var efalang_zoomReset = "'.__('Reset font size', $dom).'";
                           var efalang_zoomOut = "'.__('Decrease font size', $dom).'";
//.........这里部分代码省略.........
开发者ID:projectesIF,项目名称:Sirius,代码行数:101,代码来源:function.bt_htmloutput.php

示例5: smarty_function_bt_adminlinks

/**
 * BlankTheme plugin to display the admin navigation menu.
 *
 * Available parameters:
 *  - id           (string) ID of wrapper div (default: 'nav_admin')
 *  - ulclass      (string) CSS class name of the UL (default: 'cssplay_prodrop')
 *  - current      (string) Current screen ID (optional)
 *  - currentclass (string) CSS class name of the current tab, list item (default: 'selected')
 *
 * Example:
 *  {bt_adminlinks id='myId' ulclass='myUlClass' current='config' currentclass='myActiveClass'}
 *
 * @author Mateo Tibaquirá [mateo]
 * @author Erik Spaan [espaan]
 * @since  08/11/2007
 *
 * @param array             $params All parameters passed to this function from the template.
 * @param Zikula_View_Theme &$view  Reference to the View_Theme object.
 *
 * @return string Admin menu output.
 */
function smarty_function_bt_adminlinks($params, Zikula_View_Theme &$view)
{
    $dom = ZLanguage::getThemeDomain('BlankTheme');

    $id      = isset($params['id']) ? $params['id'] : 'nav_admin';
    $ulclass = isset($params['ulclass']) ? $params['ulclass'] : 'cssplay_prodrop';
    $current = isset($params['current']) ? $params['current'] : '';
    $cclass  = isset($params['currentclass']) ? $params['currentclass'] : 'selected';

    /*** Build the menu-array ***/
    /* menu option: {id, translatable link text, link, array of sublinks} */
    $menu = array();

    /* Homepage link */
    $menu[] = array('home', __('Home', $dom), System::getHomepageURL());

    if (SecurityUtil::checkPermission('Admin::', '::', ACCESS_EDIT))
    {
        /* Config menu */
        // System basis
        $linkoptions = array(
                             array(null, __('Site settings', $dom),  ModUtil::url('Settings', 'admin', 'main'),
                                 array(
                                     array(null, __('Localization', $dom),  ModUtil::url('Settings', 'admin', 'multilingual')),
                                     array(null, __('HTML settings', $dom), ModUtil::url('SecurityCenter', 'admin', 'allowedhtml'))
                                 )
                             ),
                             array(null, __('Permissions', $dom),    ModUtil::url('Permissions', 'admin', 'main')),
                             array(null, __('Categories', $dom),     ModUtil::url('Categories', 'admin', 'main'),
                                 array(
                                     array(null, __('Category registry', $dom), ModUtil::url('Categories', 'admin', 'editregistry')),
                                     array(null, __('New category', $dom),      ModUtil::url('Categories', 'admin', 'newcat'))
                                 )
                             ),
                             array(null, __('Admin panel', $dom),    ModUtil::url('Admin', 'admin', 'main'),
                                 array(
                                     array(null, __('Settings', $dom), ModUtil::url('Admin', 'admin', 'modifyconfig')),
                                     array(null, __('Help', $dom),     ModUtil::url('Admin', 'admin', 'help'))
                                 )
                             ),
                             array(null, __('System mailer', $dom),  ModUtil::url('Mailer', 'admin', 'main')),
                             array(null, __('Search options', $dom), ModUtil::url('Search', 'admin', 'main')),
                       );
        // Legal
        if (ModUtil::available('Legal')) {
            $linkoptions[] = array(null, __('Legal settings', $dom), ModUtil::url('Legal', 'admin', 'main'));
        }

        $menu[] = array('config', __('Config', $dom),  '#', $linkoptions);


        /* System menu */
        // Search for installed hooks
        $linkoptions = array();

        if (ModUtil::available('EZComments')) {
            $linkoptions[] = array(null, __('Comments', $dom),  ModUtil::url('EZComments', 'admin', 'modifyconfig'));
        }
        if (ModUtil::available('MultiHook')) {
            $linkoptions[] = array(null, __('MultiHook', $dom), ModUtil::url('MultiHook', 'admin', 'modifyconfig'));
        }
        if (ModUtil::available('BBCode')) {
            $linkoptions[] = array(null, __('BBCode', $dom),    ModUtil::url('bbcode', 'admin', 'config'));
        }
        if (ModUtil::available('BBSmile')) {
            $linkoptions[] = array(null, __('Smilies', $dom),   ModUtil::url('bbsmile', 'admin', 'modifyconfig'));
        }
        if (ModUtil::available('Ratings')) {
            $linkoptions[] = array(null, __('Ratings', $dom),   ModUtil::url('Ratings', 'admin', 'modifyconfig'));
        }
        if (empty($linkoptions)) {
            $linkoptions[] = array(null, __('No known hooks are installed', $dom), '#');
        }

        $theme  = System::getVar('Default_Theme');
        $menu[] = array('system', __('System', $dom), '#',
                    array(
                        array(null, __('Extensions', $dom),             ModUtil::url('Extensions', 'admin', 'main'),
                            array(
//.........这里部分代码省略.........
开发者ID:projectesIF,项目名称:Sirius,代码行数:101,代码来源:function.bt_adminlinks.php

示例6: array

<?php 
/**
 * Zikula Application Framework
 *
 * @copyright (c) 2007-2012 Mateo Tibaquirá
 * @link      http://www.blanktheme.org
 * @license   GNU/GPL - http://www.gnu.org/copyleft/gpl.html
 * @abstract  Blank theme to develop new themes with ease
 */


$dom = ZLanguage::getThemeDomain('BlankTheme');

$themeversion['name']           = 'BlankTheme';
$themeversion['displayname']    = __('BlankTheme', $dom);
$themeversion['description']    = __('Theme development framework for Zikula', $dom);
$themeversion['version']        = '1.3';

$themeversion['author']         = 'BlankTheme Team';
$themeversion['contact']        = 'http://www.blanktheme.org';
$themeversion['admin']          = 1;
$themeversion['user']           = 1;
$themeversion['system']         = 0;
$themeversion['changelog']      = 'docs/changelog.txt';
$themeversion['credits']        = 'docs/credits.txt';
$themeversion['help']           = 'docs/help.txt';
$themeversion['license']        = 'docs/license.txt';
$themeversion['xhtml']          = true;

$themeversion['extra']          = array('BlankTheme' => '1.3',
                                        'YAML'       => '3.3.1');
开发者ID:projectesIF,项目名称:Sirius,代码行数:31,代码来源:version.php

示例7: __construct

 /**
  * Build a new instance.
  */
 public function __construct($bundle)
 {
     $this->name = $bundle->getName();
     $this->baseDir = $bundle->getPath();
     $this->domain = ZLanguage::getThemeDomain($this->name);
     Zikula_ClassProperties::load($this, $this->getMetaData());
 }
开发者ID:Silwereth,项目名称:core,代码行数:10,代码来源:AbstractThemeVersion.php

示例8: _getthemedomain

    /**
     * Retrieves the theme domain
     *
     * @param string $themename Name of the theme to parse
     */
    public function _getthemedomain($themename)
    {
        if (in_array($themename, array('Andreas08', 'Atom', 'Printer', 'RSS', 'SeaBreeze'))) {
            return 'zikula';
        }

        return ZLanguage::getThemeDomain($themename);
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:13,代码来源:User.php


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