Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Pulling avatars of Vanilla users to print on Wordpress page

edited November 2010 in Vanilla 2.0 - 2.8
I would like to have a place on my blog (on same domain as Vanilla) that shows the most recent questions asked in Vanilla and also shows the avatars of the users asking them.

Is there any way to do that? :)
Tagged:

Comments

  • MarkMark Vanilla Staff
    Check out the new API.

    I have also been working on a bunch of widgets that work like the Embed Vanilla code, giving you a bunch of different things (like this) that you can add into other parts of your site.
  • Awesome, thanks @Mark. The API looks very useful.

    Am I overlooking something or is avatar pulling functionality I asked about not yet possible?
  • Oh so I could grab the ID's of the latest 5 discussions, then use the discussion API and somehow parse out the image names? Would that be possible?

    I'm very new to API :/
  • LincLinc Admin
    edited November 2010
    @jetlej You got it. I'd use cURL to grab the API data, then use json_decode on what the API sends you to get the image name.
  • Sweet, thanks for the specifics @Lincoln. That saved me at least 30 minutes
  • MarkMark Vanilla Staff
    One other thing to make note of is how we handle storing different image sizes in Vanilla. Anytime a user uploads a profile picture, we save two copies of the image to the filesystem (one thumbnail and one profile sized), and in the database we store the image name *suffix*.

    So, for example, right now if you look at the api data for my profile you'll see this image name: WOTW0SLO8QFR.jpg. But the actual url to my profile image and my thumbnail image are:

    Profile: http://vanillaforums.org/uploads/userpics/pWOTW0SLO8QFR.jpg
    Thumbnail: http://vanillaforums.org/uploads/userpics/nWOTW0SLO8QFR.jpg

    So, before the profile picture we put a "p" and before the Thumbnail we put an "n".

    Other than that you just need to build the path to the icon, which is always /uploads/userpics/ from the root of Vanilla.
  • Finally got this working ^^
Sign In or Register to comment.