vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to disable ability to subscribe to forum for certain usergroups (https://vborg.vbsupport.ru/showthread.php?t=179332)

mrkhm 05-15-2008 01:32 PM

How to disable ability to subscribe to forum for certain usergroups
 
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....bscription&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:
Code:

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:
Code:

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 [DATE]1210868631[/DATE] at [TIME]1210868631[/TIME] ---------------

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


All times are GMT. The time now is 05:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00961 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete