aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php53
-rw-r--r--include/config_default.inc.php7
2 files changed, 35 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'])
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 4ef5608c9..08f68733b 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -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;
?>