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


PHP Smarty::Smarty方法代码示例

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


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

示例1: __construct

 /**
  * Overwrite template directory path if Smarty is used by a module 
  */
 public function __construct($module = '')
 {
     if ($module != '') {
         $this->template_dir = 'modules/' . $module . '/templates';
     }
     parent::Smarty();
 }
开发者ID:anhvn,项目名称:pokerspot,代码行数:10,代码来源:template.class.php

示例2: bBlog

 function bBlog()
 {
     // connect to database
     $this->_adb = NewADOConnection('mysql://' . DB_USERNAME . ':' . DB_PASSWORD . '@' . DB_HOST . '/' . DB_DATABASE . '?persist');
     //$this->_db = new db(DB_USERNAME, DB_PASSWORD, DB_DATABASE, DB_HOST);
     $this->num_rows =& $this->_db->num_rows;
     $this->insert_id =& $this->_db->insert_id;
     //Load the config
     $config =& new configHandler($this->_adb);
     $config->loadConfig();
     $this->assign('blogname', C_BLOGNAME);
     $this->assign('blogdescription', C_BLOG_DESCRIPTION);
     $this->assign('blogurl', BLOGURL);
     $this->assign('bblogurl', BBLOGURL);
     $this->assign('metakeywords', C_META_KEYWORDS);
     $this->assign('metadescription', C_META_DESCRIPTION);
     $this->assign('charset', C_CHARSET);
     $this->assign('direction', C_DIRECTION);
     $this->assign('C_CAPTCHA_ENABLE', C_CAPTCHA_ENABLE);
     // initial time from config table, based on last updated stuff.
     // this is just the initial value.
     //$this->lastmodified = C_LAST_MODIFIED;
     //$this->register_postfilter("update_when_compiled");
     // load up the sections
     $this->get_sections();
     //start the session that we need so much ;)
     if (!session_id()) {
         session_start();
     }
     $this->_ph =& new postHandler(&$this->_adb);
     Smarty::Smarty();
 }
开发者ID:BackupTheBerlios,项目名称:loquacity-svn,代码行数:32,代码来源:bBlog.class.php

示例3: XSmarty

 function XSmarty()
 {
     $this->compile_dir = URLLOCAL . 'classes_ext/smarty/templates_c';
     $this->cache_dir = URLLOCAL . 'classes_ext/smarty/cache';
     $this->config_dir = URLLOCAL . 'classes_ext/smarty/config_smarty';
     Smarty::Smarty();
 }
开发者ID:jeromecc,项目名称:tuv2,代码行数:7,代码来源:XSmarty.php

示例4: TemplateEngine

 /**
  * Constructor
  * initialize the smarty template engine
  * 
  * @param string template
  */
 function TemplateEngine($template, $p_theme = THEME_DEFAULT)
 {
     if (!defined('THEME')) {
         //define('THEME', THEME_DEFAULT);
         define('THEME', $p_theme);
     }
     $templateSet = THEME;
     parent::Smarty();
     $this->template_dir = array(INCLUDE_PATH . '/themes/' . $templateSet . '/', INCLUDE_PATH . '/themes/' . THEME_DEFAULT . '/', PLUGINS_PATH);
     $this->compile_dir = INCLUDE_PATH . '/datas/tpl_compiled/';
     $this->cache_dir = INCLUDE_PATH . '/datas/cache_smarty/';
     $this->config_dir = INCLUDE_PATH . '/themes/' . $templateSet . '/smarty_config/';
     $this->plugins_dir = array(INCLUDE_PATH . '/libs/smarty/plugins', INCLUDE_PATH . '/core/include/smarty_plugins');
     $this->cache_lifetime = CACHE_SMARTY;
     $this->compile_id = $templateSet . PHPMV_VERSION . INTERNAL_STATS;
     if (defined('SMARTY_DEBUG') && SMARTY_DEBUG) {
         $this->caching = 0;
         $this->force_compile = 1;
         $this->compile_check = 1;
     } else {
         $this->caching = 1;
         $this->force_compile = 0;
         $this->compile_check = 0;
         $this->load_filter('output', 'trimwhitespace');
     }
     $this->clear_all_cache(CACHE_SMARTY);
     if (mt_rand(0, 5000) === 0) {
         $this->clear_all_cache();
     }
     $this->setTemplate($template);
 }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:37,代码来源:TemplateEngine.php

示例5:

 function CI_Smarty()
 {
     parent::Smarty();
     $this->compile_dir = APPPATH . "cache/templates_c";
     $this->template_dir = APPPATH . "views/templates";
     $this->assign('APPPATH', APPPATH);
     $this->assign('BASEPATH', BASEPATH);
 }
开发者ID:dalinhuang,项目名称:Teaching-interactive-web-platform,代码行数:8,代码来源:Smarty.php

