Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Random Numbers in .cgi pages- I Know How!

Quote Reply
Random Numbers in .cgi pages- I Know How!
Hi:

Finally, I have something to contribute!

You know how radom numbers only works on category pages, and not the cgi generated pages? Well, here is how to add to the other pages!

BTW, I got the idea from Digital Concepts mod for environmental variables- thanks, hope you don't mind me corrupting your code! It is a little ugly, but this works (so far, at least!)

Step one, open HTML-Templetes.pm, and go to the bottom for the specific page you want to add to. You have to do this for EACH page.... search, add, etc. Told you it was ugly!)

add:
my $random2;

then add:
$random2 = int(rand (10000));

Finally, in the output:

my $output = &load_template search.html', {
random2 => $random2, %$tags, %GLOBALS

Works!

Dave


Subject Author Views Date
Thread Random Numbers in .cgi pages- I Know How! carfac 1811 Nov 26, 1999, 9:27 PM
Post Re: Random Numbers in .cgi pages- I Know How!
widgetz 1715 Nov 27, 1999, 1:38 PM