The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Running PHP in Templates
Hi All,
I was thinking of having a template where i will run a PHP code to grab the contents of a html (eg. SomeDir/sample.html which contains a html table) and display it out by placing the template name into the ShowThread template. Is is possible to run PHP functions like file() inside the custom templates? Or are there any ways? Thanks! |
#2
|
||||
|
||||
you can use phpinclude_start to get the filecontent into a variable and then use the variable within the showthread template
|
#3
|
|||
|
|||
Thanks Xenon.
But i was thinking if I can run PHP codes to get the contents of the HTML from within the SHOWTHREAD template; as I will want to display a specific HTML file for some of the threads. For eg, thread no. 3 (from $threadid, I will show 3.html) is this possible? Thanks. |
#4
|
||||
|
||||
parsing php is just possible in phpinclude template.
you can use the condition system to show the correct variable in showthread then also in phpinclude you should already have access to the threadid, so this will work |
#5
|
|||
|
|||
Thanks mate!
I've got it working. |
#6
|
||||
|
||||
glad to read
you're welcome |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|