15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Allowing only some registered users post reply in certain topic

Page  Page 2 of 2:  « Previous  1  2  
Author Paul
Lead Developer
#16 | Posted: 28 Jul 2008 03:33 | Edited by: Paul 
This can be implemented also with arrays if you want more than 3 forums included:

if($user_id==0 and $action=='vtopic' and (in_array($forum, array(YOUR_FORUM_ID1, YOUR_FORUM_ID2, YOUR_FORUM_ID3...)))){


Author Persian
Partaker
#17 | Posted: 28 Jul 2008 06:10 
Paul:
This can be implemented also with arrays if you want more than 3 forums included:

if($user_id==0 and $action=='vtopic' and (in_array($forum, array(YOUR_FORUM_ID1, YOUR_FORUM_ID2, YOUR_FORUM_ID3...)))){

not working...this option ;)

Author Paul
Lead Developer
#18 | Posted: 28 Jul 2008 07:46 
Persian - I don't know the reason of what you are doing. It's working on my side.

Author Persian
Partaker
#19 | Posted: 28 Jul 2008 08:33 | Edited by: Persian 
It's Ok....This code Working...Thank You So Much....!!!!

if($user_id==0 and $action=='vtopic' and ($forum==YOUR_FORUM_ID or $forum==YOUR_FORUM_ID2 or $forum==YOUR_FORUM_ID3)){

$title=$l_accessDenied;

$errorMSG='Only registered users are allowed to view this forum.<br />';

//Loading header & warning page
echo load_header();
echo ParseTpl(makeUp('main_warning'));

//Loading footer
$totaltime=sprintf ("%01.3f", ($endtime-$starttime));
if(isset($includeFooter)) include($includeFooter); else echo ParseTpl(makeUp('main_footer'));
exit;
}


Author Prince
Partaker
#20 | Posted: 15 Apr 2010 14:28 
How can we do it also for last discussion... I mean unregistered user can't enter the topic from last discussion also.. ;)

Author Paul
Lead Developer
#21 | Posted: 16 Apr 2010 02:53 
Prince:
I mean unregistered user can't enter the topic from last discussion also

It's not related to Recent Topics section at all. Then you would need to make your forums completely hidden from guests, because they could enter topic's URL directly.

Page  Page 2 of 2:  « Previous  1  2 
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Allowing only some registered users post reply in certain topic Top

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

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


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