Skip to:
Content
Pages
Categories
Search
Top
Bottom

Following / Followers widgets made by me

  • Avatar of abyss
    abysshorror
    Member

    @abysshorror

    @apeatling, @r-a-y Hi !
    I took the liberty of using the `_inc/bp-follow-widgets.php` code and going a little further.

    I noticed the only widget available was for following users, so I decided to add another one of the followers.

    Then I realized that the widgets were showing information of _me_ , not of the user I was visiting on my site. So I changed this.
    Now, when you’re seeing someone’s profile, you can see him/her following and followers list.
    Also, if the user has no following/followers, the widget will say so (in the original behavior, the widget will not be shown). I also tried to add a link saying “the user has no followers. Follow him by clicking _here_” but I couldn’t get the correct link to get that done :(

    I think this little features could be useful for many (they are for me !) so maybe you could check them out, fix if something’s wrong, and add them for future releases.

    I’m not a dev so I’d like if someone could take a look at what I’ve done. Maybe I introduced a security flaw or a bug :)

    The code for my `_inc/bp-follow-widgets.php` is here: http://pastebin.com/z9P98hNZ

    I’ve also made a spanish translation of the plug-in. Ask me if interested !

    Cheers !

Viewing 9 replies - 1 through 9 (of 9 total)
  • Avatar of verleicoeim
    verleicoeim
    Member

    @verleicoeim

    Drowning man will catch at a straw

    Avatar of romocpoitens
    romocpoitens
    Member

    @romocpoitens

    I am not young enough to know everything

    Avatar of biocucoco
    biocucoco
    Member

    @biocucoco

    The very first law in advertising is to avoid the concrete promise and cultivate the delightfully vague

    Avatar of matiou34
    matiou34
    Participant

    @matiou34

    Great @abysshorror ! Exactly what Im looking for !
    Could you explain how to use it ?
    I created a folder bp-follow-widgets then a bp-follow-widgets.php with you code. What I have to do after that ?

    Thank you !

    Avatar of abyss
    abysshorror
    Member

    @abysshorror

    Hey @matiou34. Once you’ve done that, go to Apparence->Widgets on your WP admin and you should see two widgets (one for following, one for followers). Just put them in your sidebar.

    Let me know !

    Avatar of matiou34
    matiou34
    Participant

    @matiou34

    @abysshorror Thank you !
    I can’t get the number of followers/followings. Do you know what’s wrong ? I have a basic installation of buddypress

    Avatar of abyss
    abysshorror
    Member

    @abysshorror

    Weird. You just see “Following ()” / “Followers ()” ?

    BTW, I was lucky to see this reply. Notifications are not working ?

    Avatar of matiou34
    matiou34
    Participant

    @matiou34

    @abysshorror Yes I see : Following (5) when I use bp_get_displayed_user_nav();
    I Just want to take the number of followers and following and not all the navigation.

    I did’nt check the notification.

    Thanks for your reply !

    Avatar of musicdesigns
    musicdesigns
    Member

    @musicdesigns

    @abysshorror is there any way to have the name of the user in the widget also.

    e.g.

    Luke’s followers

    Luke is Following

    Obviously this name would be dependant on which page you were visiting.

    I don’t think it’s currently very obvious that the widget is changing dependant on page visited. The addition of the name might help…?

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

The topic ‘Following / Followers widgets made by me’ is closed to new replies.