Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 3,201 through 3,225 (of 5,755 total)
  • Author
    Search Results
  • #143906
    evagorasc
    Participant

    Aha. Problems.

    So, following the advice of @modemlooper I got this working just fine. Anything created under Buddypress custom user fields can display fine in the bbPress loops, using something like this:

    `
    $user_location = xprofile_get_field_data( ‘Location’, bbp_get_reply_author_id() ) ;
    if (strlen($user_location) > 0 ) :
    echo ‘

    Location: ‘ . $user_location . ‘

    ‘;
    endif;
    `

    However, how do I make sure I follow the custom fields’ restrictions regarding visibility? In BuddyPress we can create a custom field and set its visibility to be either:
    1) Anyone
    2) Logged In Users
    3) My Friends

    Furthermore, these fields’ visibility can be allowed to be changed by each user.

    So, before simply displaying a custom field for just everyone, I need to run the required checks to verify that it should be displayed for the anonymous/logged-in user. I tried getting a reference to the actual field, like this but the var_dump() doesn’t help me much:

    `$user_location_field = xprofile_get_field( ‘Location’, bbp_get_reply_author_id() ) ;`

    This is the var_dump($user_location_field):

    `object(BP_XProfile_Field)[29]
    public ‘id’ => null
    public ‘group_id’ => null
    public ‘parent_id’ => null
    public ‘type’ => null
    public ‘name’ => null
    public ‘description’ => null
    public ‘is_required’ => null
    public ‘can_delete’ => null
    public ‘field_order’ => null
    public ‘option_order’ => null
    public ‘order_by’ => null
    public ‘is_default_option’ => null
    public ‘default_visibility’ => null
    public ‘allow_custom_visibility’ => string ‘allowed’ (length=7)
    public ‘data’ => null
    public ‘message’ => null
    public ‘message_type’ => string ‘err’ (length=3)`

    Even though I see a couple of public methods like “default_visibility()” and “allow_custom_visibility()”, they don’t really help. Their value doesn’t even change even when I change the field properties in the CMS.

    yidamweb
    Participant

    Hi,

    Thanks for your inputs. Hugo’s suggestion of having all user fields merged into the Base group appears more convenient. Paul, thank you for pointing me to the Profile >> Edit tab.

    Paul Wong-Gibbs
    Keymaster

    What screen are you looking at? The registration, or the member profile screens?

    Hugo Ashmore
    Participant

    Why can they not be part of the ‘Base’ group ad thus part of the initial signup?

    If a case of not wanting to have too many signup fields – a bad thing – then best I can think of is you would need to create a function that checks on one of those extended profile fields or all of them against the loggedin_user_id and if any returned an empty value then run a redirect to the users profile edit screen with a message request to complete the mandatory required fields on that page.

    yidamweb
    Participant

    Hello,

    Request guidance on how to display profile fields that are not part of the “primary base”. and get users to input the information asked for.

    #143868
    evagorasc
    Participant

    @modemlooper thank you for your help.

    #143867
    modemlooper
    Moderator

    When you are not in a BuddyPress loop you can get BP content by using WP author id as it returns same id.

    #143862
    evagorasc
    Participant

    @modemlooper Thank you! That did it.
    get_the_author_id() as well as bbp_get_reply_author_id() seem to both work just fine.
    get_post_author_id() and $bp->displayed_user->id don’t seem to work for me though.

    #143861
    modemlooper
    Moderator

    `$user_id = $bp->displayed_user->id;

    $location = xprofile_get_field_data( ‘Location’, $user_id ) ;
    echo ‘Location: ‘ . $location;

    if that doesnt work try getting the_author_ID(); or get_post_author_id();`

    #143859
    evagorasc
    Participant

    Made some progress with this, but still need help. I figured that I could simply add something like this underneath the avatar:

    Code:
    $location = xprofile_get_field_data( ‘Location’, 10 ) ;
    echo ‘Location: ‘ . $location;

    However, notice the hard-coded “10” there which is an ID. This needs to be the ID of each user in the replies table and it changes with each table row inside the “loop-single-reply.php” file. I don’t mind changing the template file and keeping a record for it when upgrades come, but how do I know the ID of each user in the bbPress posting loop?

    evagorasc
    Participant

    I am mentioning @johnjamesjacoby who first started a thread about this some time ago, and @djpaul who asked that I start a new thread.

    So, I am running the latest version of BuddyPress and bbPress together (running bbPress as site-wide forums integrated with BuddyPress). I would like to add any custom xprofile BuddyPress fields that I created underneath the avatar of a user in the forums.

    The actual code that writes out the replies loop is inside the “loop-single-reply.php” file of the bbPress plugin. But how do I connect to BuddyPress and display any xprofile fields that I want though?

    #143852
    Paul Wong-Gibbs
    Keymaster

    Wow. This must a record for oldest resurrected thread.

    Please start a new topic

    #143848
    evagorasc
    Participant

    @johnjamesjacoby i am running the latest version of BuddyPress and bbPress together (running bbPress as site-wide forums integrated with BuddyPress). I would like to add any custom xprofile BuddyPress fields that I created underneath the avatar of a user in the forums.

    The actual code that writes out the replies loop is inside the “loop-single-reply.php” file of the bbPress plugin. But how do I connect to BuddyPress and display any xprofile fields that I want though?

    #143815
    raphadko
    Participant

    Actually I think it is impossible without modifying the core files. Any character limit or other custom validation is lost in the edit profile page, and since the $error is a local variable on xprofile_screen_edit_profile, there is no way to set it. Can you confirm that @djpaul?
    I don’t know if this is planned for future releases, but I could help build a better validation code for user registration and edit profile. Adding a character limit to fields would be nice.

    #143813
    raphadko
    Participant

    @djpaul thanks for the reply
    I found what is going on: xprofile_check_is_required_field bypasses if user is administrator, that’s why I was able to save required fields empty.
    Now I am trying to hook xprofile_check_is_required_field to a bp-custom function called check_and_validate that also checks the fields for a character limit (another very important missing security feature I pointed out on another post.) But somehow it is not working.. any ideas on how to do it?

    By the way Paul, how can I submit tickets on bug tracking? I’ve been messing around with buddypress a lot lately and found a couple.

    #32549
    raphadko
    Participant

    Hey guys, I know I can validate data on registration by hooking ‘bp_signup_validate’.
    How can I validate the fields on the edit page?

    All required xprofile fields are not required anymore in the profile edit page. Possibly a bug?

    #32539
    joshuaslate
    Participant

    Hello everyone.

    Recently I was asked to help a friend with his BuddyPress site, and he’s having me fix up some stuff. I’m experienced with WordPress, but a first time BuddyPress user. He noticed that on his site, http://investorswap.com/members/pecanzington/profile/ user profiles are showing with HTML code all over the place. I checked to make sure that there were no html tags anywhere in the profile fields, and there wasn’t. I’m kind of clueless as to how to fix this. Any ideas?

    Thanks in advance!

    Janet Morrow
    Participant

    I have the fields working now. There are still some things I’m looking to resolve, but I’m making good progress.

    #143584
    modemlooper
    Moderator

    Do you mean profile fields?

    Users > Profile fields

    modemlooper
    Moderator

    Avatar upload is only after the user has activated their account. There is a trac ticket to add this function back but it might not get added.

    If you are wanting people to add an avatar when they log in. You can have the user get redirected to the change avatar page. This would have to be coded by you or a developer.

    You can add any profile fields to the members-loop.php go into that file and scroll down to this text:

    /***
    * If you want to show specific profile fields here you can,
    * but it’ll add an extra query for each member in the loop
    * (only one regardless of the number of fields you show):
    *
    * bp_member_profile_data( ‘field=the field name’ );
    */

    Janet Morrow
    Participant

    1. I want to change the Avatar to Profile Picture across the site. I have already tried changing the language file. I am using StudioPress Genesis and Lifestyles for the theme, so I’m not sure if that is complicating things. Yes, I have already installed Genesis Connect.

    2. I want visitors to be able to add their Avatar while they are registering. I have already added the fields I want to the registration form, but cannot find a way to add the Avatar upload field.

    3. I want the information from the registration form added to the Member Directory. Right now all it has is the Avatar and their name.

    Finally, I would love to find a good ‘free’ user guide. Is there one out there?

    Thank you,
    Janet Morrow
    Mountain Ash

    HansRuedi
    Participant

    With BP installed we have these “Further Information” fields in the WP/BP user profile backend (“Address”, “Address Line 2”, “City” etc.) which are normally used by the BP registration process. For a new BP site I’m using the WP-Members plugin by Chad Butler for registration, what creates separate fields for registration.

    I would like to delete these BP “Further Information” fields and was searching for them with phpMyAdmin but couldn’t find them. Please could somebody give me a hint where they are in the db.

    #143525
    benzine
    Participant

    I’m in despair for such a solution right now. So, I think it’s better to have all custom fields mandatory while members can decide whether to hide or show them in public such that they can edit any fields later if they want to. Also, re-register from front end all manually created profiles from dashboard. This is the most plausible solution to me at this time.

    Thanks for your time.

Viewing 25 results - 3,201 through 3,225 (of 5,755 total)
Skip to toolbar