Author Topic: PHP Slideshow  (Read 4602 times)

Canuck

  • Eh?!!
  • Founders
  • Posts: 792
  • Karma: +51/-3
  • Andy Moog Fan
    • My Website
PHP Slideshow
« on: March 15, 2006, 05:25:24 PM »
I finished up the site I was working on, so I thought I would try to write a PHP slideshow.

I have a few variations, but I just put up a single example.
Some of the variations include resizing the images with thumbnails, having no thumbnails etc.

The version I uploaded has thumbnails and no resizing of the original image.  The thumbnails are created using the GD library, so the first time I run the show, its a little slow to create them.

By commenting out some code, I can have the slideshow work in a circular fashion, or non-circular.  Clicking on a thumbnail will take you to the image, and clicking on the large image will take you to the next image.  And of course you can manually go through all the images, or run the slideshow.

I may look into pre-loading images with JavaScript and PHP, if its possible...(havent looked into it yet)

Comments?

http://john.kranjcevic.com/slideshow/slideshow.php?photo_num=0

Thanks for the look :)

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14309
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
PHP Slideshow
« Reply #1 on: March 16, 2006, 07:58:37 AM »
Looks pretty sharp dude.  As far as pre-loading, there are a few ways to do it.

1) On the page you're on, load the current picture plus place the next picture and the previous picture in a hidden div.  That'll cache it for you.
2) Create the whole thing with Javascript and load all the pics into seperate divs and just swap them out.
3) Create the whole thing with AJAX to reduce page loading to just the image itself.

Jake

  • Jackass In Charge
  • Posts: 8651
  • Karma: +83/-18
Re: PHP Slideshow
« Reply #2 on: March 29, 2006, 02:57:15 AM »
hey canuck...this slideshow looks very similar to something I found in the past....

the code has some flows though http://www.zinkwazi.com/scripts/demo/phpslideshow.php?directory=photos
Do not follow where the path may lead. Go instead where there is no path and leave a trail.

Canuck

  • Eh?!!
  • Founders
  • Posts: 792
  • Karma: +51/-3
  • Andy Moog Fan
    • My Website
Re: PHP Slideshow
« Reply #3 on: March 29, 2006, 06:49:40 PM »
Yeah, thats where I got the idea from :P

I wrote all the code for my slideshow though :)

I thought that slideshow was pretty good, and I needed a little project.

Im going to be using my slideshow for my brothers photo site, as well as incorporating it into my Moog site.

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14309
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: PHP Slideshow
« Reply #4 on: March 29, 2006, 09:38:14 PM »
I wonder if they do a ton of work with the GD library to resize pics and get thumbnails and all that.

Canuck

  • Eh?!!
  • Founders
  • Posts: 792
  • Karma: +51/-3
  • Andy Moog Fan
    • My Website
Re: PHP Slideshow
« Reply #5 on: March 29, 2006, 09:53:28 PM »
I havent downloaded their application to see how it runs.  I dont know if there is anyway to optimize GD functions with PHP ( is threading possible? ), but I know when I resize pics it does take quite a bit of time to run. 

But if I run it the first time, anyone else who comes to the site wouldnt have to wait.

When I have time, I want to write an application for my brother to input his cycling statistics, (the distance and time he rode), with a form, and then I would produce some type of charts with PHP.  When I have some time Ill try to put some thought into it, but I think it will be pretty neat.

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14309
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: PHP Slideshow
« Reply #6 on: March 30, 2006, 07:57:16 AM »
If you don't want to create the charts on your own, may I suggest the following?

www.advsofteng.com

We use it here at work and we've actually bought a license.  You can use it without buying it, but it puts a yellow bar under all the graphs.  It's suuuuuuuuper easy to use and can really do some tricky stuff.

Canuck

  • Eh?!!
  • Founders
  • Posts: 792
  • Karma: +51/-3
  • Andy Moog Fan
    • My Website
Re: PHP Slideshow
« Reply #7 on: March 30, 2006, 06:05:04 PM »
Thanks.  Ill look into it :)

Perspective

  • badfish
  • Jackass In Charge
  • Posts: 4635
  • Karma: +64/-22
    • http://jeff.bagu.org
Re: PHP Slideshow
« Reply #8 on: March 30, 2006, 10:10:13 PM »
I use this one
http://jeff.bagu.org/pics/ss.php (link at bottom)

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14309
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: PHP Slideshow
« Reply #9 on: March 31, 2006, 08:30:25 AM »
http://jeff.bagu.org/pics/ss.php?album=cancun&show=6

Is that you... and is she yours?  ;)

Perspective

  • badfish
  • Jackass In Charge
  • Posts: 4635
  • Karma: +64/-22
    • http://jeff.bagu.org
Re: PHP Slideshow
« Reply #10 on: March 31, 2006, 09:58:48 AM »
http://jeff.bagu.org/pics/ss.php?album=cancun&show=6

Is that you... and is she yours?  ;)

yup :)  (why? does it not look right to see a skinny guy in a redhat tee-shirt with a beutiful bikini girl?)

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14309
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: PHP Slideshow
« Reply #11 on: March 31, 2006, 11:41:50 AM »
Nah... perfectly normal.  I was just curious.  How old are you guys?  For some reason I thought you were older.

Perspective

  • badfish
  • Jackass In Charge
  • Posts: 4635
  • Karma: +64/-22
    • http://jeff.bagu.org
Re: PHP Slideshow
« Reply #12 on: March 31, 2006, 12:02:21 PM »
I'm 24, she's 22