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

no new replies are allowed, but topics are

Author teva
Registered
#1 | Posted: 4 May 2006 13:02 
Is it possible to create forum where users could only write new topics, but no reply would be possible on this topics. I just want to let people tell the story, but no one would be allowed to reply to this. Registration is not neccecary here, guest can create new topics also.
Thank you

Author Paul
Lead Developer
#2 | Posted: 4 May 2006 15:01 
Try to paste this snippet in bb_plugins.php:

/* forbid posting replies */
if($action=='vthread' and !($user_id==1 or $isMod==1)) {
if(!in_array($forum, $roForums)) $roForums[]=$forum;
}
if($action=='pthread' and !($user_id==1 or $isMod==1)) die('Access denied');
/* forbid posting replies */

Author teva
Registered
#3 | Posted: 4 May 2006 16:26 | Edited by: teva 
Tnx, this works great. I only forgot to mention, that i would like to have only one forum with this settings.

Is this possible? Tnx

Edit:
Tnx for changing topic name to something that makes sense

Author Paul
Lead Developer
#4 | Posted: 5 May 2006 06:11 | Edited by: Paul 
So the code will be...

/* forbid posting replies */
if($action=='vthread' and !($user_id==1 or $isMod==1) and $forum=='FORUM_ID') {
if(!in_array($forum, $roForums)) $roForums[]=$forum;
}
if($action=='pthread' and !($user_id==1 or $isMod==1) and $forum=='FORUM_ID') die('Access denied');
/* forbid posting replies */

substitute your own FORUM_ID here.

Author teva
Registered
#5 | Posted: 5 May 2006 07:09 
Tnx..works excellent.
praise minibb

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / no new replies are allowed, but topics are 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
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB