Changeset 2713
- Timestamp:
- Oct 11, 2008, 2:57:31 PM (16 years ago)
- Location:
- branches/2.0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/admin/extend_for_templates.php
r2588 r2713 74 74 /* Link all supported templates to their respective handle */ 75 75 $eligible_templates = array( 76 '----------' => 'N/A', 77 'about.tpl' => 'about', 78 'identification.tpl' => 'identification', 79 'mainpage_categories.tpl' => 'index_category_thumbnails', 80 'thumbnails.tpl' => 'index_thumbnails', 81 'redirect.tpl' => 'redirect', 82 // 'menubar.tpl' => 'menubar', // TODO by blocks 83 'header.tpl' => 'header', 84 'footer.tpl' => 'tail', 85 'index.tpl' => 'index', 86 'nbm.tpl' => 'nbm', 87 'notification.tpl' => 'notification', 88 'picture_content.tpl' => 'default_content', 89 'picture.tpl' => 'picture', 90 'popuphelp.tpl' => 'popuphelp', 91 'profile.tpl' => 'profile', 92 'profile_content.tpl' => 'profile_content', 93 'register.tpl' => 'register', 94 'search.tpl' => 'search', 95 'search_rules.tpl' => 'search_rules', 96 'slideshow.tpl' => 'slideshow', 97 'tags.tpl' => 'tags', 98 'upload.tpl' => 'upload',); 76 '----------' => 'N/A', 77 'about.tpl' => 'about', 78 'identification.tpl' => 'identification', 79 'mainpage_categories.tpl' => 'index_category_thumbnails', 80 'thumbnails.tpl' => 'index_thumbnails', 81 'redirect.tpl' => 'redirect', 82 'menubar.tpl' => 'menubar', 83 'menubar_categories.tpl' => 'mbCategories', 84 'menubar_identification.tpl' => 'mbIdentification', 85 'menubar_links.tpl' => 'mbLinks', 86 'menubar_menu.tpl' => 'mbMenu', 87 'menubar_specials.tpl' => 'mbSpecials', 88 'menubar_tags.tpl' => 'mbTags', 89 'header.tpl' => 'header', 90 'footer.tpl' => 'tail', 91 'index.tpl' => 'index', 92 'nbm.tpl' => 'nbm', 93 'notification.tpl' => 'notification', 94 'picture_content.tpl' => 'default_content', 95 'picture.tpl' => 'picture', 96 'popuphelp.tpl' => 'popuphelp', 97 'profile.tpl' => 'profile', 98 'profile_content.tpl' => 'profile_content', 99 'register.tpl' => 'register', 100 'search.tpl' => 'search', 101 'search_rules.tpl' => 'search_rules', 102 'slideshow.tpl' => 'slideshow', 103 'tags.tpl' => 'tags', 104 'upload.tpl' => 'upload',); 99 105 $flip_templates = array_flip($eligible_templates); 100 106 // +-----------------------------------------------------------------------+ -
branches/2.0/include/template.class.php
r2699 r2713 67 67 $this->smarty->register_block('html_head', array(&$this, 'block_html_head') ); 68 68 $this->smarty->register_function('known_script', array(&$this, 'func_known_script') ); 69 $this->smarty->register_function('known_template', array(&$this, 'func_known_template') ); 69 70 $this->smarty->register_prefilter( array('Template', 'prefilter_white_space') ); 70 71 if ( $conf['compiled_template_cache_language'] ) … … 409 410 } 410 411 412 /** 413 * This smarty "known_template" functions allows to include template 414 * If extent[$params['id']] exists, include template extension 415 * else include $params[$file] 416 */ 417 function func_known_template($params, &$smarty ) 418 { 419 if (!isset($params['file'])) 420 { 421 $smarty->trigger_error("known_template: missing 'file' parameter"); 422 return; 423 } 424 425 if (isset($params['id']) and isset($this->extents[$params['id']])) 426 { 427 $file = $this->extents[$params['id']]; 428 } 429 else 430 { 431 $file = $params['file']; 432 } 433 434 return $smarty->_smarty_include(array( 435 'smarty_include_tpl_file' => $file, 436 'smarty_include_vars' => array() 437 )); 438 } 439 411 440 static function prefilter_white_space($source, &$smarty) 412 441 { -
branches/2.0/plugins/LocalFilesEditor/admin.php
r2588 r2713 185 185 'thumbnails.tpl', 186 186 'redirect.tpl', 187 // 'menubar.tpl' 187 'menubar.tpl', 188 'menubar_categories.tpl', 189 'menubar_identification.tpl', 190 'menubar_links.tpl', 191 'menubar_menu.tpl', 192 'menubar_specials.tpl', 193 'menubar_tags.tpl', 188 194 'header.tpl', 189 195 'footer.tpl', -
branches/2.0/template/yoga/menubar.tpl
r2711 r2713 5 5 <dl id="{$id}"> 6 6 {if not empty($block->template)} 7 { includefile=$block->template }7 {known_template id=$id file=$block->template } 8 8 {else} 9 9 {$block->raw_content|@default}
Note: See TracChangeset
for help on using the changeset viewer.