Need Help for Setting up SlideShowPro w/ CMSB

6 posts by 3 authors in: Forums > CMS Builder
Last Post: July 14, 2010   (RSS)

By yusuke - July 13, 2010 - edited: July 14, 2010

Hi,

I am trying to set up SlideShowPro with CMSB but unfortunately it's not working.
Checked below pages and of course, manuals of SlideShowPro.

http://www.interactivetools.com/docs/cmsbuilder/slideshowpro.html

http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?guest=63083730&t=search_engine&do=search_results&search_forum=forum_35&search_string=slideshowpro

Here is what I have. (images.xml.php)

http://www.cmsfactory.jp/slideshow2/

BUT w/o the CMSB, it works! (images.xml)

http://www.cmsfactory.jp/slideshow/


Here are the list of directory contents

/slideshow2/

AC_RunActiveContent_SSP.js
images.xml.php
index.php
slideshow.swf


/slideshow/

AC_RunActiveContent_SSP.js
images.xml
index.php
slideshow.swf


Could someone please help me on this?

Re: [yusuke] Need Help for Setting up SlideShowPro w/ CMSB

By gkornbluth - July 13, 2010

Hi Yusuke,

Here are a few recipes from my CMSB Cookbook http://www.thecmsbcookbook.com that might help you sort things out.

Best,

Jerry Kornbluth

INTEGRATING SLIDE SHOW PRO FOR FLASH WITH CMSB
Using Slide Show Pro with CMS Builder is relatively easy, but to utilize it effectively, you really need to have Adobe Flash or access to the program.

There are three components needed to integrate a SSP slide show into CMSB. A multi record section editor that allows multiple images to be uploaded and that creates thumbnails of appropriates size for display in your slide show, an image.xml.php file to control access to your CMSB on-line database, and an swf file with the ssp slide show and all your required parameters set, and of course, the appropriate code to display the slide show on your web page.

_______________________________________________


THE MULTI RECORD SECTION EDITOR

You’ll create a multi record section editor to upload your images. The one used in this example is called index_slides. It is set to allow only one record to be created but it’s a multi record editor so that the images can be dragged to re-order their appearance in the show.

In this example, set the first thumbnail at 525 pixels wide and 325 pixels high, and resize if over 800 pixels wide and 500 pixels high.

After you’ve created your section editor, upload a few test slides.

THE XML.PHP FILE
Since SSP uses an xml file to hold image location information, you’ll need to create an xml.php file to pull your images from your database and feed them to your SSP slide show.

HINT: In this example, the xml.php file is named images.xml.php but you can call it anything that you want to, just remember to change the file name in the <object> on your viewer page, and in the Flash component inspector XML File Path entry.

Here’s the only code in the file***:
_______________________________________
<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

<?php

require_once "/hsphere/local/home/yoursite.com/cmsAdmin/lib/viewer_functions.php";

list($index_slidesRecords, $index_slidesMetaData) = getRecords(array(
'tableName' => 'index_slides',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$index_slidesRecord = @$index_slidesRecords[0]; // get first record

?>

<gallery>
<album title="Slide Show" description="Slide Show" lgpath="/cmsAdmin/uploads/" tnpath="/cmsAdmin/uploads/thumb/">
<?php foreach ($index_slidesRecord['images'] as $upload): ?>
<img src="<?PHP echo $upload['filename'] ?>" />
<?PHP endforeach ?>
</album>
</gallery>
NOTE: If you want to start your slide show with a different image each time the page is reloaded, insert:

<?PHP shuffle($index_slidesRecord['images']) ?>

Before the line:

<?php foreach ($index_slidesRecord['images'] as $upload): ?>

***There are no other tags on this page, no <head>, no <body>, no <html>, just the code above. The file will be uploaded to the same folder as your .swf file and your viewer file.

_______________________________________________
DISPLAYING THE SSP SLIDE SHOW
The code to display the slide show on your web page is pretty straight forward, mine was set to render a transparent background. If you’re are concerned about active content and Explorer 8 compatibility using Dreamweaver CS3, you should automatically be warned about any existing incompatibility when you open your document. Either the code can be updated then, or you can do it manually by going to File > Convert > Active Content.

This code goes at the top of your page:

<?PHP

require_once "/hsphere/local/home/yoursite.com/cmsAdmin/lib/viewer_functions.php";

list($index_slidesRecords, $index_slidesMetaData) = getRecords(array(
'Table name' => 'index_slides',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$index_slidesRecord = @$index_slidesRecords[0]; // get first record

?>
<?PHP echo "<?xml version='1.0'?>\n"; ?>

<!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">

and this code goes where you want the slide show to appear:

<div id="flashcontent">

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="525" height="325" id="loader" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="yourslideshow.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="FlashVars" value="xmlfile=images.xml.php?<?php echo $index_slidesRecord['num'] ?>" />
<embed flashvars="xmlfile=images.xml.php?<?php echo $index_slidesRecord['num'] ?>" src="yourslideshow.swf" quality="best" wmode="transparent" width="525" height="325" name="loader" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>


After you’ve created your section editor, uploaded some sample images, created your viewer, your xml.php and your .swf files and uploaded them to your server, your slide show should be operational. If it is, make a protection copy of your FLA file and go ahead and play with the various SSP parameters and stage and instance sizes and colors. You’ll discover that the combination of SSP and CMSB is exceptionally flexible.
_______________________________________________
HINTS
Along the way, here are a few specific things that I learned...

1) DO NOT USE AN ABSOLUTE PATH (http://www.yoursite/images.xml.php) anywhere in your object tag.

2) The xmlFileType in the Flash Component Inspector should be set to: Default

3) If you create your CMSB image section editor as a Multi record editor set with a maximum of 1 record allowable, you can drag your images to change their display order in the slide show.

4) Your slide show will look better if your images all have the same aspect ratio, or if you group the various sizes creatively.
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [Jason] Need Help for Setting up SlideShowPro w/ CMSB

By yusuke - July 14, 2010 - edited: July 14, 2010

Hi Jason,

Thank You! but it didn't work.

I think the file you were looking was the one that already worked. (No PHP)

... I guess I am going to have to re-do the entire process again.

Thanks!

Re: [gkornbluth] Need Help for Setting up SlideShowPro w/ CMSB

By yusuke - July 14, 2010 - edited: July 14, 2010

Hi gkornbluth,

Thank you for your reply!

I followed your instruction and it did not work (get error message) until I deleted the below line from images.xml.php. Is this line necessary? It only works w/o the line...

<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

THANKS! It's beautiful!

Re: [yusuke] Need Help for Setting up SlideShowPro w/ CMSB

By gkornbluth - July 14, 2010

Don't know about that line of code. It's been working in my implementations.

But if it ain't broke... Don't fix it.

Glad it's working for you.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php