- refactoring
- adaptation of the URL for searching associated keywords to the new search URL string git-svn-id: http://piwigo.org/svn/trunk@511 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
2dbc66da3b
commit
fb5b21cbde
1 changed files with 16 additions and 11 deletions
27
picture.php
27
picture.php
|
@ -583,21 +583,26 @@ $template->assign_block_vars('info_line', array(
|
||||||
'VALUE'=>$filesize.' KB'
|
'VALUE'=>$filesize.' KB'
|
||||||
));
|
));
|
||||||
// keywords
|
// keywords
|
||||||
if ( !empty($picture['current']['keywords']))
|
if (!empty($picture['current']['keywords']))
|
||||||
{
|
{
|
||||||
$keywords = explode( ',', $picture['current']['keywords'] );
|
$keywords = explode(',', $picture['current']['keywords']);
|
||||||
$content = '';
|
$content = '';
|
||||||
$url = PHPWG_ROOT_PATH.'category.php?cat=search';
|
$url = PHPWG_ROOT_PATH.'category.php?cat=search&search=keywords:';
|
||||||
$url.= '&mode=OR&search=';
|
foreach ($keywords as $i => $keyword)
|
||||||
foreach ( $keywords as $i => $keyword ) {
|
{
|
||||||
$local_url = add_session_id( $url.$keyword );
|
$local_url = add_session_id($url.$keyword);
|
||||||
if ( $i > 0 ) $content.= ',';
|
if ($i > 0)
|
||||||
|
{
|
||||||
|
$content.= ',';
|
||||||
|
}
|
||||||
$content.= '<a href="'.$local_url.'">'.$keyword.'</a>';
|
$content.= '<a href="'.$local_url.'">'.$keyword.'</a>';
|
||||||
}
|
}
|
||||||
$template->assign_block_vars('info_line', array(
|
$template->assign_block_vars(
|
||||||
'INFO'=>$lang['keywords'],
|
'info_line',
|
||||||
'VALUE'=>$content
|
array(
|
||||||
));
|
'INFO'=>$lang['keywords'],
|
||||||
|
'VALUE'=>$content
|
||||||
|
));
|
||||||
}
|
}
|
||||||
// number of visits
|
// number of visits
|
||||||
$template->assign_block_vars(
|
$template->assign_block_vars(
|
||||||
|
|
Loading…
Add table
Reference in a new issue