Top 25 Members' Cars/Motorcycles of Final Gear 2012

jsausley

Well-Known Member
Joined
Jul 25, 2010
Messages
1,222
Location
Burlington, NC, United States
Car(s)
'16 Audi S5, '14 CC R-Line, '12 Ariel Atom 3
Ooo, this sounds fun.

What sort of rules? One entry per person? Does it need a thread in Post Your Car or just a good picture and a proof picture?
 
Last edited:

argatoga

Can't Start His Wank
Joined
Oct 4, 2005
Messages
17,988
Location
Seattle
Car(s)
'13 Moto Guzzi V7, '08 Pontiac Solstice GXP
As always it will require a thread in PYC with a proof pic.
 

Jupix

Well-Known Member
Joined
Dec 13, 2007
Messages
1,579
Location
Finland
I was rather bored the other day so I wrote a webscript.
http://jupix.info/fgcar2012/
The back end is about 90% done. Oh and I did change the point system to utilize whole integers and no decimals.

I would just need the help of someone who knows javascript... It is a far better solution to check the "ballot" before the user clicks submit, rather than only doing it in PHP when the form is processed. So, I would need javascript to check that there are under 10 (or 5) checkbox ticks in each category, and that those cars are only ticked in one category. If anyone could write it, that would be awesome.
 
Last edited:

argatoga

Can't Start His Wank
Joined
Oct 4, 2005
Messages
17,988
Location
Seattle
Car(s)
'13 Moto Guzzi V7, '08 Pontiac Solstice GXP
I was rather bored the other day so I wrote a webscript.
http://jupix.info/fgcar2012/
The back end is about 90% done. Oh and I did change the point system to utilize whole integers and no decimals.

I would just need the help of someone who knows javascript... It is a far better solution to check the "ballot" before the user clicks submit, rather than only doing it in PHP when the form is processed. So, I would need javascript to check that there are under 10 (or 5) checkbox ticks in each category, and that those cars are only ticked in one category. If anyone could write it, that would be awesome.
Thats fantastic. To prevent cheating I was thinking about having members PM me for a special per user code then for them to use that to vote.
 

Viper007Bond

Chicken Nugget Connoisseur
STAFF MEMBER
Joined
Sep 21, 2003
Messages
31,049
Location
Portland, Oregon
Car(s)
2008 Dodge Viper, 2006 MB CLS55 AMG
I would just need the help of someone who knows javascript... It is a far better solution to check the "ballot" before the user clicks submit, rather than only doing it in PHP when the form is processed. So, I would need javascript to check that there are under 10 (or 5) checkbox ticks in each category, and that those cars are only ticked in one category. If anyone could write it, that would be awesome.
Give the <form> an ID of "votingform", i.e. <form id="votingform" ... > and then add this to your <head>:

HTML:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function($){

		// Bind some code to the form submit event
		$("#votingform").submit(function(event) {

			// Select all checked checkboxes and count them
			var checked_count = $("#votingform input:checked").length;

			// If there's too many checked...
			if ( checked_count > 5 ) {

				// Tell the user
				alert( "You voted for " + checked_count + " items which is more than the 5 item maximum!" );

				// And prevent the action from occurring (the form submission)
				event.preventDefault();
			}
		});
	});
</script>
jQuery makes Javascript easy. :)

Note that of course you still need to enforce this on the PHP side too because someone could disable Javascript.


EDIT: Oh, I just noticed that the form is more complicated than I thought (people vote for their 1st, 2nd, and 3rd choices). You'll need to modify my code but it's easy enough. http://api.jquery.com/category/selectors/

Also I would randomly sort the cars on each page load so that there's no bias.

If you need any help with this, let me know. I literally do this (PHP development) for a living. :)
 
Last edited:

Jupix

Well-Known Member
Joined
Dec 13, 2007
Messages
1,579
Location
Finland
Thats fantastic. To prevent cheating I was thinking about having members PM me for a special per user code then for them to use that to vote.
That's a real nice idea if you can be arsed to handle the pm thing. I coded the webapp under the assumption you'd had enough of the administrative overhead.


Give the <form> an ID of "votingform", i.e. <form id="votingform" ... > and then add this to your <head>:
(snip)

jQuery makes Javascript easy. :)

