miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | 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
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 
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=\"https://www.minibb.com/forums/{$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 forum rules; otherwise it could be locked or removed 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