Changeset 2170 for themes/freshy2/_public.php
- Timestamp:
- 04/09/10 09:34:08 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/freshy2/_public.php
r1851 r2170 22 22 class tplFreshy2Theme 23 23 { 24 public static $settings; 25 26 public static function initSettings() { 27 global $core; 28 if (!version_compare(DC_VERSION,'2.1.6','<=')) 29 self::$settings =& $core->blog->settings->freshy2; 30 else 31 self::$settings =& $core->blog->settings; 32 } 33 24 34 public static function FreshyStyleSheet($attr) { 25 35 return "style.css"; … … 28 38 public static function FreshyLayoutClass($attr) { 29 39 $p = '<?php '."\n"; 30 $p .= 'if ( $core->blog->settings->freshy2_sidebar_right != "none")'."\n";40 $p .= 'if (tplFreshy2Theme::$settings->freshy2_sidebar_right != "none")'."\n"; 31 41 $p .= ' echo "sidebar_right ";'."\n"; 32 $p .= 'if ( $core->blog->settings->freshy2_sidebar_left != "none")'."\n";42 $p .= 'if (tplFreshy2Theme::$settings->freshy2_sidebar_left != "none")'."\n"; 33 43 $p .= ' echo "sidebar_left";'."\n"; 34 44 $p .= '?>'."\n"; … … 42 52 $pos="right"; 43 53 if ($pos == 'both') { 44 return '<?php if (( $core->blog->settings->freshy2_sidebar_left != "none") '.45 '&& ( $core->blog->settings->freshy2_sidebar_right != "none")): ?>'."\n".54 return '<?php if ((tplFreshy2Theme::$settings->freshy2_sidebar_left != "none") '. 55 '&& (tplFreshy2Theme::$settings->freshy2_sidebar_right != "none")): ?>'."\n". 46 56 $content."\n". 47 57 '<?php endif; ?>'."\n"; 48 58 } else { 49 59 $setting = "freshy2_sidebar_".$pos; 50 return '<?php if ( $core->blog->settings->'.$setting.' != "none"): ?>'."\n".60 return '<?php if (tplFreshy2Theme::$settings->'.$setting.' != "none"): ?>'."\n". 51 61 $content."\n". 52 62 '<?php endif; ?>'."\n"; … … 63 73 else 64 74 $value="nav"; 65 return '<?php if ( $core->blog->settings->'.$setting.' == "'.$value.'"): ?>'."\n".75 return '<?php if (tplFreshy2Theme::$settings->'.$setting.' == "'.$value.'"): ?>'."\n". 66 76 $content."\n". 67 77 '<?php endif; ?>'."\n"; … … 70 80 public static function publicHeadContent($core) 71 81 { 72 $cust = $core->blog->settings->freshy2_custom;73 $topimg = $core->blog->settings->freshy2_top_image;74 $theme_url= $core->blog->settings->themes_url."/".$core->blog->settings->theme;82 $cust = self::$settings->freshy2_custom; 83 $topimg = self::$settings->freshy2_top_image; 84 $theme_url= self::$settings->themes_url."/".self::$settings->theme; 75 85 76 86 $css_content=''; … … 163 173 164 174 } 175 176 tplFreshy2Theme::initSettings(); 165 177 ?>
Note: See TracChangeset
for help on using the changeset viewer.