miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

How to set the default forum for "search"?

Author Anonymous
Guest
#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

index.php?action=search&forum=11

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
Guest
#3 | Posted: 11 Oct 2007 20:11 
Thanks.
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=\"{$main_url}/{$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"? Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


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 ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB