The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Hide a style from style chooser Details »» | |||||||||||||||||||||
A simple plugin which will allow you to hide a specified user selectable style from the Quick Style Chooser which appears at the bottom of every page in vBulletin whilst still allowing the style to be used.
Instructions: 0. If you made modifications to your 'options' template as per previous instructions, you will need to revert the template 1. Import attached plugin via "Products and Plugins"," Download/Upload Plugin" 2. Go into the plugin manager and edit the "Hide Style From Style Chooser" plugin 3. Change the 'x' in '$mo37_hidden_styleid = x' to be the StyleID of the style you wish to hide 4. Set the plugin status to be active 5. Save The style is now hidden, but still usable by you users. To disable/uninstall, set the plugin status to not be active or delete the plugin. If you use the add-on that extends my mobile style, you will not need to do this as it is (soon will be) an option as of version 0.0.3. See this post for a plugin which hides the chooser in usercp options. All posts in this thread up to post #9 were in reference to the original way I thought of doing this. I have kept the original contents of this template modification below for reference **** FOLLOWING INFORMATION KEPT FOR REFERENCE ONLY **** Quote:
Show Your Support
|
Comments |
#2
|
|||
|
|||
If u uncheck the box on the left when view the styles it will prevent users from using that one. Its part of the default.
|
#3
|
|||
|
|||
That is true - but there are instances where you want the style available to a user, but you do not wish them to be able to select it. An example is my mobile detection hack. The style must be user selectable for this to work, but you don;t want PC users to select it. Or if you are developing a style on your site and you want a standard user/guest to be able to use it for testing, but don't want it showing up in the style selector..
|
#4
|
|||
|
|||
Quote:
Ummm if the box is unchecked and saved, you do realize members still cannot choose it because its hidden....right?! |
#5
|
|||
|
|||
Yes that is correct. That is why you would make the style user selectable (by checking the box and saving) , but hide it with a template edit such as this. I could then give the user a link, or use rewrites in my htaccess, or write a plugin that selects the style.
Why are people posting to this thread when they seem to have no need for it? I only released it here as it is something I use and find personally useful and thought others may feel the same. Let me give you a real life scenario which may help you understand where this has a purpose, and indeed why I wrote it.
Solution? Hide the styles which I don't want PC users to manually select whilst allowing the system to still assign them. Thus this template edit. |
#6
|
|||
|
|||
The 'option' template is used almost everywhere a select box appears, so not only for the templates.
This leads on a big system that your server will do a huge amount of if(condition) calculations that are not necessary. |
#7
|
|||
|
|||
That is true. I've not noticed any performance degradation on my site, that's not to say there won't be any and admins should of course monitor as they would after making any modifications.
I appreciate this type of feedback and I am looking for a more eloquent solution but in the mean time it's this or nothing for me. |
#8
|
|||
|
|||
Thanks - it's a useful little snippet to have.
|
#9
|
||||
|
||||
Thanks dartho. Useful for hiding the default style; but still being able to use it as a basic template to make a new style within the admin panel. As opposed to deleting it outright.
|
#10
|
|||
|
|||
Updated! Installs as a plugin with no template edits and no resource usage concerns as in post #6 and #7.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|