Support Forums

Full Version: MyBB Postbit - Add Custom Profile Fields.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Original Guide: http://ziesweb.com/showthread.php?tid=42


Hi there, in this tutorial I am going to be showing you how to add a custom profile field into a users post bit. (The bit with your rep, post count and joined date)

For this guide I will be using the "Software" profile field I added to the Zies Web post bit.

Step 1:
After creating your custom profile field we're going to need to get ID of the field itself, navigate to the custom profile configuration in your AdminCP.

To the right of the name should be the 'ID' column, in this case it's '4'
[Image: di-7Z81.png]

Make a note of that ID.


Step 2

Now we're going to edit the template to include this field into the post bit.

Navigate to:
AdminCP >> Templates & Style >> Templates >> YOUR THEME >> Post Bit Templates >> Postbit_author_user

This is the template we're going to insert the custom field into. For this example I'm going to place the profile field under the joined date and above the reputation count.

Look for the following sections of code in the template:
Code:
{$post['userregdate']}
{$post['replink']}

Between these two we're going to add the code to post the profile field, also for this example I'm going to add the text 'Software :'

Remember to replace 'fid4' with whatever your profile ID was!


This is the completed example.
Code:
{$post['userregdate']}
Software: {$post['fid4']}
{$post['replink']}


This concludes the tutorial, if you're stuck then please post below and I'll be glad to help you out Big Grin Thanks for reading.
You should include how to add images into this.
You mean use images in custom profile fields, which subsequently makes them appear in the post bit as well? I know how to do it but it's an easy adaptation from the tutorial above.
Nice tutorial, but I agree, you might want to be more detailed when explaining features, with more detailed I mean in-depth.
I know it was quick, it's not too hard if you have a bit of previous experience. The template edit is the hardest bit. Might do a video tutorial.
That's another problem, with a video tutorial they are lest detailed then text tutorials unless you're really good at explaining things with voice, I'll throw you an suggestion and just stick to thread tutorials with a lot of detail. Smile
Nice tut, I suggest giving a list of the "commands" like you used {$post['fid4']} to make it display the profile field option. Show everyone how to make it only for specific groups, etc. That'd be neat.
Lol. This tutorial is helpful. Keep it up.
Thanks Smile
Helpful ^^