Log in

View Full Version : How to disable ability to subscribe to forum for certain usergroups


mrkhm
05-15-2008, 01:32 PM
Hi,

I would like to disable the ability to subscribe to certain forums via the forum "tools" menu for certain usergroups for a specific forum, so that the ability to subscribe for daily or weekly updates is only available to a certain usergroup for that forum.

I tried to use the "if condition bbuserinfo usergroup... , do not show button to subscribe" but then i realised for savvy people they can work around this by just going directly to http://www.myforum.com/subscription.php?do=addsubscription&f=2

i really wish this was an option in the forum permissions page, amongst the options of can post poll or can view others threads, it would be nice to have "can subscribe to forum"

Any ideas? please

Lynne
05-15-2008, 02:55 PM
You could modify the subscriptions.php file directly and not allow them to subscribe. Go to the addsubscription area and add in:

if ( is_member_of($vbulletin->userinfo, x,y,z) )
{
print_no_permission();
}
There already is an area for no permission, so maybe add it in there:
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR is_member_of($vbulletin->userinfo, x,y,z))
{
print_no_permission();
}
x,y,z are the usergroup ids.

(Warning: I have NOT tested this!)

mrkhm
05-15-2008, 03:10 PM
Hi lynne,

thanks i am going to try this straight away and update you

--------------- Added 1210868631 at 1210868631 ---------------

hi again lynne,

quick questions, you know where you have said "OR is_member_of($vbulletin->userinfo, x,y,z)) " where there is already a no permission, do you know the code for "OR forumid = 2"??

so that as a backup if you are trying to subscribe to a particular forum that i have banned for subscriptions it will be printed no permission, no one is allowed to subscribe to this forum

just as an alternative?

Lynne
05-15-2008, 03:40 PM
I think that would be "OR $foruminfo['forumid'] == '2'"

mrkhm
05-15-2008, 04:48 PM
thank you again Lynne