BuddyDev

Search

Replies

  • Participant
    Level: Yogi
    Posts: 1112
    calu on in reply to: Code Snippet 'Add Xprofile fields to the member code' #18114

    Hi Brajesh, thanks for the code. I always find it difficult to locate Members Loop in the directory, could you please guide me, to which folder it is in?

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1112
    calu on in reply to: Suggestion for a new BP Registration plugin #18047

    I have done some research, and apparently it is not possible to combine WP Username and BP Profile name in one workflow, even though you would expect an auto fill of the BP profile name with the WP Username was an option.

    Another issue in the WP account registration is the lack of support of special characters in usernames like, æøå. Users expect to enter their real name here, so if your name is ‘Søren’ you can’t register! And why does WP not support capital letters, when all names starts with a capital letter…
    Fixing this with code involves a compromise safety I am told.

    The second best option is then to place the two name registrations next to each other, and make users repeat their Username (not knowing it is actual the BP Profile name they are filling out, or vise versa) The benefit is that users can accept choosing a profile name which is not with capital letters and containing æøå, rather than spelling their names wrong, e.g. ‘Søren’ has to be ‘soren’

    As it is, the Username is on top of the registration page and the Profilename sits in the bottom.

    How do I put BP name on top of the WP Account details?

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1112
    calu on in reply to: Suggestion for a new BP Registration plugin #18038

    The unlogic thing about the registration/login process, from a users point of view, is that you do not use your BP profile name for login, which you would expect, but your WP Username. On the other hand, it’s your BP Profile name which appears on your profile…

    These two names could in principle be the same, so there must be a way of feeding the information from the BP Profile name field to the WP account registration

  • Participant
    Level: Yogi
    Posts: 1112

    I just tested the code, and it is working without BP Force Profile Photo activated, great!

  • Participant
    Level: Yogi
    Posts: 1112

    Hi there, found the code, thanks!

    Is the code dependent of the BP Force Profile Photo to be activated?

  • Participant
    Level: Yogi
    Posts: 1112
    calu on in reply to: Code Snippet 'Add Xprofile fields to the member code' #18005

    Hi Brajesh, it is the code from BuddyDevs own Code Snippet directory by bphelp:

    Add Xprofile fields to the members directory
    PHP
    // Here is one way you could add xprofile fields name as well as the value to the members directory!
    // Just remember to replace “Field-Name” with the names of your fields in the 5 variables in my code.
    // Also remember the field name is case sensitive. If you notice the pattern of 5 in my code you can
    // easily see how to add more fields if you need them. You can also use the div class bph_xprofile_fields
    // to adjust the CSS in your stylesheet. Place this code in bp-custom.php:
    add_action(‘bp_directory_members_item’, ‘bphelp_dpioml’);
    function bphelp_dpioml(){
    $bphelp_my_profile_field_1=’Field-Name’;
    $bphelp_my_profile_field_2=’Field-Name’;
    $bphelp_my_profile_field_3=’Field-Name’;
    $bphelp_my_profile_field_4=’Field-Name’;
    $bphelp_my_profile_field_5=’Field-Name’;
    if( is_user_logged_in() && bp_is_members_component() ) { ?>
    <div class=”bph_xprofile_fields” style=” margin-left: 25%;”>
    <?php echo $bphelp_my_profile_field_1 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_1 ); ?><br />
    <?php echo $bphelp_my_profile_field_2 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_2 ); ?><br />
    <?php echo $bphelp_my_profile_field_3 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_3 ); ?><br />
    <?php echo $bphelp_my_profile_field_4 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_4 ); ?><br />
    <?php echo $bphelp_my_profile_field_5 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_5 ); ?><br />
    </div><?php
    }
    }

  • Participant
    Level: Yogi
    Posts: 1112

    Yes, it must be some conflict with something else, which affects the photo crop to look like this, https://imgur.com/a/mCpycby, even with all plugins deactivated, except BP and Friends Suggest.

    Thanks again.

    You wrote: ‘About filtering based on Gender, I will suggest using member types for the gender. If you do that, It can be very easily and efficiently achieved.’

    Can you describe this a little further, what you mean?

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1112

    Did you test it with Jetpack installed and Lazy Loading enabled?

    Bottom line is that Jetpack’s Lazy Loading makes the crop tool disappear, and with BuddyPress Friends Suggest widget, this
    https://imgur.com/a/mCpycby

    But thank’s for the effort, I can live without the Friends Suggests, but I am glad I located the crop issue I have had for a long time created by Jetpack, on my page at least.

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1112

    The problem with the crop tool is created by Jetpack> Enable Lazy Loading for images

    with this disabled and BuddyPress Friends Suggest inactive the crop tool is working normal:

    https://imgur.com/a/me70Tho

    With BuddyPress Friends Suggest active:

    https://imgur.com/a/X47w49k

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1112

    It’s Jetpack. When Jetpack is installed with default installation, and BuddyPress Friends Suggest widget is in place, the profile avatars are gone, and the change profile photo crop image tool is messed up.

    Regards
    Carsten