mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- new configuration parameter : hide thumbnail captions on main page with
$conf['show_thumbnail_caption'] - new configuration parameter : hide picture name in title on picture presentation page with $conf['show_picture_name_on_title'] - template : new CSS classes to manage picture.php title git-svn-id: http://piwigo.org/svn/trunk@803 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -61,25 +61,6 @@ if ( mysql_num_rows($result) > 0 )
|
||||
|
||||
while ($row = mysql_fetch_array($result))
|
||||
{
|
||||
// name of the picture
|
||||
if (isset($row['name']) and $row['name'] != '')
|
||||
{
|
||||
$name = $row['name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$name = str_replace('_', ' ', get_filename_wo_extension($row['file']));
|
||||
}
|
||||
if ($page['cat'] == 'best_rated')
|
||||
{
|
||||
$name = '('.$row['average_rate'].') '.$name;
|
||||
}
|
||||
|
||||
if ($page['cat'] == 'search')
|
||||
{
|
||||
$name = replace_search($name, $_GET['search']);
|
||||
}
|
||||
|
||||
$thumbnail_url = get_thumbnail_src($row['path'], @$row['tn_ext']);
|
||||
|
||||
// message in title for the thumbnail
|
||||
@@ -111,13 +92,35 @@ while ($row = mysql_fetch_array($result))
|
||||
'U_IMG_LINK' => add_session_id($url_link)
|
||||
)
|
||||
);
|
||||
|
||||
if ($conf['show_thumbnail_caption'])
|
||||
{
|
||||
// name of the picture
|
||||
if (isset($row['name']) and $row['name'] != '')
|
||||
{
|
||||
$name = $row['name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$name = str_replace('_', ' ', get_filename_wo_extension($row['file']));
|
||||
}
|
||||
if ($page['cat'] == 'best_rated')
|
||||
{
|
||||
$name = '('.$row['average_rate'].') '.$name;
|
||||
}
|
||||
|
||||
if ($page['cat'] == 'search')
|
||||
{
|
||||
$name = replace_search($name, $_GET['search']);
|
||||
}
|
||||
|
||||
$template->assign_block_vars(
|
||||
'thumbnails.line.thumbnail.element_name',
|
||||
array(
|
||||
'NAME' => $name
|
||||
)
|
||||
);
|
||||
$template->assign_block_vars(
|
||||
'thumbnails.line.thumbnail.element_name',
|
||||
array(
|
||||
'NAME' => $name
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ($user['show_nb_comments']
|
||||
and is_numeric($page['cat'])
|
||||
|
||||
Reference in New Issue
Block a user