Copy link to clipboard
Copied
I have a image gallery extension that gets images from a folder through the following xml script:
<?xml version="1.0" encoding="utf-8"?>
<gallery>
<item caption="Photo 01" image="images/image1.jpg" thumb_caption="caption 1" link="empty.html" target="_blank" />
<item caption="Photo 02" image="images/image2.jpg" thumb_caption="caption 2" link="empty.html" target="_blank" />
<item caption="Photo 03" image="images/image3.jpg" thumb_caption="caption 3" link="empty.html" target="_blank" />
<item caption="Photo 04" image="images/image4.jpg" thumb_caption="caption 4" link="empty.html" target="_blank" />
<item caption="Photo 05" image="images/image5.jpg" thumb_caption="caption 5" link="empty.html" target="_blank" />
<item caption="Photo 06" image="images/image6.jpg" thumb_caption="caption 6" link="empty.html" target="_blank" />
</gallery>
Copy link to clipboard
Copied
There are two things wrong, your loop and the XML tags. The first part of your script, up to and including the header() section looks OK. Change the rest like this:
<?php echo('<?xml version="1.0" encoding="utf-8"?>');?>
<gallery>
Copy link to clipboard
Copied
Thanks for the response, that cleared some things up but it seems like the extension still can't recognize the xml script, what I mean is that when the extension recognizes the script, the thumbnails show their cation titles ( ex: Caption 1, Caption 2, ect.) but when the extension doesn't recognize the xml script, the gallery appears but none of the image appear and the thumbnails don't display their corresponding captions. Has anyone used the image galleries from flashdevelopment24.com to do this? and what else could I try?
Thanks again.
Copy link to clipboard
Copied
I can't help you with the extension, but the first thing you need to check is that the PHP page is outputting the correct XML. Just load the PHP page into a browser, and see what it produces.
Copy link to clipboard
Copied
I loaded the php page into Firefox and I get the following message:
XML Parsing Error: no element found
Location: http://localhost/mottoth/user_ad_gallery.php
Line Number 4, Column 1:
^
I also loaded it into Safari and get a blank page, and in Opera and get the same message as in Firefox, what does this mean?
Copy link to clipboard
Copied
It means that the XML isn't being created correctly. Right-click in the browser to view source and see what is being output by the script.
Copy link to clipboard
Copied
Thanks for the quick response, the page source is:
<?xml version="1.0" encoding="utf-8"?><gallery>
I noticed on dreamweaver that in the code view <gallery> is colored red while </gallery> is light blue, I don't know if this means anything...
Copy link to clipboard
Copied
jt_10 wrote:
I noticed on dreamweaver that in the code view <gallery> is colored red while </gallery> is light blue, I don't know if this means anything...
Yes, it means that <gallery> is being treated as a PHP string. I have just copied and pasted everything into my version of Dreamweaver, and both <gallery> tags are in light blue. It sounds as though there's a mistake in your script somewhere.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more