|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
alal Smarty n00b
Joined: 16 Dec 2004 Posts: 2
|
Posted: Thu Dec 30, 2004 4:32 pm Post subject: compile tpl |
|
|
if you run this on the file full name and add to
SmartyCompileCheck.class.inc
the line
$this->compiler_file = 'Smarty_CompilerCheck.class.php';
and intersept all the error in the Smarty_CompilerCheck.class.php file
you'll get compiler that return the errors to your $err and do with it what u like
function CHECKTPL($filename)
{
require_once "SmartyCompileCheck.class.inc";
$smarty = new SmartyCompileCheck ;
$output = $smarty->fetch($filename);
$err = count($smarty->getErrors()) ;
if(($err > 0))
{
$result = ($smarty->getErrors()) ;
return $result ;
}
//no errors found
else
return '';
} |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|