Jump to content

auto change XML file


tyhoerr

Recommended Posts

Hi, I'm wondering if it's possible and how difficult it would be to code the following scenario:

 

Firstly, I have an upload system implemented into my website already.

 

I'm using the SimpleView gallery on my website. You put a photo in the images directory and add an entry into the gallery XML file.

 

Example Entry:

<image>
<filename>Imagefile.jpg</filename>
<caption>Caption 13</caption>	
</image>

 

What I want is an easy way for members to upload their own images without having to manually change the XML file.

 

Basically the page will have a Browse field for the image upload and a enter caption field. Then a submit button to make it all happen.

 

How can i code the page to add an XML entry based on the file uploaded? If it'd be easier to use a specific file uploading system, i'm open to that too.

 

Thanks!

Link to comment
Share on other sites

The question is if you want to add a "caption" field to the database you can generate this on the fly and make it so the user can easily pull the xml for a picture with something like make_xml.php?image=Imagefile.jpg  which would then display a valid xml file for that picture.

 

You just have to use headers to set the content-type to be xml compliant etc.

Link to comment
Share on other sites

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.