Changeset 602 for trunk/picture.php


Ignore:
Timestamp:
Nov 13, 2004, 2:43:53 PM (19 years ago)
Author:
plg
Message:
  • admin/cat_options page added : manage options for the whole categories tree (uploadable, commentable). status and visible will be soon added
  • admin.php : $conf_link var to avoid lines longer than 79 characters
  • config.upload_available configuration parameter disappear : it's simpler to manage with cat_options
  • config.show_comments idem : new column categories.commentable, each categories can be commentable or not
  • categories.site_id becomes a nullable column : a virtual category does belong to no site
  • function display_select_categories has a new argument : $CSS_classes array to optionnaly assign a CSS class to each category in the select field
  • added informations in include/config.inc.php for setting default value of :
  • categories.visible
  • categories.status
  • categories.uploadable
  • categories.commentable
  • 2 new indexes images_i3(average_rate) and images_i4(hit) : optimizes best rated and most visited categories
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r598 r602  
    754754$result = pwg_query($query);
    755755$categories = '';
     756$page['show_comments'] = false;
    756757while ($row = mysql_fetch_array($result))
    757758{
     
    762763  $cat_info = get_cat_info($row['category_id']);
    763764  $categories .= get_cat_display_name($cat_info['name'], ' >');
     765  // the picture is commentable if it belongs at least to one category which
     766  // is commentable
     767  if ($cat_info['commentable'])
     768  {
     769    $page['show_comments'] = true;
     770  }
    764771}
    765772$template->assign_block_vars(
     
    921928
    922929//---------------------------------------------------- users's comments display
    923 if ( $conf['show_comments'] )
     930if ($page['show_comments'])
    924931{
    925932  // number of comment for this picture
Note: See TracChangeset for help on using the changeset viewer.