The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PhP functions with params in Templates
I'm trying to do a pretty simple set of functions. I have a seperate custom_functions.php page I've included in my template page and now I need to call a function from that in the template and use it to print out some XHTML markup with another template called as a param in the function. The function looks like:
Code:
function graphicSection ($content) { echo('<div>'); echo($content); echo('</div>'); } Code:
graphicSection($othertemplatevariable) |
#2
|
|||
|
|||
You can not make a PHP call in templates (with the exeption of a few predefined ones).
|
#3
|
|||
|
|||
If you were more clear about your project, you might get a better answer but from what you have provided, you need to be thinking plugin to use php code in templates.
PHP Code:
But the question you are asking goes a little deeper than just calling a template. PHP code needs to be added to a plugin in order to use it and some of the PHP calls can not be used, like echo. For example, you can not use : PHP Code:
PHP Code:
HTH |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|