The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Link coming soon =)
%Rotation= (
'1/1/2007' => ['/images/img.jpg','/page.html'],
'23/11/2006' => ['/images/img0.jpg','/page0.html'],
'25/11/2006' => ['/images/img1.jpg','/page1.html'],
'26/11/2006' => ['/images/img2.jpg','/page2.html'],
'27/11/2006' => ['/images/img3.jpg','/page3.html']
);24/11/2006 isnt there, which is today, is that causing the problem? I'll give it a try.
Okay I managed to set it all up but got errors
[Fri Nov 24 23:33:48 2006] [error] [client 86.128.211.76] unable to include "/cgi-bin/rotation.cgi" in parsed file /home/AAAAAAAA/public_html/index.shtml
[Fri Nov 24 23:33:48 2006] [error] [client 86.128.211.76] Premature end of script headers: /home/AAAAAAAA/public_html/cgi-bin/rotation.cgiIs it the time script getting in it's way? I created an images folder with 4 test images in there. Didnt know if I should have put them in the cgi-bin folder so I just left them here ..language.com/images/img1.jpg
Can you spot what I did wrong? I 755 the file again.
EDIT
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content=" " />
<meta name="description" content=" " />
<title>Learn The Language</title>
</head>
<body text=#000000>
This is the time in Singapore;<br />
<!--#include virtual="/cgi-bin/textclock.cgi?zone=Singapore"--><br />
<!--#include virtual="/cgi-bin/rotation.cgi"-->
</body>
</html> Throw this into a file rotation.cgi (or whatever name you like). Change/add/edit the %Rotation variable as needed.
#!/usr/bin/perl
%Rotation= (
'1/1/2007' => ['/images/img.jpg','/page.html'],
'23/11/2006' => ['/images/img0.jpg','/page0.html'],
'25/11/2006' => ['/images/img1.jpg','/page1.html'],
'26/11/2006' => ['/images/img2.jpg','/page2.html'],
'27/11/2006' => ['/images/img3.jpg','/page3.html']
);
print "Content-type: text/html\n\n";
# Calculate the current date
($Second,$Minute, $Hour,$Month_Day,$Month,$Year,$Week_Day, $IsDST) = gmtime(time);
$Year=$Year+1900;
$Month++;
$match="$Month_Day/$Month/$Year";
if ($Rotation{$match}) {
$select=$match;
} else {
# pick one at random
@keys= keys %Rotation;
$select = $keys[rand @keys];
}
if ($Rotation{$select}) {
print "<a href=\"$Rotation{$select}[1]\">";
print "<img border=0 src=\"$Rotation{$select}[0]\" />";
print '</a>';
}
exit;
And then use
<!--#include virtual="/cgi-bin/rotation.cgi"--> to call it.
I found one called SurveySays but there was no demo so I'm not 100% sure, the comments seemed good, I'll give it a go.
> Well what I thought about doing is something like the Time_Zones
> table I did for the clock. You'd have entries like
>
'25/11/2006' ='image & link to display' > And if theres no entry for the current date then it'll just pick
> one at random. It depends what sort of control you want though.
> Maybe you prefer just to put them all in the list and let them
> rotate daily forever so you dont need to update them ever again.
That sounds perfect :-D. I think I'd put atleast 30 in the queue to start off with, then before they run out I'd submit the next 30. And so on. The random thing sounds good just incase I forget or I'm unable to update the list, atleast the script wont crash or display the same one for days.
Hmm I like the idea of a complete list already and a daily random selection. I could use that too. Like a picture of the day from my travel photography. That way I dont have to decide which one it posts it can do it randomly for me. That sounds pretty sweet :D
Yesterday I thought about doing a forum for my site. Although it would be in more people meaning more money I decided against it. One reason is that the good ones arent free anymore. But mainly because I wouldnt want to monitor it especially when I'll be traveling and working on other projects.
I updated my problem list, no new ones yet and I still have to check up on the 3 column one. Not sure if there's anything else I need/want. Usually I find a new feature on a site and I think it could be of create use. But at the moment I think I have everything I want, it's just making sure, forms, surveys and some things in CSS work properly.
> Oh really? That'd be great, cheers Garin. Would it use the
> server time? I'd probably like it programmed to change in the
> morning.
Well what I thought about doing is something like the Time_Zones table I did for the clock. You'd have entries like
'25/11/2006' => 'image & link to display' And if theres no entry for the current date then it'll just pick one at random. It depends what sort of control you want though. Maybe you prefer just to put them all in the list and let them rotate daily forever so you dont need to update them ever again.
But, if you have a pretty basic icon, you could try and re-created it on this web site, and it'll keep any un-coloured squares transparent in the finishing icon. You can also upload a PNG image to it for conversion to a favicon, and it should respect the transparency set within the PNG.
> You two have certainly been busy in here today :)
We have indeed, I'm hoping to get as much done now so I can get the site running as soon as possible.
Oh cjh I wonder if you can help me. I've finished off my favicon but it needs a transparent background. I can't seem to get it working. I did some googling, but I think I get confused or it mentions something that my photoshop doesnt do. I tried getting it to work last night but I gave up because I was so tired. Might have another go tonight.
> Machie wrote:
> ...and daily image thingy.
>
> Can still help you with that if you want. That you've switched
> the Perl doesnt make a great deal of difference.
Oh really? That'd be great, cheers Garin. Would it use the server time? I'd probably like it programmed to change in the morning.