Jump to content

Feb 2011 4.40 Challenge


Recommended Posts

  • Replies 739
  • Created
  • Last Reply

Top Posters In This Topic

Sweet! After this and my cashes in the $4.40s and my rungood last month I'm loving the looks of my balance on Stars :-) Thanks Bob!

Link to post
Share on other sites
  • 4 months later...

I'm writing in this thread because I'm guessing VB's box is full.VB, is it difficult to make the auto update scoreboard seen in some of the sigs? I wanted to do it with a google doc I have.

Link to post
Share on other sites
I'm writing in this thread because I'm guessing VB's box is full.VB, is it difficult to make the auto update scoreboard seen in some of the sigs? I wanted to do it with a google doc I have.
Not full! But since you asked here now everyone is probably itching to know. The image-creation script is written in php. The trick was that FCP does not allow linking to dynamic images (images that are generated on load) so I had to come up with another way for the image to update itself. I did this by including the image-generation script in the leaderboard page on the website so that every time someone loaded the leaderboard, the .png image would be updated for people's sigs. The code starts with a premade picture that I did in photoshop, then just prints the text on to it as needed:
//make png for signatures$im = imagecreatefrompng("images/lbtemplate.png");//define colors$white = imageColorAllocate ($im, 0xFF, 0xFF, 0xFF); $gray = imageColorAllocate ($im, 0x33, 0x33, 0x33); $black = imageColorAllocate ($im, 0x00, 0x00, 0x00); $yellow = imageColorAllocate ($im, 0xAA, 0xAA, 0x00); $green = imageColorAllocate ($im, 0x00, 0xBB, 0x00);$blue = imageColorAllocate ($im, 0x00, 0x00, 0xBB);$ltblue = imageColorAllocate ($im, 0x66, 0x66, 0xFF);$red = imageColorAllocate ($im, 0xBB, 0x00, 0x00); $orange = imageColorAllocate ($im, 0xBB, 0x44, 0x22); $gray = imageColorAllocate ($im, 0x88, 0x88, 0x88);	$teamcolor = $green;$scorecolor = $green;	$row1x = 195;$score1x = 410;$row2x=455;$score2x = 670;$top = 17;$vertspace = 12;$fontpath = "/images/Bitsumishi.ttf";	//draw text for pre-tourney period//imagettftext($im, 24, 0, 300, 45, $gray, "/images/Bitsumishi.ttf", "NOW REGISTERING");	//draw text leaderboardimagettftext($im, 9, 0, $row1x, $top, $white, "/images/Bitsumishi.ttf", "1. $a_teamname[0]");imagettftext($im, 9, 0, $score1x, $top, $white, "/images/Bitsumishi.ttf", "$a_teamscore[0]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace, $yellow, $fontpath, "2. $a_teamname[1]");imagettftext($im, 9, 0, $score1x, $top+$vertspace, $yellow, $fontpath, "$a_teamscore[1]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace*2, $yellow, $fontpath, "3. $a_teamname[2]");imagettftext($im, 9, 0, $score1x, $top+$vertspace*2, $yellow, $fontpath, "$a_teamscore[2]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace*3, $teamcolor, $fontpath, "4. $a_teamname[3]");imagettftext($im, 9, 0, $score1x, $top+$vertspace*3, $teamcolor, $fontpath, "$a_teamscore[3]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace*4, $teamcolor, $fontpath, "5. $a_teamname[4]");imagettftext($im, 9, 0, $score1x, $top+$vertspace*4, $scorecolor, $fontpath, "$a_teamscore[4]");	imagettftext($im, 9, 0, $row2x, $top, $teamcolor, $fontpath, "6. $a_teamname[5]");imagettftext($im, 9, 0, $score2x, $top, $scorecolor, $fontpath, "$a_teamscore[5]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace, $teamcolor, $fontpath, "7. $a_teamname[6]");imagettftext($im, 9, 0, $score2x, $top+$vertspace, $scorecolor, $fontpath, "$a_teamscore[6]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace*2, $teamcolor, $fontpath, "8. $a_teamname[7]");imagettftext($im, 9, 0, $score2x, $top+$vertspace*2, $scorecolor, $fontpath, "$a_teamscore[7]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace*3, $teamcolor, $fontpath, "9. $a_teamname[8]");imagettftext($im, 9, 0, $score2x, $top+$vertspace*3, $scorecolor, $fontpath, "$a_teamscore[8]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace*4, $teamcolor, $fontpath, "10. $a_teamname[9]");imagettftext($im, 9, 0, $score2x, $top+$vertspace*4, $scorecolor, $fontpath, "$a_teamscore[9]");		//draw text for winners/*imagettftext($im,12,0,380,18,$ltblue,$fontpath, "*** WINNERS ***");	imagettftext($im,9,0,220,31,$white,$fontpath,"1. $a_teamname[0]: $a_player1[0] & $a_player2[0]");imagettftext($im,9,0,620,31,$white,$fontpath,"$a_teamscore[0]");	imagettftext($im,9,0,220,41,$green,$fontpath,"2. $a_teamname[1]");imagettftext($im,9,0,620,41,$green,$fontpath,"$a_teamscore[1]");	imagettftext($im,9,0,220,51,$green,$fontpath,"3. $a_teamname[2]: $a_player1[2] & $a_player2[2]");imagettftext($im,9,0,620,51,$green,$fontpath,"$a_teamscore[2]");	*/		//make the imageimagepng($im,"images/leaderboard.png");imagedestroy($im);

