Changeset 602 for trunk/include
- Timestamp:
- Nov 13, 2004, 2:43:53 PM (20 years ago)
- Location:
- trunk/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_default.inc.php
r593 r602 121 121 ); 122 122 123 if ($conf['show_comments'] and $user['show_nb_comments']) 123 if ($user['show_nb_comments'] 124 and is_numeric($page['cat']) 125 and $page['cat_commentable']) 124 126 { 125 127 $query = ' -
trunk/include/config.inc.php
r601 r602 168 168 // show_gt : display generation time at the bottom of each page 169 169 $conf['show_gt'] = true; 170 171 // Default options for new categories. 172 // 173 // Some options for categories (commentable, uploadable, status, visible) 174 // must be set directly in the database by changing the corresponding 175 // default values of the column. Examples : 176 // 177 // ALTER TABLE phpwebgallery_categories ALTER visible SET DEFAULT 'true'; 178 // ALTER TABLE phpwebgallery_categories ALTER status SET DEFAULT 'private'; 179 // ALTER TABLE phpwebgallery_categories ALTER uploadable SET DEFAULT 'true'; 180 // ALTER TABLE phpwebgallery_categories ALTER commentable SET DEFAULT 'false'; 181 // 182 // MySQL default values are used when inserting a row and that no value is 183 // given for the column. In PhpWebGallery, the above columns are not valued 184 // during categories insertion, so default values are important. 170 185 ?> -
trunk/include/functions_category.inc.php
r593 r602 309 309 $infos = array( 'nb_images','id_uppercat','comment','site_id','galleries_url' 310 310 ,'dir','date_last','uploadable','status','visible' 311 ,'representative_picture_id','uppercats' );311 ,'representative_picture_id','uppercats','commentable' ); 312 312 313 313 $query = 'SELECT '.implode( ',', $infos ); … … 455 455 $page['cat_site_id'] = $result['site_id']; 456 456 $page['cat_uploadable'] = $result['uploadable']; 457 $page['cat_commentable'] = $result['commentable']; 457 458 $page['uppercats'] = $result['uppercats']; 458 459 $page['title'] = get_cat_display_name( $page['cat_name'],' - ','',false); … … 912 913 $indent, 913 914 $selecteds, 914 $blockname) 915 $blockname, 916 $CSS_classes) 915 917 { 916 918 global $template,$user; … … 924 926 { 925 927 $selected = ' selected="selected"'; 928 } 929 930 $class = ''; 931 foreach (array_keys($CSS_classes) as $CSS_class) 932 { 933 if (in_array($category['id'], $CSS_classes[$CSS_class])) 934 { 935 $class = $CSS_class; 936 } 926 937 } 927 938 … … 930 941 array('SELECTED'=>$selected, 931 942 'VALUE'=>$category['id'], 943 'CLASS'=>$class, 932 944 'OPTION'=>$indent.'- '.$category['name'] 933 945 )); … … 936 948 $indent.str_repeat(' ',3), 937 949 $selecteds, 938 $blockname); 950 $blockname, 951 $CSS_classes); 939 952 } 940 953 }
Note: See TracChangeset
for help on using the changeset viewer.