Slowgeek » Forums » General
 
FAQ   •     •   Login  •   Challenge Search:

slowgeek embed-able web badge?

(4 posts)

  1. ryancnelson

    junior member
    Joined: Jan '10
    Posts: 5

    is there an approved way to embed my latest run info from slowgeek (specifically, an image, not some flash monstrosity) on my own html webpages?

    Nike isn't supporting their flash-based badges anymore (the info about them has been taken off their site since they re-did it), and the datafeeds that existing ones use apparently have some Y2k10 bugs, since all my runs since new-years show up as from '00. See http://www.ryan.net/misc/skitch/nikebadge-20100201-133209.jpg for an example.

    I'd love to link to a slowgeek image to embed on my homepage/blog , or have a url that means "most recent run image". If there's a concern about site-load or traffic costs, I'd accept (or prefer, actually) something I could scrape via cron.

    I could do this now, actually, with a handful of requests and a little html parsing, but if there's an "official" way to do this that I missed in the FAQ, please let me know. Thanks!

    Posted 7 months ago #      

  2. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    I'm not that worried about load. My graphing code is pretty efficient and I cache the raw run data on my server so I don't have to hit the Nike backend. And yes, the graphing code can do this. I just haven't gotten around to documenting it. It's a bit geeky, but this is after all Slowgeek...

    If you look at the link for an image, you will see it refers to a run id. If you replace the run id with you numerical user id, the grapher will graph the latest run for that user instead. Like this:

    http://img.slowgeek.com/?u_id=672755839

    There are a bunch of parameters you can pass to change the look. First, you can make it bigger:

    http://img.slowgeek.com/?u_id=672755839&size=1.5

    Valid sizes are 1, 1.5, 2 and 3

    And the may not want your nike id cluttering up your graph, so add n=0 to get rid of that.

    http://img.slowgeek.com/?u_id=672755839&size=1.5&n=0

    Other parameters:

    raw=0 disables the grey raw data line
    yzero=1 forces the graph to start at 0 on the y-axis
    unit=km forces the graph to km (unit=mi for miles)
    hp=1 hides pauses
    hc=1 hides clicks
    hs=1 hides the split times
    hd=1 hides run comment (the d is for Description which is what it is called in the data)

    I'll add a badge-generator page to my todo list that dumbs what I explained down.

    Posted 7 months ago #      

  3. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    I added a badge generator today. You will see a little red Rosette icon under your image on your profile page now. Or you can just go to /ba if you are logged in, or /ba/<your id> if you aren't.

    I should probably add something smaller than size 1 as well. I'll work on that later.

    Posted 7 months ago #      

  4. rlerdorf

    senior admin
    Joined: Nov '08
    Posts: 236

    Ok, there is a tiny size=.5 badge now as well.

    Posted 7 months ago #      

Reply

You must log in to post.

RSS feed for this topic