Topic: PROBLEM! gallery.xml recplaced by .php

Hi everyone!
I have purchased SimpleViewer and wanted to custumize everything a bit. Problem is:
I have more galleries and do not want to create a .xml everytime. Therefore I created a .php which reads the folder and creats a virtual .xml itself.
Here is the link:
http://www.fixundfoxi.org/images/flash/galerie2.php
The structure displayed should be the same as e.g. gallery2.xml
Here is teh code of the php:

<?php echo&#40;'<?xml version="1.0" encoding="UTF-8"?>'&#41;;
if&#40;!isset&#40;$imagePath&#41;&#41; &#123; $imagePath = "gallery2/images"; &#125;
if&#40;!isset&#40;$thumbPath&#41;&#41; &#123; $thumbPath = "gallery2/thumbs"; &#125;
if&#40;!isset&#40;$maxImageHeighth&#41;&#41; &#123; $maxImageHeight = "320"; &#125;
if&#40;!isset&#40;$maxImageWidth&#41;&#41; &#123; $maxImageWidth = "480"; &#125;
if&#40;!isset&#40;$textColor&#41;&#41; &#123; $textColor = "0xFFFFFF"; &#125;
if&#40;!isset&#40;$frameColor&#41;&#41; &#123; $frameColor = "0xffffff"; &#125;
if&#40;!isset&#40;$frameWidth&#41;&#41; &#123; $frameWidth = "20"; &#125;
if&#40;!isset&#40;$stagePadding&#41;&#41; &#123; $stagePadding = "10"; &#125;
if&#40;!isset&#40;$thumbnailColumns&#41;&#41; &#123; $thumbnailColumns = "2"; &#125;
if&#40;!isset&#40;$thumbnailRows&#41;&#41; &#123; $thumbnailRows = "3"; &#125;
if&#40;!isset&#40;$navPosition&#41;&#41; &#123; $navPosition = "left"; &#125;
if&#40;!isset&#40;$title&#41;&#41; &#123; $title = "Gallery 1"; &#125;
if&#40;!isset&#40;$enableRightClickOpen&#41;&#41; &#123; $enableRightClickOpen = "true"; &#125;
if&#40;!isset&#40;$backgroundImagePath&#41;&#41; &#123; $backgroundImagePath = ""; &#125;

$verz = opendir&#40;$imagePath&#41;;
$data = "<simpleviewerGallery maxImageHeighth='".$maxImageHeight."' maxImageWidth='".$maxImageWidth."' 
textColor='".$textColor."' frameColor='".$frameColor."' frameWidth='".$frameWidth."' stagePadding='".$stagePadding."'
thumbnailColumns='".$thumbnailColumns."' thumbnailRows='".$thumbnailRows."' navPosition='".$navPosition."'
title='".$title."' enableRightClickOpen='".$enableRightClickOpen."' backgroundImagePath='".$backgroundImagePath."'
thumbPath='".$thumbPath."' imagePath='".$imagePath."' >";
while&#40;$file = readdir&#40;$verz&#41;&#41;&#123;
    if&#40;!is_dir&#40;$file&#41; && substr&#40;$file,-3&#41; == jpg&#41; &#123;
        $data .= "<image><filename>".$file."</filename><caption>".$file."</caption></image>";
    &#125;    
&#125; 
closedir&#40;$verz&#41;;
$data .= "</simpleviewerGallery>";
$data = utf8_encode&#40;$data&#41;;
$xmlData = simplexml_load_string&#40;$data&#41;;
echo $xmlData->asXML&#40;&#41;;
?>

But the Problem is, no pictures are displayed when clicking on the gallery. Just a cross appears, but the caption is displayed.
Here the link:
http://www.fixundfoxi.org/images/flash/

The gallery is flash imbedded. Gallery one is the "new" one. Number two is still generated by an xml.

Any sugestions?
Thanks in advance
Johanni

Re: PROBLEM! gallery.xml recplaced by .php

When a cross is displayed, it means that SV cannot find the image specified in the XML.

SV is looking for an image at: /images/flash/gallery2/images115-1503
and a thumb at: /images/flash/gallery2/thumbs115-1503_IMG.jpg

Looks like you missed a slash in the image and thumb paths.

Felix Turner
SimpleViewer Support Team.

Re: PROBLEM! gallery.xml recplaced by .php

OK I see,
sounds good but still, I can't find any mistake. When I "open" my php which is supposed to generate a virtual xml, the pictures are displayed.
http://www.fixundfoxi.org/images/flash/galerie2.php
I'll show you the dir.tree:
All the files are placed in the directory "flash". In flash, there is a subdir called "gallery2" which has got two subdirs itself, called images and thumbs. In this folder are the pictures and this is the path I pass to the player by my galerie.php

Any further ideas?
Thanks a lot for the fast reply!
Johanni

Re: PROBLEM! gallery.xml recplaced by .php

ok- sorry. stupid me, you were right. I think I should read closer...
thanks a lot
awesome