aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_default.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-07-17 14:58:42 +0000
committerplegall <plg@piwigo.org>2005-07-17 14:58:42 +0000
commiteb189de80066ce353e472cd9067defd67102177f (patch)
tree0ad4620d140eacc7c5367de812f9315bbb3ca539 /include/category_default.inc.php
parent3f4f655e1e16b7adfc6c5b57742e6a8f90b1db20 (diff)
- 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
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php53
1 files changed, 28 insertions, 25 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 030d12240..d553e9e05 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -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'])