The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Basically, I want the function to be able to use PHP in the template system.
Would anybody be able to do this? |
|
#2
|
||||
|
||||
|
<a href="http://www.vbulletin.com/docs/html/main/templates_phpinclude_start" target="_blank">http://www.vbulletin.com/docs/html/m...pinclude_start</a>
vb docs explains it all. |
|
#3
|
|||
|
|||
|
Ok, so if I had a load of code, that I wanted to be displayed on one page only, I'd have to include it on every page?
|
|
#4
|
||||
|
||||
|
Quote:
PHP Code:
|
|
#5
|
||||
|
||||
|
Quote:
|
|
#6
|
|||
|
|||
|
So is there, absolutely no way to do it at the moment. If there isn't, would anybody be kind enough to make a hack?
|
|
#7
|
||||
|
||||
|
As already said, you can't use PHP in templates (except a few functions in <if ...>-statements.
What you can do is put code in phpinclude_start|end, you can also do this conditional by using PHP Code:
|
|
#8
|
|||
|
|||
|
Well, Zachery just said
Quote:
|
|
#9
|
||||
|
||||
|
Hmm ... and what's the problem with putting the code in phpinclude_start?
|
|
#10
|
|||
|
|||
|
So in the PHP start template, I'd put what (if I had loads of code, where would it go in the code you gave me).
Code:
if (THIS_SCITPT == 'foobar') {
// Do smth for that specific page
}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|