aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--doc/ChangeLog10
-rw-r--r--include/category_default.inc.php53
-rw-r--r--include/config_default.inc.php7
-rw-r--r--picture.php6
-rw-r--r--template/default/default.css10
-rw-r--r--template/default/picture.tpl11
6 files changed, 69 insertions, 28 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 6c64a7e8a..2b5cc3c85 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -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
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;
?>
diff --git a/picture.php b/picture.php
index e1d60d4a4..479fcf63d 100644
--- a/picture.php
+++ b/picture.php
@@ -586,6 +586,12 @@ $template->assign_vars(array(
'U_ADD_COMMENT' => add_session_id(str_replace( '&', '&amp;', $_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'])
diff --git a/template/default/default.css b/template/default/default.css
index 5ec9a6921..3169c6a64 100644
--- a/template/default/default.css
+++ b/template/default/default.css
@@ -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;
diff --git a/template/default/picture.tpl b/template/default/picture.tpl
index 975edc802..2633113d8 100644
--- a/template/default/picture.tpl
+++ b/template/default/picture.tpl
@@ -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">