Changeset 5752 for trunk/include
- Timestamp:
- Apr 10, 2010, 11:47:19 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/menubar.inc.php
r5703 r5752 111 111 //------------------------------------------------------------------------ tags 112 112 $block = $menu->get_block('mbTags'); 113 if ( $block!=null and 'tags'==@$page['section'] and !empty($page['items']) ) 114 { 115 $tags = get_common_tags( 116 $page['items'], 117 $conf['menubar_tag_cloud_items_number'], 118 $page['tag_ids'] 119 ); 120 $tags = add_level_to_tags($tags); 121 122 foreach ($tags as $tag) 123 { 124 $block->data[] = array_merge( 125 $tag, 126 array( 127 'U_ADD' => make_index_url( 128 array( 129 'tags' => array_merge( 130 $page['tags'], 131 array($tag) 113 if ( $block!=null and !empty($page['items']) ) 114 { 115 if ('tags'==@$page['section']) 116 { 117 $tags = get_common_tags( 118 $page['items'], 119 $conf['menubar_tag_cloud_items_number'], 120 $page['tag_ids'] 121 ); 122 $tags = add_level_to_tags($tags); 123 124 foreach ($tags as $tag) 125 { 126 $block->data[] = array_merge( 127 $tag, 128 array( 129 'U_ADD' => make_index_url( 130 array( 131 'tags' => array_merge( 132 $page['tags'], 133 array($tag) 134 ) 132 135 ) 133 ) 134 ), 136 ), 137 'URL' => make_index_url( array( 'tags' => array($tag) ) 138 ), 139 ) 140 ); 141 } 142 } 143 else 144 { 145 $selection = array_slice( $page['items'], $page['start'], $page['nb_image_page'] ); 146 $tags = add_level_to_tags( get_common_tags($selection, 12) ); 147 foreach ($tags as $tag) 148 { 149 $block->data[] = 150 array_merge( $tag, 151 array( 152 'URL' => make_index_url( array( 'tags' => array($tag) ) ), 135 153 ) 136 154 ); 137 } 138 $block->template = 'menubar_tags.tpl'; 155 } 156 } 157 if ( !empty($block->data) ) 158 { 159 $block->template = 'menubar_tags.tpl'; 160 } 139 161 } 140 162
Note: See TracChangeset
for help on using the changeset viewer.