Thread: Subnav Script
View Single Post
Old 29-04-2007, 11:18   #1 (permalink)
RaelRode
Designers are strange :)
 
RaelRode's Avatar
 
Join Date: Jan 2007
Location: Shrewsbury, UK
Posts: 1,733
Send a message via ICQ to RaelRode Send a message via AIM to RaelRode Send a message via MSN to RaelRode Send a message via Yahoo to RaelRode Send a message via Skype™ to RaelRode
Subnav Script

OK so I found this script which basically puts text over an image so I dont need to create loads of images for my subnav. Here it is....

PHP Code:
<?
header
('Content-type: image/gif');
$im = @imagecreatefromgif('_img/nav_link.gif');
$black imagecolorallocate($im51102153);
$font 'Verdana';
$text strtoupper($_REQUEST['text']);

$box imagettfbbox 6.40$font$text);
$tw=$box[2]-$box[0];
$th=$box[5]-$box[3];
$px = (imagesx($im) -$tw)/2;
$py = (imagesy($im) -$th)/2;

imagettftext($im6.40$px12$black$font$text);
imagegif($im);
imagedestroy($im);
?>

The only problem is that it doesn't work. My images are in the right place etc but it doesn't show up. I am using it here.

Any ideas????
  Reply With Quote