PDA

View Full Version : Usergroups access to a different style ?


wii
08-27-2007, 07:05 AM
Is it possible to setup the forum, so that specific usergroups see different styles of the forum ?

Thanks

Zachery
08-27-2007, 01:24 PM
Not by default but I can't imagine it would be terribly hard to plugin to the forum style override and change the styleid depending on the usergroup.

wii
08-27-2007, 01:37 PM
Who can I ask to do this modification ?

Zachery
08-27-2007, 02:52 PM
You might want to try it for yourself, take a look at global.php for a sample of code that should get the job done

FullyTested
08-28-2007, 04:38 AM
You can modify this for usergroups conditional...
https://vborg.vbsupport.ru/showthread.php?t=115256

wii
08-28-2007, 05:34 AM
If I could I would, I´m not a programmer in any way or form, unfortunately...

FullyTested
08-28-2007, 08:03 AM
You could insert this in the global.php file where the following hook is:
($hook = vBulletinHook::fetch_hook('style_fetch')) ? eval($hook) : false;

if ($vbulletin->userinfo['usergroupid'] == 10)
{
$vbulletin->userinfo['styleid'] = 2;
$styleid = 2;
}
else if ($vbulletin->userinfo['usergroupid'] == 20)
{
$vbulletin->userinfo['styleid'] = 3;
$styleid = 3;
}

replace the above numbers with those of your usergroups and desired styles

wii
08-28-2007, 11:06 AM
Cool thanks - I will try this asap.

Zachery
08-28-2007, 04:15 PM
Cool thanks - I will try this asap.
You may not be a coder now, but learning is the key, baby steps ;)