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
This commit is contained in:
parent
6d73f88a51
commit
fc5c5d4b7c
4 changed files with 8 additions and 6 deletions
|
@ -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)),
|
||||
|
|
|
@ -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 '';
|
||||
|
|
|
@ -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'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue