CMS & Slideshow Pro (LR2)

25 posts by 7 authors in: Forums > CMS Builder
Last Post: June 6, 2010   (RSS)

Re: [drewh01] CMS & Slideshow Pro (LR2)

By Damon - March 19, 2009

Here is a page with details about using Using SlideShowPro With CMS Builder:
http://www.interactivetools.com/docs/cmsbuilder/slideshowpro.html

Hopefully that helps.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] CMS & Slideshow Pro (LR2)

By drewh01 - March 19, 2009

Does this work with the Lightroom 2 version of SSP? Or the newest standalone player?

The standalone, Flash version and LR2 are all different I believe.....

The LR2 version uses a lot of Javascripting and once I get to part 2 of the link you sent....things don't match up. Is there an updated version of these instructions?

For instance....

Here is some of the code taken from the standalone player:

<div id="flashcontent">
This SlideShowPro photo gallery requires the Flash Player plugin and a web browser with JavaScript enabled.
</div>

<script type="text/javascript">
var so = new SWFObject("loader.swf", "loader", "650", "450", "8", "#FFFFFF");
so.addParam("allowFullScreen","true");
so.addParam("quality", "best");
so.addVariable("paramXMLPath","param.xml");
so.write("flashcontent");
</script>

Re: [drewh01] CMS & Slideshow Pro (LR2)

By drewh01 - March 19, 2009

**followup** (got it to work)

Note: Those posted instructions ONLY work with the Flash version of SSP.

Re: [drewh01] CMS & Slideshow Pro (LR2)

By sublmnl - March 20, 2009

anyone have a demo of how it looks?

Re: [sublmnl] CMS & Slideshow Pro (LR2)

By sublmnl - April 30, 2009 - edited: May 1, 2009

Got it to work.

Step one: Get SSP working outside the CMS for the Client
DONE.

Step Two: Get SSP working inside the CMS for the Client.

There are a few things that need to be done to get it to work right.
One thing I suggest is to set up cross-domain file for the 'www' users and non-users. http://wiki.slideshowpro.net/SSPfl/CP-Crossdomain

THe instructions here
http://www.interactivetools.com/docs/cmsbuilder/slideshowpro.html
are A-okay but the SSP instructions need some tweaking: http://wiki.slideshowpro.net/SSPfl/C-DynamicallyAssignXML

This step here:

<param name="FlashVars" value="xmlfile=http://mydomain.com/myXML.xml&xmlfiletype=Default" />

I changed to this in mine:

<param name="FlashVars" value="xmlfile=http://www.YourDomain.com/Path/to/images.xml.php?<?php echo $yourRecord['num'] ?>" />

This next piece of code here:

<embed FlashVars="xmlfile=http://mydomain.com/myXML.xml&xmlfiletype=Default" ... (other attributes)>

I changed to this:

... (other attributes) ... FlashVars="xmlfile=http://www.YourDomain.com/Path/to/images.xml.php?<?php echo $yourRecord['num'] ?>"

Sorry got a few more things to change:


Step Three (Flash CS3/CS4 only): Edit JavaScript
Flash CS3/CS4 users have an additional step -- modifying the inline JavaScript. Search the HTML document for a method named AC_FL_RunContent, followed by a descending list of comma-separated parameters. Anywhere in that list (the bottom is fine), add the following:

1.'FlashVars','xmlfile=http://mydomain.com/myXML.xml&xmlfiletype=Default'


Editing the AC_RunActiveContent.js globally is just plain crazy.
So I made a copy and I can call it for SSP all day long.
I copied it and placed it in my root JS folder and named it this:
AC_RunActiveContent_SSP.js

My new piece of JS for the above looks like this now:
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash", "FlashVars", "xmlfile=http://YourDomain.com/Path/To/images.xml.php&xmlfiletype=Default"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}


On your Flash export, call that file instead and also call it in the JS on the page. Even in the IF/ELSE call I changed it -


if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent_SSP.js.");
} else


Few things I almost forgot to mention were the changes to the Fla file.
Change your pathway to the XML file:
/pathway/to/images.xml.php

Also don't forget to include your title, description, lgpath and tnpath and tn file in your gallery album code in the XML.PHP file. That way you have a pretty picture and some text to go by the gallery albums.
Granted the client won't be able to do this little portion of fixing the XML.PHP file but, think about it... you create a new upload record, make a new album tag in the XML.PHP file, add some values and its all him after that!



