MyBB Community Forums

Full Version: Display additional user info in post.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Searched but could not find. Wanting a plugin that will display the users location underneath their avatar.
You wouldn't need a plugin for this, it can be done through the templates.

Open the postbit_auth_user template, inside the Postbit template set.

Add to the end of the template:
<br />Location: {$post['fid1']}

This should work, assuming you haven't changed the custom user fields inside the ACP. If you have, just replace the '1' in the snippet above to whichever ID is connected to your location field (which can be found in ACP > Configuration > Custom Profile Fields).



Also not sure if you meant the location they provided as info or their current location on the board.
Thanks. This should be helpful Big Grin
(2012-12-03, 09:45 AM)Beardy Wrote: [ -> ]You wouldn't need a plugin for this, it can be done through the templates.

Open the postbit_auth_user template, inside the Postbit template set.

Add to the end of the template:
<br />Location: {$post['fid1']}

This should work, assuming you haven't changed the custom user fields inside the ACP. If you have, just replace the '1' in the snippet above to whichever ID is connected to your location field (which can be found in ACP > Configuration > Custom Profile Fields).



Also not sure if you meant the location they provided as info or their current location on the board.

I did mean the location they provided as info. Thanks for the help.

Edit: Did not work. Here is how it looks.
{$lang->postbit_posts} {$post['postnum']}<br />
%%TYL_NUMTHANKEDLIKED%%<br /><!-- CountThreads -->{$lang->postbit_threads} {$post['threadnum']}<br /><!-- /CountThreads -->
{$lang->postbit_joined} {$post['userregdate']}
{$post['replink']}{$post['warninglevel']}
<br />Location: {$post['fid1']}
Not sure why it hasn't worked. Have you checked the ACP to make sure that 'location' is ID 1? (ACP > Configuration > Custom Profile Fields)
I did. Location ID is 1.

Okay, got it to work. I would like it to appear like the other boxes but this will work for now. Thanks.

[attachment=27935]