miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Exclude forum from search-results

 
Author _Marco
Partaker
#1 | Posted: 23 Nov 2005 22:23 
Ola,

I want to exclude a forum from the search-results. Is there an easy way to do so?
I know there is a value $lastOut to exclude posts from last_discussions. Maybe this can be used for the searchpage too.

_Marco

Author Team
8-)
#2 | Posted: 24 Nov 2005 15:41 
hello.. do you also want to hide it from other members? or just exclude it from search? cause for example a private closed forum will be excluded from search by default.

Author _Marco
Partaker
#3 | Posted: 24 Nov 2005 20:04 
I was thinking to hide it from everyone (exept admin), and create some extra templates to use as a guestbook. The guestbook I use now is an other php script, but it would be cool to use some miniBB functions and templates.

_Marco

Author Team
8-)
#4 | Posted: 25 Nov 2005 15:17 
well, you will need to modify bb_func_search.php and add your SQL forum exclusion string like forum_id!=10 to the $xtr variable

or change this line

if (isset($clForumsUsers)) $closedForums=getAccess($clForums, $clForumsUsers, $user_id); else $closedForums='n';


to


if (isset($clForumsUsers)){
$closedForums=getAccess($clForums, $clForumsUsers, $user_id);
$closedForums[]=10;
}
else $closedForums=array(10);


where 10 is your hidden/closed forum id.

Author _Marco
Partaker
#5 | Posted: 25 Nov 2005 17:46 
Nice! this sound like something I could make work.
I'll try it later and keep you informed.

Thanx,

_Marco

Author Team
8-)
#6 | Posted: 26 Nov 2005 20:52 
Try also a non-core-destructive solution... in your bb_plugins.php, paste something like that:

if($action=='search') { $clForums[]=10; $clForumsUsers[10]=array(); }

where "10" is an ID of your forum to hide.

Author _Marco
Partaker
#7 | Posted: 2 Dec 2005 18:58 
After thinking, I think I could use a "hidden" forum that does not show in the Forums-list, last discussions, search results, stats, userinfo, etc.
A simple line like $hideForums=array(); in bb_specials.php would be most easy for me. That means some functions have to be modified to exclude the $hideForums for all users (exept admin).

Is this hard to do? It would be a nice feature ;)

_Marco

Author _Marco
Partaker
#8 | Posted: 3 Dec 2005 01:48 
Although I still think it would be a nice option ($hideForums), I've found a solution that works fine for me.

Very simple:

$clForums=array(9);
$clForumsUsers[9]=array(1);

_Marco

Author Team
8-)
#9 | Posted: 4 Dec 2005 17:08 
Your solution seems more better than adding additional options. Let's keep it mini ;)

Author 666
Guest
#10 | Posted: 21 Oct 2007 16:07 
how to exlude only a topic ?

Author Paul
Lead Developer 
#11 | Posted: 22 Oct 2007 02:20 
666
I think you would need to put in bb_plugins.php the code like this...

if($action=='vthread' and $topic=YOUR_TOPIC_ID) $metaRobots='NOINDEX,NOFOLLOW';

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Exclude forum from search-results
 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.


  ⇑