The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom Style Chooser
I'm trying to setup a custom style chooser and following some advice found on these forums (I forget where) I was able to move the Style Changer from the footer to the top links. We are only using two styles, one narrow and one wide, and we want a radio button selector instead of a drop down. The original code is:
Code:
<form action="{vb:link forumhome|nosession}" method="get" id="footer_select"> <vb:if condition="$show['quickchooser']"> <select name="styleid" onchange="switch_id(this, 'style')"> <optgroup label="{vb:rawphrase quick_style_chooser}"> {vb:raw quickchooserbits} </optgroup> </select> </vb:if> </form> Code:
<form action="{vb:link forumhome|nosession}" method="get" id="footer_select"> <vb:if condition="$show['quickchooser']"> <input type="radio" name="styleid" value="5" onChange="switch_id(this, 'style')"/> Narrow (Default) <input type="radio" name="styleid" value="4" onChange="switch_id(this, 'style')"/> Wide </vb:if> </form> |
#2
|
||||
|
||||
Unfortunately the JavaScript function switch_id is hard coded to use a <select> input and just won't work with any other type of input. You'd need to rewrite the function or make a new one to work with radio buttons.
FYI - this is the javascript function in question: PHP Code:
|
#3
|
||||
|
||||
OK so if you add this javascript to your template:
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|