View Full Version : An evil little prank mod - force user to a style
amykhar
02-06-2006, 10:00 PM
I threw this together as a practical joke. I installed a style for one of our private forums, and some members hated it. So, I set it so that one of those users was faced with that style in every forum - and couldn't change it.
If you want to force a user to a given style, do this:
1. Note your styleid and the userid of the person you want to torment.
In global.php Find:
// ################################################## ###########################
// ######################## START TEMPLATES & STYLES ###########################
// ################################################## ###########################
Add After
if($vbulletin->userinfo['userid']==useridhere)
{
$codestyleid= styleidhere;
}
If you have a whole usergroup you want to torment, do this: (haven't tested this one)
if(is_member_of($vbulletin->userinfo,usergroupidhere))
{
$codestyleid= styleidhere;
}
hiiped
02-07-2006, 07:42 PM
force ?
torment ?
wow, you're so evil
but I love it . LOL
code modification?
i think Andreas coded and awesome product named "Restrict Style to Usergroup"
goood work, but i prefer Andreas's work;)
amykhar
02-07-2006, 08:25 PM
That's different. It's an update of one of my older mods and certainly has it's uses.
This is a temporary code hack that can be used as a practical joke or even for users that you're trying to drive away. Both have their uses.
That's different. It's an update of one of my older mods and certainly has it's uses.
This is a temporary code hack that can be used as a practical joke or even for users that you're trying to drive away. Both have their uses.
ofcourse;) this mod supports user restriction ;)
Thanks Amy :)
Smiry Kin's
02-08-2006, 08:24 AM
If you have a whole usergroup you want to torment, do this: (haven't tested this one)
Code:
if(is_member_of($vbulletin->userinfo,usergroupidhere))
{
$codestyleid= styleidhere;
}
Does this work?? also ideal if people are having problems not viewing the default skin..??
Snake
02-08-2006, 11:05 AM
Thanks!
Sooner95
02-09-2006, 12:13 PM
This would be a cool thing one could buy via Estore or Ushop..haha..
Nice one..
SouthernTn
02-14-2006, 07:36 PM
can you do this in 3.5.2? Theres no START TEMPLATES & STYLES
Smiry Kin's
02-22-2006, 02:01 AM
is there away to select all user groups? :S
amykhar
02-22-2006, 02:37 AM
Yes. Leave off the conditional, Smiry.
Southern, sorry. I don't write for older versions.
Andreas
02-22-2006, 05:32 AM
Could also easily be done as a plugin on style_fetch :)
Love it! :) I'm using it as a premium system - i have a skin without adverts that i use for premium, but not anyone else :)
amykhar
02-24-2006, 04:36 PM
Jon,
Andreas's mod to restrict styles to usergroups may be more suitable for your needs. It's more robust and it's a plugin.
This is more of a quick and dirty hack to do something style-wise to an individual or two.
Smiry Kin's
02-26-2006, 02:05 AM
is it possible to have 2
if($vbulletin->userinfo['userid']==useridhere)
{
$codestyleid= styleidhere;
}
?
e.g you might want admins / mods to use a no add style, and users etc to use one..
but then you want a different group to use another style.. is this possbiel?
e.g
if($vbulletin->userinfo['userid']==1,2,3,4)
{
$codestyleid= 1;
}
if($vbulletin->userinfo['userid']==4,5,6)
{
$codestyleid= 2;
}
amykhar
02-26-2006, 12:20 PM
Yes, Smiry. But, as I said before if you are doing it with large groups of people, it's better to use Andreas's mod.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.