The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Integration Project For vbAdvanced and Logican's WebTemplates
Integration Project For vbAdvanced and Logican's WebTemplates Pre-requisites! This is the system on which the article was written, I have no idea whether it will work on earlier versions of vBulletin.
Introduction What follows is a very simplistic solution to a problem that may face others. I use vbAdvanced CMPS for my main website page, and Logican's WebTemplate CMS for all other static pages. I prefer this because the LWT provides for me a much better platform for the creation of extra pages. My problem was this. I wanted to share a standard side navigation solution across both products. I am a C# Applications Developer by trade, and I am totally into GUI design. Having identical look and feel across disperate systems is vital for me, and code reuse is also highly important. Anyway, enough with the lecture on geekdom. Simply, I wanted a menu system in both areas to enhance the user experience so they can't see the joins. So, how to accomplish? I tried different things but could not get the content of a menu system to display in both systems. In the end I went ahead and created an external .js file to solve the issue. It did work, but it was a very rubbish solution. Time to read. I found a very good article by Kerry-Anne concerning the creation of a simple template, and how to use the plugin system to actually be able to consume the output elsewhere. [How To Include A Custom Template Via Plugins]. This was the turning point of my 3rd day trying to solve this problem. So, big thanks to Kerry-Anne who is now officially my hero. After a good deal of fumbling, testing, fiddling and hair pulling I discovered that to make this work in a good way, I had to create a template for my own raw HTML content, another template specifically for the vBa specification, which contains a little extra HTML and consumes the content of my first template. Both templates use 2 plugins each, and we are displaying content successfully from a single source accross 2 different products... bonzer! What we end up with is a solution that has no database changes, no additional files to upload and no code changes. Of course, changes to what is being displayed (in my case a menu) is edited in the template itself; one location, dead simple! Step By Step 1. Create Template for Logican's WebTemplate AdminCP >> Styles & Templates >> Style Manager >> Add New Template Quote:
AdminCP >> Plugins & Products >> Add New Plugin Quote:
Quote:
AdminCP >> Logician's WebTemplates >> WebTemplates >> Edit Theme It is already assumed that you have an appropriate theme. To display the output from the template created in steps 1 and 2 you would simply type in the variable name at the appropriate place. HTML Code:
$sitemenu_plugin We have to create a seperate template for 2 reasons. First, to consume the template in vBa, the title must be prefixed with "adv_portal_" and secondly, the actual template contains some required additional HTML to make it display correctly inside the module (once we create it). As you can see, the variable name we used here is the same one that was displayed directly in LWT, so now we have a template inside a template. AdminCP >> Styles & Templates >> Style Manager >> Add New Template Quote:
AdminCP >> Plugins & Products >> Add New Plugin Quote:
Quote:
AdminCP >> vBa CMPS >> Add Module Quote:
Summary Your final step would be to hone the HTML in your LWT Theme to mirror that of your vBa theme, and in my case the positioning of the output from both products has to be pixel perfect, which it is... but that is a whole different article! At the time of writing I do not have a publically accessible site* to allow a demo of this integration, but I have attached an image to show what the output looks like in both product pages. The area inside the red rectangle is the bit being producted by this technique. On the left is the vBa page and on the right is the LWT page. I am no vBulletin expert, and I'm pretty sure that there will be other ways to accomplish the same task, but for me this is a solution I'm very proud to have cracked. If this technique is of any use to others, then I'm happy that I have been able to give just a little back, with my thanks to the extended communities that make vBulletin A#1! Cheers! Respectfully Submitted, TigerWare |
#2
|
||||
|
||||
Great tips, thanks for sharing!
|
#3
|
||||
|
||||
Excellent read. I will definitely spend some time to study this in more detail.
Thanks |
#4
|
|||
|
|||
I'm trying to get this set up and I've followed the instructions but can't get the content from the template created in step 1 to display in vbAdvanced CMPS.
The content displays in the LWT page but not in vbA. My Forum is vBulletin v3.6.2, vBadvanced CMPS v3.1.0 & Logician's WebTemplates 3.6.03 |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|