Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)

  • BuddyPresser
    Participant

    @buddypresser

    Wait.. sorry guys I might have fixed it :P

    Looks like an action I added to the signup process was missing a return; !

    Just waiting for a few people to test it to confirm and will reply back here if there’s still a problem.

    Peace!


    BuddyPresser
    Participant

    @buddypresser

    Just upgraded to 1.1.3 and still not working :( sorry for repeat post but if anyone has any advice please let me know!


    BuddyPresser
    Participant

    @buddypresser

    Just to confirm I’ve tested it with the BuddyPress default theme now and it’s still saving the wrong hash in the database for some reason :S

    The signup-password POST data is definitely being delivered to the signups backend PHP… so I can’t work out why it wouldn’t be saving it correctly…


    BuddyPresser
    Participant

    @buddypresser

    Thanks! :D


    BuddyPresser
    Participant

    @buddypresser

    Hold up, I think I’ve worked it out…

    I was using (shorthand): ‘if ( bp_has_site_videos) while (bp_has_site_videos)’

    When I wanted to be using: ‘while (bp_site_videos)’

    .. without the ‘_has’.

    I hope i got that right.


    BuddyPresser
    Participant

    @buddypresser

    I read one of the moderators here recently say that, at present, this would require re-writing part of the search functionality (if not the whole thing)

    Not sure though, as I haven’t looked into it myself.


    BuddyPresser
    Participant

    @buddypresser

    Ok finally fixed it with some core code hacking :P

    Here’s my patch solution for anyone wanting to replace default avatars and disable gravatars:

    in bp-core-avatars.php, function bp_core_fetch_avatar():

    I replaced this:

    $gravatar = apply_filters( 'bp_gravatar_url', 'https://secure.gravatar.com/avatar/' ) . md5( $grav_email ) . '?d=' . $default_grav . '&s=' . $grav_size;

    with this line:

    $gravatar = get_bloginfo('template_directory') . '/images/new-default.jpg';

    then in bp-core-templatetags.php, function bp_get_signup_avatar():

    replaced this line:

    return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';

    with these:

    $default_grav = get_bloginfo('template_directory') . '/images/new-default.jpg';
    return apply_filters( 'bp_get_signup_avatar', '<img src="' . $default_grav . '"' ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';

    Also added a filter to functions.php as it was sometimes returning an image tag with an empty src (broken avatars) – it checks for the empty tag and replaces it with the default:

    Note: BP_AVATAR_DEFAULT was defined in my bp-custom.php file.

    function no_empty_avatar($avatar_link) {
    if ( strpos( $avatar_link, "src=''" ) ) {
    $avatar_link = str_replace("src=''", "src='" . BP_AVATAR_DEFAULT . "'", $avatar_link );
    }
    return $avatar_link;
    }
    add_filter( 'bp_core_fetch_avatar', 'no_empty_avatar' );

    Hope this helps someone in future..

    If anyone has a better solution without hacking the core files, please let me know!


    BuddyPresser
    Participant

    @buddypresser

    Wow, I’ve tried everything now (obviously except the one thing that works…)!

    Anybody got any clues? Thanks!


    BuddyPresser
    Participant

    @buddypresser

    Throwing this into bp-custom.php…

    function remove_xprofile_links() {

    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 2, 2 );

    }

    add_action( 'plugins_loaded', 'remove_xprofile_links' );

    …worked for me.

    If you don’t have a bp-custom.php file, create one and put that code in it, then save it into the wp-content/plugins/ directory.


    BuddyPresser
    Participant

    @buddypresser

    For the record, I’ve got this in bp-custom.php:

    /* Set default image for BP users without avatar: */<br />
    define ( 'BP_AVATAR_DEFAULT', get_bloginfo('template_url') . '/_inc/images/default-full.png' );<br />
    define ( 'BP_AVATAR_DEAFULT_THUMB', get_bloginfo('template_url') . '/_inc/images/default-thumb.png' );<br />


    BuddyPresser
    Participant

    @buddypresser

    OK That did the job!

    I had to do a bit more tweaking in the AJAX to make sure it was posting the ‘type’. From there I was able to put that into the hidden input and it was all fine and dandy.

    Thanks :D

    Out of interest, what did you mean by:

    …but keep in mind that it’s bad practice to refer to any variable directly in the template;

    ?

    Cheers.


    BuddyPresser
    Participant

    @buddypresser

    Thanks JJJ, I’ll try it and get back!

Viewing 12 replies - 1 through 12 (of 12 total)
Skip to toolbar