Farktography.net

It's not photography, it's Farktography.net


Post new topic   Reply to topic
View previous topicPrintable versionPrivate messagesView next topic
Author Message
CauseISaidSo
Post subject: Displaying places in the voting results page  PostPosted: 12.08.2010 18:53
Bibliostatus Rex


Joined: 13.07.2010 Posts: 1600

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 Smile, 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('<span%20style="float:right;margin-right:8px"><font%20size="+1">'+p+b+"%20Place%20(Entry%20#"+n+")</font></span>")})

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.


Last edited by CauseISaidSo on 05.02.2012 00:21; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
sleeping
Post subject: RE: Displaying places in the voting results page  PostPosted: 12.08.2010 20:25
Moderator


Joined: 21.12.2005 Posts: 853

Nice! And if you paste the code into a bookmark instead of the address bar it's re-usable.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ravnostic
Post subject: RE: Displaying places in the voting results page  PostPosted: 12.08.2010 20:52



Joined: 14.02.2010 Posts: 2898

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!

_________________
"Photography is about having a vision, a good eye, passion for the subject, great light, access, storytelling and heart. The camera equipment is just a tool designed to help capture the rest."--Scott Bourne
 
 View user's profile Send private message  
Reply with quote Back to top
U-Man
Post subject: RE: Displaying places in the voting results page  PostPosted: 12.08.2010 22:11
Moderator


Joined: 29.09.2006 Posts: 1625

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.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
nobigdeal
Post subject: RE: Displaying places in the voting results page  PostPosted: 12.08.2010 22:14
Moderator


Joined: 14.11.2007 Posts: 1070

Cool!

_________________
Website: http://musicinpictures.net/

Flickr: http://www.flickr.com/photos/21629306@N00/
 
 View user's profile Send private message  
Reply with quote Back to top
Kestrana
Post subject: RE: Displaying places in the voting results page  PostPosted: 12.08.2010 22:47
Moderator


Joined: 10.09.2009 Posts: 1750

Nvm I got it to work

_________________
flickr: http://www.flickr.com/photos/kestrana/
 
 View user's profile Send private message  
Reply with quote Back to top
olavf
Post subject: RE: Displaying places in the voting results page  PostPosted: 12.08.2010 22:56
Moderator


Joined: 15.07.2008 Posts: 1626

Very cool. And depressing at the same time...

Wink

_________________
And if a day goes by without my doing something related to photography, it?s as though I?ve neglected something essential to my existence, as though I had forgotten to wake up. - Richard Avedon
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
CauseISaidSo
Post subject: Re: RE: Displaying places in the voting results page  PostPosted: 12.08.2010 23:42
Bibliostatus Rex


Joined: 13.07.2010 Posts: 1600

      olavf wrote:
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. Sad
 
 View user's profile Send private message  
Reply with quote Back to top
olavf
Post subject: Re: RE: Displaying places in the voting results page  PostPosted: 13.08.2010 00:16
Moderator


Joined: 15.07.2008 Posts: 1626

      CauseISaidSo wrote:
      olavf wrote:
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. Sad


You're pretty new, so it comes and goes. A lot. Give it time Wink

_________________
And if a day goes by without my doing something related to photography, it?s as though I?ve neglected something essential to my existence, as though I had forgotten to wake up. - Richard Avedon
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
LeicaLens
Post subject:   PostPosted: 13.08.2010 00:47



Joined: 24.04.2009 Posts: 376
Location: Fukuoka, Japan
Very useful!

And slightly depressing at the same time.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
lokisbong
Post subject: Re: RE: Displaying places in the voting results page  PostPosted: 13.08.2010 03:14
Moderator


Joined: 21.04.2007 Posts: 1323

      olavf wrote:
Very cool. And depressing at the same time...

Wink


thats what I was just gonna post.

_________________
Of all the things I have lost I miss my mind the least!
 
 View user's profile Send private message  
Reply with quote Back to top
orionid
Post subject: Re: RE: Displaying places in the voting results page  PostPosted: 13.08.2010 13:23
Moderator


Joined: 04.09.2008 Posts: 3175

      sleeping wrote:
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! Wink

_________________
For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return.

~Leonardo Da Vinci
 
 View user's profile Send private message  
Reply with quote Back to top
kashari
Post subject:   PostPosted: 29.09.2010 18:47



Joined: 17.01.2009 Posts: 314

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!
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
orionid
Post subject:   PostPosted: 29.09.2010 19:28
Moderator


Joined: 04.09.2008 Posts: 3175

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).

_________________
For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return.

~Leonardo Da Vinci
 
 View user's profile Send private message  
Reply with quote Back to top
Kestrana
Post subject:   PostPosted: 29.09.2010 19:29
Moderator


Joined: 10.09.2009 Posts: 1750

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.

_________________
flickr: http://www.flickr.com/photos/kestrana/
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are
Post new topic   Reply to topic
View previous topicPrintable versionPrivate messagesView next topic