View Full Version : Integration with vBulletin - vBTemplates - Custom templates anywhere
davidw
03-09-2009, 10:00 PM
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.
rob01
03-10-2009, 12:13 AM
i dont get it :S.. for what is this? .. do you have some screenshots?
davidw
03-10-2009, 01:55 AM
No screenshots are really needed.
Say for example you want to add a box of images - and - you want to have specific text for a specific style in your footer.
You can add your box of images in $vbtpldw_01 and your specific text in $vbtpldw_02 and only include those two variables where you need them in your footer.
$ad_location[ad_footer_start]
$vbtpldw_01
$vbtpldw_02
<br />
$spacer_close
Say as an additional example, your second style has something you want similar, but rather than putting the text in there, add what you want to $vbtpldw_03 and just put the variable in the second style's footer.
$ad_location[ad_footer_start]
$vbtpldw_01
$vbtpldw_03
<br />
$spacer_close
Btw, this isn't far from what I have on my own site. I'm using $vbtpldw_02 on my site rather than 01 and 02 or 01 and 03.
I am not using 01 on my site currently as I have other footer information in there and have that "not in play" at the moment.
Hope that helps :)
MARCO1
03-10-2009, 08:28 AM
Good David :) Installed
Daniel_HBK
03-10-2009, 01:14 PM
is it like that :- https://vborg.vbsupport.ru/showthread.php?t=199869 ?
davidw
03-10-2009, 01:32 PM
No, totally different. This is for inserting custom templates into different locations of your site (forumhome template, navbar template, header, footer, etc.) That way those locations are much cleaner and you can put them in more than one place. You can put an image in one template and and put that variable scattered wherever you want.
Jasem
03-10-2009, 06:42 PM
Good work, thank you
installed
lpetrich
03-11-2009, 02:04 AM
I have a problem. I'm trying to move some navbars in some old themes to a custom template, but that custom template does not seem to "know" anything about vBulletin-API contents. It thus shows what a guest would see rather than what a member would see. Is there any simple way to fix that?
davidw
03-11-2009, 10:46 AM
Can you give me an example of where this is happening (is this going on a non-vb page) and what kind of code you are trying to use? PM me if you need to.
lpetrich
03-11-2009, 11:08 AM
It's code like this:
Everybody should be able to see this text.
<if condition="$show['member']">Only members should be able to see this text.</if>
I can make the first sentence get rendered but not the second sentence, even when viewing it as a member.
davidw
03-11-2009, 11:31 AM
Where is the target being displayed? That will make a difference. And, are you using 3.6.8 or 3.8.x?
lpetrich
03-11-2009, 07:47 PM
I've tried it in a header and in a footer, and it's in vB 3.8.1
davidw
03-11-2009, 08:49 PM
Let me see if I can recreate this and find out what's going on.
davidw
03-11-2009, 11:59 PM
Ok, I am not sure why <if condition="$show['member']"> doesn't work, however, other conditions (similar) do work; see attached screenshots.
Chadi
03-12-2009, 03:02 AM
Installed. Exactly what I was looking for only a few days ago! Thanks.
Just a quick question:
I'm using IBPro arcade module and with that mod, template edits is done old school style via a php file. I tried using $vbtpldw_01 in the code, but the output was blank instead of outputting the template's content.
Do you know of any method around this in the php file?
The file is skin_v3Arcade.php and the code is around line 75, in this section:
EOF;
}
function top_links_table($links,$width,$extra) {
global $ibforums;
return <<<EOF
$vbtpldw_01
<table width='100%' border='0' cellspacing='1' cellpadding='4' class="tborder">
<tr>
<td class="tcat" align="center" width="{$width}">{$links}</td>
{$extra}
</tr>
</table>
EOF;
}
lpetrich
03-12-2009, 03:52 AM
Ok, I am not sure why <if condition="$show['member']"> doesn't work, however, other conditions (similar) do work; see attached screenshots.
Thanx for your help on this. Your successful solution looks like it will work for a board where all members have the same navbar access privileges, as do all guests (different from members, of course!).
davidw
03-12-2009, 10:55 AM
Installed. Exactly what I was looking for only a few days ago! Thanks.
Just a quick question:
I'm using IBPro arcade module and with that mod, template edits is done old school style via a php file. I tried using $vbtpldw_01 in the code, but the output was blank instead of outputting the template's content.
Do you know of any method around this in the php file?
The file is skin_v3Arcade.php and the code is around line 75, in this section:
EOF;
}
function top_links_table($links,$width,$extra) {
global $ibforums;
return <<<EOF
$vbtpldw_01
<table width='100%' border='0' cellspacing='1' cellpadding='4' class="tborder">
<tr>
<td class="tcat" align="center" width="{$width}">{$links}</td>
{$extra}
</tr>
</table>
EOF;
}
The templates created using this modification need to work as if they are working in a regular template. In order to call a template on a non-template, such as a non-vb or non-standard page, you would most likely need to call everything that would make [that] template work as if it were on a vb page, like forumhome.php. I've not actually tested this on a those types of pages as they were meant for going into templates. However, with the right calls, it might work. I'm just not sure what they are offhand.
Thanx for your help on this. Your successful solution looks like it will work for a board where all members have the same navbar access privileges, as do all guests (different from members, of course!).
No problem
nnStaff
07-06-2009, 06:17 PM
So this just creates a new template and gives you the name to hook it into the page?
The same as if I manually created one and did the same? I'm not trying to put your product down, just seeking clarification, could be useful.
davidw
07-06-2009, 06:25 PM
Basically. This just simplifies a process.
Most of the time when you want a template, you have to add the template and add a plugin. This is just something that lets you do it automatically so you won't have to create it. I have a lot of sandbox ideas, so this was useful for me. I create alternate templates (modifying each one slightly) and use it for testing - rather than changing whole blocks of code, I just change the template name.
No offense taken. I hope I have cleared things up.
nnStaff
07-06-2009, 06:26 PM
Wow, quick response time, you must be subscribed. This will be a great time-saving shortcut for an upcoming project, thanks for the clarification!
Will dl and check out later.
davidw
07-06-2009, 06:46 PM
I can't guarantee all my response times will be quick (if I am online I will catch it - yes I am subscribed :) ).
Skyrider
09-19-2009, 09:47 PM
This is exactly what I was looking for, as I have to edit each template to add a custom navbar & header. How ever, I'm having an issue. While it is loading my banners, etc just fine.. The navbar seems to be missing. It won't show the username, quicklinks, etc.
Example:
http://forum.esforces.com/
See the:
User CP Competitions Forum Rules gTeamSpeak FAQ Members List New PostsNew Posts: 1 Search Quick Links Log Ou
With above that, the username information?
I've added the exact code that adds that within one of your plugin templates, with this as result:
http://forum.esforces.com/faq.php
It adds our custom background, banner, etc.. But it seems it doesn't add the navbar + user info in there. Any idea?
EDIT:
I also added the footer information within one of your plugins template (and also added custom stuff which can be seen as example on the main esforces forums at the bottom). I copy/pasted the exact footer info and added the code ($vbtpldw_02) within the FAQ template.. it won't show the full footer correctly.
ubcforums
09-20-2009, 01:19 PM
very useful..
will it cause any problems while upgrading vBulletin ?
Thanks
davidw
09-22-2009, 01:21 AM
@ubcforums Not that I'm aware.
lpetrich
02-15-2010, 05:19 PM
Has anyone tried vBTemplates in vB 4.0? Does vB 4.0 make it unnecessary? I'm asking because I wouldn't know where to look in the vB 4.0 documentation to find out.
davidw
02-15-2010, 06:19 PM
Currently this is assumed to be not compatible with 4.0, however, it has not been tested with 4.0.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.