The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Is passing raw variables from PHP to be parsed by a template possible?
I have this in my PHP page. PHP Code:
Code:
{vb:raw content} It's just going straight to the web page. |
#2
|
||||
|
||||
![]()
Parse the conditions in your php and then just pass the result.
|
#3
|
||||
|
||||
![]()
Why would you want to do that? template conditionals is just a cheap method because php isn't available there. Everything you can build with template vars, you can do even better with php.
PHP Code:
|
#4
|
||||
|
||||
![]() Quote:
![]() Quote:
You could always make a template and just pass that in php with a goof ol' str_replace. |
#5
|
|||
|
|||
![]() Quote:
Thanks guys. ![]() |
#6
|
||||
|
||||
![]()
You first post would never work as vb 4 doesn't recognize the if conditions when you are trying to replace them. There are ways around it but you are not going to find it in the vb documentation, sorry to say.
|
#7
|
||||
|
||||
![]()
well, you could try to find the template functions which do the preprocessing, work with output buffers your way around and ... well that's not only a pain but I'd have to put you in jail if you did that, so I highly recommend to learn from your mistakes and re-program it to php.
Quote:
Also, yeah they're uncool. |
#8
|
||||
|
||||
![]() Quote:
![]() |
#9
|
|||
|
|||
![]()
So, there is no way to pass a raw variable to a coditional?
|
#10
|
||||
|
||||
![]() PHP Code:
like: PHP Code:
HTML Code:
<vb:if condition="$foo == 'bar'"> display this <vb:else /> otherwise this </vb:if> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|