[Phpslash-commit] CVS: phpslash-dev/include/class slashTemplate.class,1.2,1.3
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2003-04-28 19:30:28
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1:/tmp/cvs-serv27034/phpslash-dev/include/class Modified Files: slashTemplate.class Log Message: alternate module template locations Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/slashTemplate.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** slashTemplate.class 21 Apr 2003 20:36:57 -0000 1.2 --- slashTemplate.class 28 Apr 2003 19:30:19 -0000 1.3 *************** *** 28,34 **** */ function slashTemplate($root = ".", $unknowns = "remove") { ! global $_PSL; $this->psl = &$_PSL; if ($this->debug & 4) { --- 28,35 ---- */ function slashTemplate($root = ".", $unknowns = "remove") { ! global $_PSL, $ary; $this->psl = &$_PSL; + $this->ary = &$ary; if ($this->debug & 4) { *************** *** 82,87 **** $status = false; ! if( file_exists($filepath)) { $status = Template::set_file($varname, $filepath); } elseif(!file_exists($templatedir ."/skin.ini")) { --- 83,97 ---- $status = false; ! if( file_exists($filepath)) { + // module templates in skin directory + $status = Template::set_file($varname, $filepath); + } elseif(file_exists($this->psl['moduledir'] ."/". $this->psl['module'][$this->ary['module']] ."/templates/" . basename($filename))) { + // module templates in module subdirectory + $filepath = $this->psl['moduledir'] ."/". $this->psl['module'][$this->ary['module']] ."/templates/" . basename($filename); + $status = Template::set_file($varname, $filepath); + } elseif( file_exists($templatedir ."/". $this->psl['module'][$this->ary['module']] ."/". basename($filename))) { + // module templates in subdirectory of skin + $filepath = $templatedir ."/". $this->psl['module'][$this->ary['module']] ."/". basename($filename); $status = Template::set_file($varname, $filepath); } elseif(!file_exists($templatedir ."/skin.ini")) { |