[Bb-trac] Re: [bbPress] #793: Order by date in search

bbPress bb-trac at lists.bbpress.org
Thu Feb 21 19:18:52 GMT 2008


#793: Order by date in search
-------------------------+--------------------------------------------------
 Reporter:  sambauers    |        Owner:                   
     Type:  enhancement  |       Status:  new              
 Priority:  normal       |    Milestone:  0.8.4 & Pings    
Component:  Front-end    |      Version:  1.0-alpha (trunk)
 Severity:  normal       |   Resolution:                   
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by mdawaffe):

 I was playing with search the other day.

 It was reasonably easy to change the search on the WordPress Plugins
 Directory to only show "relevant" topics (ignoring titles, recent,
 users,... and whatever other garbage we show) and to paginate the list.

 http://wordpress.org/extend/plugins/search.php

 Just a small plugin and a template tweak (running trunk or branches/0.8)

 Plugin
 {{{
 function mod_bb_relevant_search( $query ) {
         if ( 'bb_relevant_search' == $query->query_id )
                 $query->query_vars['count'] = true;
 }

 add_action( 'bb_parse_query', 'mod_bb_relevant_search' );
 }}}

 Template:
 {{{
 <?php
 global $bb_query_form;

 echo get_page_number_links( $page, $bb_query_form->found_rows );
 ?>
 }}}

-- 
Ticket URL: <http://trac.bbpress.org/ticket/793#comment:1>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list