Changeset 810:143528f926c6 for themes/ductile/_public.php
- Timestamp:
- 03/29/12 13:34:24 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_public.php
r776 r810 22 22 $core->tpl->addBlock('EntryIfContentIsCut',array('tplDuctileTheme','EntryIfContentIsCut')); 23 23 $core->tpl->addValue('ductileNbEntryPerPage',array('tplDuctileTheme','ductileNbEntryPerPage')); 24 $core->tpl->addValue('ductileLogoSrc',array('tplDuctileTheme','ductileLogoSrc')); 24 25 25 26 class tplDuctileTheme … … 100 101 $local_attr = array('src' => '_entry-'.($model ? $model : $default).'.html'); 101 102 return $core->tpl->includeFile($local_attr); 103 } 104 105 public static function ductileLogoSrc($attr) 106 { 107 global $core; 108 109 $s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_style'); 110 if ($s === null) { 111 return; 112 } 113 $s = @unserialize($s); 114 if (!is_array($s)) { 115 return; 116 } 117 118 $img_url = $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme.'/img/logo.png'; 119 if (isset($s['logo_src'])) { 120 if ($s['logo_src'] !== null) { 121 if ($s['logo_src'] != '') { 122 if ((substr($s['logo_src'],0,1) == '/') || (parse_url($s['logo_src'],PHP_URL_SCHEME) != '')) { 123 // absolute URL 124 $img_url = $s['logo_src']; 125 } else { 126 // relative URL (base = img folder of ductile theme) 127 $img_url = $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme.'/img/'.$s['logo_src']; 128 } 129 } 130 } 131 } 132 133 return $img_url; 102 134 } 103 135
Note: See TracChangeset
for help on using the changeset viewer.