Ignore:
Timestamp:
Nov 23, 2004, 11:31:24 PM (20 years ago)
Author:
plg
Message:
  • global categories' options : instead of N horizontal tabs on a single page, N options in the left menu (but the same backend)
  • categories.global_rank : new calculated field. It gives a global rank of the category among all others (updated during ordering)
  • category.php page : menu is generated faster thanks to categories.global_rank, recursivity becomes useless :-)
  • new function to display select box with a set of categories : display_select_cat_wrapper
  • cat_options : instead of using 1 multiselect for true/false items, using 1 multiselect for true, and another one for false. The form provides buttons with arrows to switch categories from one multiselect to another
  • deletion of obsolete function display_categories (working with the old template system)
  • deletion of obsolete functions get_user_plain_structure, create_user_structure, get_user_subcat_ids, update_structure, count_images : useless thanks to global_rank
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r610 r614  
    581581}
    582582
    583 function display_categories( $categories, $indent,
    584                              $selected = -1, $forbidden = -1 )
    585 {
    586   global $vtp,$sub;
    587 
    588   foreach ( $categories as $category ) {
    589     if ( $category['id'] != $forbidden )
    590     {
    591       $vtp->addSession( $sub, 'associate_cat' );
    592       $vtp->setVar( $sub, 'associate_cat.value',   $category['id'] );
    593       $content = $indent.'- '.$category['name'];
    594       $vtp->setVar( $sub, 'associate_cat.content', $content );
    595       if ( $category['id'] == $selected )
    596         $vtp->setVar( $sub, 'associate_cat.selected', ' selected="selected"' );
    597       $vtp->closeSession( $sub, 'associate_cat' );
    598       display_categories( $category['subcats'], $indent.str_repeat(' ',3),
    599                           $selected, $forbidden );
    600     }
    601   }
    602 }
    603 
    604583/**
    605584 * returns an array with the ids of the restricted categories for the user
Note: See TracChangeset for help on using the changeset viewer.