slideshow pro - photos not looping
18 posts by 2 authors in: Forums > CMS Builder
Last Post: December 18, 2008 (RSS)
By petejdg - November 21, 2008 - edited: November 21, 2008
http://www.cywakeman.com/slideshow/
http://www.cywakeman.com/slideshow/images.xml.php
Here is my images.xml.php code:
<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<?php
require_once "/home/content/j/d/g/jdgordon/html/cmsAdmin/lib/viewer_functions.php";
list($photo_galleryRecords, $photo_galleryMetaData) = getRecords(array(
'tableName' => 'photo_gallery',
));
$photo_galleryRecord = @$photo_galleryRecords[0]; // get first record
?>
<gallery>
<album title="Slide Show" description="Slide Show" lgpath="/cmsAdmin/uploads/" tnpath="/cmsAdmin/uploads/thumb/">
<?php foreach ($photo_galleryRecord['image'] as $upload): ?>
<img src="<?php echo $upload['filename'] ?>" />
<?php endforeach ?>
</album>
</gallery>
Re: [petejdg] slideshow pro - photos not looping
By Dave - November 21, 2008
It looks like this code right now will load the very first record from the photo_gallery. Is that what you want it to do? You can display the record number it is loading like this:
num: <?php echo $photo_galleryRecord['num'] ?>
Let me know which record number it's loading and if you have more than one record in that section or how it's setup and I'll help you get it working.
interactivetools.com
Re: [Dave] slideshow pro - photos not looping
By petejdg - November 21, 2008
If you hit the page the slideshow is on, it only shows 1 photo, but I want all my photos to show up on the viewer. Right now I have photo_gallery with "image" upload field and three records for testing right now. I want it to loop and pull all my photos in - not just the one. So, not sure how to accomplish that. Thought it was looping in the image.xml.php code but guess it is not. Let me know what else you need from me.
thanks for your help,
pete
Re: [petejdg] slideshow pro - photos not looping
By Dave - November 21, 2008
The way it works by default is it would show photos for a specified record. So you'd list the record and then click on one to see the photo slideshow for that record.
Is it possible to have all the photos in one record?
interactivetools.com
Re: [Dave] slideshow pro - photos not looping
By petejdg - November 21, 2008
Re: [petejdg] slideshow pro - photos not looping
By Dave - November 21, 2008
Try this with what you have now. I just thought of a simple way to make it loop over each upload from each record:
<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<?php
require_once "/home/content/j/d/g/jdgordon/html/cmsAdmin/lib/viewer_functions.php";
list($photo_galleryRecords, $photo_galleryMetaData) = getRecords(array(
'tableName' => 'photo_gallery',
));
$photo_galleryRecord = @$photo_galleryRecords[0]; // get first record
?>
<gallery>
<album title="Slide Show" description="Slide Show" lgpath="/cmsAdmin/uploads/" tnpath="/cmsAdmin/uploads/thumb/">
<?php foreach ($photo_galleryRecords as $record): ?>
<?php foreach ($record['image'] as $upload): ?>
<img src="<?php echo $upload['filename'] ?>" />
<?php endforeach ?>
<?php endforeach ?>
</album>
</gallery>
Let me know if that works for you.
interactivetools.com
Re: [Dave] slideshow pro - photos not looping
By petejdg - November 22, 2008
using the code you supplied I am getting the following error in the xml file:
error on line 16 at column 103: EntityRef: expecting ';'
Re: [petejdg] slideshow pro - photos not looping
By petejdg - November 22, 2008
Re: [petejdg] slideshow pro - photos not looping
By petejdg - November 22, 2008
<img src="CyGloria2006_012_001_001.jpg"/>
There isn't a space between "/> Could that cause anything?
Re: [petejdg] slideshow pro - photos not looping
By Dave - November 24, 2008
You can have it automatically encode & symbols in urls like this:
<img src="<?php echo urlencode($upload['filename']) ?>" />
Is there anything else still preventing it from working?
interactivetools.com