Dotclear


Ignore:
Timestamp:
04/09/10 09:34:08 (14 years ago)
Author:
bruno
Message:

Added dotclear 2.2 compatibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • themes/freshy2/_public.php

    r1851 r2170  
    2222class tplFreshy2Theme 
    2323{ 
     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 
    2434     public static function FreshyStyleSheet($attr) { 
    2535          return "style.css"; 
     
    2838     public static function FreshyLayoutClass($attr) { 
    2939          $p = '<?php '."\n"; 
    30           $p .= 'if ($core->blog->settings->freshy2_sidebar_right != "none")'."\n"; 
     40          $p .= 'if (tplFreshy2Theme::$settings->freshy2_sidebar_right != "none")'."\n"; 
    3141          $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"; 
    3343          $p .= '  echo "sidebar_left";'."\n"; 
    3444          $p .= '?>'."\n"; 
     
    4252               $pos="right"; 
    4353          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". 
    4656                    $content."\n". 
    4757                    '<?php endif; ?>'."\n"; 
    4858          } else { 
    4959               $setting = "freshy2_sidebar_".$pos; 
    50                return '<?php if ($core->blog->settings->'.$setting.' != "none"): ?>'."\n". 
     60               return '<?php if (tplFreshy2Theme::$settings->'.$setting.' != "none"): ?>'."\n". 
    5161                    $content."\n". 
    5262                    '<?php endif; ?>'."\n"; 
     
    6373          else 
    6474               $value="nav"; 
    65           return '<?php if ($core->blog->settings->'.$setting.' == "'.$value.'"): ?>'."\n". 
     75          return '<?php if (tplFreshy2Theme::$settings->'.$setting.' == "'.$value.'"): ?>'."\n". 
    6676               $content."\n". 
    6777               '<?php endif; ?>'."\n"; 
     
    7080     public static function publicHeadContent($core) 
    7181     { 
    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; 
    7585 
    7686          $css_content=''; 
     
    163173 
    164174} 
     175 
     176tplFreshy2Theme::initSettings(); 
    165177?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map