[Pro] Monthly Image, Auto Changing

Hi there,
Wondering if you might be able to give me a hand.
I’m putting together a website that has a splash page, and the splash page is to have a set image for every month of the year - one that automatically changes.
Anyone know how this might be achieved?
Many thanks in advanced.
Fergus


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Splash pages are soooooo last year!

But seriously they do nothing for your SEO and almighty Googleness.

You would be better to incorporate this alternating image into your proper index page where there is some decent searchable content.

Have a look on hotscripts.com (or similar) for a Banner Rotation script which should do the job.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Heres a few PHP Resource Index » Programs and Scripts » Images & Graphs » Timed Rotation

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

And here is a simple one in action - if you look at the source code you will see that image1.jpg is being displayed.

http://www.deltadesign.co/examples/picofmonth.php

<?php



$totalPics="7";                    // Total photos in folder



$photoOfTheDay = Array (           // Add up to 31 photos below



   '1' => '../boutique_images/image1.jpg' ,     // Name of or Path to image

   '2' => '../boutique_images/image2.jpg' ,     // Name of or Path to image

   '3' => '../boutique_images/image3.jpg' ,     // Name of or Path to image

   '4' => '../boutique_images/image4.jpg' ,     // Name of or Path to image

   '5' => '../boutique_images/image5.jpg' ,     // Name of or Path to image

   '6' => '../boutique_images/image6.jpg' ,     // Name of or Path to image

   '7' => '../boutique_images/image7.jpg' ,     // Name of or Path to image



);

//  published at: scripts.tropicalpcsolutions.com



// Place day of month in variable 'x'

//$x=date("d"); 

// A website vistor made a suggestion to change the date function to use j 

// instead of d. This causes the date to be read without leading zeros. I have used n as it relates to month rather than day

$x=date("n");  //Thanks for the suggestion Andrew



// If value of date exceeds the amount of photos then pick a random photo to display

if($x > $totalPics) { $x=rand(1,$totalPics); }



// Display image

echo <<<EOC

<center><img src="$photoOfTheDay[$x]"></center>

EOC;



?>

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s a script that gets the content of the folder of images and
shows the one for the current month. All you have to do is put 12
pictures in a folder on your server (with an FTP app) and the script
does all the rest. You could modify this to be one per day if you
prefer.

On Jan 28, 2011, at 9:31 PM, DeltaDave wrote:

And here is a simple one in action - if you look at the source code
you will see that image1.jpg is being displayed.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Fantastic, thanks so much for the help. I’ll give it a shot and let you know if I hit any walls!

Splash pages are soooooo last year!

Yeah, I know… but it’s for a client and they wanted one on the site so what says goes!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

so what says goes!

But it is also part of your job to tell them that it is not going to do them any SEO favours so that they can make a properly informed choice.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

But it is also part of your job to tell them that it is not going >to do them any SEO favours so that they can make a >properly informed choice.

I know, and I did tell them all that… but to no avail.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s a script that gets the content of the folder of images >and shows the one for the current month. All you have to do >is put 12 pictures in a folder on your server (with an FTP >app) and the script does all the rest. You could modify this >to be one per day if you prefer.

A silly question, I know, but what am I supposed to call the files? have tried everything and doesn’t seem to work…

Many thanks!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It shouldn’t matter what you call them – they have to be images,
naturally, but any 12 images will work. If you want to have a
particular image for each month, then just name them so they sort into
month order when placed in a directory. They will be listed in
alphabetical order, so something like aaa_january.jpeg,
bbb_february.jpeg, ccc_march.jpeg, etc…

You need to have PHP5 on your server, and you need to change the
filename of your Web page from whatever.html to whatever.php.

And I had to add one more line to the script. I didn’t sort the photos
after stripping out any hidden files, so they started at the index 2
rather than 0. Sort re-indexes the array, bringing its lowest index
back to 0. I updated the Gist, so it should be correct now.

Walter

On Jan 29, 2011, at 10:31 AM, Fergus T wrote:

Here’s a script that gets the content of the folder of images >and
shows the one for the current month. All you have to do >is put 12
pictures in a folder on your server (with an FTP >app) and the
script does all the rest. You could modify this >to be one per day
if you prefer.

A silly question, I know, but what am I supposed to call the files?
have tried everything and doesn’t seem to work…

Many thanks!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options