本文整理汇总了PHP中SmartyWrap::theSmarty方法的典型用法代码示例。如果您正苦于以下问题:PHP SmartyWrap::theSmarty方法的具体用法?PHP SmartyWrap::theSmarty怎么用?PHP SmartyWrap::theSmarty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmartyWrap
的用法示例。
在下文中一共展示了SmartyWrap::theSmarty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
static function init()
{
self::$theSmarty = new Smarty();
self::$theSmarty->template_dir = util_getRootPath() . 'templates';
self::$theSmarty->compile_dir = util_getRootPath() . 'templates_c';
self::$theSmarty->inheritance_merge_compiled_includes = false;
// This allows variable names in {include} tags
self::assign('wwwRoot', util_getWwwRoot());
self::assign('imgRoot', util_getImgRoot());
self::assign('sources', Model::factory('Source')->order_by_desc('isOfficial')->order_by_asc('displayOrder')->find_many());
self::assign('sUser', session_getUser());
self::assign('nick', session_getUserNick());
self::assign('currentYear', date("Y"));
self::assign('isMobile', util_isMobile());
self::assign('suggestNoBanner', util_suggestNoBanner());
self::assign('cfg', Config::getAll());
self::assign('GLOBALS', $GLOBALS);
self::$theSmarty->registerPlugin('function', 'getDebugInfo', array('SmartyWrap', 'getDebugInfo'));
}
示例2: init
static function init()
{
self::$theSmarty = new Smarty();
self::$theSmarty->template_dir = util_getRootPath() . 'templates';
self::$theSmarty->compile_dir = util_getRootPath() . 'templates_c';
self::assign('wwwRoot', util_getWwwRoot());
self::assign('imgRoot', util_getImgRoot());
self::assign('staticServer', Config::get('static.url'));
self::assign('sources', Model::factory('Source')->order_by_desc('isOfficial')->order_by_asc('displayOrder')->find_many());
self::assign('sUser', session_getUser());
self::assign('is_mirror', Config::get('global.mirror'));
self::assign('nick', session_getUserNick());
self::assign('contact_email', Config::get('global.contact'));
self::assign('hostedBy', Config::get('global.hostedBy'));
self::assign('currentYear', date("Y"));
self::assign('bannerType', Config::get('banner.type'));
self::assign('developmentMode', Config::get('global.developmentMode'));
self::assign('isMobile', util_isMobile());
self::assign('suggestNoBanner', util_suggestNoBanner());
self::assign('acEnable', Config::get('search.acEnable'));
self::assign('acMinChars', Config::get('search.acMinChars'));
self::assign('GLOBALS', $GLOBALS);
self::$theSmarty->registerPlugin('function', 'getDebugInfo', array('SmartyWrap', 'getDebugInfo'));
}