![]() |
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? |
I don't think you can call a PHP function "<?php" inside a template.
|
Quote:
|
Bump
|
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) |
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. |
Quote:
|
All times are GMT. The time now is 09:13 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|