Link to post
Share on other sites

Thanks for the response here and through PM, VB. I'll read your post more closely when I get home.

Link to post
Share on other sites
Not full! But since you asked here now everyone is probably itching to know. The image-creation script is written in php. The trick was that FCP does not allow linking to dynamic images (images that are generated on load) so I had to come up with another way for the image to update itself. I did this by including the image-generation script in the leaderboard page on the website so that every time someone loaded the leaderboard, the .png image would be updated for people's sigs. The code starts with a premade picture that I did in photoshop, then just prints the text on to it as needed:
//make png for signatures$im = imagecreatefrompng("images/lbtemplate.png");//define colors$white = imageColorAllocate ($im, 0xFF, 0xFF, 0xFF); $gray = imageColorAllocate ($im, 0x33, 0x33, 0x33); $black = imageColorAllocate ($im, 0x00, 0x00, 0x00); $yellow = imageColorAllocate ($im, 0xAA, 0xAA, 0x00); $green = imageColorAllocate ($im, 0x00, 0xBB, 0x00);$blue = imageColorAllocate ($im, 0x00, 0x00, 0xBB);$ltblue = imageColorAllocate ($im, 0x66, 0x66, 0xFF);$red = imageColorAllocate ($im, 0xBB, 0x00, 0x00); $orange = imageColorAllocate ($im, 0xBB, 0x44, 0x22); $gray = imageColorAllocate ($im, 0x88, 0x88, 0x88);	$teamcolor = $green;$scorecolor = $green;	$row1x = 195;$score1x = 410;$row2x=455;$score2x = 670;$top = 17;$vertspace = 12;$fontpath = "/images/Bitsumishi.ttf";	//draw text for pre-tourney period//imagettftext($im, 24, 0, 300, 45, $gray, "/images/Bitsumishi.ttf", "NOW REGISTERING");	//draw text leaderboardimagettftext($im, 9, 0, $row1x, $top, $white, "/images/Bitsumishi.ttf", "1. $a_teamname[0]");imagettftext($im, 9, 0, $score1x, $top, $white, "/images/Bitsumishi.ttf", "$a_teamscore[0]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace, $yellow, $fontpath, "2. $a_teamname[1]");imagettftext($im, 9, 0, $score1x, $top+$vertspace, $yellow, $fontpath, "$a_teamscore[1]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace*2, $yellow, $fontpath, "3. $a_teamname[2]");imagettftext($im, 9, 0, $score1x, $top+$vertspace*2, $yellow, $fontpath, "$a_teamscore[2]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace*3, $teamcolor, $fontpath, "4. $a_teamname[3]");imagettftext($im, 9, 0, $score1x, $top+$vertspace*3, $teamcolor, $fontpath, "$a_teamscore[3]");	imagettftext($im, 9, 0, $row1x, $top+$vertspace*4, $teamcolor, $fontpath, "5. $a_teamname[4]");imagettftext($im, 9, 0, $score1x, $top+$vertspace*4, $scorecolor, $fontpath, "$a_teamscore[4]");	imagettftext($im, 9, 0, $row2x, $top, $teamcolor, $fontpath, "6. $a_teamname[5]");imagettftext($im, 9, 0, $score2x, $top, $scorecolor, $fontpath, "$a_teamscore[5]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace, $teamcolor, $fontpath, "7. $a_teamname[6]");imagettftext($im, 9, 0, $score2x, $top+$vertspace, $scorecolor, $fontpath, "$a_teamscore[6]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace*2, $teamcolor, $fontpath, "8. $a_teamname[7]");imagettftext($im, 9, 0, $score2x, $top+$vertspace*2, $scorecolor, $fontpath, "$a_teamscore[7]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace*3, $teamcolor, $fontpath, "9. $a_teamname[8]");imagettftext($im, 9, 0, $score2x, $top+$vertspace*3, $scorecolor, $fontpath, "$a_teamscore[8]");	imagettftext($im, 9, 0, $row2x, $top+$vertspace*4, $teamcolor, $fontpath, "10. $a_teamname[9]");imagettftext($im, 9, 0, $score2x, $top+$vertspace*4, $scorecolor, $fontpath, "$a_teamscore[9]");		//draw text for winners/*imagettftext($im,12,0,380,18,$ltblue,$fontpath, "*** WINNERS ***");	imagettftext($im,9,0,220,31,$white,$fontpath,"1. $a_teamname[0]: $a_player1[0] & $a_player2[0]");imagettftext($im,9,0,620,31,$white,$fontpath,"$a_teamscore[0]");	imagettftext($im,9,0,220,41,$green,$fontpath,"2. $a_teamname[1]");imagettftext($im,9,0,620,41,$green,$fontpath,"$a_teamscore[1]");	imagettftext($im,9,0,220,51,$green,$fontpath,"3. $a_teamname[2]: $a_player1[2] & $a_player2[2]");imagettftext($im,9,0,620,51,$green,$fontpath,"$a_teamscore[2]");	*/		//make the imageimagepng($im,"images/leaderboard.png");imagedestroy($im);

Exactly what I would have done.
Link to post
Share on other sites
  • 2 years later...

miss this challenge :(

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements


×
×
  • Create New...