Dynamic Slideshow pro
6 posts by 3 authors in: Forums > CMS Builder
Last Post: September 4, 2009 (RSS)
By dsternalski - July 28, 2009
i've been working on creating a dynamic xml feed so that any images that are uploaded to the CMS automatically update the gallery. However, i have more than one gallery on the site, but I am unable to get xml feed into the flash swf.
i have got the xml feed working, it's just getting the images to feed into the flash.
the code is below:
<?php header('Content-type: text/html; charset=utf-8');
require_once "C:/Users/Dani/Documents/xampp-win32-1.6.6a/xampp/htdocs/janizm/cmsAdmin/lib/viewer_functions.php";
list($indexRecords, $indexMetaData) = getRecords(array(
'tableName' => 'index',
));
list($galleryRecords, $galleryMetaData) = getRecords(array(
'tableName' => 'gallery',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
'loadUploads' => 'uploads'
));
$galleryRecord = @$galleryRecords[0]; // get first record
list($linksRecords, $linksMetaData) = getRecords(array(
'tableName' => 'links',
));
list($contactRecords, $contactMetaData) = getRecords(array(
'tableName' => 'contact',
));
// show error message if no matching record is found
if (!$galleryRecord) {
print "Record not found!";
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/janizm.css" rel="stylesheet" type="text/css" />
<title><?php foreach ($galleryRecords as $record): ?><?php echo $record['name'] ?><?php endforeach ?></title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<body>
<div class="container">
<?php
include("navigation/navigation.php");
?>
<?php foreach ($galleryRecords as $record): ?>
<div class="mainText">
<?php echo $record['content'] ?>
<div class="flashContent">
<script language="JavaScript" type="text/javascript">
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '630',
'height', '420',
'src', 'slideshowpro',
'quality', 'high',
'pluginspage', 'http://www.adobe.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'slideshowpro',
'bgcolor', '#ffffff',
'name', 'slideshowpro',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'slideshowpro',
'salign', '',
'FlashVars','xmlfile=http://localhost/janizm/images.xml.php?num=<?php echo $record ['num']?>'
);
</script>
</div>
</div>
<?php endforeach ?>
<br class="clearBoth" />
</div>
</body>
</html>
Re: [dsternalski] Dynamic Slideshow pro
By Dave - July 29, 2009
There's a few things you can try. Let's start with this:
Add the code in red to this line:
xmlfile=http://localhost/janizm/images.xml.php?num=<?php echo $record ['num']?>&'
And change this line as well:
'where' => "num = '" .mysql_real_escape_string(@$_REQUEST['num']). "'",
We've seen some examples in the past where SSP or flash added some extra numbers on the end of the url before requesting it, so even if num=123 was requested you'd get num=123;2342343 and CMSB would try to load the number on the end instead of the one intended. You could check your web logs to test that theory or try the above changes and let me know if that makes a difference.
Hope that helps, let me know how it goes!
interactivetools.com
Re: [Dave] Dynamic Slideshow pro
By dsternalski - September 3, 2009 - edited: September 3, 2009
thanks and sorry for the late reply. i've tried this, but all i get is Record not found!
Please find attached the gallery php file (which has changed quite a bit since my last post).
This page is also pulling through the content of another page.
Re: [dsternalski] Dynamic Slideshow pro
By Chris - September 3, 2009
Is this another symptom of the same issue we're discussing in [url http://www.interactivetools.com/forum/gforum.cgi?post=74268#74268]this thread[/url]?
Please let me know if this is still a problem after trying out that fix in the other thread.
Chris
Re: [chris] Dynamic Slideshow pro
this is now working in the code. thank you!
Re: [dsternalski] Dynamic Slideshow pro
By Chris - September 4, 2009
Chris