[buddypress-trac] [BuddyPress] #2255: merging wp search and buddypress search on same form
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sat Mar 27 15:04:00 UTC 2010
#2255: merging wp search and buddypress search on same form
-------------------------+--------------------------------------------------
Reporter: PedroMiguel | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.2.4
Component: Core | Keywords: has_patch, search, integrated search
-------------------------+--------------------------------------------------
on bp-core-tempaltetags.php change this:
{{{
function bp_search_form_type_select() {
// Eventually this won't be needed and a page will be built to
integrate all search results.
$selection_box = '<select name="search-which" id="search-which"
style="width: auto">';
if ( function_exists( 'xprofile_install' ) ) {
$selection_box .= '<option value="members">' . __(
'Members', 'buddypress' ) . '</option>';
}
}}}
to this:
{{{
function bp_search_form_type_select() {
// Eventually this won't be needed and a page will be built to
integrate all search results.
$selection_box = '<select name="search-which" id="search-which"
style="width: auto">';
$selection_box .= '<option value="blog">' . __( 'Blog', 'buddypress' ) .
'</option>';
if ( function_exists( 'xprofile_install' ) ) {
$selection_box .= '<option value="members">' . __(
'Members', 'buddypress' ) . '</option>';
}
}}}
and on bp-core.php
change this:
{{{
if ( !$slug || empty( $slug ) ) {
switch ( $search_which ) {
case 'members': default:
$slug = BP_MEMBERS_SLUG;
$var = '/?s=';
break;
}}}
to this:
{{{
if ( !$slug || empty( $slug ) ) {
switch ( $search_which ) {
case 'blog': default:
$slug = '';
$var = '/?s=';
break;
case 'members':
$slug = BP_MEMBERS_SLUG;
$var = '/?s=';
break;
}}}
--
Ticket URL: <http://trac.buddypress.org/ticket/2255>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list