diff options
author | patdenice <patdenice@piwigo.org> | 2009-03-04 21:49:21 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2009-03-04 21:49:21 +0000 |
commit | d3e6eabb053f311d5d8fd4ec80cfb0c1b32cf141 (patch) | |
tree | 8d1a164df1106c5238917c94ef8eaffb4f152b5b /include/functions_html.inc.php | |
parent | 9045f11c700970825022eb2762cfeb8db0598764 (diff) |
Remove get_html_menu_category function and use smarty abilities.
git-svn-id: http://piwigo.org/svn/trunk@3171 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_html.inc.php | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 462bfe222..9b045bfcb 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -374,104 +374,6 @@ SELECT id, name, permalink } /** - * returns the HTML code for a category item in the menu (for the main page) - * - * HTML code generated uses logical list tags ul and each category is an - * item li. The paramter given is the category informations as an array, - * used keys are : id, name, nb_images, max_date_last, date_last - * count_images, count_categories - * - * @param array categories - * @return string - */ -function get_html_menu_category($categories, $selected_category) -{ - $ref_level = 0; - $level = 0; - - $menu = trigger_event('get_html_menu_category', '', - $categories, $selected_category); - if (strlen($menu)) - { - return $menu; - } - - foreach ($categories as $category) - { - $level = substr_count($category['global_rank'], '.') + 1; - if ($level > $ref_level) - { - $menu.= "\n<ul>"; - } - else if ($level == $ref_level) - { - $menu.= "\n</li>"; - } - else if ($level < $ref_level) - { - // we may have to close more than one level at the same time... - $menu.= "\n</li>"; - $menu.= str_repeat("\n</ul></li>",($ref_level-$level)); - } - $ref_level = $level; - - $menu.= "\n\n".'<li'; - if ($category['id'] == @$selected_category['id']) - { - $menu.= ' class="selected"'; - } - $menu.= '>'; - - $url = make_index_url( - array( - 'category' => $category - ) - ); - - $title = get_display_images_count - ( - $category['nb_images'], - $category['count_images'], - $category['count_categories'], - false, - ' / ' - ); - - $menu.= '<a href="'.$url.'"'; - if ($selected_category!=null - and $category['id'] == $selected_category['id_uppercat']) - { - $menu.= ' rel="up"'; - } - $menu.= ' title="'.$title.'">'; - $menu.= trigger_event( - 'render_category_name', - $category['name'], - 'get_html_menu_category' - ); - $menu.= '</a>'; - - if ( $category['count_images']>0 ) - {// at least one direct or indirect image - $menu.= "\n".'<span class="'; - // at least one image in this category -> class menuInfoCat - $menu.= ($category['nb_images'] > 0 ? "menuInfoCat" - : "menuInfoCatByChild").'"'; - $menu.= ' title=" '.$title.'">'; - // show total number of images - $menu.= '['.$category['count_images'].']'; - $menu.= '</span>'; - } - $child_date_last = @$category['max_date_last']> @$category['date_last']; - $menu.= get_icon($category['max_date_last'], $child_date_last); - } - - $menu.= str_repeat("\n</li></ul>",($level)); - - return $menu; -} - -/** * returns HTMLized comment contents retrieved from database * * newlines becomes br tags, _word_ becomes underline, /word/ becomes |