Using the XML Editor

Return to the Main Gallery Docs

The Gallery by Dali comes with a powerful XML editor, which provides an intuitive, user-friendly interface for editing the XML files. This editor is located in the "xmleditor" folder, which comes with your download from TUFaT.com. You should upload this folder to your web server as a sub-folder of your main gallery folder.

For example, if your gallery was uploaded to ...

http://www.your_domain.com/gallery/

... then the "xmleditor" folder would be located at ...

http://www.your_domain.com/gallery/xmleditor/

SECURITY NOTE: The xmleditor folder is NOT PROTECTED. You should therefore protect it using .htaccess (if you intend to leave it on the server), OR delete the folder after you have configured the gallery. Most web hosts have a back-end control panel, like CPanel or Plesk, that can be used to protect directories on your server, if you do not know how to use .htaccess.

The "xmleditor" folder then contains three sub-folders, "xmlengine", "xmltemplate", and "galleries", as well as many PHP files, GIF files, and other files.

If you are using a Unix or Linux server, you should CHMOD the "galleries" folder to a writable setting, like 777. This may vary depending on the server. For security reasons, you should set this back to a more restrictive setting after you are done editing, if you intend to keep the xmleditor on your server.

Open your web browser to the "admin" folder index to view the admin interface. It should look something like this:

Click on "Create new gallery" to start the process. At the top of the page, you will see the XML file name at the top in parenthesis: Gallery_08.08.05_19-22-21.xml. Of course, this will vary by the current date. This XML file is saved in the "galleries" folder, along with any MP3 files that you upload.

Please double-check the "galleries" folder to ensure that this XML file has been correctly created. If not, then first check to ensure that the "galleries" folder is writable (CHMOD 777), and second check to ensure that PHP file-writing has been enabled on your server. Some web hosts disable file writing as a security measure.

Your screen may have more options than those shown in this screenshot, depending on the version of the XML editor that you are using.

At this point, you just need to start changing options and uploading files. These are fairly self-explanatory, and they directly mirror the gallery XML configuration file, which you learned about in the previous tutorial. Click on "Edit gallery images" to start creating directories and subdirectories of images. This is also self-explanatory.

The folder that you create, and files that you upload, will be immediately available on your server, in the "galleries" folder. For example, I uploaded 3 MP3 files in the "Edit gallery options" screen, then I created two folders, one for Vacation Pictures, and one for Wedding Pictures, then created two sub-folders within "Vacation Pics", and uploaded two of my Utah vacation files.

You should check the "galleries" folder to ensure that these sub-folder have been correctly created, and the files have been correctly uploaded by the XML editor. You can do this check using any FTP client.

CRITICAL STEP: When you are done editing, rename the XML file to "config.xml", and copy this file to your gallery root folder, replacing the existing config.xml file. Within the folder of the same name (the "Gallery_08.08.05_19-22-21" in this example), copy all files and sub-folders to your gallery root.

After moving the files and folders that were newly created to the gallery root, your system might look something like this.

IMPORTANT: You don't actually copy the "Gallery_08.08.05_19-22-21" folder itself to the gallery root, but rather the CONTENTS of this folder to the gallery root! For example, the MP3 files that were uploaded by the XML editor to "Gallery_08.08.05_19-22-21" would be copied to the same location that the config.xml file is located. Likewise, the sub-folders that the XML editor created, like "Vacation Pics" and "Wedding Pictures", are copied to the gallery root. In my final setup, there is NO folder called "Gallery_08.08.05_19-22-21".

That's all! At this point, you should be able to open gallery.swf and see the new gallery that was created using the XML editor. Remember that using the XML editor is completely optional... in the event that your server doesn't support the necessary PHP functions to use the editor, or if you just can't get it working for some other reason (e.g. you're not able to chmod the galleries folder, etc.), then you can always just edit the XML file manually using Textpad.

Good luck, and thanks for using this Gallery by Dali!
Darren