HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Another Way to Add Avatars to WhosOnline

ShadowdareShadowdare r_j MVP
edited March 2013 in Feedback

Here is the code for WhosOnline 1.3 that I've modified for user avatars. This works in Vanilla 2.1.

Simply replace everything in ./plugins/WhosOnline/class.whosonlinemodule.php with the code on this page:

http://pastebin.com/raw.php?i=F8B0j3my

In your theme, you can add CSS code like this:

#WhosOnlineCustom li.cycle {
  display: inline;
  border: 0;
}

#WhosOnlineCustom li.cycle img {
  width: 32px;
  height: 32px;
  margin: 5px 5px 0 0;
}

Add Pages to Vanilla with the Basic Pages app

Srggamervrijvlinderngtrianjeongweerajlaksh

Comments

  • ShadowdareShadowdare r_j MVP
    edited March 2013

    This is what it can look like after custom CSS code is applied:

    Add Pages to Vanilla with the Basic Pages app

    Srggamer
  • SrggamerSrggamer HardCore Gamer ✭✭✭

    Was really looking for this thanks!!!

  • No problem.

    Add Pages to Vanilla with the Basic Pages app

  • This code has Vanillicon and Gravatar support for anyone who needs it with WhosOnline.

    Add Pages to Vanilla with the Basic Pages app

    vrijvlinderSrggamer
  • "In your theme, you can add CSS code like this:" Please tell me step by step.where?

  • @chathura99:

    1. Go to the ./themes directory.
    2. Open the directory of the theme you are using.
    3. Create a directory called "design" inside of it.
    4. Create a file called "custom.css" inside of the new design directory.
    5. You can place custom CSS code in the custom.css file that you create.

    Add Pages to Vanilla with the Basic Pages app

    UnderDogjeongwee
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    He is using the Geek theme if I am not mistaken made by Chanux. So he already has a custom.css

    I can't find an appropriate graphic lol to predict where this is going :)))

  • @vrijvlinder said:
    I can't find an appropriate graphic lol to predict where this is going :)))

    Either nostradamus or a badge for 'patience'

    There was an error rendering this rich post.

    Shadowdareperegrinevrijvlinder
  • CelesteCeleste New
    edited April 2013

    I used your code exactly and I'm getting a broken Gravatar image and the icons are not showing up inline. Any ideas?

    EDIT: it's actually only not showing up inline in the sidebar on the profile page. On regular view, it shows up inline but the Gravatar image is still broken.

  • If I open the broken image, it opens as:

    uploads/http://ngravatar.com/avatar/12e42531ac5770f6a5afa4dd2ef5b5f0

    If I delete off the "if" statement about the user profile pic having been uploaded, it works. So it seems like the part where it determines the URL of the image (uploaded or Gravatar) is getting mixed up somehow and that's why it's adding the uploads/ and "n" to the beginning of the gravatar.com URL?

  • If anyone else needs help with this, I got it working (with both uploaded avatars and Gravatars) with @peregrine's code here.

  • lifeisfoolifeisfoo Zombie plugins finder ✭✭✭

    @Shadowdare Thank you for your work. If you can push your changes to https://github.com/lifeisfoo/WhosOnline or send me a PM with the source code and I'll upload it for you.

    There was an error rendering this rich post.

    vrijvlinder
  • ShadowdareShadowdare r_j MVP
    edited April 2013

    @Celeste, the "uploads" string being added in doesn't happen on my end, but I suppose it has to do with the output of $User->Photo being different in Vanilla 2.1. The code is a little bit messy, but it's just something I put together really quick.

    @lifeisfoo, the source code is in the link in the first post.

    Add Pages to Vanilla with the Basic Pages app

    vrijvlinder
  • SrggamerSrggamer HardCore Gamer ✭✭✭

    @lifeisfoo said:
    Shadowdare Thank you for your work. If you can push your changes to https://github.com/lifeisfoo/WhosOnline or send me a PM with the source code and I'll upload it for you.

    Stop making GitHub man... I already have it...

  • edited September 2013

     

  • @Shadowdare My plugin still isn't working correctly. What's wrong with me? Please help.

    Please check here : www.tech9.co . (I tried to upload a photo. But isn't working)

  • Nice Thanks. +rep

Sign In or Register to comment.