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

Reply
 
Thread Tools
Change Style dropdown on ALL of your vB pages :) (hardcoded, no queries) Details »»
Change Style dropdown on ALL of your vB pages :) (hardcoded, no queries)
Version: 1.00, by KuraFire KuraFire is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-05-2003 Last Update: Never Installs: 15
 
No support by the author.

HACK: Change Style dropdown on ALL of your vB pages (hardcoded, no queries)
BY: KuraFire [www.kurafire.com]
DESCRIPTION: Allows users/guests to change the style on ANY given vB page of yours
DIFFICULTY: Medium
INSTALL-TIME: 10 minutes
STEPS: 9

Demo: www.kurafire.com/thecouch/
Just browse around and try changing the style on various pages

EXTENDED DESCRIPTION:
This hack will put a small drop-down box in your Header template, containing all the styles of your vBulletin forum. This particular version of the hack will not require a query for every pageload to get the different Styles, but it does require you to hardcode your Styles into the global.php file. There is also a version where you don't have to do that, but that will add one query to every page load.

PROS FOR THIS VERSION:
- no query extra for every page load of your vB
- drop down box isn't as wide as with the other version of the hack
CONS FOR THIS VERSION:
- the amount of users using each style is not displayed;
- if you add more styles, you have to hardcode the new ones into your global.php again.

Personally, I use this version, for I don't add styles very often at all (made 6 initial ones and will only add 1 more style somewhere in the coming year or two ), and I like to keep my query count as low as possible on every page load



Install instructions are in the attachment. Enjoy / good luck

Show Your Support

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

Comments
  #12  
Old 05-05-2003, 08:17 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 12:27 AM Conundrum9 said this in Post #10
I'm not sure if there is a reason fo rit, but I found a problem with the instructions for Step 5.

I found that on installing this on my test board the nc_stylechangebit needed to be changed to header_styleboxbit which is a template the instructions tell you to make in Step 6.

Anyway since I'm still just learning the finer points of php it might just be me, but I thought I should bring it up.

Gleh, you're right.

I updated the attachment in the first post with the instructions, it now has the right template name.

AlexanderT: that query is only to make your new templates be 'global' templates. It's not a necessary step, really, so don't worry. Just make sure to check your hack install to see if you have to adjust the template name (see Conundrum9's post above this one) in the code. :up:
Reply With Quote
  #13  
Old 06-08-2003, 06:12 AM
-Sidekick- -Sidekick- is offline
 
Join Date: May 2002
Location: Cudahy, Wi
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this hack update things like the style postbit hack, like Grog6's?
Reply With Quote
  #14  
Old 06-29-2003, 06:47 PM
Kamui Shirou's Avatar
Kamui Shirou Kamui Shirou is offline
 
Join Date: Sep 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no queries? if i put it one the forumhome, there will be no additional queries?
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 02:50 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.07350 seconds
  • Memory Usage 2,230KB
  • Queries Executed 20 (?)
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
  • (1)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
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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