View Full Version : Invisible Style, But Still Active
L9IAnime
09-27-2006, 08:50 PM
Damn, this looks so much like my previous thread its scary....
Basically when the style changer is listing the styles available, i want it to skip a certain style, but i still want the style to be able to be used by everyone... any ideas how this can be done??
L9IAnime
09-29-2006, 01:25 PM
any ideas, any ideas at all???
SCRIPT3R
09-29-2006, 03:51 PM
why would you want it invisible then?
Paul M
09-29-2006, 04:32 PM
How would they choose it ?
L9IAnime
09-29-2006, 04:41 PM
it is forcibly placed on the user in certain forums/cmps pages, i just dont want them to be able to select it elsewhere...
SCRIPT3R
09-29-2006, 05:07 PM
just set the forum styles accordingly and then disable the option which lets users choose their own style.
L9IAnime
09-29-2006, 06:41 PM
but i want them to be able to choose from the other styles outside of the area i want it to be locked in :S
Paul M
09-29-2006, 07:18 PM
You can already force a style to be used in a forum, it's part of the forum settings, and that style does not need to be visible.
josiespencer
10-04-2006, 05:55 PM
I sorta understand this need - I have a group of people attached to one usergroup. I would like that group of people to always be forced to use a certain style. And I don't want any of my other users to be able to pick this style.
It all has to do with creating a forum for a group of employees with different logos, etc. that only pertains to their usergroup. I want everyone else to not even know that this special group exists.
I've had a lot of suggestions, like modify the templates of all my styles which I do not want to do. My mind has been bouncing around all kinds of ideas but I just want a solution with minimal code impact.
Paul M
10-04-2006, 10:56 PM
You can force a style on a particular usergroup (or groups) like this ;
Create a plugin and link it to the style_fetch hook.
Put this as the contents ;
if (is_member_of($vbulletin->userinfo,5,6,7)) // Usergroups //
{
$userselect = 0;
$styleid = 11; // Style id //
$vbulletin->userinfo['styleid'] = $styleid;
$vbulletin->options['styleid'] = $styleid;
}Edit the usergroups and styleid to suit.
josiespencer
10-05-2006, 07:19 PM
My usergroup is 98 and my styleid is 39. Is this code correct? It seems to have worked!
if (is_member_of($vbulletin->userinfo,98)) // Usergroups //
{
$userselect = 0;
$styleid = 39; // Style id //
$vbulletin->userinfo['styleid'] = $styleid;
$vbulletin->options['styleid'] = $styleid;
}
Now one more thing and I will leave you alone - got any ideas how I can disallow the style pick box on my "special" style??? I don't want the users in my usergroup to be able to pick a different style either on the main forum page or in their CP screen.
josiespencer
10-06-2006, 09:59 PM
I found a workaround - I added a new plugin for profile_complete that does this:
if (is_member_of($vbulletin->userinfo,98)) // Usergroups //
{
$userselect = 0;
$styleid = 39; // Style id //
$vbulletin->userinfo['styleid'] = $styleid;
$vbulletin->options['styleid'] = $styleid;
$vbulletin->userinfo['styleid'] = 39;
$vbulletin->options['styleid'] = 39;
}
So no matter if they pick a new style on one of the forum pages or the CP screen, 39 just gets popped right back in there!
Paul M
10-06-2006, 10:21 PM
The two lines you have added change nothing, they just duplicate the lines above.
$styleid = 39; // Style id //
$vbulletin->userinfo['styleid'] = $styleid;
$vbulletin->options['styleid'] = $styleid;
is the same as ;
$vbulletin->userinfo['styleid'] = 39;
$vbulletin->options['styleid'] = 39;
(ignore vb's strange formatting)
josiespencer
10-06-2006, 10:42 PM
True - the same code would work in both places:
if (is_member_of($vbulletin->userinfo,98)) // Usergroups //
{
$userselect = 0;
$styleid = 39; // Style id //
$vbulletin->userinfo['styleid'] = $styleid;
$vbulletin->options['styleid'] = $styleid;
}
I guess when I next to add the next usergroup, I will create a variable to replace the 39 but for now all works fine.
GameWizard
11-29-2006, 01:28 PM
Is it possible to force a certain style for everyone based on what link is pressed? I have multiple styles being used and each style has a unique "New Posts" link.
What I would like to see happen is when the "New Posts" link is pressed, they are taken to the page and then they will see the style from which section they came from.
Example: They are in a subsection which happens to use styleid=3, i want then New Posts section to use that theme aswell.
Although I am aware of the command &styleid=3, however if I then navigate to any other board, it apears to use that same style in a board that was previously NOT designated to use styleid 3, see my dilema?
I hope someone can help.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.