I have a meeting with a potential client this upcoming Wed. If I am hired, I will be redesigning his website, the major components he wants are galleries of his sculpture art and a way to update the images himself.
My idea: develop a custom CMS so he or his secretary can easily update what images are in the online flash galleries. My idea right now is an HTML/PHP form where they would enter what gallery the image goes to and maybe an upload button for the image, they hit submit and the PHP form edits an XML document which is where the gallery gets its image info from. Can anyone help me figure out how to do this? Or if there is an easier way to develop a CMS for them to update the images in the gallery themselves? Being able to remove images via a custom CMS would be ideal.
I just graduated with an AA degree a couple months ago but I focused on the front-end design aspect of web design, so I am not that backend savvy, but I learn fast. I appreciate any help and insight anyone can offer me.
What you could do is have PHP read all the existing images in the folder (this can be easily done), and have it output the proper XML so that Flash can read it. Then, in your admin panel, you’d have an upload script that uploads the image to that folder (very easy too). After the image has been uploaded, PHP will then read it because it reads all the images in the folder, and thus output the new XMl file with the new image added to it, and thus it’s been updated.
Hmm, that is a really good idea. Thanks for the advice!
But, how could I remove images as well from the xml? Would the php form simply have an option to delete the image from the folder, THEN, output a new xml based on what images are NOW in the folder? or what?
If anyone can help me figure out the best way to do this, and/or show an example of what the code would look like. I mean I know the basics but I have no idea how to do this or where to start, I need a stepping stone, thanks to anyone who can spare some time, I appreciate it.
To remove an image, just remove it from the folder then. When PHP reads the folder, it won’t be there anymore and thus no longer in the XML file, and thus no longer in Flash. To output XML with PHP, use this excellent tutorial by Jubba/Vash. It’s originally used with MySQL, but you can apply it to your situation too: http://www.kirupa.com/web/mysql_xml_php.htm