The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Quick Style Choose via button
ok i've seen the "quick style chooser" edit which makes the drop down.... but can someone tell me how i'd go about setting up the same kind of quick style chooser, but by process of a button to be placed with "User CP, Home, FAQ" etc. buttons at the top of the forums that when clicked would make the list drop down like, for example, the search feature does?.... thanks in advance :smoke:
|
#2
|
|||
|
|||
bump
|
#3
|
|||
|
|||
Hi
You will not be able to do this with just template edits! The reason why is that the template 'option' is used by many of the other templates to create drop boxes! You could hard code each of the styles in the 'navbar' template, but what good is that if you change style order or add new styles! Here is quick mod..... Follow me... Open Admin Panel Go to Styles & Templates >> Style Manager In the the select box for the style you want to add "NAVBAR STYLE SELECTOR", select Add New Template When the new template page opens, add the following! title Code:
navbar_style_bit Code:
<tr> <td class='vbmenu_option' style='white-space : nowrap'><if condition="$httptype"><a href='$httpurls'>$httplink</a><else /><strong>$httplink</strong></if></td> </tr> Go to Styles & Templates >> Search in Templates Search in Style: select the stle you are adding "NAVBAR STYLE SELECTOR", Search for text: chooser Click >> Find Style Manager >> Opens Click on the template footer template >> footer >> Opens Click on the Find button Now Find This... Code:
<if condition="$show['quickchooser']"> <td class="tfoot"> <select name="styleid" id="ressel" onchange="switch_styleid(this)"> <optgroup label="$vbphrase[quick_style_chooser]"> $quickchooserbits </optgroup> </select> </td> </if> Code:
<td class="tfoot"> </td> Click >> Save Style Manager >> Opens Click on the template navbar template >> navbar >> Opens Search for this!!! Code:
<if condition="$show['popups']"> Code:
<if condition="$show['popups']"> <!-- NAVBAR POPUP MENUS --> Code:
<if condition="$show['popups']"> <!-- NAVBAR POPUP MENUS --> <if condition="$show['quickchooser']"><!-- s / header styles changer --> <div class='vbmenu_popup' id='navbar_styles_menu' style='display : none'> <table cellpadding='4' cellspacing='1' border='0'> <tr> <td class='thead' align='center'>$vbphrase[select_styles]</td> </tr> $navbarstylesbits </table> </div> <!-- e / header styles changer --></if> Code:
vbmenu_register("navbar_search") Code:
<script type="text/javascript"> vbmenu_register("navbar_search"); </script></td> </if> Code:
<script type="text/javascript"> vbmenu_register("navbar_search"); </script></td> </if> <if condition="$show['quickchooser']"><td id="navbar_styles" class="vbmenu_control"><a name='vb_styles' accesskey='5'>$vbphrase[navbar_styles]</a><script type='text/javascript'> vbmenu_register('navbar_styles');</script></td></if> Go to Languages & Phrases >> Phrase Manager Phrase Type GLOBAL (add (2) new phrases) Code:
1. varname: navbar_styles text: Styles 2. varname: select_styles text: Select Style Now the Script edits!!! open (./global.php) Find This... Code:
$quickchooserbits = construct_style_options(-1, '--', true, true); Code:
$quickchooserbits = construct_style_options(-1, '--', true, true); $navbarstylesbits = navbar_styles_builder ( $session[sessionurl], $vboptions['styleid'] ); open ( ./includes/functions.php) Find This... Code:
return $stylesetlist; } Code:
return $stylesetlist; } function navbar_styles_builder ( $sess, $csid ) { $out = ''; if ( is_array ( $GLOBALS['stylechoosercache'][-1][1] ) ) { $cs = $GLOBALS['stylechoosercache'][-1][1]; for ( $i = 0; $i < sizeof ( $cs ); $i++ ) { if ( $csid != $cs[$i]['styleid'] ) { $httptype = true; } else { $httptype = false; } $httpurls = $_SERVER['PHP_SELF'] . "?" . $sess . "styleid=" . $cs[$i]['styleid'] . "#style"; $httplink = $cs[$i]['title']; eval ( '$out .= "' . fetch_template ( 'navbar_style_bit' ) . '";' ); } } return ( $out ); } Save changes, close './includes/functions.php' You now have NAVBAR STYLE SELECTOR installed C, ya... Sonia |
#4
|
|||
|
|||
i was starting to think i'd never get help, but after checking out the number of steps, i see why no one wanted to tackle it lol.... once i get home i am definitely going to get cracking on your steps.... thank you for the reply why-not.. i appreciate it greatly
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|