Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Templates Reference Guide
PyroNET
Join Date: Aug 2004
Posts: 72

 

Show Printable Version Email this Page Subscription
PyroNET PyroNET is offline 03-11-2008, 10:00 PM

Many people seem interested in learning to modify the vBulletin templates, but find it difficult at first because they don't know what template controls what. Here are a few helpful tips to make learning easier.

Add Template Name in HTML Comments

vBulletin has an option to add comments in the source output at the start and end of template usage. To enable this feature navigate to

AdminCP -> vBulletin Options -> General Settings

Find Add Template Name in HTML Comments and set it to yes.

Now that this is enabled you can go View Source on any page and you will see comments in the source specifying where a template was used.

vBulletin Template Reference Sheets

vBulletin has a great online manual that for some reason lacks reference sheets as to what templates are used where; so I decided I'd make some Attached to this post are 3 images that show template usage on the FORUMHOME, FORUMDISPLAY, and SHOWTHREAD pages. I hope you find them helpful.

vBulletin Online Manual

The vBulletin Online Manual is an excellent source for information regarding the vBulletin style system. In addition to information concerning using the style system itself, it also contains a CSS class reference sheet that shows what areas of vBulletin are controlled by what CSS selectors. Below are some links you may find useful.

vBulletin Styles Intro

Information about the legacy postbit

Creating vBulletin popup menus

Collapsible elements

vBulletin Template / CSS Color Reference

Thanks For Reading

I hope you found this tutorial useful and informative. Be sure to visit vbStartup.com for more vBulletin styles, tutorials, and stuff.
Attached Images
File Type: jpg forumhome.jpg (116.7 KB, 0 views)
File Type: jpg forumdisplay.jpg (105.8 KB, 0 views)
File Type: jpg showthread.jpg (123.4 KB, 0 views)
Reply With Quote
  #2  
Old 03-12-2008, 12:17 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for sharing ... many will find this useful :up:
Reply With Quote
  #3  
Old 03-12-2008, 02:58 PM
Michael Biddle Michael Biddle is offline
 
Join Date: Apr 2004
Location: Anaheim, CA
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Useful indeed. Thank you.
Reply With Quote
  #4  
Old 03-15-2008, 10:48 PM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very interesting.

One question though...if you have a custom template, how do you add that to a plugin? I remember reading somewhere, I thought the manual but I can't find it again, that you're supposed to create the template with debug turned on and under the GLOBAL style. Is that correct?

Basically, I want it so that uninstalling the plugin will cause the new template to disappear from the template list...
Reply With Quote
  #5  
Old 03-15-2008, 11:01 PM
PyroNET PyroNET is offline
 
Join Date: Aug 2004
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Templates can be attached to products, not plugins.

You need to make a new product and attach both the plugin and template to it. To do this you'd make a new product, then when you go to add the template, you do it with debug on and make it on the MASTER STYLE. Make sure when doing it that you select the new product from the 'Product' dropdown on the new template page.
Reply With Quote
  #6  
Old 03-15-2008, 11:27 PM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, that was it. For some reason I keep forgetting it. Maybe because it isn't exactly intuitive what all those settings are for or really do...

--------------- Added [DATE]1205627673[/DATE] at [TIME]1205627673[/TIME] ---------------

Now I remember why I asked the question in the first place. There are some custom templates I created in vb 3.0.x

There is no edit button even when debug is on, to change product from "vbulletin" to custom, nor the Style to Master Style. I have tons and tons of these templates...

Is there any way to edit this? Or do I have to create a new template for each...

If there is no way to edit from the AdminCP, I'm willing to write a query and change those templates in the db if you know what values will need changing.
Thanks.
Reply With Quote
  #7  
Old 03-16-2008, 01:12 AM
PyroNET PyroNET is offline
 
Join Date: Aug 2004
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I doubt there's an easy way from the AdminCP... If you can write you're own query what you need to do is change the styleid field for each template to -1, the product field to the id of the product you want to attach them to, and the version field to the version number you entered when you made the product..

I don't know if this screenshot will help you visualize or not, heh.
Attached Images
File Type: jpg template.jpg (9.6 KB, 0 views)
Reply With Quote
  #8  
Old 03-16-2008, 01:23 AM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! exactly what I needed. Boy will this ever make upgrades more palatable. I'm several versions back due to the nightmare of bringing up to speed a fully hacked board. Now I can give each hack a product / plugin and bring them each in one at a time peacefully. Hallelujah!
Reply With Quote
Reply


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 11:35 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04016 seconds
  • Memory Usage 2,287KB
  • Queries Executed 22 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (4)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete