Source for file smarty.class.php
Documentation is available at smarty.class.php
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* @author m2mtech <tech@m2m.at>
* @copyright 2007 m2m server software gmbh
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License Version 2
* @version $Id: smarty.class.php 149 2007-09-08 16:35:19Z m2mtech $
* @link http://www.ea-geier.at/
* attention: might have been defined already in
* config/config.php or code/config.php
if (!defined('eaSMARTY_DIR')) define('eaSMARTY_DIR', '3party/smarty/Smarty-2.6.18/libs/');
* path to temporary smarty folder
* attention: might have been defined already in
* config/config.php or code/config.php
if (!defined('eaSMARTY_TMP')) define('eaSMARTY_TMP', 'tmp/smarty/');
* path to template folder for smarty
* attention: might have been defined already in
* config/config.php or code/config.php
* path to language folder for smarty
* attention: might have been defined already in
* config/config.php or code/config.php
require_once(eaSMARTY_DIR . 'Smarty.class.php');
* holds local extension of the smarty library e.g. language handling
* constructor of smarty wrapper
* defines the environmental settings
$this->plugins_dir[] = dirname(__file__ ) . '/smartyplugins';
* and adjusts folder settins accordingly
* @param string $lang user language ('de'|'en')
if (!$lang) return false;
if (!preg_match('/[a-z]{2}/', $lang)) return false;
$this->compile_dir = eaSMARTY_TMP . '/templates_c/' . $lang . '/';
if (!is_dir($this->compile_dir)) mkdir($this->compile_dir);
if (!is_dir($this->cache_dir)) mkdir($this->cache_dir);
|