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:
// Module Name
$mod_name = "SlideShow Pro";
// Module Version
$mod_version = "19.09.2008, v1.0";
// Module Author
$mod_author = "Sinan Yasar";
// Module Homepage
$mod_homepage = "http://www.sinanyasar.com";
// 1 = dynamic & static
// 2 = dynamic & static export of module code
// 3 = only dynamic
$mod_mode = 1;
// Generate PHP function to connect to openEngine database
$mod_useInternalDB = true;
?>
Edit main.php file as following:
$link = connectDB();
$query = "SELECT * FROM ".$db_praefix."filepool GROUP BY folder_name";
$result = mysql_query($query);
$count = 1;
$select[0] = array("name" => "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/"
?>
if ($filepool_key != ''){
$files = get_filepool_key($filepool_key);
$dest = "../html/sspxml/".$filepool_key;
if (is_dir($dest))
{ }
else
{ mkdir ($dest, 0777); }
$myFile = "../html/sspXML/".$filepool_key."/images.xml";
$fh = fopen($myFile, 'w+') or die("can't open file");
$stringData = "\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
\n";
fwrite($fh, $stringData);
?>


