This hack allows you to display your forum statistics in an image,whichyou can use as your signature in most forums (like mine).
If you have any trouble, please post here or in my forum for a good response. Please Click INSTALL, otherwise if an important fix becomes available, you will not be notified.
Now with truetype font support and line breaks. Fixed online userscode(was resetting 'most users online'). New easy support for GD2 andbelow.
Attached pixel font for use in your signatures, must be in all capitals, at size 6 to work appropriately.
New! Attached signature colourgenerator application. Useful to work out the colour scheme of yoursignature. Displays the RGB code for picked colour, and also allows forHEX to RGB conversion.
//full path to signare image with forum data (output image)
$ausgabedatei = "root/httpdocs/forums/images/signature.jpg";
The error I'm getting:
PHP Code:
Warning: imagecreatefromjpeg(root/httpdocs/forums/images/sig.jpg): failed to open stream: No such file or directory in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 208
Warning: imagecopy(): supplied argument is not a valid Image resource in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 225
Warning: Wrong parameter count for imagettftext() in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php:208) in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 242
?PNG IHDR?CN`?oPLTE???$????tRNS@??fIDATx?c`?`??Q0 F?(@?g??IEND?B`?
Warning: imagejpeg(): Unable to open 'root/httpdocs/forums/images/signature.jpg' for writing in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 244
thanks! That got rid of the first error... I'm still getting this:
PHP Code:
Warning: Wrong parameter count for imagettftext() in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php:238) in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 242
?PNG IHDR?C ??? PLTE??????$??L?0tRNS@??f/IDATx??˱ 0??#?J????voܖ???,?{r?ɲ,˲,˲<5??Cm>YT?BIEND?B`?
Warning: imagejpeg(): Unable to open '/home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.jpg' for writing in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 244
imagecolortransparent($img, $bg_color); // set dummybg transparent
// the distance is in pixels and the font # is 1 through 5
$i = 0;
while($i < count($output)){
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
//imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); // LINE1
imagettftext($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, $output); // LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
Ok.... I've uploaded verdana.ttf and the changes to php.
PHP Code:
Warning: Wrong parameter count for imagettftext() in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php:238) in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 242
?PNG IHDR?C ??? PLTE??????$??L?0tRNS@??f/IDATx??˱ 0??#?J????voܖ???,?{r?ɲ,˲,˲<5??Cm>YT?BIEND?B`?
Warning: imagejpeg(): Unable to open '/home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.jpg' for writing in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 244