Script will be included in the _imgGallery object * * Vars: provided by $oCMS_scriptData["imgGallery"] * ["script"] this script * ["dir"] the path where to search for images * example: /userFiles/Image/path/to/dir/ * ["thumbsDir"] the path where to search for the thumbs. * If not set, script uses the subdirectory 'thumbs' to pick thumbnails) * example: /userFiles/Image/path/to/dir/ * ["order"] name / date * ["orderType"] ASC / DESC * ["cat"] * ["class"] ... characteristics the images must have to be listed * ["theme"] * * Returned array (assigned to smarty): * $gallery_listData * * Changelog: * 10.12.07 works now with $oCMS_scriptData["_imgGallery"]["thumbs_dir"] * 10.01.08: reading the title and desc from the std lang as intTitle and intDesc * 11.10.08: order added * 19.06.09: characs added * 20.06.09: Recursion and sorting addded, based on fileHandler class * 03.09.11: Now based on class wn_file_search * 14.11.11: wn_file_search v 0.12 + thumbsDir included * * ToDo: * - thumbsDir ... how to handle that? not possible with recursion! * */ global $oCMS_sessObj; //$oCMS_debug = true; require_once($oCMS_cfgInt["common_script_root"] . "libs/webnico/wn_file_search_0.12.class.php"); /** ********************************************************************** ** * CONFIG PART ** ********************************************************************** **/ $galleryData = $oCMS_scriptData[($oCMS_objData["obj_name"])]; // set to $oCMS_scriptData["NAME_OF_OBJECT"] /** ********************************************************************** ** * / CONFIG PART ** ********************************************************************** **/ if($galleryData["dir"] && is_dir($oCMS_cfgInt["htdocs_root"] . substr($galleryData["dir"], 1))) { // if($oCMS_sessObj->sessData["usr_id"] == "1") { // echo "

\$galleryData:

" . print_r($galleryData, true) . "
"; // } $fh = new oCMS_file_search($oCMS_cfgInt["htdocs_root"] . substr($galleryData["dir"], 1)); $fh->set_recursive($galleryData["recursive"] == "Y" ? true : false); $fh->set_db_lang($l); $fh->set_media_type("img"); if($galleryData["thumbsDir"]) { $fh->set_thumbs_dir($galleryData["thumbsDir"]); } if(!$galleryData["order"]) $galleryData["order"] = "filename"; $fh->sort_list($galleryData["order"] == "rand" ? "filename" : $galleryData["order"], $galleryData["orderType"]); // if($oCMS_sessObj->sessData["usr_id"] == "1") { // echo "

Files:

" . print_r($fh->get_filelist(), true) . "
"; // $myscript_log .= "

Files:

" . print_r($fh->get_filelist(), true) . "
"; // } if($galleryData["cat"]) { $fh->add_filter("media_charCat", intval($galleryData["cat"])); } if($galleryData["class"]) { $fh->add_filter("media_charClass", intval($galleryData["class"])); } if($galleryData["theme"]) { $fh->add_filter("media_charTheme", intval($galleryData["theme"])); } if($fh->read_filelist() == true) { $gallery_listData = $fh->get_filelist_filtered(); // if($oCMS_sessObj->sessData["usr_id"] == "1") { // echo "

\$gallery_listData:

" . print_r($gallery_listData, true) . "
"; // } $myscript_log .= "

\$gallery_listData:

" . print_r($gallery_listData, true) . "
"; $smarty->assign("gallery_listData", $gallery_listData); } // if($oCMS_sessObj->sessData["usr_id"] == "1") { // echo "

" . $fh->get_log() . "
"; // $myscript_log .= "

" . $fh->get_log() . "
"; // } if(preg_match("/greybox/i", $galleryData["tpl"])) { $smarty->assign("oCMS_includeGreyBox", true); } elseif(preg_match("/lightbox/i", $galleryData["tpl"])) { $smarty->assign("oCMS_includeLightBox", true); } elseif(preg_match("/slideshow/i", $galleryData["tpl"])) { $smarty->assign("oCMS_includeSlideshow", true); } elseif(preg_match("/cycle/i", $galleryData["tpl"])) { $smarty->assign("oCMS_includeCycle", true); } unset($galleryData, $gallery_listData); } ?>Smarty Error: Syntax error in template "file:/var/www/vhosts/ballybrado.com/httpdocs/cms/oCMS_tpl/objects/imgGallery_lightBox.tpl.inc" on line 61 "{unassign var=$gallery_listData}" unknown tag "unassign"