PDA

View Full Version : An evil little prank mod - force user to a style


amykhar
07 Feb 2006, 20:59
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
07 Feb 2006, 21:42
force ?

torment ?

wow, you're so evil











but I love it . LOL

IrPr
07 Feb 2006, 22:12
code modification?
i think Andreas coded and awesome product named "Restrict Style to Usergroup"
goood work, but i prefer Andreas's work;)

amykhar
07 Feb 2006, 22:25
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.

IrPr
08 Feb 2006, 04:11
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
08 Feb 2006, 10:24
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
08 Feb 2006, 13:05
Thanks!

Sooner95
09 Feb 2006, 14:13
This would be a cool thing one could buy via Estore or Ushop..haha..

Nice one..

SouthernTn
14 Feb 2006, 21:36
can you do this in 3.5.2? Theres no START TEMPLATES & STYLES

Smiry Kin's
22 Feb 2006, 04:01
is there away to select all user groups? :S

amykhar
22 Feb 2006, 04:37
Yes. Leave off the conditional, Smiry.

Southern, sorry. I don't write for older versions.

Andreas
22 Feb 2006, 07:32
Could also easily be done as a plugin on style_fetch :)

Jon.
24 Feb 2006, 18:18
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
24 Feb 2006, 18:36
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.

Jon.
25 Feb 2006, 22:47
Oh, thanks :)

Smiry Kin's
26 Feb 2006, 04:05
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
26 Feb 2006, 14:20
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.