Jump to content

Recommended Posts

Hi,

 

I realize this is probably quite a broad question, but here's what I need to do:

 

* Firstly I need to be able to upload folders of images to the server - is this possible with PHP? If not I can use FTP.

* Then I need to loop through all the image folders in the 'root' image folder and create thumbnails from the images in each folder and put all the thumbnails into a 'thumbs' folder each folder. I'd also need to know how to trigger the script so it creates thumbs for any new images that have been uploaded.

* Then I need to loop through the folder structure again and create an XML file with <gallery> nodes for each folder within the 'root' folder and <image> and <thumb> nodes inside the <galley> nodes for each image and it's corresponding thumbnail. I need the gallery nodes ID to be the name of the folder too.

(I'd also like to get names and descriptions for the images from the metadata, but I'm pretty sure that's a bit much for me!)

 

I'll be using the XML to generate a flash image gallery that has a dynamically created gallery for every folder in the root folder and is populated with images contained in that folder.

I'm pretty new to PHP so I apologize if I'm asking a bit much here... I can pull off some of this stuff (kind of), but putting it all together and getting it right is a mission.

If anyone can help or point me in the right direction or give me some links to tutorials that would be awesome!

 

Thanks!!

Link to comment
https://forums.phpfreaks.com/topic/126778-image-directory-to-xml/
Share on other sites

WOW, and your pretty new to php! This isnt going to be easy.

 

To start with you cant upload folders, this isnt a PHP limitation but a web browser limitation, you cant select a folder for upload. You could upload a zip/gz file and then unpack it after upload.

 

To generate thumbnails you need an image processor. Imagemagick is your best bet.

 

You will also need XML libraries to create your XML files. PHP DOM can do this.

 

Some R+D needed to get you started

Thanks, I'll check that all out.

My brain is pretty fried from all the 'googling' I've been doing but I think I'll get there. I think I'll skip the whole upload and create thumbs thing and just give my client FileZilla or something so they they can manage the files with that. I'll also give them a fireworks or photoshop script or action to create the thumbs before they upload the folders. Then I only have to figure out how to loop through the directory and create the appropriate XML file. That's probably more doable for me...

 

Thanks for the reply!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.