Dotclear


Ignore:
Timestamp:
01/19/13 12:20:15 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Preview of comment may not be mandatory before posting for Ductile theme (new option in config)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • themes/ductile/_public.php

    r1081 r1096  
    2323$core->tpl->addValue('ductileNbEntryPerPage',array('tplDuctileTheme','ductileNbEntryPerPage')); 
    2424$core->tpl->addValue('ductileLogoSrc',array('tplDuctileTheme','ductileLogoSrc')); 
     25$core->tpl->addBlock('IfPreviewIsNotMandatory',array('tplDuctileTheme','IfPreviewIsNotMandatory')); 
    2526 
    2627class tplDuctileTheme 
     
    175176           
    176177          return $img_url; 
     178     } 
     179 
     180     public static function IfPreviewIsNotMandatory($attr,$content) 
     181     { 
     182          $s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_style'); 
     183          if ($s !== null) { 
     184               $s = @unserialize($s); 
     185               if (is_array($s)) { 
     186                    if (isset($s['preview_not_mandatory'])) { 
     187                         if ($s['preview_not_mandatory']) { 
     188                              return $content; 
     189                         } 
     190                    } 
     191               } 
     192          } 
     193          return ''; 
    177194     } 
    178195 
Note: See TracChangeset for help on using the changeset viewer.

Sites map