WordPress.org

Support

Support » Plugins and Hacks » BP Show Friends » [Resolved] [Plugin: BP Show Friends] Display Everywhere – Your Friends Only

[Resolved] [Plugin: BP Show Friends] Display Everywhere – Your Friends Only

  • Love this plugin, does it’s job well, the best I’ve seen.
    But, is it possible for me to change the code so the widget displays on every page and it only displays that person’s friends.
    I think I’ve changed it so it only display the logged in person’s friends by changing $user_id = $bp->displayed_user->id; to $user_id = $bp->loggedin_user->id; but I can’t figure out how to change it so it displays on every page. Any help would be great.

    http://wordpress.org/extend/plugins/bp-show-friends/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thanks and happy you like this widget.

    You should test this in order to display the friends of the loggedin_user on every page :
    line 39, 87 and 111 : $user_id = $bp->loggedin_user->id;
    line 40 : $user_all_friends_url = $bp->loggedin_user->domain . BP_FRIENDS_SLUG;

    remove line 42 and 58
    remove line 135 and 151.

    It should work, and you actually built another widget 😉

    well actually, a user must be logged in, so instead of removing line 42, 58, 135 and 151, i think it would be best to edit line 42 this way :
    <?php if(is_user_logged_in()): ?>

    and line 135 this way
    if(is_user_logged_in()){

    thanks for your replies, I shall test it out and report back after christmas 🙂

    hi imath,

    thanks for great plugin, your corrections here are exactly what I needed, as shoeyn still celebrates christmas, I can confirm that your method works, at least at the moment see no any issue.

    Hi James,

    thank you for the feedback, i was afraid to wait for Sheyn till next year christmas 😉

    Works perfectly.. nice!

    Hi Bowe 😉

    Just added a beta version of next version if you want to test it..

    Version 1.1, as you suggested on my blog, will add the widget on every page displaying the loggedin user’s friends and when in BP member area, it will display the displayed member’s friends.

    Hi there,

    Just to say that this plugin does not show as a widget in BP 1.5. It is not uncommon as I’ve tried a few widgets that fail to show on the Appearance/Widgets page. Something fairly fundamental seems to have changed in the way widgets are registered.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] [Plugin: BP Show Friends] Display Everywhere – Your Friends Only’ is closed to new replies.
Skip to toolbar