Changeset 803


Ignore:
Timestamp:
Jul 17, 2005, 4:58:42 PM (19 years ago)
Author:
plg
Message:
  • template : new CSS classes to manage picture.php title
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/ChangeLog

    r802 r803  
     12005-07-17 Pierrick LE GALL
     2
     3        * new configuration parameter : hide thumbnail captions on main
     4        page with $conf['show_thumbnail_caption']
     5
     6        * new configuration parameter : hide picture name in title on
     7        picture presentation page with $conf['show_picture_name_on_title']
     8
     9        * template : new CSS classes to manage picture.php title
     10       
    1112005-07-16 Pierrick LE GALL
    212
  • trunk/include/category_default.inc.php

    r760 r803  
    6262while ($row = mysql_fetch_array($result))
    6363{
    64   // name of the picture
    65   if (isset($row['name']) and $row['name'] != '')
    66   {
    67     $name = $row['name'];
    68   }
    69   else
    70   {
    71     $name = str_replace('_', ' ', get_filename_wo_extension($row['file']));
    72   }
    73   if ($page['cat'] == 'best_rated')
    74   {
    75     $name = '('.$row['average_rate'].') '.$name;
    76   }
    77 
    78   if ($page['cat'] == 'search')
    79   {
    80     $name = replace_search($name, $_GET['search']);
    81   }
    82  
    8364  $thumbnail_url = get_thumbnail_src($row['path'], @$row['tn_ext']);
    8465 
     
    11293      )
    11394    );
     95
     96  if ($conf['show_thumbnail_caption'])
     97  {
     98    // name of the picture
     99    if (isset($row['name']) and $row['name'] != '')
     100    {
     101      $name = $row['name'];
     102    }
     103    else
     104    {
     105      $name = str_replace('_', ' ', get_filename_wo_extension($row['file']));
     106    }
     107    if ($page['cat'] == 'best_rated')
     108    {
     109      $name = '('.$row['average_rate'].') '.$name;
     110    }
     111   
     112    if ($page['cat'] == 'search')
     113    {
     114      $name = replace_search($name, $_GET['search']);
     115    }
    114116 
    115   $template->assign_block_vars(
    116     'thumbnails.line.thumbnail.element_name',
    117     array(
    118       'NAME' => $name
    119       )
    120     );
     117    $template->assign_block_vars(
     118      'thumbnails.line.thumbnail.element_name',
     119      array(
     120        'NAME' => $name
     121        )
     122      );
     123  }
    121124   
    122125  if ($user['show_nb_comments']
  • trunk/include/config_default.inc.php

    r801 r803  
    217217// "hour", "half day", "day", "week", "month".
    218218$conf['feed_period'] = 'week';
     219
     220// show_thumbnail_caption : on thumbnails page, show thumbnail captions ?
     221$conf['show_thumbnail_caption'] = true;
     222
     223// show_picture_name_on_title : on picture presentation page, show picture
     224// name ?
     225$conf['show_picture_name_on_title'] = true;
    219226?>
  • trunk/picture.php

    r801 r803  
    587587  )
    588588);
     589
     590if ($conf['show_picture_name_on_title'])
     591{
     592  $template->assign_block_vars('title', array());
     593}
     594
    589595//------------------------------------------------------- upper menu management
    590596// download link if file is not a picture
  • trunk/template/default/default.css

    r800 r803  
    100100
    101101/* POSITION */
     102
     103div#pictureTitle {
     104  float:left;
     105  text-align:left;
     106}
     107
     108div#pictureNumber {
     109  float:right;
     110  text-align:right;
     111}
    102112
    103113#gauche,#droite
  • trunk/template/default/picture.tpl

    r774 r803  
    22<div class="information">{information.INFORMATION}</div>
    33<!-- END information -->
     4
    45<div class="titrePage">
    5   <div id="gauche"><a href="{U_HOME}">{L_HOME}</a>{LEVEL_SEPARATOR}{CATEGORY}</div>
    6   <div id="centre" class="nameImage">{TITLE}</div>
    7   <div id="droite">{PHOTO}</div>
     6  <div id="pictureTitle">
     7    <a href="{U_HOME}">{L_HOME}</a>{LEVEL_SEPARATOR}{CATEGORY}
     8    <!-- BEGIN title -->
     9    {LEVEL_SEPARATOR}{TITLE}
     10    <!-- END title -->
     11  </div>
     12  <div id="pictureNumber">{PHOTO}</div>
    813</div>
    914
Note: See TracChangeset for help on using the changeset viewer.