Current location: Hot Scripts Forums » Programming Languages » PHP » Need help on a image slide show using php!


Need help on a image slide show using php!

Reply
  #1 (permalink)  
Old 10-15-03, 06:46 PM
xelanoimis xelanoimis is offline
New Member
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Need help on a image slide show using php!

Hi!
I'm new to php and i want to do a image slide show (or a navigator) that can manage a large number of images (too large to include in a javascript file and send it to client).

I think I know how to create the page with one image and call the script to get another page with another image.

WHAT I WANT TO DO:
is to get a smood FADE FX when passing to the next image.
I think that for that I need to have the images already loaded, so a page loading break would ruin the process.

I was thinking about sending with php a page containig like 10 images (links to images acctualy) and load them and use javascript, but after these 10 images i will have to break and reload a new page... So i really would like it to go somehow better (like ask the php to give me a new image and reload it without reloading the whole page or something...)

I keep the php script and a txt file with the images links on a site and the page html page that calls the script on another site.

So, if anyone have any ideea about this or had seen something like this, please help me wit some code or links!

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-16-03, 01:26 AM
Perry Perry is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Tennessee
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
if all the images are in the same directory, you could easily use PHP to read the directory listing into a javascript array and then use your JS fade function between each image. This way, you're not actually loading all the images on the page at once... only changing the src of one image with javascript. Like this:

<img id="myImage" src="placeholder.jpg">

document.getElementById(id).src = 'path/to/new/image.jpg;

You should write a function to do this for you using your PHP/Javascript array of images

just increment a counter each time nextImage is called or decrement if prevImage is called... If the next image's index is greater than imageArray.length just reset the counter and begin again.

<a href="javascriptrevImage();">
<a href="javascript:nextImage();">

It's late and I'm in the middle of some things here, or I'd flesh it out a bit more for you. Let me know if you need more help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 10-16-03, 07:51 PM
xelanoimis xelanoimis is offline
New Member
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Thanks!

Thanks!

I finaly decided to this methode myself!
First I was afraid of the huge file that php would generate (because of so many images resulted by some search that returned almost all images I have) - That would include for each image not only the url (or the file name since they are in the same dir for now) but also some not so small descriptions.
At last I came with the idea that I'll send only the file name, the title and the number of votes (for each image resulted from search), write them in a javascript array and do as you told me. It's nice because it will keep the code clean and clear.
And when I'll need the descriptions I'll ask the php script to create another popup window - no fade and no navigation in this one.

I'm also happy because my fade code worked so fine - using layers to fade to the next image (any size) and title togather.

Thanks again for the help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
PHP Triad/Upload form eddyvlad PHP 6 10-07-03 12:17 AM
Nefarious PHP Seeking a few jobs to fill nefariousphp Job Offers & Assistance 4 09-17-03 10:05 AM
Rotate an image (CW, CCW) in php? borgo PHP 4 08-16-03 04:47 AM
PHP Live Support image change Jakenorton Script Requests 2 07-28-03 05:28 AM


All times are GMT -5. The time now is 01:59 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.