![]() |
Maybe this belongs in customisation, but I REALLY need an explanation
I am trying to modify my VB4 CMS / Forums main chrome
I have heavily modified the code. I found out I cannot take the user "toplinks" section outside of the "header" template, because for some reason the vboption.facebookconnect enabled boolean is only accessible there. If I take outside the template, the facebook button disappears. I can't take the navbar outside of navbar template, because it won't show the CMS home tab.... again, its stuck inside there. It seems the internal processes that actually generate the final templates for VB are so obfuscated and hidden that I cannot work out the processes. Anyway, I got this far. I have set up everything that is not VB4 variable dependent inside my navbar template. I removed the {vb:raw header} line from GENERIC_SHELL and placed it in the right place , where I want it to appear inside the navbar, see code snippet below. Careful it's long NAVBAR Code:
<div class="above_body"> <!-- closing tag is in template this --> Code:
<div class="forum_disabled"><b>Alert:</b> The forums are currently turned off!</div> <!-- DLUK CUSTOM CONTAINER USER BEGIN --> It's really driving me bonkers. See my site here for the example of the code in action. |
You can move the facebook, or other variables, elsewhere. All you have to do is preregister the variable for use in the new template. Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide
I very much doubt you want to be modifying GENERIC_SHELL, because, well, it's generic and just not used on most any page you will be looking at. To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.) |
Ok thanks for pointing me in the right direction.
I can see how now (brown cow) I might be able to move the facebook variable and therefore move all the header stuff to the navbar, which might solve my problem. If it does, then Lynne, you're a freaking genius. However, on the flip side, if I wanted to move the navbar to the header. How does that all work? I mean, building the navbar, the "HOME" tab is built inside vbCMS_navbar_link, but then somehow dropped into the navbar template, as far as I can tell. But in the navbar template, it doesn't call that vbcms_navbar_link template anywhere. How does it get added to it!?! The only place it seems to work is if the navbar is in the navbar template. What if I wanted to moved the navbar to say, the footer, for experiments sake? If you move it out of the navbar template (the navbar generating code, it "loses" the home tab?!). I'm not asking you to write my code Lynne, just give me a technical explanation and I can investigate further. Your help is greatly appreciated. --------------- Added [DATE]1280935279[/DATE] at [TIME]1280935279[/TIME] --------------- Also, a second point. How would I register that facebook variable elsewhere? It wouldn't be a custom variable, its a big old vbulletin variable. and I think the other template that gets called is dependent on it too. Code:
$vboptions['enablefacebookconnect'] I have read the guide, but it talks about rendering templates? Surely I don't need to render a template? just register that vbulletin variable elsewhere? but to register it, I need to access it's values, can I access them from my own code?! If you catch my drift... |
All times are GMT. The time now is 12:28 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|