PDA

View Full Version : Forcing style on a usergroup


Zelda-King
01-28-2006, 05:47 PM
This should be an EASY one;

I am trying to write a plugin using the global_start hook to administer the above affect.

This is the code I'm using;
if ($usergroupid == '12')
{
$styleid == '3';
}
There must be some really simple reason why that's not working. Any pointers?

filburt1
01-28-2006, 06:04 PM
The hook probably fires after the style is already selected, in which case you'd manually have to edit files (lame).

BTW, don't use quotes when working with numeric values. You're treating them as strings.

Zelda-King
01-28-2006, 06:07 PM
Thanks, I didn't know either of those facts.

I have got this running. I simply needed to use the style_fetch hook instead.

I used the following code;
if ($vbulletin->userinfo['usergroupid'] == XX)
{
$styleid = X;
$userselect = true;
}

Capt. GannA
05-17-2006, 03:59 PM
Thanks, I didn't know either of those facts.

I have got this running. I simply needed to use the style_fetch hook instead.

I used the following code;
if ($vbulletin->userinfo['usergroupid'] == XX)
{
$styleid = X;
$userselect = true;
}

Where do I have to add this?

Nevermind, figured it out. Thanks :D