- 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
commit eb189de800
6 changed files with 69 additions and 28 deletions

View file

@ -1,3 +1,13 @@
2005-07-17 Pierrick LE GALL
* 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
2005-07-16 Pierrick LE GALL
* new feature : RSS notification feed. Feed generator is an

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
@ -112,12 +93,34 @@ while ($row = mysql_fetch_array($result))
)
);
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
)
);
}
if ($user['show_nb_comments']
and is_numeric($page['cat'])

View file

@ -216,4 +216,11 @@ $conf['links'] = array();
// feed_period : how long between two feed refresh ? Possible values are
// "hour", "half day", "day", "week", "month".
$conf['feed_period'] = 'week';
// show_thumbnail_caption : on thumbnails page, show thumbnail captions ?
$conf['show_thumbnail_caption'] = true;
// show_picture_name_on_title : on picture presentation page, show picture
// name ?
$conf['show_picture_name_on_title'] = true;
?>

View file

@ -586,6 +586,12 @@ $template->assign_vars(array(
'U_ADD_COMMENT' => add_session_id(str_replace( '&', '&', $_SERVER['REQUEST_URI'] ))
)
);
if ($conf['show_picture_name_on_title'])
{
$template->assign_block_vars('title', array());
}
//------------------------------------------------------- upper menu management
// download link if file is not a picture
if (!$picture['current']['is_picture'])

View file

@ -100,6 +100,16 @@ div.information { font-size:14px; font-weight:bold;}
/* POSITION */
div#pictureTitle {
float:left;
text-align:left;
}
div#pictureNumber {
float:right;
text-align:right;
}
#gauche,#droite
{
float:left;

View file

@ -1,10 +1,15 @@
<!-- BEGIN information -->
<div class="information">{information.INFORMATION}</div>
<!-- END information -->
<div class="titrePage">
<div id="gauche"><a href="{U_HOME}">{L_HOME}</a>{LEVEL_SEPARATOR}{CATEGORY}</div>
<div id="centre" class="nameImage">{TITLE}</div>
<div id="droite">{PHOTO}</div>
<div id="pictureTitle">
<a href="{U_HOME}">{L_HOME}</a>{LEVEL_SEPARATOR}{CATEGORY}
<!-- BEGIN title -->
{LEVEL_SEPARATOR}{TITLE}
<!-- END title -->
</div>
<div id="pictureNumber">{PHOTO}</div>
</div>
<div id="imgBarMenu">