vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Force Style to Certain Usergroup(s) and/or User(s) (https://vborg.vbsupport.ru/showthread.php?t=108623)

Mosh 05-08-2006 11:51 PM

If it can not be selected by the user, it can not be used by that user unfortunately and my mod will not work, it is what permissions is all about.

My mod is used in conjunction with Andrea's one (advanced permissions for each style) to force a particular style on a user or a group of users (but the user or group have to have permissions to select/see the style being forced on them).

beano33 01-30-2007 07:46 PM

I force a lite style during periods of high server loads. Does anyone know how to add a trigger to this plugin so it would only go active at a defined server load? I suspect it might involve adding another plugin to the global.php hook location. Thanks!

The Equivocate 03-14-2007 05:04 AM

Hey, I'm using this hack to implement a "multi-site" shared forum. Because the sites will be referring hits based on style id (I.E. the affiliate has skin id #2 branded with their logos/ads, so they'd use mysite.com/index.php?styleid=2), Unregistered Users need to have all the skins available to them, and their skin defined via the styleid in the URL.

What change would I have to make? I know absolutely nothing about PHP, but here's the change I tried to make to allow Unregs (usergroup ID #1) to view both skin styleid #1 AND #2 (but let's pretend there's going to be about 6 more). It's giving me a parse error and only showing skin #2.:

Code:

if (in_array($vbulletin->userinfo['usergroupid'], array(1)) || (in_array($vbulletin->userinfo['membergroupids'], array(1))))
{
$styleid = 1,2;
}


Mosh 03-18-2007 10:53 PM

Quote:

Originally Posted by The Equivocate (Post 1203072)
Hey, I'm using this hack to implement a "multi-site" shared forum. Because the sites will be referring hits based on style id (I.E. the affiliate has skin id #2 branded with their logos/ads, so they'd use mysite.com/index.php?styleid=2), Unregistered Users need to have all the skins available to them, and their skin defined via the styleid in the URL.

What change would I have to make? I know absolutely nothing about PHP, but here's the change I tried to make to allow Unregs (usergroup ID #1) to view both skin styleid #1 AND #2 (but let's pretend there's going to be about 6 more). It's giving me a parse error and only showing skin #2.:

Code:

if (in_array($vbulletin->userinfo['usergroupid'], array(1)) || (in_array($vbulletin->userinfo['membergroupids'], array(1))))
{
$styleid = 1,2;
}


This is only to force a 1 style on member group(s).

You can not have multiple style ids as you have them, this is what is causing the parse error:

Code:

$styleid = 1,2;
If you want to have guests use all styles then do not use this hack. Only use this hack for the member groups you want to restrict to a particular style.

If you want to restrict say 2 different member groups to one style and say 1 different member group to another style then here is an example of how to do it.
Code:

if (in_array($vbulletin->userinfo['usergroupid'], array(2,3)))
{
$styleid = 1;
}
if (in_array($vbulletin->userinfo['usergroupid'], array(4)))
{
$styleid = 2;
}

Also please click INSTALL, as you said you are using this hack.

lostgirl815 03-23-2007 05:16 AM

Is there any chance that I can use this with 3.6.4?

Mosh 03-24-2007 08:34 PM

Quote:

Originally Posted by lostgirl815 (Post 1210116)
Is there any chance that I can use this with 3.6.4?

It should work with v3.6.x :)

lostgirl815 03-24-2007 08:37 PM

Great! Thanks for your answer! :)

--------------

Worked like a charm in the test run - thanks so much for this one!

Mosh 03-26-2007 06:26 AM

Quote:

Originally Posted by lostgirl815 (Post 1211306)
Great! Thanks for your answer! :)

--------------

Worked like a charm in the test run - thanks so much for this one!

You are most welcome :)

Mosh 04-02-2007 09:11 PM

The official v3.6.x version of this modification is now available from here.

Thanks for your patience, and hope all of you users with v3.6.x will enjoy this ported mod :)


All times are GMT. The time now is 04:18 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.01622 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete