MyBB Community Forums

Full Version: Calling custom profile fields outside of postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i'm looking to display specific custom profile fields on a custom php page, i think that {$post['fid1']} gets me the field but how do i send in the userid i need it to look up? It seems to be that it only works in postbit, is there another hook i can use? or toss me the table names and i'll write out the sql query myself Smile

<div> First Name's Favorite color: {$post['fid1']}</div>
<div> Second Name's Favorite color: {$post['fid1']}</div>
is basically what i'd be going for i'd have the userID's able to be hard coded. 

Thanks!
try this:
{$userfields['fidX']}

where X is the number of your desired profile field
Good starting point for me, but I'd need a way to input the userid since each Div would be referencing a different Iser's 'Favorite color' (ie profile field)



<div>{getuserprofilefield[userid,fieldid]}div>
(Clearly not the correct function name, that's what I'm looking for Smile )
Is sort of what I'm looking for thanks!

There has to be a quick hook for when you view someone else's profile, would be the same code...

Right, so maybe my question should be: how to show profile fields in the memberlist?