Changeset 1947
- Timestamp:
- 09/25/2009 06:40:35 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1934 r1947 1533 1533 case 'members': default: 1534 1534 $slug = BP_MEMBERS_SLUG; 1535 $var = '/?s='; 1535 1536 break; 1536 1537 case 'groups': 1537 1538 $slug = BP_GROUPS_SLUG; 1539 $var = '/?s='; 1538 1540 break; 1539 1541 case 'forums': 1540 1542 $slug = BP_FORUMS_SLUG; 1543 $var = '/?fs='; 1541 1544 break; 1542 1545 case 'blogs': 1543 1546 $slug = BP_BLOGS_SLUG; 1547 $var = '/?s='; 1544 1548 break; 1545 1549 } 1546 1550 } 1547 1548 $search_url = apply_filters( 'bp_core_search_site', site_url( $slug . '/?s='. urlencode($search_terms) ), $search_terms );1551 1552 $search_url = apply_filters( 'bp_core_search_site', site_url( $slug . $var . urlencode($search_terms) ), $search_terms ); 1549 1553 1550 1554 bp_core_redirect( $search_url ); -
trunk/bp-forums/bp-forums-templatetags.php
r1924 r1947 181 181 182 182 /* If $_GET['s'] is set, let's auto populate the filter var */ 183 if ( $bp->is_directory && !empty( $_GET[' s'] ) )184 $filter = $_GET[' s'];183 if ( $bp->is_directory && !empty( $_GET['fs'] ) ) 184 $filter = $_GET['fs']; 185 185 186 186 $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $per_page, $max, $no_stickies, $filter ); … … 921 921 global $bp; ?> 922 922 <form action="<?php echo $bp->root_domain . '/' . $bp->forums->slug . '/'; ?>" method="get" id="search-forums-form"> 923 <label><input type="text" name=" s" id="forums_search" value="<?php if ( isset( $_GET['s'] ) ) { echo attribute_escape( $_GET['s'] ); } else { _e( 'Search anything...', 'buddypress' ); } ?>" onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>923 <label><input type="text" name="fs" id="forums_search" value="<?php if ( isset( $_GET['fs'] ) ) { echo attribute_escape( $_GET['fs'] ); } else { _e( 'Search anything...', 'buddypress' ); } ?>" onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label> 924 924 <input type="submit" id="forums_search_submit" name="submit" value="<?php _e( 'Search', 'buddypress' ) ?>" /> 925 925 </form>
Note: See TracChangeset
for help on using the changeset viewer.