PDA

View Full Version : php code to pull custom profile fields?


christian8a
12-26-2008, 11:51 PM
I have a custom made php file, but I need to display some custom profile fields on the product, what coding will it take?

I know on the template what to use, but on the php code no idea? :confused:

Lynne
12-27-2008, 02:57 AM
If you have the global.php file called, then I believe you should be able to get it with $bbuserinfo[fieldx] (assuming you want it for the person viewing the page).

Dismounted
12-27-2008, 03:17 AM
$vbulletin->userinfo['fieldx']
$bbuserinfo is used strictly in templates only. It actually won't work outside of templates anyway.

Lynne
12-27-2008, 03:25 AM
You are right, Hanson. I think it's time for some sleep when I can't read what is being asked!

christian8a
12-27-2008, 04:27 AM
$vbulletin->userinfo['fieldx']
$bbuserinfo is used strictly in templates only. It actually won't work outside of templates anyway.

Cool, thanx guys, but where does that code goes and how to add that on the template? Im getting close :)

Lynne
12-27-2008, 03:48 PM
Cool, thanx guys, but where does that code goes and how to add that on the template? Im getting close :)
Why don't you post the code you've written so far and tell us what you want as the result and then we can help you with more specifics.

pein87
12-30-2008, 03:49 PM
I had that same problem and I used <if condition="{your condition code}">{code to execute if its that condition}</if><else />