Rotating banners (5)

1 Name: Anonymous : 2005-10-25 18:40 ID:+b6Ahn6w [Del]

So I noticed in the config.pl file, you can have rotating title images (title image = banner?). But all it says is to point TITLEIMG to a script. And I couldn't find anywhere anything about what said script should do. A friend thought that it's supposed to return the filename of the image, so I decided to set out to write a script to do so.

Then the problem is I don't know any Perl. So I had another friend who knows some Perl to help me out. Together we came up with the following:

#!/usr/bin/perl -w

sub getRandImage {

srand;
my $randomnumber = int(rand(6));
my $filename;
if ($randomnumber == 0){
$filename = 'banner1.gif';
}
if ($randomnumber == 1){
$filename = 'banner2.gif';
}
if ($randomnumber == 2){
$filename = 'banner3.gif';
}
if ($randomnumber == 3){
$filename = 'banner4.gif';
}
if ($randomnumber == 4){
$filename = 'banner5.gif';
}
if ($randomnumber == 5){
$filename = 'banner6.gif';
}
return $filename;

}
1;

And in config.pl, I have:

require 'banner.pl';
use constant TITLEIMG => getRandImage;

And, lo and behold, it doesn't work (as might be expected?). Can anyone tell me what's wrong and what I should have done instead?

Thanks in advance.

2 Name: Anonymous : 2005-10-25 18:41 ID:+b6Ahn6w [Del]

Oh, by the way, this is in Wakaba. I don't know if Kareha has the same option, but I don't want to confuse you.

3 Name: !WAHa.06x36 : 2005-10-25 18:54 ID:Heaven [Del]

There's a thread somewhere over on 4-ch discussing this... Here we go: http://4-ch.net/tech/kareha.pl/1102969545/

I recommend http://4-ch.net/tech/kareha.pl/1102969545/6, of course.

4 Post deleted by user.

5 Name: Anonymous : 2017-03-13 01:52 ID:EW/Jt/Pw (Image: 720x540 jpg, 155 kb) [Del]

>posting a reply to a thread from 2005
>on an dead imageboard
Name: Link:
Leave these fields empty (spam trap):
More options...
Verification:
Image: