miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | 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 
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 
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
 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
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