New feature: Modeling could be turn off in themeconf

$themeconf['modeling'] = false; /* Assume to have all *.tpl files in the template.

git-svn-id: http://piwigo.org/svn/trunk@5101 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
vdigital
2010-03-10 22:22:30 +00:00
parent dfe94b111d
commit 964a191ff1
+5 -4
View File
@@ -100,15 +100,16 @@ class Template {
*/
function set_template_dir($dir)
{
if (!defined('IN_ADMIN'))
$modeling = $this->get_themeconf('modeling');
if (!defined('IN_ADMIN') and ($modeling !== false))
{ // Modeling is active only on gallery side and never in admin
// Set the normal directory
$this->smarty->template_dir = array($dir);
// Modeling by theme parameter
$modeling = './template/' . $this->get_themeconf('modeling');
if ( $modeling != './template/' and is_dir($modeling))
$model = './template/' . $modeling;
if ( $model != './template/' and is_dir($model))
{
$this->smarty->template_dir[] = $modeling;
$this->smarty->template_dir[] = $model;
}
// Default template directory
$this->smarty->template_dir[] = './template/default';