Skip to:
Content
Pages
Categories
Search
Top
Bottom

friends widget for the profile sidebar

  • @ngsonst

    Participant

    hi,

    i like the possibility to show your friends in the profile sidebar:

    sidebar plugin: http://buddypressdev.org/plugins/bpdev-profile-sidebar/

    example: http://buddypressdev.org/members/admin/

    i’am trying to make a widget to realise it. but i have some problems with it. it works but i am not able to figure out a way to have a extra size for the thumbnails at the side bar. or let’s say i am not able to figure out a way without changing the core files. if possible i want to avoid that. maybe someone here can help me.

    first here is what i did:

    widget v1 code: http://pastie.org/398710

    example: http://kommune.ngcorp.de/members/admin/

    you see, it works but only with one of the standard sizes. i took “avatoar_mini” same as the picture in the header at “user/logout”.

    like i said i figured out a way to customize the size of the picture. for this made some slightly changes.

    widget v2 code: http://pastie.org/398735

    in addition i had to make some changes in the bp-core-classes.php:

    i inserted on line 16: var $avatar_thumb_sb;

    and on line 68: $this->avatar_thumb_sb = bp_core_get_avatar( $this->id, 1, 30, 30, false );

    now i have my size. no example for that, but it works.

    my question would be: is there a way to customize the size of the sidebar thumbnail without changing core files?

    thanks, nicolai

    p.s.: sorry for the bad english.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @johnjamesjacoby

    Keymaster

    No worries on English, and I’ll do my best to help with as much simple English as possible.

    To customize the thumbnails sizes, I would tell you to use Firefox, and install FireBug. It will allow you to browse through the CSS of any web page visually, to give you an idea of what CSS rules you can change to get you what you want.

    @nicolagreco

    Participant

    I’ve planned to release that code today/tomorrow

    @jschires

    Participant

    probably too old and not needed now, but I did something like this and added it to the userbar.php

    <td colspan=”2″ align=”center” valign=”middle” class=”freindsbox”> <?php if ( bp_has_friendships(‘type=active&per_page=6&max=50&user_id=’ . bp_loggedin_user_id() ) ) : ?>

    <ul id=”friend-list” class=”item-list”>

    <?php while ( bp_user_friendships() ) : bp_the_friendship(); ?>

    ” title=”<?php bp_friend_name() ?>” target=”_blank”><?php bp_friend_avatar_thumb() ?>

    <?php endwhile; ?>

    <?php else: ?>

    <div id=”message” class=”info”>

    <p>No friend connections found.</p>

    </div>

    <?php endif;?></td>

    </tr>

    <tr>

    <td height=”110″ colspan=”2″ align=”center” valign=”middle”>

    </td>

    </tr>

    </table>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘friends widget for the profile sidebar’ is closed to new replies.
Skip to toolbar