Displaying places in the voting results page

Forums Forums Get Technical Software Displaying places in the voting results page

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #1968
    CauseISaidSo
    Participant

    I love schnee’s statistics (it’s part of what makes farktography fun, IMHO), but I wish the rankings refreshed a little more frequently.

    Maybe I’m the only one, but I check the voting results page often to see how things are going. Since I’m not U-Man or soosh :), I have to count down many (often times many many) entries to see where my pix have placed and how badly my average standings evar stat will be affected.

    I considered creating my own stats site, but I just don’t have the time to do that right now, so I went with the next best thing – I whipped up some java script to add places to the existing voting results page. Each entry will look something like this:

    I’ve tested this in both IE and Chrome (no Firefox or Safari, but it should work there, too; at worst, it can’t do any harm). To add places to the voting results page:

    1) Open the voting results page (you do have it bookmarked, right?)

    2) Paste the javascript below (the entire script should be one single line) into the address bar of your browser and press enter.

    That’s it! It should work for any week’s contest. Here’s the script:

    javascript:var%20n=0,p=0,lv=0,x=$(‘td.commentHeaderRow[colSpan=”3″]%20font’).each(function(){n=n+1;var%20a=$(this).text();a=a.substr(0,a.indexOf(“%20″));if(a!=lv){p=n;lv=a}var%20b=”th”,d=p%25100;if(d<4||d>20){var%20c=p%2510;if(c==1)b=”st”;else%20if(c==2)b=”nd”;else%20if(c==3)b=”rd”}$(this).before(‘‘+p+b+”%20Place%20(Entry%20#”+n+”)“)})

    Edited on 2012-Feb-4 to add:
    The script above has been updated to match recent Fark HTML changes. Also note that it works on either Best or Funny vote results pages (and also on Photoshop contests).

    Important note for IE9 users: For some reason, IE9 eats the leading “javascript:” when you first paste it into the broswer address bar. Just go back to front of the address bar and type it back in before pressing Enter and it’ll work.

    #32460
    sleeping
    Participant

    Nice! And if you paste the code into a bookmark instead of the address bar it’s re-usable.

    #32461
    ravnostic
    Participant

    Hrmm…why didn’t my comment stick? I think this is way cool. I’ve faired really well these past couple of weeks, but since that isn’t usually the case, this is useful stuff! Thanks for the innovation!

    #32462
    U-Man
    Participant

    Yep. Works with Firefox, too. Very cool. And thank you for the compliment.

    I like this sort of mix of creativity and technical ability. Good stuff.

    #32463
    nobigdeal
    Participant

    Cool!

    #32464
    Kestrana
    Participant

    Nvm I got it to work

    #32465
    olavf
    Participant

    Very cool. And depressing at the same time…

    😉

    #32466
    CauseISaidSo
    Participant

    Very cool. And depressing at the same time…

    Thanks. And I hear ya.

    I think I picked the wrong contest to implement this. Fare thee well, oh Greatest Averages Evar list, I hardly knew ye. 🙁

    #32467
    olavf
    Participant

    Very cool. And depressing at the same time…

    Thanks. And I hear ya.

    I think I picked the wrong contest to implement this. Fare thee well, oh Greatest Averages Evar list, I hardly knew ye. 🙁

    You’re pretty new, so it comes and goes. A lot. Give it time 😉

    #32468
    LeicaLens
    Participant

    Very useful!

    And slightly depressing at the same time.

    #32469
    lokisbong
    Participant

    Very cool. And depressing at the same time…

    😉

    thats what I was just gonna post.

    #32470
    orionid
    Participant

    Nice! And if you paste the code into a bookmark instead of the address bar it’s re-usable.

    Huzzah!

    Awesome code, ’cause. Now, if you write a neat little script to add the bookmark button to the top of the browser, you could market it as a chrome/ie plugin to all the PSers! 😉

    #32471
    kashari
    Participant

    Maybe this would be a good place to ask this question: Why do the final stats skip places? i.e., it will go 1, 2, 4, 5 7, etc.. Awhile ago I looked around and didn’t find an answer, but I may have missed it.

    And thanks for this tip, I’ll give it a shot!

    #32472
    orionid
    Participant

    If there is a tie, it will assign everyone with that number of votes the highest place, then resume at the next available place. So, in your above example, there would be a two-way tie for second place (eating up the #3), and a two way tie for fifth (eating up the #6).

    #32473
    Kestrana
    Participant

    If there’s a tie, the next rank will be skipped so that the total number of photographs for any given sequence is the same.

    So if two people tie for 2nd place, 3rd place will be skipped and the next highest picture will be 4th.

Viewing 15 posts - 1 through 15 (of 32 total)
  • The topic ‘Displaying places in the voting results page’ is closed to new replies.