miniBB Support Forums | 16 years on The Web
miniBB ®


 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

How to set the default forum for "search"?

Author Anonymous
#1 | Posted: 10 Oct 2007 20:41 
I've set up MiniBB working properly. But on "search" page, I want to set one forum as the default one to search as "where" item.
I've tried to use Javascript "selectedIndex" but it does not work. Is there any "option" value to achieve this?

Author Paul
Lead Developer
#2 | Posted: 11 Oct 2007 03:15 
Basically you need just to specify forum ID in the link which points to the Search form. Like


for example. It would be possible to create a non-core-destructive solution for this... or you may modify load_header() function of bb_functions.php and modify this directly, but changing the core file.

Author Anonymous
#3 | Posted: 11 Oct 2007 20:11 
By the way, I'd rather not "destruct" the core with copyright.

Author Paul
Lead Developer
#4 | Posted: 12 Oct 2007 02:56 | Edited by: Paul 
Then you will just replace standart {$l_menu[1]} search menu button in templates/main_header.html to let's say {$searchMenu}

And then paste in bb_plugins.php the following code:

/* Custom search menu */

if($action!='search') $searchMenu="<a href=\"{$indexphp}action=search&amp;forum=FORUM_ID\">{$l_menu[1]}</a> {$l_sepr} "; else $searchMenu='';

/* --Custom search menu */

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 How to set the default forum for "search"?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.


miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.