vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Limit Chat (https://vborg.vbsupport.ru/showthread.php?t=269795)

sacpony 09-06-2011 08:04 PM

Limit Chat
 
Is there a way to limit who can use a chat plug-in? For example, if I wanted to have a basic site for non-pay members and sort of an upgraded site for donating members.

kh99 09-06-2011 08:43 PM

It depends on the chat plugin. I've seen at least one with that option built in. But even if it's not, you could probably edit the plugin(s) and surround the code with

PHP Code:

if (is_member_of($vbulletin->userinfo567))
{
   
// chat code here



where you'd change 5, 6, 7 to the list of usergroups you want to have access.


Another way might be if the mod already has an option to enable/disable it from the adminCP, you could create a plugin using hook location global_bootstrap_init_start and code like:

PHP Code:

if (!is_member_of($vbulletin->userinfo567))
    
$vbulletin->options[option_name] = 0

where option_name is the actual name of the option (You can probably figure this out by looking at the existing plugin).

Anyway, I hope this helps.

sacpony 09-06-2011 09:33 PM

Thanks for the reply...I will try it out and let you know!


All times are GMT. The time now is 04:07 PM.

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.00957 seconds
  • Memory Usage 1,714KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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