2 sam2kb Sep 06, 2008 01:19Welcome to the forum. Create new file /conf/_config_TEST.php with the following code function generate_tags_list( $form = true, $class = 'tags_list' ) { global $DB, $Blog, $cache_tags; if( empty($cache_tags) ) { $cache_tags = $DB->get_col( 'SELECT tag_name FROM T_items__itemtag INNER JOIN T_items__tag ON itag_tag_ID = tag_ID ORDER BY tag_name', 0, 'Get all tags' ); if( is_array($cache_tags) ) $cache_tags = array_unique($cache_tags); } if( empty($cache_tags) ) return false; $r = array(); foreach( $cache_tags as $tag ) { if( $form ) { $r[] = '<option value="'.$tag.'">'.$tag.'</option>'; } else { $r[] = '<li><a href="'.$Blog->gen_blogurl().'?tag='.$tag.'">'.$tag.'</a></li>'; } } if( !empty($r) ) { if( $form ) { return "\n\n".'<select name="tag"><option value="">'.T_('All').'</option>'.implode( "\n", $r ).'</select>'; } else { return "\n\n".'<ul class="'.$class.'">'.implode( "\n", $r ).'</ul>'; } } return false; } This function will build a list of all tags assigned to posts, and display it in 2 ways. 1. Options menu $Form = & new Form( $Blog->gen_blogurl(), NULL, 'post' ); $Form->begin_form(); echo generate_tags_list(); $Form->submit( array( '', T_('Search'), 'ActionButton' ) ); $Form->end_form(); 2. Tags List echo generate_tags_list( false );
4 sam2kb Sep 06, 2008 19:19You can put the code 1 or 2 in sidebar or anywhere in skin. To make a stand-alone page check this post http://forums.b2evolution.net//viewtopic.php?t=14046
Welcome to the forum.
Create new file /conf/_config_TEST.php with the following code
This function will build a list of all tags assigned to posts, and display it in 2 ways.
1. Options menu
2. Tags List