aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_cats.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-08-25 23:08:02 +0000
committerrub <rub@piwigo.org>2007-08-25 23:08:02 +0000
commit9d91210e41c0a83ec5af83bd5e254d14348086a6 (patch)
treee77f04b81640f381b47f4a9751323dbf577844b1 /include/category_cats.inc.php
parent5e5dc77f9e05941281ed4ba3e6b0ec0712634d65 (diff)
Resolved 0000728: Add description triggers for categories and elements
Add: o render_category_description o render_category_literal_description o render_element_description git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2078 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_cats.inc.php')
-rw-r--r--include/category_cats.inc.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index f50f9ff77..3ef955b4c 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -177,6 +177,12 @@ if (count($categories) > 0)
{
update_cats_with_filtered_data($categories);
}
+
+ // add default event handler for rendering category literal description
+ add_event_handler('render_category_literal_description',
+ create_function('$d',
+ 'return strip_tags($d, \'<a><br><p><b><i><small><strong><font>\');'));
+
trigger_action('loc_begin_index_category_thumbnails', $categories);
if ($conf['subcatify'])
{
@@ -184,7 +190,6 @@ if (count($categories) > 0)
foreach ($categories as $category)
{
- $comment = strip_tags(@$category['comment'], '<a><br><p><b><i><small><strong><font>');
if ($page['section']=='recent_cats')
{
$name = get_cat_display_name_cache($category['uppercats'], null, false);
@@ -217,7 +222,10 @@ if (count($categories) > 0)
true,
'<br />'
),
- 'DESCRIPTION' => @$comment,
+ 'DESCRIPTION' =>
+ trigger_event('render_category_literal_description',
+ trigger_event('render_category_description',
+ @$category['comment'])),
'NAME' => $name,
)
);