![]() |
Quote:
Example: PHP Code:
However I might say that if you are trying to apply different styles for different forums you dont need a hack, you can do it by configuring your forum styles.. I believe you already know that? |
Thanks for that info. Yeah I know different styles can be done without hacks, but there may be different templates involved not just graphical styles alone, e.g. our gaming forums may have other templates for clan and multiplayer stuff etc...
-Abbas |
Does this work ok with 2.2.6? I installed it as per instruction but conditional tests simply get reflected back unchanged.
I tried the advanced_functions code as a stand alone and it seems fine. Perhaps I've made a silly mistake somewhere ;) |
Quote:
More likely your condition didnt apply so it wasnt parsed. What condition did you test and where? |
Wow! I can't wait to try this out!
/me clicks install button |
Sorted out my problem re conditionals not getting parsed.
gettemplate actually contains two return statements - the first executed only if you have enabled template debugging. I had this option enabled, so the call to advanced_templates was not being made. you need to make the following change to gettemplate PHP Code:
|
This looks great! I have two questions with how it might work:
1) Is the html between the conditionals parsed, that is if I use a variable name in the html there will it be replaced with its value or will it stay as-is? 2) Can I put a "virtual include" in there in the html conditional? I've done this before using php-include template, but I'm wondering if I can get around that. Many thanks, Matt |
Hi Matt,
Quote:
The hack only checks the template if there is special conditional tags inside and acts like this: a) if the template does not include any conditional, it takes no action and returns the entire template just like a normal vb. template. b) If the template has conditionals, the hack checks them one by one and ba) if condition is FALSE, it deletes this condition (and its HTML code in between) from the template, as if it never existed in the template bb) If condition is TRUE, it deletes only the condition tags and keeps the condition's HTML code in between so that it will be parsed. As you see it does not interfere with vb's default template processing in anyway.. Hope this helps.. |
hi
will this edit all my style templates if I just edit the template of one style? thanks |
Quote:
|
All times are GMT. The time now is 12:41 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:
|