Changeset 1820 for trunk/index.php


Ignore:
Timestamp:
Feb 15, 2007, 1:10:41 AM (17 years ago)
Author:
rvelices
Message:
  • feature 642: display both subcategory thumbnails and element thumbnails (if a

category has both) in the index page

flat category view

  • web service fixes for categories.getList
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r1815 r1820  
    6969}
    7070
    71 if (isset($page['cat_nb_images'])
    72     and $page['cat_nb_images'] > $user['nb_image_page'])
     71if ( count($page['items']) > $user['nb_image_page'])
    7372{
    7473  $page['navigation_bar'] = create_navigation_bar(
    7574    duplicate_index_url(array(), array('start')),
    76     $page['cat_nb_images'],
     75    count($page['items']),
    7776    $page['start'],
    7877    $user['nb_image_page'],
     
    102101//-------------------------------------------------------------- category title
    103102$template_title = $page['title'];
    104 if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > 0)
    105 {
    106   $template_title.= ' ['.$page['cat_nb_images'].']';
     103if ( count($page['items']) > 0)
     104{
     105  $template_title.= ' ['.count($page['items']).']';
    107106}
    108107
     
    242241
    243242//------------------------------------------------------ main part : thumbnails
    244 if (isset($page['thumbnails_include']))
    245 {
    246   include(PHPWG_ROOT_PATH.$page['thumbnails_include']);
     243if ( 0==$page['start']
     244    and !isset($page['flat'])
     245    and !isset($page['chronology_field'])
     246    and ('recent_cats'==$page['section'] or 'categories'==$page['section'])
     247  )
     248{
     249  include(PHPWG_ROOT_PATH.'include/category_cats.inc.php');
     250}
     251if ( !empty($page['items']) )
     252{
     253  include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
    247254}
    248255//------------------------------------------------------- category informations
     
    259266}
    260267
    261 if (isset($page['cat_nb_images']) and $page['cat_nb_images'] > 0
     268if ( count($page['items']) > 0
    262269    and $page['section'] != 'most_visited'
    263270    and $page['section'] != 'best_rated')
Note: See TracChangeset for help on using the changeset viewer.