Changeset 5101


Ignore:
Timestamp:
Mar 10, 2010, 11:22:30 PM (11 years ago)
Author:
vdigital
Message:

New feature: Modeling could be turn off in themeconf

$themeconfmodeling = false; /* Assume to have all *.tpl files in the template.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/template.class.php

    r5095 r5101  
    101101  function set_template_dir($dir)
    102102  {
    103         if (!defined('IN_ADMIN'))
     103    $modeling = $this->get_themeconf('modeling');
     104        if (!defined('IN_ADMIN') and ($modeling !== false))
    104105        { // Modeling is active only on gallery side and never in admin
    105106          // Set the normal directory
    106107      $this->smarty->template_dir = array($dir);
    107108          // Modeling by theme parameter
    108           $modeling = './template/' . $this->get_themeconf('modeling');
    109       if ( $modeling != './template/' and is_dir($modeling))
     109          $model = './template/' . $modeling;
     110      if ( $model != './template/' and is_dir($model))
    110111          {
    111                 $this->smarty->template_dir[] = $modeling;
     112                $this->smarty->template_dir[] = $model;
    112113      }
    113114          // Default template directory
Note: See TracChangeset for help on using the changeset viewer.