public static
displayCategoryExtImgOrFolder
(mixed $extS, mixed $extM, mixed $size, mixed $rightDisplayKey, mixed $param = 'display_category_icon_image')
/*
* BACK FOLDER - CATEGORY VIEW
*/
/*
public static function displayBackFolder ($size, $rightDisplayKey) {
$fileThumbnail = new CMSObject;
// if category is not accessable, display the key in the image:
$key = '';
if ((int)$rightDisplayKey == 0) {
$key = '-key';
}
phocagalleryimport('phocagallery.image.image');
phocagalleryimport('phocagallery.path.path');
$path = PhocaGalleryPath::getPath();
$fileThumbnail->abs = '';
$paramsC = ComponentHelper::getParams('com_phocagallery') ;
if ( $paramsC->get( 'image_background_shadow' ) != 'None' ) {
$fileThumbnail->rel = $path->image_rel_front . 'icon-up-images'.$key.'.png';
} else {
$fileThumbnail->rel = $path->image_rel_front . 'icon-up-images'.$key.'.png';
}
return $fileThumbnail->rel;
}*/
/*
* IMAGE OR FOLDER - CATEGORY VIEW - EXTERNAL IMAGE
*/
public static function displayCategoryExtImgOrFolder($extS, $extM, $size, $rightDisplayKey, $param = 'display_category_icon_image')
{
phocagalleryimport('phocagallery.image.image');
phocagalleryimport('phocagallery.path.path');
$paramsC = ComponentHelper::getParams('com_phocagallery');
$path = PhocaGalleryPath::getPath();
$fileThumbnail = new CMSObject();
$fileThumbnail->extm = $extM;
$fileThumbnail->exts = $extS;
$fileThumbnail->linkthumbnailpath = $extS;
// in case external image doesn't exist or the category is locked
$displayCategoryIconImage = $paramsC->get($param, 0);
$imageBackgroundShadow = $paramsC->get('image_background_shadow', 'None');
// if category is not accessable, display the key in the image:
$key = '';
if ((int) $rightDisplayKey == 0) {
$key = '-key';
}
//Thumbnail_file doesn't exists or user wants to display folder icon
$fileThumbnail->extpic = true;
if ($size == 'medium') {
if ($extM == '' || (int) $rightDisplayKey == 0 || $displayCategoryIconImage != 1) {
if ($imageBackgroundShadow != 'None') {
$fileThumbnail->linkthumbnailpath = $path->image_rel_front . 'icon-folder-medium' . $key . '.png';
} else {
$fileThumbnail->linkthumbnailpath = $path->image_rel_front . 'icon-folder-medium' . $key . '.png';
}
$fileThumbnail->extpic = false;
}
}
if ($size == 'small') {
if ($extS == '' || (int) $rightDisplayKey == 0 || $displayCategoryIconImage != 1) {
if ($imageBackgroundShadow != 'None') {
$fileThumbnail->linkthumbnailpath = $path->image_rel_front . 'icon-folder-small' . $key . '.png';
} else {
$fileThumbnail->linkthumbnailpath = $path->image_rel_front . 'icon-folder-small' . $key . '.png';
}
$fileThumbnail->extpic = false;
}
}
return $fileThumbnail;
}