The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
if condition in bbcode_code template
Hi,
I am trying to add if condition in bbcode_code template, but it seem not working well ! For example: I want to show a message for groups (2,5,6,7) inside the code <pre> .. its not work proparly! .. it will show even for guest so the if is not working PHP Code:
PHP Code:
Am I doing something wrong !! Best Regards, |
#2
|
||||
|
||||
If you have post parsing turned on, then the bbcode all gets parsed into the post and is fed from the post parsed table. You can't apply a condition to it at that time.
|
#3
|
|||
|
|||
I'm not sure if I clearly understand you but what do you mean with post parsing, and where could I turned it off and what it should do.
|
#4
|
||||
|
||||
Try vboptions > server settings > cached posts lifespan. Set that to 0.
Quote:
|
#5
|
|||
|
|||
Edit: It works after a while !
But why should I remove the cache at all .. is there any other way just to remove this template from the cache?! I guess it should not be related with any cache .. bacause I am just trying to add an IF .. and it should works fine just like how it works in header or navbar template. Otherwise, those variables and functions ($show / is_member_of()) are not related/connected with all templates OR maybe this is a bug?! |
#6
|
||||
|
||||
The caching is only *post* caching. It's done to make your site faster by parsing all the bbcode at save time, rather than post time. That way it's done once and not every time the post is called. It isn't some bug, it is what that function does.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|