Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add profile fields under avatar in bbpress forum posts


  • NewUser123
    Participant

    @newuser123

    I have setup up a forum (on localhost) using bbpress where users that register through buddypress can actively participate. I want to customize the information and add fields that would be displayed under the avatar when users post on forum topics.
    How do I go about doing this?
    Is there some kind of plug-in that would help?
    Haven’t found much on my own any help would be highly appreciated!

Viewing 25 replies - 1 through 25 (of 37 total)

  • Robin W
    Moderator

    @robin-w


    NewUser123
    Participant

    @newuser123

    Robin, thanks for the plug-in! I am somewhat able to get it functioning. I was able to add profile fields that appeared in forum posts; however I could not edit the fields as a user through profile edit. Is it due to possibly some other plugin interfering ? Am I suppose to change some setting within your plugin?

    Thanks


    Robin W
    Moderator

    @robin-w

    Yes maybe plugin or theme

    Plugins

    Deactivate all but bbpress and profile information and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.

    come back and let us know the results


    NewUser123
    Participant

    @newuser123

    Hi, tried using a different theme and still no good. In addition I tried deactivating plugins to no avail. My buddypress already has several customized profile fields under “Base” Primary fields. I tried to take most of these out but the edit button still redirects me as well as users to editing these older fields rather than the forum profile information to be displayed.

    Can you recommend additional steps?
    Thanks for helping out!


    Robin W
    Moderator

    @robin-w

    sorry, forgot that buddypress uses it’s own profile, so my plugin won’t work.

    Which fields under your customised buddypress fields would you like shown? Let me have the names and I’ll see if I can work out how to get them in – no promises, but I’ll take a look


    Robin W
    Moderator

    @robin-w

    just been doing a quick mod to my plugin to create a buddypress version that uses the customised buddypress fields – needs tidying, but functional. I’ll try and work some more on it tomorrow to finish off.


    NewUser123
    Participant

    @newuser123

    Having the buddypress fields still be accessible would be very useful! But at the very least I would be satisfied with simply being able to edit and use your forum fields while having the buddypress plugin running.
    You are awesome for doing the modifications to your plug-in, ill update it and try it again once you are done!


    Robin W
    Moderator

    @robin-w

    Ok, I’ve recut this.

    you can find a buddypress version at :

    http://www.rewweb.co.uk/bbp-buddypress-profile-information/

    Basically you use the custom fields from buddypress.

    In Dashboard>settings>bbp buddypress profile information you set which up to 4 buddypress fields you wish to display. I don’t yet validate these, so make sure the names are exactly as set up in buddypress, or they won’t appear !

    Please come back with any feedback, and I’ll cut this to the wordpress plugins page in the next few days


    NewUser123
    Participant

    @newuser123

    Hi, I was able to successfully integrate the new plugin. The profile fields do appear underneath the avatar, the problem is that the words used to fill the field do not appear after the label. For example if one of my fields were City, and I edited it under profile edit to be Houston, Houston would not display under the forum avatar.
    Any advice for trouble shooting this? In addition I tried with using checkboxes, text, and dropdown boxes to fill the profile field all of which do not display :( any thoughts? Thanks Robin!


    Robin W
    Moderator

    @robin-w

    ok, any chance I can have a url link to your site, so that I can see if it is trying to display, or not even starting !


    NewUser123
    Participant

    @newuser123

    the site is on my local host! I believe it is trying to display simply from the fact that it is generating under the avatar in forums just not adding the items that users fill out for the fields.


    Robin W
    Moderator

    @robin-w

    ahh, that makes it a bit more difficult.

    ok, the field names have to exactly match, I presume you have tried several?


    NewUser123
    Participant

    @newuser123

    yes I copy and pasted from the buddypress profile fields straight to the bbp profile information field options. :(


    NewUser123
    Participant

    @newuser123

    To give an update: Even If I enter the profile field label incorrectly it will still display the incorrect field under the avatar. Does this mean it is not correctly linked to my buddy press?


    Robin W
    Moderator

    @robin-w

    no, the label will always show – I’ll need to do some coding to check that the field exists.

    I’ll come back


    Robin W
    Moderator

    @robin-w

    ok, I’ve cut a version that will help debug

    can you

    deactivate and then delete my buddypress profile information plugin
    download a new version from

    http://www.rewweb.co.uk/bbp-buddypress-profile-information/

    and activate

    Then set just the first field to show, say your city one

    Then go into forums, you’ll (hopefully) see a whole load of information.

    Basically I need to know exactly what it says

    to save you typing copy/paste the following and add answers

    table prefix :
    xfields :
    xdata :
    xpid :
    xdata2 :

    This will help me see where it might be going wrong.

    I wouldn’t rule out a localhost issue, ie it’ll work fine on the net, but not locally, some forum parts don’t like being local. It works fine on my test site :-)


    NewUser123
    Participant

    @newuser123

    Hi,
    this is what it underneath my avatar:

    city :
    table prefix : wp_
    xfields : wp_bp_xprofile_fields
    xdata : wp_bp_xprofile_data
    xpid : 20
    xdata2 :


    Robin W
    Moderator

    @robin-w

    ok, that’s most of the way there

    what the code does next is to look in wp_bp_xprofile_data for the value where data type 20 (‘city’) and the user_ID exist.

    select VALUE from $xdata where ID  = '$xpid' AND user_id = '$user_id' 
    

    so either the $user_ID is not correct or there is no data in there

    I can cut another test version to look further, but in case I can shortcut it, arr you any good at being able to look at the mtsql database?

    If so I’ll come back with further instructions, if not, I’ll cut a further test.


    NewUser123
    Participant

    @newuser123

    Im new to this but if you direct me I can give it a shot, otherwise it might be faster with the recut.


    Robin W
    Moderator

    @robin-w

    ok, sorry I’ve been busy earning a living !

    Right I’ve been back through the code and I am fairly sure I’ve found the error.

    Can you download one more time

    http://www.rewweb.co.uk/bbp-buddypress-profile-information/

    and come back and let me know if it works !


    Halo Diehard
    Participant

    @halo-diehard

    Hello guys! Happy to find this thread, and more than happy to help :)

    I have a running site and have just tested this. The Label is showing, but the user-entered information for the label is not.

    As you can see in the following link, the label is “Gamertag” and if you scroll to AddiCt3d 2CHa0s you will see no gamertag (item) listed, even though it is filled in the profile field.

    In settings I was very careful to check and see if there were any spaces, and even that the first letter was capitalized, etc. in both the Name in the plugin and the Name in the BuddyPress profile field and it still won’t work. In settings I’ve elected that both the Label and Item are to be displayed.

    Here is an url so you can check it out: http://www.halodiehards.net/forums/topic/hd-shorts/

    I am using the most current versions of WordPress, bbPress and BuddyPress.

    Let me know if I can be of any more assistance!


    Robin W
    Moderator

    @robin-w

    @halo-diehard – thanks for joining in – can you try that for more than the first setting, ie repeat the label in dashboard>settings>bbp-buddypress-profile-information and put in the same name label for label 2

    Thanks


    Halo Diehard
    Participant

    @halo-diehard

    Ok, I created the second Label with the same name and it does the same thing.

    Then, just as a test, I created another Profile Field with a different name, “Gamertag2″, labeling it in the plugin. To further test, I created a separate Profile Group and made another Profile Field in there, “@mention”. I went into the plugin and labeled that as the fourth one. All the labels show up under the profiles, but none of the info, even though everything is checked to show in the plugin.

    It would be SO awesome to have this work. I searched for quite awhile today to find something, and found a thread by Jacob Jacoby from like five years ago talking about integrating BuddyPress and bbPress profile fields! So it’s well overdue to have something for non-coders, and that would be sweet for it to work.

    I’ll keep testing whatever you ask, so just let me know how I can help.

    Edit: I kept it all set up, so you can see it at the same link above.


    Halo Diehard
    Participant

    @halo-diehard

    To add to the above post, I just tested with default theme and all plugins of except bbPress, BuddyPress and bbp buddypress profile information and the issue persists. Just wanted to rule out any conflicts, since I hadn’t done the first rule of testing plugins.


    Robin W
    Moderator

    @robin-w

    Hey great – thanks for doing all that testing – it really helps.

    I have another thought, let me work on it and I’ll come back !

Viewing 25 replies - 1 through 25 (of 37 total)

You must be logged in to reply to this topic.