Skip to:
Content

bbPress.org

Changeset 4618


Ignore:
Timestamp:
12/21/2012 09:23:05 AM (8 years ago)
Author:
johnjamesjacoby
Message:

Search Tweaks:

  • Add support for search root page.
  • Add search root page to breadcrumb.
  • Tweak search form CSS.
  • See #1575.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbpress.php

    r4612 r4618  
    181181        /** Versions **********************************************************/
    182182
    183         $this->version    = '2.3-bleeding-4612';
     183        $this->version    = '2.3-bleeding-4618';
    184184        $this->db_version = '220';
    185185
     
    924924
    925925            // Search All
    926             $search_slug . $search_page_rule => 'index.php?&paged=' . $wp_rewrite->preg_index( 1 ),
    927             $search_slug . $search_root_rule => 'index.php?',
     926            $search_slug . $search_page_rule => 'index.php?paged=' . $wp_rewrite->preg_index( 1 ),
     927            $search_slug . $search_root_rule => 'index.php?' . $search_id,
    928928        );
    929929
  • trunk/includes/common/template-tags.php

    r4607 r4618  
    22432243        } elseif ( bbp_is_topic_tag_edit() ) {
    22442244            $crumbs[] = '<a href="' . get_term_link( bbp_get_topic_tag_id(), bbp_get_topic_tag_tax_id() ) . '" class="bbp-breadcrumb-topic-tag">' . sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ) . '</a>';
     2245
     2246        // Search
     2247        } elseif ( bbp_is_search() && bbp_get_search_terms() ) {
     2248            $crumbs[] = '<a href="' . home_url( bbp_get_search_slug() ) . '" class="bbp-breadcrumb-search">' . __( 'Search', 'bbpress' ) . '</a>';
    22452249        }
    22462250
  • trunk/includes/core/template-functions.php

    r4579 r4618  
    425425
    426426    // Search Page
    427     } elseif ( !empty( $bbp_search ) ) {
     427    } elseif ( isset( $bbp_search ) ) {
    428428
    429429        // Check if there are search query args set
  • trunk/templates/default/bbpress/content-search.php

    r4579 r4618  
    2626         <?php bbp_get_template_part( 'pagination', 'search' ); ?>
    2727
    28     <?php else : ?>
     28    <?php elseif ( bbp_get_search_terms() ) : ?>
    2929
    3030         <?php bbp_get_template_part( 'feedback',   'no-search' ); ?>
    3131
     32    <?php else : ?>
     33
     34        <?php bbp_get_template_part( 'form', 'search' ); ?>
     35
    3236    <?php endif; ?>
    33 
    34     <?php bbp_get_template_part( 'form', 'search' ); ?>
    3537
    3638    <?php do_action( 'bbp_template_after_search_results' ); ?>
  • trunk/templates/default/css/bbpress.css

    r4603 r4618  
    363363-------------------------------------------------------------- */
    364364
    365 div.bbp-search-form {
     365#bbpress-forums #bbp-search {
     366    clear: left;
     367}
     368
     369#bbpress-forums div.bbp-search-form {
    366370    float: right;
    367371}
Note: See TracChangeset for help on using the changeset viewer.