Changeset 5177
- Timestamp:
- Mar 18, 2010, 7:40:00 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/clear/themeconf.inc.php
r5173 r5177 1 1 <?php 2 2 $themeconf = array( 3 ' theme' => 'clear',3 'name' => 'clear', 4 4 'parent' => 'default', 5 5 'admin_icon_dir' => 'admin/themes/clear/icon', -
trunk/admin/themes/default/themeconf.inc.php
r5123 r5177 1 1 <?php 2 2 $themeconf = array( 3 ' theme' => 'default',3 'name' => 'default', 4 4 'icon_dir' => 'themes/default/icon', 5 5 'admin_icon_dir' => 'admin/themes/default/icon', 6 6 'mime_icon_dir' => 'themes/default/icon/mimetypes/', 7 'local_head' => 'local_head.tpl', 7 8 ); 8 9 ?> -
trunk/admin/themes/roma/themeconf.inc.php
r5173 r5177 1 1 <?php 2 2 $themeconf = array( 3 ' theme' => 'roma',3 'name' => 'roma', 4 4 'parent' => 'default', 5 5 ); -
trunk/include/template.class.php
r5154 r5177 25 25 require_once(PHPWG_ROOT_PATH.'include/smarty/libs/Smarty.class.php'); 26 26 27 // migrate lang:XXX28 // sed "s/{lang:\([^}]\+\)}/{\'\1\'|@translate}/g" my_template.tpl29 // migrate change root level vars {XXX}30 // sed "s/{pwg_root}/{ROOT_URL}/g" my_template.tpl31 // migrate change root level vars {XXX}32 // sed "s/{\([a-zA-Z_]\+\)}/{$\1}/g" my_template.tpl33 // migrate all34 // cat my_template.tpl | sed "s/{lang:\([^}]\+\)}/{\'\1\'|@translate}/g" | sed "s/{pwg_root}/{ROOT_URL}/g" | sed "s/{\([a-zA-Z_]\+\)}/{$\1}/g"35 36 27 37 28 class Template { … … 49 40 // Templates prefilter from external sources (plugins) 50 41 var $external_filters = array(); 51 42 52 43 // used by html_head smarty block to add content before </head> 53 44 var $html_head_elements = array(); … … 79 70 80 71 $this->smarty->template_dir = array(); 81 $this->set_theme($root, $theme, $path); 72 if ( !empty($theme) ) 73 $this->set_theme($root, $theme, $path); 74 else 75 $this->set_template_dir($root); 82 76 83 77 $this->smarty->assign('lang_info', $lang_info); … … 104 98 } 105 99 106 $tpl_var = array('name' => $themeconf[' theme']);107 if ( file_exists($root.'/'.$theme.'/local_head.tpl'))108 { 109 $tpl_var['local_head'] = realpath($root.'/'.$theme.'/ local_head.tpl');100 $tpl_var = array('name' => $themeconf['name']); 101 if (!empty($themeconf['local_head']) ) 102 { 103 $tpl_var['local_head'] = realpath($root.'/'.$theme.'/'.$themeconf['local_head'] ); 110 104 } 111 105 $this->smarty->append('themes', $tpl_var); … … 469 463 ksort($this->external_filters[$handle]); 470 464 } 471 465 472 466 /** 473 467 * This function actually triggers the filters on the tpl files. … … 480 474 { 481 475 $compile_id = ''; 482 foreach ($this->external_filters[$handle] as $filters) 483 { 484 foreach ($filters as $filter) 476 foreach ($this->external_filters[$handle] as $filters) 477 { 478 foreach ($filters as $filter) 485 479 { 486 480 list($type, $callback) = $filter; … … 497 491 if (isset($this->external_filters[$handle])) 498 492 { 499 foreach ($this->external_filters[$handle] as $filters) 500 { 501 foreach ($filters as $filter) 493 foreach ($this->external_filters[$handle] as $filters) 494 { 495 foreach ($filters as $filter) 502 496 { 503 497 list($type, $callback) = $filter; -
trunk/themes/Sylvia/themeconf.inc.php
r5123 r5177 1 1 <?php 2 2 $themeconf = array( 3 ' theme' => 'Sylvia',3 'name' => 'Sylvia', 4 4 'parent' => 'default', 5 5 'icon_dir' => 'themes/Sylvia/icon', -
trunk/themes/clear/themeconf.inc.php
r5123 r5177 1 1 <?php 2 2 $themeconf = array( 3 ' theme' => 'clear',3 'name' => 'clear', 4 4 'parent' => 'default', 5 5 ); -
trunk/themes/dark/themeconf.inc.php
r5123 r5177 1 1 <?php 2 2 $themeconf = array( 3 ' theme' => 'dark',3 'name' => 'dark', 4 4 'parent' => 'default', 5 5 ); -
trunk/themes/default/themeconf.inc.php
r5123 r5177 1 1 <?php 2 2 $themeconf = array( 3 ' theme' => 'default',3 'name' => 'default', 4 4 'icon_dir' => 'themes/default/icon', 5 5 'mime_icon_dir' => 'themes/default/icon/mimetypes/', 6 'local_head' => 'local_head.tpl', 6 7 ); 7 8 ?>
Note: See TracChangeset
for help on using the changeset viewer.