Note that of course you still need to enforce this on the PHP side too because someone could disable Javascript.


EDIT: Oh, I just noticed that the form is more complicated than I thought (people vote for their 1st, 2nd, and 3rd choices). You'll need to modify my code but it's easy enough. http://api.jquery.com/category/selectors/

Also I would randomly sort the cars on each page load so that there's no bias.

If you need any help with this, let me know. I literally do this (PHP development) for a living. :)
Thanks for your interest and effort so far! Unfortunately making the necessary modifications would require learning the js syntax and aforementioned library from scratch, which I don't have time for (or interest tbh) at present. The webapps I've written with php so far have utilized very little js and the few scripts I've used have been stock clips. If you could finish the script that would be awesome. I'm guessing to you it would be a breeze.
 
Last edited:

argatoga

Can't Start His Wank
Joined
Oct 4, 2005
Messages
17,988
Location
Seattle
Car(s)
'13 Moto Guzzi V7, '08 Pontiac Solstice GXP
That's a real nice idea if you can be arsed to handle the pm thing. I coded the webapp under the assumption you'd had enough of the administrative overhead.
It's not a big issue for me.
 

Viper007Bond

Chicken Nugget Connoisseur
STAFF MEMBER
Joined
Sep 21, 2003
Messages
31,049
Location
Portland, Oregon
Car(s)
2008 Dodge Viper, 2006 MB CLS55 AMG
Thanks for your interest and effort so far! Unfortunately making the necessary modifications would require learning the js syntax and aforementioned library from scratch, which I don't have time for (or interest tbh) at present. The webapps I've written with php so far have utilized very little js and the few scripts I've used have been stock clips. If you could finish the script that would be awesome. I'm guessing to you it would be a breeze.
If you know PHP, HTML, and CSS, then picking up jQuery wouldn't be that hard but whatever. :?

HTML:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function($){

		// Bind some code to the form submit event
		$("#votingform").submit(function(event) {

			var max_votes_per_type = 5;

			// Each grouping of checkboxes, identified by "name" value
			var voting_types = new Array(
				"v1_options",
				"v2_options",
				"v4_options" // No trailing comma! IE is a piece of shit
			);

			// Loop through each group
			var array_len = voting_types.length;
			for ( var i = 0; i < array_len; i++ ) {
				
				// Select all checked checkboxes and count them
				var checked_count = $("#votingform input[name='" + voting_types[i] + "[]']:checked").length;

				// If there's too many checked...
				if ( checked_count > max_votes_per_type ) {

					// Tell the user
					alert( "You voted for " + checked_count + " items in a single column which is more than the " + max_votes_per_type + " item maximum!" );

					// And prevent the action from occurring (the form submission)
					event.preventDefault();

					// No need to check the other columns
					return;
				}
			}
		});
	});
</script>
 

Der Stig

is Der Slut
DONOR
Joined
Dec 19, 2008
Messages
7,285
Location
Misery Knob
Car(s)
Too many and yet not enough
ALL HAIL TO THE GLORIOUS LEADER'S PUNCTUALLY ARRIVING FOUR-WHEELED SNAKE.

Also, Pry's Beetle, avanti's GSX-R 750, Blind's VFR and Bub's DRZ :p
 

argatoga

Can't Start His Wank
Joined
Oct 4, 2005
Messages
17,988
Location
Seattle
Car(s)
'13 Moto Guzzi V7, '08 Pontiac Solstice GXP
I will keep the rules as it was last time. 50 post minimum with six months of membership required to have your car nominated. Anyone who meets these requirements may nominate an eligible vehicle.

If there are over 25 nominations there wil be two votes. The first will be for all cars nominated with the top 25 being included in the final vote.
 

argatoga

Can't Start His Wank
Joined
Oct 4, 2005
Messages
17,988
Location
Seattle
Car(s)
'13 Moto Guzzi V7, '08 Pontiac Solstice GXP
Once nominations are done, I'm thinking of having a shorter voting period than last time. Perhaps two weeks?
 

Jupix

Well-Known Member
Joined
Dec 13, 2007
Messages
1,579
Location
Finland
I think we can draw some conclusions from the nomination activity; 2 weeks is plenty, and pretty much an absolute maximum. We might want to consider even going as short as 1 week.
 
Top