{*
The comment list is defined inside a tabsheet made with the jQuery $().tabs()
With jQuery 1.2.6 (don't know how other release manage this) all the anchors tags are considered as a tab.
So, can't use because href is modified by the jQuery function.
Links are managed by an event onclick="document.location='link';"
*}
{if isset($comment.U_DELETE)}-
{/if}
{if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
-
{php}
/*
this php code is used to calculate the key need to be allowed to
edit the comment, and determine the picture number if necessary
(theses properties are not in the template var because with the
default template, Piwigo reloads the page for editing an item :
this template is abble to edit an item without reloading the page)
*/
global $conf;
$comment=$this->get_template_vars('comment');
$current=$this->get_template_vars('current');
if(!array_key_exists('image_id', $comment))
{
if(isset($current['id']))
{
$comment['IMAGE_ID']=$current['id'];
}
else
{
preg_match('#picture\.php\?/(\d+)/category/#i', $comment['U_PICTURE'], $result);
if(isset($result[1]))
{
$comment['IMAGE_ID']=$result[1];
}
}
}
$now=time();
$comment['KEY']=$now.":".hash_hmac('md5', $now.':'.$comment['IMAGE_ID'], $conf['secret_key']);
$this->assign_by_ref('comment', $comment);
{/php}
{/if}
{if isset($comment.U_VALIDATE)}
-
{/if}
{/if} {$comment.AUTHOR} - {$comment.DATE}