Changeset 2078 for branches


Ignore:
Timestamp:
Aug 26, 2007, 1:08:02 AM (17 years ago)
Author:
rub
Message:

Resolved 0000728: Add description triggers for categories and elements

Add:

o render_category_description
o render_category_literal_description
o render_element_description

Location:
branches/branch-1_7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_7/include/category_cats.inc.php

    r1900 r2078  
    178178    update_cats_with_filtered_data($categories);
    179179  }
     180
     181  // add default event handler for rendering category literal description
     182  add_event_handler('render_category_literal_description',
     183    create_function('$d',
     184      'return strip_tags($d, \'<a><br><p><b><i><small><strong><font>\');'));
     185
    180186  trigger_action('loc_begin_index_category_thumbnails', $categories);
    181187  if ($conf['subcatify'])
     
    185191    foreach ($categories as $category)
    186192    {
    187       $comment = strip_tags(@$category['comment'], '<a><br><p><b><i><small><strong><font>');
    188193      if ($page['section']=='recent_cats')
    189194      {
     
    218223                                    '<br />'
    219224                                  ),
    220           'DESCRIPTION' => @$comment,
     225          'DESCRIPTION' =>
     226            trigger_event('render_category_literal_description',
     227              trigger_event('render_category_description',
     228                @$category['comment'])),
    221229          'NAME'  => $name,
    222230          )
  • branches/branch-1_7/index.php

    r1932 r2078  
    297297    'cat_infos.comment',
    298298    array(
    299       'COMMENTS' => $page['comment']
     299      'COMMENTS' =>
     300        trigger_event('render_category_description', $page['comment'])
    300301      )
    301302    );
  • branches/branch-1_7/picture.php

    r2015 r2078  
    5656  2
    5757  );
     58// add default event handler for rendering element description
     59add_event_handler('render_element_description', 'nl2br');
     60
    5861trigger_action('loc_begin_picture');
    5962
     
    639642    'legend',
    640643    array(
    641       'COMMENT_IMG' => nl2br($picture['current']['comment'])
     644      'COMMENT_IMG' =>
     645        trigger_event('render_element_description',
     646          $picture['current']['comment'])
    642647      ));
    643648  $header_infos['COMMENT'] = strip_tags($picture['current']['comment']);
Note: See TracChangeset for help on using the changeset viewer.