Railwolf.com

www.flickr.com
This is a Flickr badge showing public photos from railwolf. Make your own badge here.

My Amazon.com Wish List









Signature

signature image

My signature is quite interesting, isn't it?
In this section, you will find information about my signature. What it is, how it works, and more.

 

What is it?

My signature is now powered by my Signature Lab PHP script.

How does it work?

The Signature Lab script loads a series of plug-in images from a MySQL database. A plug-in can be active or static, and can be loaded randomly, or not. Signature Lab then takes the plug-in images and  adds them to the main signature image using PHP's image functions (GD). The base signature image can be pre-made, or it can be created dynamically by Signature Lab.
There is also a dynamic link feature. Using a static link (required for use in forums), Signature Lab dynamically redirects the viewer to the corresponding location, depending on which plug-in is being displayed. The Now Playing plug-in would redirect to Railwolf.com's Now Playing section, for example.

What do the icons and numbers in your signature mean?

The icon on the top right of the signature indicates that the dynamic link function is enabled.

The number on the bottom right side of the signature indicates how many days have passed since the last update at Railwolf.com. It is replaced by a green light bulb icon when it has been 24 hours or less since the last update.

Can I have one too?

No, you can't. I know, I'm mean. I will not give the Signature Lab source code to anyone.

I might offer Signature Lab hosting in the future, but only to a limited amount of users...

You can, however, design your own signature, similar to mine. You will need to be able to work with PHP and MySQL , and specifically the image functions of PHP, such as imagecreatefrompng. You will need to have GD installed on your server. Contact your server's administrator to install it for you if you don't have it. It might also need to be updated if you don't have the latest version.

Here's a bit of code (very simplified version of a plug-in image) to get you started:

<?PHP

//-----------------------------------------------------------
// PHP Signature
// by Railwolf
//-----------------------------------------------------------

$data = "Railwolf is mean";   // NOTE: This is just an example. You need to get this data from somewhere (from a MySQL database, or including another script into this one, for example), and you can change it to anything you want.

//-----------------------------------------------------------
// Build image
//-----------------------------------------------------------

$font = "fonts/tahoma.ttf";   // NOTE: this is the font you use, you must upload it to the server and have the correct path here.
$fontsize = "10";

$image = ImageCreateFromPNG("yourimage.png");   // NOTE: this is the image to use for the signature.

$white = imagecolorallocate($image, 255,255,255);
$black = imagecolorallocate($image, 0,0,0);

imagettftext($image, $fontsize, 0, 65, 30, $white, $font, "$data");   // This adds the $data to the image

header("Content-type: image/png");
Imagepng($image);
ImageDestroy($image);

?>

To use the code, copy the code from the table above and paste it into Notepad.

You can then save the file as either a PHP (signature.php), or a PNG (signature.png) file. This depends on whether you want it to appear as an image file instead of a PHP script.

To be able to use it as a PNG image, you have to use an htaccess file to make the file get executed as a PHP script. This is an example of one:

<Files signature.png>
ForceType application/x-httpd-php
</Files>

You're on your own from now on...  If you can't do this, you probably wouldn't be able to use Signature Lab anyway.

© 2004 - 2008 Railwolf.com. All rights reserved. Redistribution of any part of this site and/or its contents is strictly prohibited without permission.