Changeset 2541:10f7fb5a782a
- Timestamp:
- 11/13/13 14:22:39 (12 years ago)
- Branch:
- default
- Location:
- inc
- Files:
-
- 2 edited
- 19 moved
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.themes.php
r2492 r2541 22 22 */ 23 23 class dcThemes extends dcModules 24 { 24 { 25 25 protected static $type = 'theme'; 26 26 … … 28 28 This method registers a theme in modules list. You should use this to 29 29 register a new theme. 30 30 31 31 <var>$parent</var> is a optional value to indicate them inheritance. 32 If <var>$parent</var> is null / not set, we simply fall back to 32 If <var>$parent</var> is null / not set, we simply fall back to 33 33 the standard behavior, by using 'default'. 34 34 35 35 <var>$priority</var> is an integer. Modules are sorted by priority and name. 36 36 Lowest priority comes first. This property is currently ignored when dealing 37 37 with themes. 38 38 39 39 @param name <b>string</b> Module name 40 40 @param desc <b>string</b> Module description 41 41 @param author <b>string</b> Module author name 42 42 @param version <b>string</b> Module version 43 @param properties <b>array</b> extra properties 43 @param properties <b>array</b> extra properties 44 44 (currently available keys : parent, priority, standalone_config, type) 45 45 */ … … 59 59 # Themes specifics properties 60 60 $properties = array_merge( 61 array('parent' => null ),61 array('parent' => null, 'tplset' => 'legacy'), 62 62 $properties, 63 63 array('permissions' => 'admin') // force themes perms … … 65 65 66 66 parent::registerModule($name, $desc, $author, $version, $properties); 67 } 68 67 } 68 69 69 /** 70 70 Loads namespace <var>$ns</var> specific file for module with ID 71 71 <var>$id</var> 72 72 Note : actually, only 'public' namespace is supported with themes. 73 73 74 74 @param id <b>string</b> Module ID 75 75 @param ns <b>string</b> Namespace name -
inc/public/prepend.php
r1949 r2541 101 101 } 102 102 } 103 103 104 104 # If theme doesn't exist, stop everything 105 105 if (!$core->themes->moduleExists($__theme)) { … … 134 134 $__theme_tpl_path[] = $core->blog->themes_path.'/'.$__parent_theme.'/tpl'; 135 135 } 136 137 $core->tpl->setPath( 138 $__theme_tpl_path, 139 dirname(__FILE__).'/default-templates', 140 $core->tpl->getPath()); 141 136 $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 137 if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) { 138 $core->tpl->setPath( 139 $__theme_tpl_path, 140 dirname(__FILE__).'/default-templates/'.$tplset, 141 $core->tpl->getPath()); 142 } else { 143 $core->tpl->setPath( 144 $__theme_tpl_path, 145 $core->tpl->getPath()); 146 } 142 147 $core->url->mode = $core->blog->settings->system->url_scan; 143 148 … … 145 150 # --BEHAVIOR-- publicBeforeDocument 146 151 $core->callBehavior('publicBeforeDocument',$core); 147 152 148 153 $core->url->getDocument(); 149 154 150 155 # --BEHAVIOR-- publicAfterDocument 151 156 $core->callBehavior('publicAfterDocument',$core); … … 155 160 ,660); 156 161 } 157 ?> 162
Note: See TracChangeset
for help on using the changeset viewer.