From: <on...@us...> - 2002-09-18 11:20:33
|
Update of /cvsroot/xoops/xoops-current/html/class In directory usw-pr-cvs1:/tmp/cvs-serv32109 Added Files: xoopstpl.php Log Message: no message --- NEW FILE: xoopstpl.php --- <?php // $Id: xoopstpl.php,v 1.1 2002/09/18 11:20:29 onokazu Exp $ // ------------------------------------------------------------------------- // // XOOPS - PHP Content Management System // // <http://www.xoops.org/> // // ------------------------------------------------------------------------- // // 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------- // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // require_once(SMARTY_DIR."Smarty.class.php"); class XoopsTpl extends Smarty{ function XoopsTpl($id=null){ $this->Smarty(); $this->compile_id = isset($id) ? trim($id) : null; } function setTemplateDir($dirname){ if (substr(trim($dirname), -1) == '/' || substr(trim($dirname), -1) == '\\') { $dirname = substr($dirname, 1, -1); } $ret = ''; if (isset($this->template_dir)) { $ret = $this->template_dir; } $this->template_dir = $dirname; return $ret; } function setDebugging($flag=false){ $this->debugging = is_bool($flag) ? $flag : false; } function setCaching($num=0){ $this->caching = intval($num); } function setCompileDir($dirname){ if (substr(trim($dirname), -1) == '/' || substr(trim($dirname), -1) == '\\') { $dirname = substr($dirname, 1, -1); } $ret = ''; if (isset($this->compile_dir)) { $ret = $this->compile_dir; } $this->compile_dir = $dirname; return $ret; } function setCacheDir($dirname){ if (substr(trim($dirname), -1) == '/' || substr(trim($dirname), -1) == '\\') { $dirname = substr($dirname, 1, -1); } $ret = ''; if (isset($this->cache_dir)) { $ret = $this->cache_dir; } $this->cache_dir = $dirname; return $ret; } } ?> |