This is an old revision of the document!


Layout

Add your own Welcome Banner

via Admininistration / Configuration / General for field “Gallery title” remove current title and replace it by

<div style="padding:3px;"><img src="logo/my_logo.jpg"></div> 

This html code will be used in state of the previous text format title. A received tip on French side of our Forum, thanks a lot to rub.

Hide galery title

in default_layout.css :

#theHeader {
  display: none;
}

Hide the "quickconnect" connection form in the menu bar

in default_layout.css :

FORM#quickconnect {
  display: none;
}

Set the margin of the page

in default_layout.css :

BODY {
    margin: 5px;
}

Fix position of next/previous thumbnail in picture page

To set both thumbnails under the title bar and left and write of the actual picture, try in default_layout.css :

#the_page {
  position: relative;
}
* html #the_page { /* IE only */
  position: absolute; 
  left: 0;
}
#thumbPrev {
  position: absolute;
  left: 5px;
  top: 200px;
  float: none;
}
#thumbNext {
  position: absolute;
  right: 5px;
  top: 200px;
  float: none;
}

Seems to be OK with Gecko, KHTML, Opera, and IE (with a special rule “* html #the_page”) We don't like this layout very mutch because when the picture is wide, the thumbnails overlap and it's not pretty.

Change legend attributes in picture page

All picture legend information have the same generation code. If you need to change some of those, you can edit picture.php. Author field for instance, near line 671, find this :

// author
if (!empty($picture['current']['author']))
{
  $infos['INFO_AUTHOR'] =
    '<a href="'.
    add_session_id(
      PHPWG_ROOT_PATH.'category.php?cat=search'.
      '&amp;search=author:'.$picture['current']['author']
      ).
    '">'.$picture['current']['author'].'</a>';
}
else
{
  $infos['INFO_AUTHOR'] = l10n('N/A');
}

You can add a class (class=“author” and manage it in defaut-color.css), or you can add style=“color: #009900; font-weight: bold;”… e.g.:

// author
if (!empty($picture['current']['author']))
{                                                     /* MyPWG Start */
  $infos['INFO_AUTHOR'] =
    '<a style="color: #009900; font-weight: bold;" href="'.
    add_session_id(
      PHPWG_ROOT_PATH.'category.php?cat=search'.
      '&amp;search=author:'.$picture['current']['author']
      ).
    '">'.$picture['current']['author'].'</a>';
}
else
{
  $infos['INFO_AUTHOR'] = '<span class="water">'.l10n('N/A').'</span>';
}                                                     /* MyPWG End */

This is true for all metadata fields.

Note: inline style should be used for testing only, use a class and rules in default-color.css instead espacially if you want to release a MOD.

Tips:

  • Try to add your change without adding any new line (this will simplify support and MOD apply).
  • Try to add a comment marker to improve finding your changes before applying a new version of PWG (i.e. /* MyPWG */ )

Remove legend fields under pictures

… like Author, Created on, Registered on, Dimensions, File or Average rate.

In image.css add:

TABLE.infoTable {
    display: none;
}

Warning: this tip will hide all captions, you can't select only on caption to hide.

Hide the navigation thumbnails in "picture" page

In default_layout.css :

.navThumb { 
  display: none;
}

Behaviour

Display only positive number of user comments

in include/category_default.inc.php, (line 136) replace

$template->assign_block_vars(
  'thumbnails.line.thumbnail.nb_comments',
  array('NB_COMMENTS'=>$row['nb_comments']));

by

if ($row['nb_comments'] > 0)
{
$template->assign_block_vars(
  'thumbnails.line.thumbnail.nb_comments',
  array('NB_COMMENTS'=>$row['nb_comments']));
}
 
Back to top
en/customization/branch_1.5.1133083703.txt.gz · Last modified: 2009/03/07 22:13 (external edit)
 
 
github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact