Changeset 960 for trunk/include
- Timestamp:
- Dec 3, 2005, 6:33:38 PM (18 years ago)
- Location:
- trunk/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include
- Property svn:ignore
-
old new 1 1 mysql.inc.php 2 config_local.inc.php
-
- Property svn:ignore
-
trunk/include/common.inc.php
r953 r960 221 221 } 222 222 223 // include template/theme configuration 224 list($user['template'], $user['theme']) = explode('/', $user['template']); 225 // TODO : replace initial $user['template'] by $user['layout'] 226 227 include(PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/'.$user['theme'].'/themeconf.inc.php'); 228 223 229 // template instance 224 230 $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']); -
trunk/include/functions.inc.php
r894 r960 534 534 535 535 /** 536 * returns available templates 536 * returns available templates/themes 537 537 */ 538 538 function get_templates() 539 539 { 540 return get_dirs(PHPWG_ROOT_PATH.'template'); 540 return get_dirs(PHPWG_ROOT_PATH.'theme'); 541 } 542 function get_themes() 543 { 544 $themes = array(); 545 546 foreach (get_dirs(PHPWG_ROOT_PATH.'template') as $template) 547 { 548 foreach (get_dirs(PHPWG_ROOT_PATH.'template/'.$template.'/theme') as $theme) 549 { 550 array_push($themes, $template.'/'.$theme); 551 } 552 } 553 554 return $themes; 541 555 } 542 556 … … 566 580 else 567 581 { 568 $src = PHPWG_ROOT_PATH; 569 $src.= 'template/'.$user['template'].'/mimetypes/'; 582 $src = get_themeconf('mime_icon_dir'); 570 583 $src.= strtolower(get_extension($path)).'.png'; 571 584 } … … 727 740 return isset($lang[$key]) ? $lang[$key] : $key; 728 741 } 742 743 /** 744 * returns the corresponding value from $themeconf if existing. Else, the key is 745 * returned 746 * 747 * @param string key 748 * @return string 749 */ 750 function get_themeconf($key) 751 { 752 global $themeconf; 753 754 return $themeconf[$key]; 755 } 729 756 ?> -
trunk/include/functions_html.inc.php
r948 r960 44 44 if ( $diff < $user['recent_period'] * $day_in_seconds ) 45 45 { 46 $icon_url = './template/'.$user['template'].'/theme/'; 47 $icon_url.= 'recent.png'; 46 $icon_url = get_themeconf('icon_dir').'/recent.png'; 48 47 $title .= $user['recent_period']; 49 48 $title .= ' '.$lang['days']; -
trunk/include/template.php
r858 r960 331 331 // PWG specific : communication between template and $lang 332 332 $code = preg_replace('/\{lang:([^}]+)\}/e', "l10n('$1')", $code); 333 // PWG specific : expand themeconf.inc.php variables 334 $code = preg_replace('/\{themeconf:([^}]+)\}/e', "get_themeconf('$1')", $code); 333 335 334 336 // replace \ with \\ and then ' with \'.
Note: See TracChangeset
for help on using the changeset viewer.