Album representation

The representant of the category is the thumbnail displayed to represent the category on main page (category.php) when a category contains only sub-categories (just as the root category).

By default, the representant is randomly set at category creation. Randomly must be understood as “chosen once by random”, once chosen the representant won't change.

Set the representant

There are severaly ways to set the representative picture of a category:

  1. When displayed a picture in normal size (picture.php): in the action buttons bar, one of them let you set the displayed picture as representative for the displayed category. This button is available only for administrators when visiting a normal category, ie not a special category like search, calendar or most seen pictures. This is the easiest way to set the representative because you do it while visiting the category. in yoga template for branch 1.5
  2. [Modify informations about a picture in administration]. This screen can be reach from picture.php with (yoga template for branch 1.5) or [Batch management] in “unit mode”. This screen gives more possiblities than direct representative setting in picture.php because you can set the picture as representant of many categories at once and also because it is the only screen that let you choose any picture to represent any category.
  3. [Administration » Categories » Manage » Edit a category] with the icon (yoga template for branch 1.5). This screen can also be reached from the main page category.php. In this screen, you can ask to find a new representant at random and you can ask to delete the representant (see next section)
  4. [Administration » Categories » Representative] see next section.

Random representant

The representation depends on configuration parameter allow_random_representative that is set in include/config_default.inc.php:

// allow_random_representative : do you wish PhpWebGallery to search among
// categories elements a new representative at each reload ?
//
// If false, an element is randomly or manually chosen to represent its
// category and remains the representative as long as an admin does not
// change it.
//
// Warning : setting this parameter to true is CPU consuming. Each time you
// change the value of this parameter from false to true, an administrator
// must update categories informations in screen [Admin > General >
// Maintenance].
$conf['allow_random_representative'] = false;

Learn how to modify configuration parameter on the dedicated wiki page: configuration parameters

In default mode (allow_random_representative set to false) each category containing at least one element is represented by a fixed element. Once set (at category creation), the representative changes only when an administrator ask for it. If the representant is not appropriate, you can ask to “Find a new representant by random” on [Administration » Categories » Manage » Edit a category] screen.

If configuration parameter allow_random_representative is set to true, a category containing elements can have no fixed representant. As said in warning, remember that setting this parameter to true will ask more CPU power, this is the only reason why PhpWebGallery has false for default value. For a particular category, just use “Delete representant button” on [Administration » Categories » Manage » Edit a category] screen, the category will become randomly represented.

If this parameter allow_random_representative is set to true, a new screen [Administration » Categories » Representative] become available. In this screen, you have two list of categories: randomly represented or singely represented. Only categories containing elements and empty categories with a manually set representant are listed on this screen. If you ask a set of categories to become singely represented, PhpWebGallery will randomly find a single representant

 
Back to top
user_documentation/album_representation.txt · Last modified: 2011/09/13 15:36 (external edit)
 
 
twitter facebook google+ newsletter Donate Piwigo.org © 2002-2014 · Contact