vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Templates Reference Guide (https://vborg.vbsupport.ru/showthread.php?t=172770)

PyroNET 03-11-2008 10:00 PM

Templates Reference Guide
 
1 Attachment(s)
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. :D

Princeton 03-12-2008 12:17 PM

thanks for sharing ... many will find this useful :up:

Michael Biddle 03-12-2008 02:58 PM

Useful indeed. Thank you.

dwh 03-15-2008 10:48 PM

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...

PyroNET 03-15-2008 11:01 PM

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.

dwh 03-15-2008 11:27 PM

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.

PyroNET 03-16-2008 01:12 AM

1 Attachment(s)
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.

dwh 03-16-2008 01:23 AM

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!


All times are GMT. The time now is 10:48 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.01124 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete