Changeset 478 for trunk/category.php
- Timestamp:
- Aug 6, 2004, 11:42:07 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/category.php
r459 r478 46 46 check_restrictions( $page['cat'] ); 47 47 } 48 49 48 //-------------------------------------------------------------- initialization 50 function display_category( $category, $indent )51 {52 global $user,$template,$page;53 54 $url = PHPWG_ROOT_PATH.'category.php?cat='.$category['id'];55 56 $style = '';57 if ( isset( $page['cat'] )58 and is_numeric( $page['cat'] )59 and $category['id'] == $page['cat'] )60 {61 $style = 'font-weight:normal;color:yellow;';62 }63 64 $name = $category['name'];65 if (empty($name)) $name = str_replace( '_', ' ', $category['dir'] );66 67 $template->assign_block_vars('category', array(68 'T_NAME' => $style,69 'LINK_NAME' => $name,70 'INDENT' => $indent,71 'U_LINK' => add_session_id($url),72 'BULLET_IMAGE' => $user['lien_collapsed'])73 );74 75 if ( $category['nb_images'] > 0 )76 {77 $template->assign_block_vars(78 'category.infocat',79 array(80 'TOTAL_CAT'=>$category['nb_images'],81 'CAT_ICON'=>get_icon($category['date_last'])82 ));83 }84 85 // recursive call86 if ( $category['expanded'] )87 {88 foreach ( $category['subcats'] as $subcat ) {89 display_category( $subcat, $indent.str_repeat( ' ', 2 ));90 }91 }92 }93 94 49 // detection of the start picture to display 95 50 if ( !isset( $_GET['start'] ) … … 139 94 $page['structure'] = create_user_structure( '' ); 140 95 $page['structure'] = update_structure( $page['structure'] ); 141 142 96 //----------------------------------------------------- template initialization 143 144 97 // 145 98 // Start output of page … … 163 116 $icon_recent = get_icon(date('Y-m-d')); 164 117 118 $page['menu'] = ''; 119 foreach ($page['structure'] as $category) 120 { 121 $page['menu'].= get_html_menu_category($category); 122 } 123 165 124 $template->assign_vars(array( 166 125 'NB_PICTURE' => count_user_total_images(), … … 168 127 'USERNAME' => $user['username'], 169 128 'TOP_VISITED'=>$conf['top_number'], 129 'MENU_CATEGORIES_CONTENT'=>$page['menu'], 170 130 171 131 'L_CATEGORIES' => $lang['categories'], … … 216 176 ); 217 177 218 foreach ( $page['structure'] as $category ) {219 // display category is a function relative to the template220 display_category( $category, ' ');221 }222 223 178 // authentification mode management 224 179 if ( !$user['is_the_guest'] )
Note: See TracChangeset
for help on using the changeset viewer.