Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //To add forum tag search to global unified search
- //show forum tags search
- function bpmag_show_forums_tag_search(){
- //only if tag exists
- if(bb_get_tag($_REQUEST['search-terms'])):?>
- <div class="forums-search-result search-result">
- <h2 class="content-title"><?php _e(sprintf("Forum topics for tag %s",$_REQUEST['search-terms']),"bpmag");?></h2>
- <?php locate_template( array( 'forums/tag-topics.php' ), true ) ; ?>
- <a href="<?php echo bp_get_root_domain().'/'.BP_FORUMS_SLUG.'/tag/'.$_REQUEST['search-terms']?>" ><?php _e("View All matched forum topics","bpmag");?></a>
- </div>
- <?php
- endif;
- }
- //Hook Forums results to search page
- if ( bp_is_active( 'forums' ) && bp_is_active( 'groups' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() )
- add_action("advance-search","bpmag_show_forums_tag_search",20);
- ?>
Add Comment
Please, Sign In to add comment