News:

Wondering if this will always be free?  See why free is better.

Main Menu

signature info stats [no more updates and support]

Started by sebastian, August 20, 2005, 10:42:12 PM

Previous topic - Next topic

spottedhog

#20
Surf---  try an image file that has more height and less width.  As you can see from my sig, I resized everything to make it fit.  And yes, I removed some items to make it space out ok. 

sebastian

#21
For Chucky and spottedhog (older post about  forum who do not accept .php link as signature)

open your .htaccess ADD this line AddType application/x-httpd-php .png

then rename your .php file to .png file... For example signinfo.php to signinfo.png...

Finally set your signature --> [img]http://mydomain/signinfo.png[/img]



spottedhog

Thanks!!!   I had long forgotten about it.....  I will try it!

thanks again!

karlbenson

Latest member wasnt working for me, so i changed
$latest_member = $context['common_stats']['latest_member'];

to

$latest_member = $context['common_stats']['latest_member']['name'];

a2h_

I tried to add the font the same way the topic starter did but it still looked the same...

<?php
$img_number 
imagecreate(150,25);
$backcolor imagecolorallocate($img_number,0,0,0);
$textcolor imagecolorallocate($img_number,255,255,255);
$font "fonts/cour.ttf"// change your font path and name here
imagefill($img_number,0,0,$backcolor);
$number "$_SERVER[REMOTE_ADDR]";
Imagestring($img_number,10,5,5,$number,$textcolor);

header("Content-type: image/gif");
imagegif($img_number);
?>

My font is Courier New, in http://rctxtremegamez.aonservers.com/forum/fonts/cour.ttf
With an underscore. Because the one without an underscore's taken.

sebastian

It's not the same.
Check your script syndax again.

Quoteimagestring ( resource image, int font, int x, int y, string s, int col )
http://php.net/imagestring


Try to use 1,2,3,4 or 5 no 10


a2h_

10? How would that be Courier New? PHP is so confusing....
With an underscore. Because the one without an underscore's taken.

spottedhog

Did you try putting in the absolute path to your font file?

sebastian

Try this ...

Quote<?php

$im = imagecreatetruecolor(130,30);
$white = ImageColorAllocate ($im, 255, 255, 255);
$font = "fonts/cour.ttf"; // change your font path and name here
$number = "$_SERVER[REMOTE_ADDR]";

imagettftext($im, 12, 0, 20, 20, $white, $font, $number);

header("Content-Type: image/png");
Imagepng($im,'',9);
ImageDestroy ($im);

?>

a2h_

Doesn't work, just gives me an image 4 pixels wide. Go to my forum http://www.rctxtremegamez.aonservers.com/forum/ and look at the section 'Your user IP has been logged'.
With an underscore. Because the one without an underscore's taken.

sebastian

If you have PHP version 4.0+ then Imagepng($im,'',90); otherwise if your php version is 5.0 + then  Imagepng($im,'',9);

It work fine. http://www.rctxtremegamez.aonservers.com/forum/userip.php

.... does not exist any problem.

a2h_

Fatal error: Call to undefined function: imagettftext() in /home/rctxtrem/public_html/forum/userip.php on line 8
With an underscore. Because the one without an underscore's taken.

sebastian

rctxtreme this is impossible
yesterday your little script it was well.

Check all elements of imagettftext() again.
or copy-past this script here.

a2h_

No, yesterday I used the old script that I started with
With an underscore. Because the one without an underscore's taken.

sebastian

http://php.net/manual/en/function.imagettftext.php#61227
http://www.tomrafteryit.net/authimage-error-call-to-undefined-function-imagettftext/

Αccording to these sites:
Those errors indicate that your PHP installation does not have True Type Font support compiled.

a2h_

The guy that owns my webhost is like 'use <font>'... omfgwtf...
With an underscore. Because the one without an underscore's taken.

sebastian

#36
Forget true type fonts ... Get GDfonts...
like this Your IP

Download Courier GDfont

<?php
header
("Content-type: image/png");
$im imagecreatetruecolor(29018);
$black imagecolorallocate($im000);
$white imagecolorallocate($im255255255);
imagefilledrectangle($im004919$black);
$font imageloadfont("Courier.gdf");
$number "$_SERVER[REMOTE_ADDR]";
imagestring($im$font100"Your IP adress is:$number"$white);
imagepng($im);
?>

a2h_

It works, thanks, now I just need to wait for TP 0.9.5
With an underscore. Because the one without an underscore's taken.

efootball

Thanks just what i was looking for
hxxp:smfff.co.uk [nonactive]

hxxp:www.englishfootball.me.uk/football [nonactive]hxxp:smfff.co.uk [nonactive]

hxxp:www.englishfootball.me.uk/football [nonactive]

hxxp:www.gamemilitary.com/ [nonactive]

hxxp:gamemilitary.com/forum/index.php?board=2.0 [nonactive]

Inque187

#39
Worked like a charm for me! Thanks! I even added some database calls for numbers which update daily. Check out my signature.

Advertisement: