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)

ToyotaDiesel 04-20-2006 12:46 PM

Anyone? I'm getting by using the user level version, but the usergroup script would make it alot easier to see whos in the group and whos not.

Mosh 04-20-2006 04:05 PM

Post the Style ID you want to restrict to certain groups, and the primary and secondary membergroups you want to limit. And I will PM you the script with the appropriate info already in it.

So do it as:

Style ID:
Primary Groups:
Secondary Groups:

ToyotaDiesel 04-20-2006 05:04 PM

thanks. This is what I was using

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

Style ID: 9
Primary Groups: none
Secondary Groups: 29

Mosh 04-21-2006 12:27 AM

Try this instead:

Code:

if (in_array($vbulletin->userinfo['membergroupids'], array(29)))
{
$styleid = 9;
}

Tell me if that works.

ToyotaDiesel 04-21-2006 01:17 PM

Thanks. I get this at the top of the page with that line

Parse error: parse error, unexpected '{' in /home/public_html/forums/global.php(233) : eval()'d code on line 2

ToyotaDiesel 04-21-2006 01:24 PM

I added a close parenthesis, and it fixed the parse error listed above, but otherwise the code is working the same.

It works fine with all secondary usergroups with an id# of less than 12.

ToyotaDiesel 04-21-2006 01:33 PM

Usergroup ids 13-16 were deleted. Would this lack of ID #s cause a problem? Seems like thats where the problem starts. Nothing greater than that block of deleted ids will work.

Mosh 04-23-2006 01:19 AM

You may need to rebuild your Styles to get this to work.

Code:

Maintenance -> Update Counters - > Rebuild Styles.

Select Yes for both Check For Styles With No Parent and Renumber all templates from 1.

.

If that does not work, then I do not have a clue, as it should work as advertised.

Mosh 04-24-2006 12:07 AM

ToyotaDiesel, I had a thought, if you are using this mod with Restrict Style to Usergroup(s) by Andreas, then make sure the style you are using for this secondary member group has the correct permissions for the group to be able to use it.

Warlock40 05-07-2006 04:31 AM

Quote:

Originally Posted by ToyotaDiesel
Usergroup ids 13-16 were deleted. Would this lack of ID #s cause a problem? Seems like thats where the problem starts. Nothing greater than that block of deleted ids will work.


Initially I had the same problem. I could not get a specific style to work.
My problem was that I had the style set as "not user selectable"
so members could not pick it.

So to get have my cake and eat it to. I uploaded andreas hack https://vborg.vbsupport.ru/showthread.php?t=95910
and then allowed the style to be select by a specific user group, and then used this hack to set it as a default for that user group.

I also had this set as a default for a cmps page different from my home but in order to keep that I then just created a child and set that to non user selectable and pointed it to my cmps page so that it could get style (as the other was restricted.

So now members who are new or visit the specific page or forum area or are part of a specified usergroup can enjoy this style.

Thanks for the hack.

Oh and if there is an easier way to make this so it can be used by non user selectable styles I'll be happy to change it all back..it will save me some keystrokes down the road.


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.01934 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
  • (2)bbcode_code_printable
  • (1)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
  • (10)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