$_SERVER["HTTP_HOST"] :
(isset($ff->HTTP_HOST) ? $ff->HTTP_HOST : 'localhost');
- /* use the regex compiler, as it doesnt parse <tags */
- require_once 'HTML/Template/Flexy.php';
- $template = new HTML_Template_Flexy( array(
+ /* use the regex compiler, as it doesnt parse <tags */\
+ $tops = array(
'compiler' => 'Flexy',
'nonHTML' => true,
'filters' => array('SimpleTags','Mail'),
// 'debug'=>1,
- ));
+ );
+ if (!empty($args['templateDir'])) {
+ $tops['templateDir'] = $args['templateDir'];
+ }
+
+ require_once 'HTML/Template/Flexy.php';
+ $template = new HTML_Template_Flexy( $tops );