PDA

View Full Version : Integration with vBulletin - vBTemplates - Custom templates anywhere


davidw
06-11-2007, 10:00 PM
I was playing around a couple days ago trying to add a custom template and wondering why it wouldn't work. I did a little searching and found that in order to make a template and then call it elsewhere there were a few steps you had to go through. No big deal.

But then I thought... for a lot of people who are in need of a quick custom template and don't have that much time - such as for testing purposes - or if you are new to vbulletin and are unsure how to do much of anything, this would be a lifesaver for a few out there. This takes the guesswork on what to do and where to go. :)

It was a really easy hack (took me very little time to write it) - and very easy to install.

Step 1: Install the product.

Admincp => Plugins & Products => Manage Products => Add/Import Product [ product-davidw_vbtemplates.xml ]

Step 2: Add your custom template

Admincp => Styles & Templates => Style Manager => Edit Templates => Open up vbtpldw Templates => Open up whichever template you want to use => Put in your template code

Step 3: Find wherever you want to place your new custom template (header, navbar, footer) and place $vbtpldw_## with the ## being the number of the template you just saved. You might have to add the template name to vbadvanced per vbadvanced's global options.

That's it!

I've provided up to 10 custom templates. Need more? Let me know.

ran_iu_Conan
06-12-2007, 11:19 AM
first post .... *installed*

TheBlackPoet
06-12-2007, 11:23 AM
you da man!!!! thank you for this!! now all i need to do is add my code and link to it.... SWWWEEETT!!!

Barakat
06-12-2007, 11:45 AM
yes nice but i use an externel file to make like those templates edit

installed


http://www.jerusalemgts.com/gti/quran.php

or

http://www.jerusalemgts.com/gti/quran.php?do=abd-nada

wizardan
06-12-2007, 12:44 PM
Handy:)
Installed.

Hornstar
06-13-2007, 12:56 PM
hey not a bad option for many, nice work.

AzzidReign
06-13-2007, 03:19 PM
Awesome! I'll be installing this later on a few of my boards :)

redskins_43
06-30-2007, 12:29 PM
do you have somewhere where this shows on a webpage for an example? the above links posted by barakat are not coming up.

what is the difference between this and the forms hack or the custom threads hack at https://vborg.vbsupport.ru/showthread.php?t=128587?

i need something like this very much. and need to decide on what to use for setting up custom fields. pardon the ignorance here.

j

davidw
06-30-2007, 02:02 PM
The custom thread fields look similar to profile fields. There is a world of difference between this hack and those hacks (forms included) - like comparing apples to oranges. If you need something for custom fields, this would probably not be the hack for you then. It doesn't work like that. However, essentially, you could probably create a form or forms and place them in a custom template if you chose to - then they would work together.

How this works:
Say for example you want to place some content on your site - an image, an iframe, a whole block of code. Normally, and especially if you have multiple styles (2-20 or more), just going in and editing each one's content to change something can become cumbersome. This hack allows you to put all your code in one spot (the template) and then let you call the template wherever. If you have 10 styles, your edit changes 10 styles at once (provided you have the custom template called in each of those styles). This is one example. This is how I am doing it (I have 5-6 styles.