OpenEngine meets SlideShowPro

19 September 2008 von Sinan Yasar Kommentieren »

Today i wrote a module for OpenEngine CMS ver1.9(one of the best CMS’s that i have seen so far) that integrates the professional SlideShowPro.

To use that module you have to have a working installation of openengine and unfortunately a licensed SlideShowPro but it costed me 20usd, so no big deal.

for those who are not into details, here is the result of what this tutorial shows.

!!! IMPORTANT !!! Before you continue if you don’t know one of these components that i mentioned above, please download and play with them to get the best from tutorial below.

Assuming you know how to work on both of these components, i start to tell what i did:

Create following files and directories under your OE installation,

/html/script/swfobject.js
/html/sspXML/ (make it writable [0777] )
/html/modules/ssp/
/html/modules/ssp/description.php
/html/modules/ssp/main.php
/html/modules/ssp/ssp.swf

(swfobject.js can be found here put only swfobject.js file from the package)
More Importantly you have to have ssp.swf, you can download it for 14 days trial from slideshowpro.net

And make sure following have write permissions:

/html/img/pool/
/html/img/thumbs/

Edit the description.php file as following:


Edit main.php file as following:

 "No directory selected","value" => "");
while ($row = mysql_fetch_array($result))
   {
   $select[$count] = array("name" => $row["folder_name"],"value" => $row["folder_key"]);
   $count ++;
   }
closeDB($link);
editSelect("page_text6",$select,"Selcet filepool directory");
$filepool_key = outputBlock("page_text6");

/* IMPORTANT! Change the URL below to absolute root of your site, this is
   necessary to have a working slideshow when the site is exported    */

$site_root = "http://localhost/oe/"
?>
\n\t\n"; fwrite($fh, $stringData); while ($row = mysql_fetch_array($files)) { createThumb("../html/img/pool/".$row["asset_filename"],"../html/img/thumbs/". $row["asset_filename"],150,120); $stringData = "\t\t".$row["asset_alt"]."\n"; fwrite($fh, $stringData); ?>
\n"; fwrite($fh, $stringData); fclose($fh); } ?>

Module is ready now, but we need to make a few extras for slideshowpro to make work with OE.

Assuming you have SSP (below is taken from SSP wiki)

Open the FLA containing SlideShowPro for Flash. Open the Properties panel (Windows > Properties) and give the component instance a unique variable name. For this tutorial, we’ll name it my_ssp.

Now we need to write some ActionScript. Create a new layer in your movie timeline, and click its first frame so it’s highlighted. Open the Actions panel. If you are using the ActionScript 2 version of SlideShowPro, enter the following:

if (xmlfile) { my_ssp.xmlFilePath=xmlfile; }
if (xmlfiletype) { my_ssp.xmlFileType=xmlfiletype; }

Moreover you need to add swfobect.swf to “head” section of your website, in our case to:

/cms/templates/_system/head.php


I think we’re done, it has been a long boring tutorial but the result is easy to use and charming :)

So we did all these, to get the functionality and end-result pictured below:

In OpenEngine admin you create your directories and put your pictures:

filepool

filepool

then on the page that your module is added, you select the folder that you want to have your slideshow on:

select folder

select folder

Then you get this slideshow appearing on your page:

SlideShowPro

SlideShowPro

Enjoy.

Werbung

Hinterlasse einen Kommentar