I'm working on creating another album in the CMS right now and will edit this or follow up once I get it working.

EDIT: got the second album working. just added another UPLOAD field to the section and edited the XML.PHP accordingly to add the new album. One issue, no captions are showing up. hmnnn?

Yall should hall of fame this post!

Re: [sublmnl] CMS & Slideshow Pro (LR2)

By sublmnl - April 30, 2009 - edited: April 30, 2009

Anyone know how to get the captions or title to show up in the caption area?

this is what normal code looks like:
<img src="01.jpg" caption="Your Caption Goes Here" />

this is what I tried in the XML.PHP:
<img src="<?php echo $upload['filename'] ?>" caption="<?php echo $upload['caption'] ?>" />
and this:
<img src="<?php echo $upload['filename'] ?>" caption="<?php echo $upload['title'] ?>" />

Which produced this in the caption area of SSP:

Notice: Undefined Index: title in /Path/To/images.XML.PHP on line 25

Help!? Please

Re: [sublmnl] CMS & Slideshow Pro (LR2)

By ross - May 1, 2009

Hi there.

I think you are on the right track here but when you are trying to call on the image attributes like title or caption you need to use info1 or info2 like this:

caption="<?php echo $upload['info1'] ?>"

I don't know for sure which one you'll need as that's something you customize in your own system. You can see what you've set though by going into the Section editor and looking at the advanced settings of your upload field.

Or your could just try info1, info2, info3 or info4 one after another. There's only 4 so it's a pretty quick thing to guess and check :).

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] CMS & Slideshow Pro (LR2)

By sublmnl - May 1, 2009 - edited: May 1, 2009

You rule!

That works. Althought I don't know why the Title and Caption fields in the CMS are named title1, title2 and so on.
BUT,
it works!

EDIT: I checked the advanced upload fields and there are 5 total and the first two are named: Title and Caption.
I don't know what else you could use it for but if you had some need I bet with the PHP you could pull it out somehow.


This is what I am using:

<img src="<?php echo $upload['filename'] ?>" caption="<?php echo $upload['info1'] ?>" />

this shows the TITLE field in the Image uploader in the CMS.
if you use info2, it picks up the caption field in the Image uploader in the CMS.

BINGO!

Thanks.

Now stickie this post for all the other IT-CMS monkeys out there! [cool]

Re: [sublmnl] CMS & Slideshow Pro (LR2)

By sublmnl - October 29, 2009 - edited: October 29, 2009

I wanted to update this post with a question:

We have code like this for multiple albums in a gallery which causes us to come back and add more 'albums' to the gallery when a client wants them. We ask for a thumbnail, title and description - add it to the CMS and the xml file... and they're busy uploading after that.
<gallery>
<album title="Title of the Album" description=Short description goes here for all to see" tnpath="/images/gallery/thumb/"
tn="/images/gallery/thumb/3591690865_4e254e3132_o.jpg" lgpath="/images/gallery/">

<?php foreach ( $photosRecord['may_30_2009'] as $upload): ?>
<img src="<?php echo $upload['filename'] ?>"
caption="<?php echo $upload['info1'] ?>" />
<?php endforeach ?>
</album>

<album title="Title of the Album2" description=Short description goes here for all to see" tnpath="/images/gallery/thumb/"
tn="/images/gallery/2009_03_17/thumb/3480849053_d58d631322_o.jpg" lgpath="/images/gallery/2009_03_17/">

<?php foreach ( $photosRecord['march_17_2009'] as $upload): ?>
<img src="<?php echo $upload['filename'] ?>"
caption="<?php echo $upload['info1'] ?>" />
<?php endforeach ?>
</album>

<album title="Title of the Album3" description=Short description goes here for all to see" tnpath="/images/gallery/thumb/"
tn="/images/gallery/2009_03_07/thumb/3480864873_b03d97e246_o.jpg" lgpath="/images/gallery/2009_03_07/">

<?php foreach ( $photosRecord['march_7_2009'] as $upload): ?>
<img src="<?php echo $upload['filename'] ?>"
caption="<?php echo $upload['info1'] ?>" />
<?php endforeach ?>
</album>
</gallery>



Well, What if there was a way to have the gallery, pull from the section record that there was more than one and just write it out?

I'm not proficient enough in PHP to come up with an IF statement to pull more records if there are more but I imagine it can be done.

That way the client can just add away after we add the image upload to the CMS and the XML.PHP file 'knows' to just make another album.

anyone?