- 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:
plegall
2005-07-17 14:58:42 +00:00
parent 3f4f655e1e
commit eb189de800
6 changed files with 69 additions and 28 deletions
+28 -25
View File
@@ -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'])