It's possible (I have it in my sig), but it can't be automated for good reasons.
So you have to code it yourself in PHP and no one can help you
Offline
LS97 wrote:
It's possible (I have it in my sig), but it can't be automated for good reasons.
So you have to code it yourself in PHP and no one can help you![]()
Well, Daffy22 could help, but I don't see him around lately...
Offline
ProgrammingFreak wrote:
LS97 wrote:
It's possible (I have it in my sig), but it can't be automated for good reasons.
So you have to code it yourself in PHP and no one can help you![]()
Well, Daffy22 could help, but I don't see him around lately...
![]()
I could help too
but it's not something that can be standardized.
Offline
LS97 wrote:
ProgrammingFreak wrote:
LS97 wrote:
It's possible (I have it in my sig), but it can't be automated for good reasons.
So you have to code it yourself in PHP and no one can help you![]()
Well, Daffy22 could help, but I don't see him around lately...
![]()
I could help too
but it's not something that can be standardized.
yeah.
Thats true. I have a copy of the code somewhere....hmm...
Offline
ProgrammingFreak wrote:
LS97 wrote:
ProgrammingFreak wrote:
Well, Daffy22 could help, but I don't see him around lately...![]()
I could help too
but it's not something that can be standardized.
yeah.
Thats true. I have a copy of the code somewhere....hmm...
Guess what me too...
Offline
LS97 wrote:
ProgrammingFreak wrote:
LS97 wrote:
I could help toobut it's not something that can be standardized.
yeah.
Thats true. I have a copy of the code somewhere....hmm...
Guess what me too...
![]()
I know.
Offline
ProgrammingFreak wrote:
LS97 wrote:
ProgrammingFreak wrote:
yeah.Thats true. I have a copy of the code somewhere....hmm...
Guess what me too...
![]()
I know.
![]()
Except I can't find it and also I don't want to use all the bandwidth because I'm download a 500MB linux distro
Offline
LS97 wrote:
ProgrammingFreak wrote:
LS97 wrote:
Guess what me too...![]()
I know.
![]()
Except I can't find it and also I don't want to use all the bandwidth because I'm download a 500MB linux distro
![]()
lol. I'm cleaning out all my files right now, so I'll probably find it soon.
Offline
ProgrammingFreak wrote:
LS97 wrote:
ProgrammingFreak wrote:
I know.
![]()
Except I can't find it and also I don't want to use all the bandwidth because I'm download a 500MB linux distro
![]()
lol. I'm cleaning out all my files right now, so I'll probably find it soon.
![]()
4 seconds left for the download!
Done! (after 3 cancelled/failed downloads. One would think internet would work well enough to download only 500MBs...)
Last edited by LS97 (2011-08-13 10:49:35)
Offline
Found it.
You need an image called bg.png for this.
<?php
// find posts...
// line 1224
// start making image
//creates a image handle
$file_name= 'http://scratch.mit.edu/forums/viewtopic.php?id=46494';
$scratchpage = file_get_contents("http://scratch.mit.edu/forums/viewtopic.php?id=46494");
$start = stripos($scratchpage,'<dd><a href="search.php?action=show_user&user_id=118336">Posts</a>: ');
$end = stripos($scratchpage,'</dd>
',$start);
$posts = strip_tags(substr($scratchpage,$start + 67,$end - $start - 20));
// start
$img = imagecreatefrompng ( "bg.png" );
//choose a bg color, u can play with the rgb values
$background = imagecolorallocate( $img,232, 0, 135 );
//chooses the text color
$text_colour = imagecolorallocate( $img, 250, 218, 4);
$colour2 = imagecolorallocate( $img, 250, 218, 4);
//sets the thickness/bolness of the line
imagesetthickness ( $img, 3 );
//draws a line params are (imgres,x1,y1,x2,y2,color)
imageline( $img, 20, 130, 165, 130, $text_colour );
//pulls the value passed in the URL
$text = 'Posts';
// place the font file in the same dir level as the php file
$font = 'font.ttf';
//this function sets the font size, places to the co-ords
imagettftext($img, 12, 0, 6, 15, $colour2, $font, $text);
//places another text with smaller size
imagettftext($img, 13, 0, 15, 35, $text_colour, $font, $posts);
//alerts the browser abt the type of content i.e. png image
header( 'Content-type: image/png' );
//now creates the image
imagepng( $img );
//destroys used resources
imagecolordeallocate( $text_color );
imagecolordeallocate( $background );
imagedestroy( $img );
?>Offline
ProgrammingFreak wrote:
Found it.
You need an image called bg.png for this.
Code:
<?php // find posts... // line 1224 // start making image //creates a image handle $file_name= 'http://scratch.mit.edu/forums/viewtopic.php?id=46494'; $scratchpage = file_get_contents("http://scratch.mit.edu/forums/viewtopic.php?id=46494"); $start = stripos($scratchpage,'<dd><a href="search.php?action=show_user&user_id=118336">Posts</a>: '); $end = stripos($scratchpage,'</dd> ',$start); $posts = strip_tags(substr($scratchpage,$start + 67,$end - $start - 20)); // start $img = imagecreatefrompng ( "bg.png" ); //choose a bg color, u can play with the rgb values $background = imagecolorallocate( $img,232, 0, 135 ); //chooses the text color $text_colour = imagecolorallocate( $img, 250, 218, 4); $colour2 = imagecolorallocate( $img, 250, 218, 4); //sets the thickness/bolness of the line imagesetthickness ( $img, 3 ); //draws a line params are (imgres,x1,y1,x2,y2,color) imageline( $img, 20, 130, 165, 130, $text_colour ); //pulls the value passed in the URL $text = 'Posts'; // place the font file in the same dir level as the php file $font = 'font.ttf'; //this function sets the font size, places to the co-ords imagettftext($img, 12, 0, 6, 15, $colour2, $font, $text); //places another text with smaller size imagettftext($img, 13, 0, 15, 35, $text_colour, $font, $posts); //alerts the browser abt the type of content i.e. png image header( 'Content-type: image/png' ); //now creates the image imagepng( $img ); //destroys used resources imagecolordeallocate( $text_color ); imagecolordeallocate( $background ); imagedestroy( $img ); ?>
That's Daffy's code exactly how I saw it!
Mine's a bit enhanced... it changes color for special posts automatically and doesn't do some of the useless stuff on there
Offline
LS97 wrote:
ProgrammingFreak wrote:
Found it.
You need an image called bg.png for this.
Code:
<?php // find posts... // line 1224 // start making image //creates a image handle $file_name= 'http://scratch.mit.edu/forums/viewtopic.php?id=46494'; $scratchpage = file_get_contents("http://scratch.mit.edu/forums/viewtopic.php?id=46494"); $start = stripos($scratchpage,'<dd><a href="search.php?action=show_user&user_id=118336">Posts</a>: '); $end = stripos($scratchpage,'</dd> ',$start); $posts = strip_tags(substr($scratchpage,$start + 67,$end - $start - 20)); // start $img = imagecreatefrompng ( "bg.png" ); //choose a bg color, u can play with the rgb values $background = imagecolorallocate( $img,232, 0, 135 ); //chooses the text color $text_colour = imagecolorallocate( $img, 250, 218, 4); $colour2 = imagecolorallocate( $img, 250, 218, 4); //sets the thickness/bolness of the line imagesetthickness ( $img, 3 ); //draws a line params are (imgres,x1,y1,x2,y2,color) imageline( $img, 20, 130, 165, 130, $text_colour ); //pulls the value passed in the URL $text = 'Posts'; // place the font file in the same dir level as the php file $font = 'font.ttf'; //this function sets the font size, places to the co-ords imagettftext($img, 12, 0, 6, 15, $colour2, $font, $text); //places another text with smaller size imagettftext($img, 13, 0, 15, 35, $text_colour, $font, $posts); //alerts the browser abt the type of content i.e. png image header( 'Content-type: image/png' ); //now creates the image imagepng( $img ); //destroys used resources imagecolordeallocate( $text_color ); imagecolordeallocate( $background ); imagedestroy( $img ); ?>That's Daffy's code exactly how I saw it!
Mine's a bit enhanced... it changes color for special posts automatically and doesn't do some of the useless stuff on there![]()
Yeah, it could probably get some work...
I just don't get what the url is. Its something to do with your posts.
Offline
Wait. The urls I have on that are my own threads. I must have added that.
Offline