Новорічні ранки
define("PSS_GALLERY_WIDGET_PATH",MODX_BASE_PATH."assets/widgets/pss_gallery/");
define("PSS_BASE_PATH",MODX_BASE_PATH."assets/snippets/pss_gallery/");
require_once PSS_GALLERY_WIDGET_PATH.'classes/libs/PSS_Abstract_Controller.php';
require_once PSS_GALLERY_WIDGET_PATH.'classes/libs/PSS_Utils_Image.php';
require_once PSS_BASE_PATH.'classes/PSS_Gallery_Controller.php';
$pss_gallery_config['type'] = (isset($type)) ? $type : "lightbox";
$pss_gallery_config['itemTpl'] = (isset($itemTpl)) ? $itemTpl : null;
$pss_gallery_config['docId'] = (isset($docId)) ? $docId : $modx->documentIdentifier;
$pss_gallery_config['emptyShow'] = (isset($emptyShow)) ? $emptyShow : true;
$pss_gallery_config['emptyTpl'] = (isset($emptyTpl)) ? $emptyTpl : null;
$pss_gallery_config['imgClass'] = (isset($imgClass)) ? $imgClass : "";
$pss_gallery_config['hrefClass'] = (isset($hrefClass)) ? $hrefClass : "";
$pss_gallery_config["sortBy"] = (isset($sortBy)) ? $sortBy : "position"; //name,position,dateUpload
$pss_gallery_config["order"] = (isset($order)) ? $order : "asc"; //asc,desc
$pss_gallery_config["thumbnailWidth"] = (isset($thumbnailWidth)) ? $thumbnailWidth : null;
$pss_gallery_config["thumbnailHeight"] = (isset($thumbnailHeight)) ? $thumbnailHeight : null;
$pss_gallery_config["galleryWidth"] = (isset($galleryWidth)) ? $galleryWidth : 800;
$pss_gallery_config["galleryHeight"] = (isset($galleryHeight)) ? $galleryHeight : 600;
$controller = new PSS_Gallery_Controller($pss_gallery_config);
$controller->setModx($modx);
$controller->setTplFolder(MODX_BASE_PATH."assets/snippets/pss_gallery/templates/");
$controller->setLangsFolder(MODX_BASE_PATH."assets/snippets/pss_gallery/lang/");
$controller->loadLangs();
$controller->draw();