Changeset 5071 for trunk/include
- Timestamp:
- Mar 7, 2010, 3:24:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/template.class.php
r5014 r5071 97 97 /** 98 98 * Sets the template root directory for this Template object. 99 * Revised from Piwigo 2.1 to add modeling support 99 100 */ 100 101 function set_template_dir($dir) 101 102 { 102 $this->smarty->template_dir = $dir; 103 103 if (!defined('IN_ADMIN')) 104 { // Modeling is active only on gallery side and never in admin 105 // Set the normal directory 106 $this->smarty->template_dir = array($dir); 107 // Modeling by theme parameter 108 $modeling = './template/' . $this->get_themeconf('modeling'); 109 if ( $modeling != './template/' and is_dir($modeling)) 110 { 111 $this->smarty->template_dir[] = $modeling; 112 } 113 // Default template directory 114 $this->smarty->template_dir[] = './template-common/yoga'; 115 } 116 else 117 { 118 $this->smarty->template_dir = $dir; 119 } 104 120 $real_dir = realpath($dir); 105 121 $compile_id = crc32( $real_dir===false ? $dir : $real_dir);
Note: See TracChangeset
for help on using the changeset viewer.