Dotclear


Ignore:
Timestamp:
06/23/11 13:00:59 (14 years ago)
Author:
Dsls <dsls@…>
Branch:
default
Message:
  • Re-enabled blank post_type required by media.php in class dcBlog
  • Attachments are now handled by a plugins/attachments/_admin.php
  • Added core dcPostMedia multi-purpose class, and 'link_type' in post_media table
  • Added new behavior : tplIfConditions, to enable to add new attributes to tpl:XXXIf tags
  • Moved tpl:SysIf has_tag attribute to Tags plugin
File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/tags/_public.php

    r270 r407  
    4444 
    4545$core->addBehavior('templateBeforeBlock',array('behaviorsTags','templateBeforeBlock')); 
     46$core->addBehavior('tplSysIfConditions',array('behaviorsTags','tplSysIfConditions')); 
    4647 
    4748class behaviorsTags 
     
    6869                    "\$params['sql'] .= \"AND META.meta_id = '\".\$core->con->escape(\$_ctx->meta->meta_id).\"' \";\n". 
    6970               "} ?>\n"; 
     71          } 
     72     } 
     73      
     74     public static function tplIfConditions($tag, $attr,$content,$if) 
     75     { 
     76          if ($tag == 'Sys' && isset($attr['has_tag'])) { 
     77               $sign = ''; 
     78               if (substr($attr['has_tag'],0,1) == '!') { 
     79                    $sign = '!'; 
     80                    $attr['has_tag'] = substr($attr['has_tag'],1); 
     81               } 
     82               $if[] =  $sign."(\$core->tpl->tagExists('".addslashes($attr['has_tag'])."') )"; 
    7083          } 
    7184     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map