WordPress.org

Forums

BuddyPress Avatar Bubble
[resolved] Slight issue with showing avatars (9 posts)

  1. AutomatedKid007
    Member
    Posted 2 years ago #

    I'm testing the plugin in a buddypress 1.6.2 / WP 3.5 / multisite environment and after installing the plugin my original admin avatar shows fine on both the front and back end of the primary site (buddypress theme), but for the two other sites using either the Twenty Twelve or Responsive themes the plugin somehow removed the avatar and all it's showing are the words "Avatar of 'myusername'" wherever the avatar belongs, such as on the admin toolbar, articles, etc, etc.

    I tried re installing the avatar, disabling the plugin, reenabling the plugin, clearing cache, restarting browser, and I'm still stuck with a missing avatar and the wording "Avatar of 'myusername'" throughout the 2 network sites.

    I really like the plugin, want to use it, but I'm just stuck with this issue.

    Any suggestions on how to resolve this? Also, if we can get this resolved one way or another, is there a way to disable the bubble from showing on the admin toolbar and/or the admin altogether?

    Thanks

    http://wordpress.org/extend/plugins/cd-bp-avatar-bubble/

  2. AutomatedKid007
    Member
    Posted 2 years ago #

    The missing avatars ended up being an issue where wp sub sites were looking for avatars in the wrong place, which had nothing to do with this plugin. If anyone has a multisite setup and can't see avatars on subsites, just let me know.

    I'll create a new topic to request the ability to disable the plugin for the admin toolbar.

  3. jamiel.barnes
    Member
    Posted 2 years ago #

    Hi AutomatedKid007 I am having the same issue. Used it with WPMU 3.4.2 and the Avatars show, now I have a avatar upload issue, that can only be fixed by WPMU 3.5. How did you change the sub sites to look in the right place?

  4. AutomatedKid007
    Member
    Posted 2 years ago #

    jamiel,
    here's the code i'm currently using..

    // Custom filters to clean up issues in WP 3.0 with avatar paths.
    // Written by @theandystratton
    function sizeable_bp_core_avatar_folder_dir( $path ) {
        $items = explode('/', $path);
        $path = ABSPATH . 'wp-content/uploads/avatars/' . end($items);
        return $path;
    }
    add_filter('bp_core_avatar_folder_dir', 'sizeable_bp_core_avatar_folder_dir');
    function sizeable_bp_core_avatar_folder_url( $url ) {
        $items = explode('/', $url);
        $url = 'http://' . $items[2] . '/wp-content/uploads/avatars/' . end($items);
        return $url;
    }
    add_filter('bp_core_avatar_folder_url', 'sizeable_bp_core_avatar_folder_url');

    [Please post code or markup snippets between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    as noted, credit goes to theandystratton who took the time to write it. it just works for me. hopefully it will work for you as well.

  5. Andy Stratton
    Member
    Posted 2 years ago #

    Thanks for the nod – I hope this code helps. I wrote this a while ago when troubleshooting some of these issues for a client. Hopefully it's still functional/usable. I have minimal multisite / BuddyPress experience - so you may want to use at your own risk or consult a full-time WPMS/BuddyPress experience.

  6. AutomatedKid007
    Member
    Posted 2 years ago #

    no problem, andy. i personally have to thank you since i was hitting my head against the wall trying to figure out a solution, and it was your script that was the perfect solution. so thanks!

    by chance, do you know someone reasonable to hire to write a simple script to add a menu with child menus for the multisite admin toolbar? nothing complicated, pretty straight forward stuff, something similar to the wpmu custom admin bar, but with child menus as opposed to a simple drop down.

    any feedback would be appreciated. plus, now that i know that you exist, i will definitely inquire with a possible wordpress project in the future.

    thanks

  7. jamiel.barnes
    Member
    Posted 2 years ago #

    Thanks automatedkid, quick question do I paste the code in my functions.php file or is there a specific buddypress php file I need to paste it into. Thanks again for your response

  8. AutomatedKid007
    Member
    Posted 2 years ago #

    jamiel, i have the code placed in a php file (separate plugin) along with a few others codes, located in the wp-content/mu-plugins folder, where it is automatically activated for all sites. so far, so good, it works. do a quick search "how to create a simple wordpress plugin" via google and you'll easily find what you need.

  9. kennibc
    Member
    Posted 2 years ago #

    Thank you for posting this fix. I was able to add it to my site and all is well. I had a similar issue with the avatars and this did the trick.

    Here is the code to copy in plugin form and then add to a file saved as avatar.php (I just used Notepad) and upload it into the plugins folder. Then do a Network Activate and it will fix the avatar issue.

    <?php
    /**
    * Plugin Name: Avatar Fix
    * Plugin URI: http://#
    * Description: This custom plugin fixes avatars on subsites.
    * Author: Name
    * Author URI: http://#
    * Version: 1
    */
    // Custom filters to clean up issues in WP 3.0 with avatar paths.
    // Written by @theandystratton
    function sizeable_bp_core_avatar_folder_dir( $path ) {
        $items = explode('/', $path);
        $path = ABSPATH . 'wp-content/uploads/avatars/' . end($items);
        return $path;
    }
    add_filter('bp_core_avatar_folder_dir', 'sizeable_bp_core_avatar_folder_dir');
    function sizeable_bp_core_avatar_folder_url( $url ) {
        $items = explode('/', $url);
        $url = 'http://' . $items[2] . '/wp-content/uploads/avatars/' . end($items);
        return $url;
    }
    add_filter('bp_core_avatar_folder_url', 'sizeable_bp_core_avatar_folder_url');
    
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BuddyPress Avatar Bubble
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.