The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
PHP Function in MEMBERINFO
I need to call a PHP function in the MEMBERINFO template, with optional parameters.
myFunction("http://www.url.com"); I will setup a profile field to set the url of the function: myFunction("$userinfo[field11]"); however, I am unsure of how to actually call the PHP in the template. Can anyone assist with this? |
#2
|
||||
|
||||
I don't think you can call a PHP function "<?php" inside a template.
|
#3
|
||||
|
||||
Quote:
|
#4
|
||||
|
||||
Bump
|
#5
|
|||
|
|||
Yeah easy...
Go to the Plugin Manager, Add a New Plugin, Hook it to "memberinfo_complete" and in the Plugin put your PHP code and at the end of it, put the results into a variable (i.e $pluginresults ) Then goto your MEMBERINFO template in Edit Styles and put that variable where you want the results of the PHP code to go, just like this: $pluginresults (you don't have to put anything but the var name) |
#6
|
||||
|
||||
Quote:
I will setup a profile field to set the url of the function: myFunction("$userinfo[field11]"); The function output will be different per user. They pass a userinfo var to the function. I can't do this with a plugin, if I'm not mistaken. |
#7
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|