559 pointsLike some sort of WPMU DEV God"I'm helpful
rossagrant
Member
—
2nd May 2010
Hi guys,
I have disabled the global forum directory in my BP install however the search widget still contains the 'forums' field. When clicked this no longer searches anywhere as there is no forums directory to search anymore.
What I would like to do is simply delete the 'forums' option from the dropdown but also rename the 'groups' option to 'share chat'.
Hi guys,
I have disabled the global forum directory in my BP install however the search widget still contains the 'forums' field. When clicked this no longer searches anywhere as there is no forums directory to search anymore.
What I would like to do is simply delete the 'forums' option from the dropdown but also rename the 'groups' option to 'share chat'.
@rossagrant: Can you test for me if you get it still showing using the default theme (Daily uses the core component for that search) as I do therefore I think it's a BuddyPress core issue. I'm not dismissing it in saying that just want to confirm you see what I do in my testing. That all being said I think it can be changed with some core file editing however at this point want to see if you also get the same result with the default theme. I'm also a bit dubious we should have to core file edit to get this to work - to me I also agree it makes sense if you turn off an option you shouldn't be able to search it.
@rossagrant: hmmm well it's going to be a core part I did a spot of digging searching on the term and found the following in buddypress/bp-core/bp-core-templatetags.php:
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">';
What it will do if you remove the forums call from it I to be honest don't know as we're talking editing core files here so not something to be done lightly. If you want you can try by taking a back up though but if it was me I'd log a bug over it and see if someone over at BuddyPress can get it fixed in the core rather than hacking things. To me the fact you turn something off and it doesn't turn off in the search is a bug.
Cheers Tammie! I'll log a bug and see what happens. Hacking stuff seems severe to me so it might be best if we can get an update sorted.
Thanks for your help!
@rossagrant: I agree and I completely agree it makes perfect sense to me infact I will probably if I have time this week potter over a log it myself too as I can't believe that is the way it is meant to be... seems logical to me you turn off something it isn't searchable or at least you get a nice error message which you don't in this case.
I would much prefer a 'Search Everything' function as well. If the results are sorted out, that's fine, but the user shouldn't have to concern herself with types and categories of search terms. I hope the BP guys decide to go in that direction.
@Christofire: That is why I myself often add a post / page / content search to themes it's not a global 'all' buddypress also search but it at least covers content.
Responses (9)
Member — 2nd May 2010 #
This is the area I am talking about.
Theme Designer — 2nd May 2010 #
@rossagrant: Can you test for me if you get it still showing using the default theme (Daily uses the core component for that search) as I do therefore I think it's a BuddyPress core issue. I'm not dismissing it in saying that just want to confirm you see what I do in my testing. That all being said I think it can be changed with some core file editing however at this point want to see if you also get the same result with the default theme. I'm also a bit dubious we should have to core file edit to get this to work - to me I also agree it makes sense if you turn off an option you shouldn't be able to search it.
Member — 2nd May 2010 #
Hi Tammie,
yeah it must be a BP issue as the 'forums' option is still there in the default theme.
Anyidea of what I need to change in order to get rid of the option?
Thanks
Ross :)
Theme Designer — 2nd May 2010 #
@rossagrant: hmmm well it's going to be a core part I did a spot of digging searching on the term and found the following in buddypress/bp-core/bp-core-templatetags.php:
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>';
}
if ( function_exists( 'groups_install' ) ) {
$selection_box .= '<option value="groups">' . __( 'Groups', 'buddypress' ) . '</option>';
}
if ( function_exists( 'bp_forums_setup' ) && !(int) $bp->site_options['bp-disable-forum-directory'] ) {
$selection_box .= '<option value="forums">' . __( 'Forums', 'buddypress' ) . '</option>';
}
if ( function_exists( 'bp_blogs_install' ) && bp_core_is_multisite() ) {
$selection_box .= '<option value="blogs">' . __( 'Blogs', 'buddypress' ) . '</option>';
}
$selection_box .= '</select>';
return apply_filters( 'bp_search_form_type_select', $selection_box );
}
What it will do if you remove the forums call from it I to be honest don't know as we're talking editing core files here so not something to be done lightly. If you want you can try by taking a back up though but if it was me I'd log a bug over it and see if someone over at BuddyPress can get it fixed in the core rather than hacking things. To me the fact you turn something off and it doesn't turn off in the search is a bug.
Member — 2nd May 2010 #
Cheers Tammie! I'll log a bug and see what happens. Hacking stuff seems severe to me so it might be best if we can get an update sorted.
Thanks for your help!
Theme Designer — 2nd May 2010 #
@rossagrant: I agree and I completely agree it makes perfect sense to me infact I will probably if I have time this week potter over a log it myself too as I can't believe that is the way it is meant to be... seems logical to me you turn off something it isn't searchable or at least you get a nice error message which you don't in this case.
Member — 3rd May 2010 #
I would much prefer a 'Search Everything' function as well. If the results are sorted out, that's fine, but the user shouldn't have to concern herself with types and categories of search terms. I hope the BP guys decide to go in that direction.
Theme Designer — 4th May 2010 #
@Christofire: That is why I myself often add a post / page / content search to themes it's not a global 'all' buddypress also search but it at least covers content.
Member — 28th September 2011 #
Lets get a plugin that searches all Buddypress and Blog content ! Please +1 here
http://premium.wpmudev.org/forums/topic/feature-request-global-site-search-needs-to-be-more-powerful
Become a member