Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Create Style Groups for Style Chooser Details »»
Create Style Groups for Style Chooser
Version: 1.00, by Wayne Luke (Senior Member) Wayne Luke is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-05-2004 Last Update: Never Installs: 3
 
No support by the author.

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 www.vbulletinmods.com. Just select the style chooser there.

Show Your Support

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

Comments
  #2  
Old 04-06-2004, 08:40 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Might want to see about caching thoose templates. Seeing as thats making 2 extra queries on your vbulletinmods.com site.
Reply With Quote
  #3  
Old 04-06-2004, 08:44 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All you need to do is add the cached templates

In global.php find

PHP Code:
    'STANDARD_REDIRECT'
    
//'board_inactive_warning'
)); 
change to
PHP Code:
    'STANDARD_REDIRECT',
    
'optiongroup_start',
    
'optiongroup_end'
    
//'board_inactive_warning'
)); 
hit save and your done, that should work
Reply With Quote
  #4  
Old 04-06-2004, 08:50 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
All you need to do is add the cached templates

In global.php find

PHP Code:
    'STANDARD_REDIRECT'
    
//'board_inactive_warning'
)); 
change to
PHP Code:
    'STANDARD_REDIRECT',
    
'optiongroup_start',
    
'optiongroup_end'
    
//'board_inactive_warning'
)); 
hit save and your done, that should work
I know what all you had todo. I was just informing wayne here that he might want to add that part into the hack and on vbulletinmods.com.
Reply With Quote
  #5  
Old 04-08-2004, 05:40 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rather much editing...
Reply With Quote
  #6  
Old 04-13-2004, 01:44 AM
Lurk Lurk is offline
 
Join Date: Feb 2004
Location: Garden Grove, CA
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gmarik
Rather much editing...
is there something i'm doing wrong?
I currently run:
vBadvanced
vBulletin 3.0.0 gold

i keep getting the error:
Code:
Parse error: parse error in /home/lurkcorp/public_html/forum/includes/functions.php on line 1864

Fatal error: Call to undefined function: is_browser() in /home/lurkcorp/public_html/forum/global.php on line 59
Reply With Quote
  #7  
Old 04-24-2004, 10:48 PM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A question or two...Do the skins need to be reinstalled after implementing this? And in order to have categories, I would change Option Group to dark, light, etc...? Sorry for not understanding completely
Reply With Quote
  #8  
Old 04-25-2004, 08:15 PM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok I've been playing around with this and am clueless ...When I go to upload a new skin, I do see yes/no/option group. If i choose it to be in option group, I get that name on the chooser, but cant choose it. I'm at a loss, how to set a category and then put the correct skins under it. Any help will be greatly appreciated.
Reply With Quote
  #9  
Old 04-28-2004, 12:43 AM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any ideas out there...just a direction to point me in ....I'm ok once i know what i'm doing
Thanks to all
Reply With Quote
  #10  
Old 05-14-2004, 11:10 PM
blubber12 blubber12 is offline
 
Join Date: Nov 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any ideas out there
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 07:00 PM.


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.05582 seconds
  • Memory Usage 2,312KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (2)bbcode_html
  • (8)bbcode_php
  • (2)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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