aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-10-29 09:31:06 +0000
committermistic100 <mistic@piwigo.org>2013-10-29 09:31:06 +0000
commitfc5c5d4b7cc08637eee2ca1be3baae0db5d95269 (patch)
tree1ccf6e11fd9221ec8f2cc16d9308e12ec3cd6ea7
parent6d73f88a51728a4e39b25f9da2e104d5ed5c4953 (diff)
add two extra param to render_element_description trigger: main_page_element_description and picture_page_element_description
git-svn-id: http://piwigo.org/svn/trunk@25202 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/category_default.inc.php2
-rw-r--r--include/functions_html.inc.php4
-rw-r--r--picture.php4
-rw-r--r--tools/triggers_list.php4
4 files changed, 8 insertions, 6 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 41f83f9e1..bc3057c74 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -111,7 +111,7 @@ foreach ($pictures as $row)
}
$name = render_element_name($row);
- $desc = render_element_description($row);
+ $desc = render_element_description($row, 'main_page_element_description');
$tpl_var = array_merge( $row, array(
'TN_ALT' => htmlspecialchars(strip_tags($name)),
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 2daac2c83..ae776f55e 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -543,12 +543,12 @@ function render_element_name($info)
return get_name_from_file($info['file']);
}
-function render_element_description($info)
+function render_element_description($info, $param='')
{
$comment = $info['comment'];
if (!empty($comment))
{
- $comment = trigger_event('render_element_description', $comment);
+ $comment = trigger_event('render_element_description', $comment, $param);
return $comment;
}
return '';
diff --git a/picture.php b/picture.php
index 13a02b863..4c267bbac 100644
--- a/picture.php
+++ b/picture.php
@@ -808,7 +808,9 @@ if (isset($picture['current']['comment'])
$template->assign(
'COMMENT_IMG',
trigger_event('render_element_description',
- $picture['current']['comment'])
+ $picture['current']['comment'],
+ 'picture_page_element_description'
+ )
);
}
diff --git a/tools/triggers_list.php b/tools/triggers_list.php
index 53c0b4ac2..bd57023c1 100644
--- a/tools/triggers_list.php
+++ b/tools/triggers_list.php
@@ -672,8 +672,8 @@ array(
array(
'name' => 'render_element_description',
'type' => 'trigger_event',
- 'vars' => array('string', 'element_secription'),
- 'files' => array('picture.php'),
+ 'vars' => array('string', 'element_description', 'string', 'action'),
+ 'files' => array('picture.php', 'include\functions_html.inc.php (render_element_description)'),
),
array(
'name' => 'render_lost_password_mail_content',