Ignore:
Timestamp:
Feb 22, 2007, 9:20:30 PM (17 years ago)
Author:
rub
Message:

o Proposition: improved display of 'x images in y sub-categories' or 'x images in this category' for cases when categories contain both images and sub-categories
o Good idea of this new way for way confguest_access, but I kept last implementation for access methods (Could be useful on future development)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_category.inc.php

    r1840 r1851  
    387387 * @return string
    388388 */
    389 function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_categories, $short_message = true)
     389function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_categories, $short_message = true, $Separator = '\n')
    390390{
    391391  $display_text = '';
    392392
    393   if ($cat_count_images>0)
    394   {//at least one image direct or indirect
     393  if ($cat_count_images > 0)
     394  {
     395    if ($cat_nb_images > 0 and $cat_nb_images < $cat_count_images)
     396    {
     397      $display_text.= get_display_images_count($cat_nb_images, $cat_nb_images, 0, $short_message, $Separator).$Separator;
     398      $cat_count_images-= $cat_nb_images;
     399      $cat_nb_images = 0;
     400    }
     401   
     402    //at least one image direct or indirect
    395403    $display_text.= l10n_dec('image_available', 'images_available', $cat_count_images);
    396404
    397     if ($cat_count_categories==0 or $cat_nb_images>=$cat_count_images)
    398     {//no descendant categories or descendants do not contain images
     405    if ($cat_count_categories == 0 or $cat_nb_images == $cat_count_images)
     406    {
     407      //no descendant categories or descendants do not contain images
    399408      if (! $short_message)
    400409      {
Note: See TracChangeset for help on using the changeset viewer.