Log in

View Full Version : What extra code do I need to add?


chris1979
12-03-2006, 08:23 AM
I have some custom fields set up for my site. For example, field6 is the member's real name.

If I type $post[field6] in the membersinfo template, their name appears.

With other templates I've tried this with, the name doesn't appear. It just leaves a blank space.

Is there some coding in membersinfo that I can copy into other templates? It's vital for my site that I can use the member's real name in different places.

What code do I need to add to the other files and/or templates?

Thanks,

Chris

peterska2
12-03-2006, 09:51 AM
$userinfo[fieldx]Used in memberinfo and some other places$bbuserinfo[fieldx]used if you want the logged in users info to show and not specific to where he is viewing$post[fieldx]used in postbit only

Hope this helps

chris1979
12-03-2006, 11:38 AM
I have tried all three versions in my who's online template, and none of them work for me at the moment. :(

$post[fieldX] and $userinfo[fieldX] both show nothing and $bbuserinfo[fieldX] shows the data for the member viewing the page.

Any ideas?

kobescoresagain
12-03-2006, 02:07 PM
I checked my postbit_legacy template where I have information from my custom field displayed at. I used $post[field5] for it. So that should work. I would recommend that you do a print_r on the $post array to see what is contained, it may be a possibility that you don't have that array avialable on that page currently.

chris1979
12-03-2006, 02:34 PM
I want this to work on the who's online page. It already works on postbit.

I would recommend that you do a print_r on the $post array to see what is contained, it may be a possibility that you don't have that array avialable on that page currently.

What does that mean? What's a print_r?

chris1979
12-10-2006, 08:35 AM
anyone know?