Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications

Reply
 
Thread Tools
Hide a style from style chooser Details »»
Hide a style from style chooser
Version: 1.0.1, by dartho dartho is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.7.1 Rating:
Released: 06-21-2008 Last Update: 06-23-2008 Installs: 50
Supported Uses Plugins
 

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:
Originally Posted by dartho
If you have multiple styles installed but wish to 'hide' some from users while still be able to use them you can use this template modification to hide particular styles form the quick chooser:

Edit your 'options' template - the original should look like this:
Code:
<option value="$optionvalue" class="$optionclass" $optionselected>$optiontitle</option>
and change it to the following:
Code:
<if condition="($optionvalue!=x) && ($optiontitle!='yyyyyy')">
<option value="$optionvalue" class="$optionclass" $optionselected>$optiontitle</option>
</if>
where x is the styleid of your mobile style and yyyyyy is the name of your mobile style. The name is case sensative!

This should stop it being added to the drop down list.

If you wish to hide multiple styles , you could extend the conditional as follows:

Code:
<if condition="(($optionvalue!=x1) && ($optiontitle!='yyyyyy1')) || (($optionvalue!=x2) && ($optiontitle!='yyyyyy2'))">
<option value="$optionvalue" class="$optionclass" $optionselected>$optiontitle</option>
</if>
where x2 is the 2nd styleid and yyyyyy2 is the 2nd style name.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-24-2008, 06:25 PM
BeerLuver's Avatar
BeerLuver BeerLuver is offline
 
Join Date: Mar 2002
Location: Green Bay, WI, US
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the update dartho
Reply With Quote
  #13  
Old 07-15-2008, 03:06 PM
mesdar mesdar is offline
 
Join Date: Jul 2008
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanx
Reply With Quote
  #14  
Old 12-04-2008, 11:31 PM
sung sung is offline
 
Join Date: Feb 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyway so that the style is also hidden from the Forum Skin drop down list in the User CP and not just the Quick Style Chooser?
Reply With Quote
  #15  
Old 12-12-2008, 07:45 PM
sung sung is offline
 
Join Date: Feb 2002
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sung View Post
Is there anyway so that the style is also hidden from the Forum Skin drop down list in the User CP and not just the Quick Style Chooser?
Made a plugin that does just this. It uses the same variable ($mo37_hidden_styleid) to hide the style, and is inactive by default.

So assuming you're already using dartho's plugin and it is working just upload this one and set it active and the same style will be hidden in the User CP as well.
Reply With Quote
  #16  
Old 12-31-2008, 04:06 AM
fta2k fta2k is offline
 
Join Date: Feb 2008
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've installed this and put in ID in the edit but it still shows in the dropdown.



Any ideas?


EDIT:

Ok, I'm an idiot.

I was using skin display number and not skin id. It's all fixed now.

Reply With Quote
  #17  
Old 03-07-2009, 05:14 AM
Merriweather Merriweather is offline
 
Join Date: Nov 2006
Posts: 389
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to hide more than one skin with this mod?
Reply With Quote
  #18  
Old 03-09-2009, 05:00 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is probably not very efficient, but you could edit the plugin and duplicate the code for each styleid...

PHP Code:
mo37_hidden_styleid x;
$mo37start strpos($quickchooserbits'<option value="'.$mo37_hidden_styleid.'"'); 
if (
$mo37start !== FALSE) {
  
$quickchooserbits substr($quickchooserbits 0$mo37start).substr($quickchooserbits strpos($quickchooserbits'</option>'$mo37start) + strlen('</option>'));
}
mo37_hidden_styleid y;
$mo37start strpos($quickchooserbits'<option value="'.$mo37_hidden_styleid.'"'); 
if (
$mo37start !== FALSE) {
  
$quickchooserbits substr($quickchooserbits 0$mo37start).substr($quickchooserbits strpos($quickchooserbits'</option>'$mo37start) + strlen('</option>'));

replace 'x' with one styleid, and 'y' with the next ...
Reply With Quote
  #19  
Old 06-24-2009, 07:13 PM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just went to -vb options-Style & Language Settings- and unchecked the ability to change styles. In the 2 styles I use I allow user selection. This removes the ability to change styles from the footer and usercp, but it also forces the mobile style with the mobile detection mod.
Reply With Quote
  #20  
Old 07-05-2009, 07:44 PM
accludetuner accludetuner is offline
 
Join Date: Jun 2009
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great on 3.8.3
Reply With Quote
  #21  
Old 12-10-2009, 02:50 AM
choccyclaire choccyclaire is offline
 
Join Date: Jan 2008
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sung View Post
Made a plugin that does just this. It uses the same variable ($mo37_hidden_styleid) to hide the style, and is inactive by default.

So assuming you're already using dartho's plugin and it is working just upload this one and set it active and the same style will be hidden in the User CP as well.
What about if you used darthos example a few posts above in order to hide more than one?

When I used this plugin it just eliminated the last style.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04698 seconds
  • Memory Usage 2,315KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete