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.
if you look back there is a thing about creating a jpeg and a trurtype function, which was taken off in the new version because that was causing a few troubles.
if you look back there is a thing about creating a jpeg and a trurtype function, which was taken off in the new version because that was causing a few troubles.
1. I can only make this work with certain colors -- 90% of the graphics I've made convert down to a 16-color "Safe Mode" look. Below is how I have the font code section of the version I loaded from the first post yesterday.
PHP Code:
// ######################### CHANGE FONT BELOW ############################ // Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font. // Replace "verdana.ttf" with the URL to your .ttf font // // LINE1 imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color);
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 ?>
</FONT>
My understanding was that I commented to where it takes the default -- but I suck as a programmer and that may be where I'm screwing up. The Line 2 & 22 or 1 & 12 confuse me as to exactly which lines are which. Is that 1, 2, 12, & 22 from the ########### down?
2. I see your sig is a JPG -- are you having a CRON job generate a new image every so often -- and it so, please roll me a bone and tell me how to do that. I visit a lot of phpBB and YaBB boards that I have no control over -- and they do not allow for php images.
This is a very cool hack and if I had more control over which graphics will work and the ability to generate frequent images (I know it isn't real time -- but every 10 minutes would be close enough for Government work) for my members -- it would be too Kool.
I'm using imagecreate() because imagecreatetruecolor() gives me a red x.
However the color comes up looking terrible! It's not even grayscale, it's just some washed out blue all over.
I've attached a pic. I know the stats text is out of alignment but I'm not going to bother aligning it until I know I can get it working in full color :P
No - it means that you have an old version of GD - it also means that your server can only produce low-quality images (hence the lack of truecolor support)