Back to vBulletin 3.0 Add-Ons

Create Style Groups for Style Chooser
Mod Version: 1.00, by Wayne Luke

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 3
Released: 06 Apr 2004 Last Update: Never Downloads: 0
Not Supported  

If you have a lot of style groups added, it can be hard to organize them in the quick style chooser located in the footer of each page. I wanted to provide a visual break between style groups so I came up with this mini modification. It requires 2 file edits and two new minor templates and a minor query.

Create the following templates:

optiongroup_start:
HTML Code:
<optgroup label="$optiontitle">
optiongroup_end:
HTML Code:
</optgroup>
Next open up includes/functions.php and find:
PHP Code:
    eval ('$stylesetlist .= "' fetch_template('option') . '";');
    
$stylesetlist .= construct_style_options($style['styleid'], $depthmark '--'false$quickchooser); 
Change that to:
PHP Code:
    if ($style['userselect'] == 1)
    {
     eval (
'$stylesetlist .= "' fetch_template('option') . '";');
     
$stylesetlist .= construct_style_options($style['styleid'], $depthmark '--'false$quickchooser);
    }
    else
    {
     eval (
'$stylesetlist .= "' fetch_template('optiongroup_start') . '";');
     
$stylesetlist .= construct_style_options($style['styleid'], $depthmark '--'false$quickchooser);
     eval (
'$stylesetlist .= "' fetch_template('optiongroup_end') . '";');
    } 
In admincp/template.php find:
PHP Code:
 print_yes_no_row($vbphrase['allow_user_selection'], 'userselect'$style['userselect']); 
and replace with:
PHP Code:
 print_yes_no_other_row($vbphrase['allow_user_selection'], 'userselect''Option Group'$style['userselect']); 
Finally run this query:
Code:
 ALTER TABLE `style` CHANGE `userselect` `userselect` SMALLINT( 5 ) DEFAULT '1' NOT NULL
This modification is not phrase friendly but you could easily create a phrase for the words "Option Group" used in admincp/template.php and implement it. You can also modify the templates to apply a CSS class and style the option groups to fit your site.

Feel free to modify this to suit your needs.

A demo can be see at http://www.vbulletinmods.com. Just select the style chooser there.

Download

No files for download.

Similar Mods

Forum Display Enhancements Hide a style from style chooser vBulletin 3.7 Template Modifications
Nonselectable style on Quick Style Chooser for admin vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024