示例6:

 function CI_Smarty()
 {
     parent::Smarty();
     $this->compile_dir = APPPATH . "views/templates_c";
     $this->template_dir = APPPATH . "views/templates";
     $this->assign('APPPATH', APPPATH);
     $this->assign('BASEPATH', BASEPATH);
     log_message('debug', "Smarty Class Initialized");
 }
开发者ID:Hammad90,项目名称:SportoyaRepo,代码行数:9,代码来源:Smarty.php

示例7:

 /**
  * class constructor
  *
  * @access	public
  */
 function __construct()
 {
     // call parent class
     parent::Smarty();
     // use application cache folder
     $this->cache_dir = APPDIR . 'cache/';
     // use application view folder
     $this->template_dir = APPDIR . 'views/';
 }
开发者ID:hymns,项目名称:phphyppo,代码行数:14,代码来源:smarty_wrapper.php

示例8: __construct

 public function __construct($name, $panelName = '')
 {
     Smarty::Smarty();
     $this->name = $name;
     $this->panelName = $panelName;
     $this->default_resource_type = 'template';
     $this->security = true;
     Gpf_Plugins_Engine::extensionPoint('Core.initSmarty', $this);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:9,代码来源:Smarty.class.php

示例9:

 function __construct()
 {
     parent::Smarty();
     $this->compile_dir = $this->smartydir . "templates_c/";
     $this->config_dir = $this->smartydir . "configs/";
     $this->cache_dir = $this->smartydir . "cache/";
     $this->caching = true;
     $this->force_compile = false;
     $this->template_dir = APP_TMVC_DIR . "/myapp/views/";
 }
开发者ID:haibaer76,项目名称:volksvermessung,代码行数:10,代码来源:library.Smarty_Wrapper.php

示例10: array

 function Smarty_parser($config = array())
 {
     parent::Smarty();
     if (count($config) > 0) {
         $this->initialize($config);
     }
     // register Smarty resource named "ci"
     $this->register_resource("ci", array($this, "ci_get_template", "ci_get_timestamp", "ci_get_secure", "ci_get_trusted"));
     log_message('debug', "Smarty_parser Class Initialized");
 }
开发者ID:nise-nabe,项目名称:uzuramemo,代码行数:10,代码来源:Smarty_parser.php

示例11: __construct

 public function __construct()
 {
     // Вызов конструктораSmarty
     parent::Smarty();
     // Меняем папки шаблонов по умолчанию
     $this->template_dir = TEMPLATE_DIR;
     $this->compile_dir = COMPILE_DIR;
     $this->config_dir = CONFIG_DIR;
     $this->plugins_dir[0] = SMARTY_DIR . 'plugins';
     $this->plugins_dir[1] = PRESENTATION_DIR . 'smarty_plugins';
 }
开发者ID:kulikovalexey,项目名称:myshop,代码行数:11,代码来源:application.php

示例12: installbase

 /**
  * Performs basic setup and then calls __init
  *
  * Note that all data received via $_POST have magic quotes removed.
  */
 function installbase()
 {
     stringHandler::removeMagicQuotes($_POST);
     Smarty::Smarty();
     $this->_steps = array('prescan', 'install', 'postscan', 'upgrade');
     $this->assign('version', LOQ_CUR_VERSION);
     $this->template_dir = LOQ_INSTALLER . '/templates';
     $this->setCompileDir();
     $this->loadconfiguration();
     $this->__init();
 }
开发者ID:BackupTheBerlios,项目名称:loquacity-svn,代码行数:16,代码来源:installbase.class.php

示例13:

 function CI_Smarty()
 {
     parent::Smarty();
     $this->template_dir = APPPATH . "views/";
     $this->compile_dir = "saemc://smartycompiled/";
     $this->cache_dir = "saemc://smartycache/";
     $this->compile_locking = false;
     $this->assign('APPPATH', APPPATH);
     $this->assign('BASEPATH', BASEPATH);
     log_message('debug', "Smarty Class Initialized");
 }
开发者ID:udng,项目名称:looking-glass-php-sae,代码行数:11,代码来源:Smarty.php

示例14:

 /**
  * The class constructor.
  */
 function __construct()
 {
     parent::Smarty();
     if (file_exists(SMARTY_DIR . $this->compiler_file)) {
         require_once SMARTY_DIR . $this->compiler_file;
     } else {
         // use include_path
         require_once $this->compiler_file;
     }
     $this->compiler_file = "Smarty_CompilerExt.class.php";
     $this->compiler_class = "Smarty_CompilerExt";
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:15,代码来源:SmartyExt.class.php

示例15: __construct

 /**
  * Override Smarty::__construct
  * 
  * @return void
  */
 public function __construct()
 {
     parent::Smarty();
     /**
      * Config some params
      */
     $viewConfig = Vi_Registry::getConfig('viewConfig');
     $viewConfig['template_dir'] = '';
     foreach ($viewConfig as $key => $value) {
         $this->{$key} = $value;
     }
 }
开发者ID:judasnow,项目名称:qspread20101020,代码行数:17,代码来源:Engine.php


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