miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Re-cycled miniBB Support Forums / Re-cycled /   

Disable members from locking topics

Author hugh
Registered
#1 | Posted: 17 Apr 2005 14:23 | Edited by: hugh 
Hi Team

I would like to disable the option of members to LOCK their topics. What would be the best way to do that? MiniBB 1.7. Thanks.

Author Team
8-)
#2 | Posted: 18 Apr 2005 10:46 
index.php

search for that:

elseif($action=='locktopic') require('./bb_func_locktop.php');

replace to:

elseif($action=='locktopic' and ($user_id==1 or $isMod==1)) require('./bb_func_locktop.php');

User will still see the "lock topic" under the thread, so you need also to remove condition in bb_func_vthread.php

Author Ivan
Advanced Member
#3 | Posted: 18 Apr 2005 13:18 
Is this also valid for 2.0?

It will not be bad if such option appears as normal in miniBB 2.0.

Author Team
8-)
#4 | Posted: 18 Apr 2005 13:20 
This is also valid for 2.0.

We'll think about an option.

Author hugh
Registered
#5 | Posted: 18 Apr 2005 18:52 | Edited by: hugh 
I've taken care of index.php and topic is no longer lockable by user. I presume this is the relevant part of bb_func_vthread.php but I'm not sure which part to delete.

Author Team
8-)
#6 | Posted: 19 Apr 2005 11:19 
Yes, this is part you need to edit.

elseif (($user_id == $topicPoster and $user_id != 0 and $user_id != 1) and $topicStatus != 9 and $topicStatus != 8) { if ($topicStatus == 0) $closeTopic = "$l_closeTopic"; elseif ($topicStatus == 1 and $userUnlock == 1) $closeTopic = "$l_unlockTopic"; else $closeTopic = ''; }

replace to:

elseif (($user_id == 1 or $isMod==1) and $topicStatus != 9 and $topicStatus != 8) { if ($topicStatus == 0) $closeTopic = "$l_closeTopic"; elseif ($topicStatus == 1) $closeTopic = "$l_unlockTopic"; else $closeTopic = ''; }

(I've not tested it but I hope you get the idea).

Author Anonymous
Guest
#7 | Posted: 19 Apr 2005 16:43 
Seems to work OK. thanks very much.

Author 0z
Guest
#8 | Posted: 20 Nov 2006 14:52 
I can't find this to-be-replaced text in index.php nor bb_func_locktop.php

What do I have to do in 2.0?

Author Ivan
Advanced Member
#9 | Posted: 20 Nov 2006 16:14 
From the manual

In setup_options.php

$userUnlock=0; If it is set to 0, registered user can not unlock his topic again after it was locked (by admin or himself), and vice versa. If set to 2, users are not able to lock their topics in general (avail. from ver. 2.0 RC3).

Re-cycled miniBB Support Forums / Re-cycled / Disable members from locking topics 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB