View Full Version : Random Forum Signature Quote

10-28-2009, 11:31 AM
Mods, if this is for some reason the wrong section or against the rules, please do what you need to do, and please give me a PM as to why.
Thank You

Firstly, credits where credits are due: http://www.donationcoder.com/Forums/bb/index.php?topic=8527.msg61408 Is (I believe) the creator and originator of the scripts that this involves using. I take no credit for producing them. I simply will be hosting one of them at my site to facilitate the ease of use to you guys. I also feel his tutorial is a little complicated as it took me a while to get it going last night.

There are two versions, one that is more modifiable then the other. The first will be the easy one, the second, will require more work.

Tutorial 1:

If you like the quotes in my signature, all you have to do is put

Otherwise, create you own webspace directory, and create an index.php and quotes.txt file in said directory.

index.php should be filled with:


$all_quotes = file('quotes.txt');

if (!$all_quotes || empty($all_quotes)) exit;

foreach ($all_quotes as $myquote)
$myquote = trim ($myquote);
if ($myquote != '' && strlen($myquote) <= 400) $real_quotes[] = $myquote;

if (empty($real_quotes)) exit;


$key = array_rand($real_quotes);
die ($real_quotes[$key]);

function make_seed()
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);

quotes.txt shoulkd be filled with your quoptes in the following format:


New lines denote a new quote

so it would look like this
even a line break like this is a new quote

||denotes a lkine break

MY QUOTE||-By Trace

Now, building your image to use your quotes is easy:
we start out with then proceed to put http://tracehagan.com/signature/q.php?
Now you can add the following options:

f - fontname (e.g. default)
c - color code (e.g. 000000)
b - background color code (e.g. FFFFFF)
s - line spacing (e.g. 3) (range = 1-5)
w - image width (e.g. 500) (range = 200-600)
pt - top padding (e.g. 3) (range = 0 - 10)
pl - left padding (e.g. 1) (range = 0 - 10)
a - author line spacing (e.g. 3) (range = 0 - 10)
i - image format (e.g. 1) (default 0 = png, 1 = gif, 2 = jpeg)

u - url, without http:// (e.g. yoursite.com/index.php)

the "u" option is important, as that is where you specify your site to load your quotes.

To build the correct URL, we add &f=

the U option allows it to pull your quotes.

then we finish with

If you need any help, post here or PM me and I would be glad to help.

Part 2:

Coming soon. Need to be at home to do this, not on my Netbook at school