#1 (permalink)  
Old 12-19-2005, 07:41 AM
Bryan G's Avatar
Registered User
 
Join Date: Jul 2005
Location: Hawaii
Posts: 7
Send a message via Yahoo to Bryan G
Image rotation script

I know this forum is to help people writing scripts, but this is over my head. I'm looking for a script, preferably .php, that will place a different image on a page each day. Not a random image, but will go through a folder of images placing them on the page in order. This probably is too much to ask for a script, but I have a set of comics, in a series, I want to have them placed on the page, one per day, in consecutive order. To keep people coming back for to see what happens.
I have a random php I use for oahu4u.com but like stated, there random.

Any help would be appreciated

thanx
Reply With Quote

  #2 (permalink)  
Old 12-19-2005, 09:49 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
This is actually a fairly common script. I know I've seen one around (about a year ago), but I can't remember at the moment where I saw it. I'll try to take a look. If I can't find it, I'll see what I can work up in my free time (if I have any). It's not that difficult to do.

Are the comics you want to use your own comics, or are you planning on using existing comics? There are quite a few scripts out there that will show your favorite comics when you want them to (like Garfield, etc.) that you can incorporate into your web site.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #3 (permalink)  
Old 12-20-2005, 02:15 AM
Bryan G's Avatar
Registered User
 
Join Date: Jul 2005
Location: Hawaii
Posts: 7
Send a message via Yahoo to Bryan G
They're old comics out of syndication, can't find them anywhere. many years ago I got a large book and recently I scanned the whole book.
A few years ago I made a page for myself, a home page, Google on top, TV guide/zap2it and many common links. Not a home page for others to see "hey, this is me", a home page for when I launch IE or FireFox.
What happened was all my friends and family liked it and made it their home page, it's a nice place to start when you sit at your PC. bryang.com/www. I add stuff once in a while, and I know they all love Calvin and Hobbes so I want to give them a comic a day, but I don't want to do it manually.
I've been searching for a script to do this, but all I find are random image scripts.
I'll keep searching, if I find something I'll make a post here but I doubt I'll find anything, I've already spent hours searching. I'm learning php but I'm not good enough to do this.

Thanx for your offer.
Reply With Quote
  #4 (permalink)  
Old 12-20-2005, 08:36 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
If you have Perl/CGI available on your server, then this link should get you what you want.

Here is a PHP script that should do what you want as well.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #5 (permalink)  
Old 12-20-2005, 03:39 PM
Bryan G's Avatar
Registered User
 
Join Date: Jul 2005
Location: Hawaii
Posts: 7
Send a message via Yahoo to Bryan G
The PHP script looks very configurable, I'm sure I'll have use for it on other sites I build later as well.
Tank you very much .
edit: nope, I have over 300 images, that's too much, need to add a line for each image. I'll try the other scripts...

Last edited by Bryan G; 12-20-2005 at 07:08 PM.
Reply With Quote
  #6 (permalink)  
Old 12-20-2005, 09:49 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
Quote:
Originally Posted by Bryan G
edit: nope, I have over 300 images, that's too much, need to add a line for each image. I'll try the other scripts...
Yeah. Also, after I posted it, I noticed that it requires an outside PHP file that they don't provide for you.

I don't know when I'll have any free time, but I might be able to work something up that works out of a database. I know I'm using a random rotation script right now that uses my database, but I'd have to do some serious customization to make it work day by day, rather than randomly.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #7 (permalink)  
Old 12-20-2005, 10:36 PM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
Quote:
Originally Posted by Bryan G
The PHP script looks very configurable, I'm sure I'll have use for it on other sites I build later as well.
Tank you very much .
edit: nope, I have over 300 images, that's too much, need to add a line for each image. I'll try the other scripts...
Just a script to generate your listing. That's what scripting is for, to save time, to ease your day.
Reply With Quote
  #8 (permalink)  
Old 12-21-2005, 12:58 AM
Bryan G's Avatar
Registered User
 
Join Date: Jul 2005
Location: Hawaii
Posts: 7
Send a message via Yahoo to Bryan G
Quote:
Originally Posted by curtiss
Yeah. Also, after I posted it, I noticed that it requires an outside PHP file that they don't provide for you.

I don't know when I'll have any free time, but I might be able to work something up that works out of a database. I know I'm using a random rotation script right now that uses my database, but I'd have to do some serious customization to make it work day by day, rather than randomly.
I'll keep looking, I've tried many scripts so far, some with using mysql and some perl/cgi but the all grab a random picture. One was nice, used a database and you could set it to minute, hour, day, month, or year, but still, it grabbed a random image.
These comics need to be read in order but I don't want you to write anything, unless you could use it yourself. I'm sure I'll find something, even if I get something close, I could get some help here to re-write it to what I need.

Right now I'm going to test "Comic Update Script for PHP"
I'll know in a few, I have a feeling this only allows you to view it on the page it generates, maybe that can be changes though............ahh well...
Reply With Quote
  #9 (permalink)  
Old 12-21-2005, 07:35 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
Quote:
Originally Posted by Bryan G
I have a feeling this only allows you to view it on the page it generates, maybe that can be changes though
There's always a way around that.

If you get the script up and running, and can't figure out how to get it on your own page, let us know.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #10 (permalink)  
Old 12-21-2005, 05:33 PM
Bryan G's Avatar
Registered User
 
Join Date: Jul 2005
Location: Hawaii
Posts: 7
Send a message via Yahoo to Bryan G
Quote:
Originally Posted by curtiss
There's always a way around that.

If you get the script up and running, and can't figure out how to get it on your own page, let us know.
I couldn't get that to work, I had the database set up, was into the admin area and it wants you to upload each picture with a description. I tried to just put the pics in the folder but that didn't work, you need to upload them with a thumbnail so it makes the database, over 300 images, with comments, no way
I found this, it's so simple.
PHP Code:
<?php

$totalPics
="10";

$photoOfTheDay = Array (

   
'1' => 'files/photo1.jpg' ,     // Name of or Path to image
   
'2' => 'files/photo2.jpg' ,     // Name of or Path to image
   
'3' => 'files/photo3.jpg' ,     // Name of or Path to image
   
'4' => 'files/photo4.jpg' ,     // Name of or Path to image
   
'5' => 'files/photo5.jpg' ,     // Name of or Path to image
   
'6' => 'files/photo6.jpg' ,     // Name of or Path to image
   
'7' => 'files/photo7.jpg' ,     // Name of or Path to image
   
'8' => 'files/photo1.jpg' ,     // Name of or Path to image
   
'9' => 'files/photo2.jpg' ,     // Name of or Path to image
   
'10' => 'files/photo3.jpg' ,     // Name of or Path to image

);

$x=date("d"); 

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

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

?>
I just loaded it today, and it grabbed the pic coinciding with today's day, I'll know tomorrow if everything works, but so far so good.
If you want to check it out I have it here temporarily, for testing.

Thank you for your effort trying to help

note: I should have searched the web more before posting here, sorry.

Last edited by Bryan G; 12-21-2005 at 05:54 PM.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML Image question GreenKoopaKid Programming and Scripting 2 12-16-2005 07:43 PM
Controlling image sizes using onmouseover unitygizmo Programming and Scripting 26 09-12-2005 07:04 PM
continuous vertical image Leonabrook Programming and Scripting 1 05-11-2005 11:59 PM
PHP Code of random image thumnail and link to full size image... CAG Hotshot Programming and Scripting 3 01-20-2005 10:08 PM
domain vs script bg4m3r Programming and Scripting 4 01-19-2005 05:48 PM


All times are GMT -5. The time now is 06:03 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter