Topic: Dynamix xml generation with Mambo
Hi all,
I am having a problem when trying to make SimpleViewer work when I dynamically generate the XML file.
Here is what I have:
<script type="text/javascript">
var fo = new SWFObject("components/com_gallery/viewer.swf", "viewer", "100%", "100%", "7", "#181818");
fo.addVariable("preloaderColor", "0xffffff");
fo.addVariable("xmlDataPath", "index.php?option=com_gallery&task=makealb");
fo.write("flashcontent");
</script>
The xmlDataPath is in fact a call to a page that returns xml content using php header function:
<?php
$xmlCode = makeXML();
header('Content-Type: application/xml; charset=UTF-8');
header('Content-Disposition: inline; filename="alb.xml"');
header("Content-Length: ".strlen($xmlCode ));
header('Expires: 0');
header('Pragma: cache');
header('Cache-Control: private');
echo $xmlCode ;
die();
?>
The application just displays crosses. Not even the captions of the images. this makes me think that the xml data sent is not valid, but I have checked the data sent and it is a valid gallery xml file.
I would like to know if someone spoted something wrong with the php code.
I am using Mambo CMS. Are there any know issues that would prevent me doing this?
Thanks a lot,
Guillaume