Esempio n. 1
0
 function displayThumbOrFolder($filename, $size, $rightDisplayKey)
 {
     $path = PhocaGalleryHelperFront::getPathSet();
     $file_thumbnail = PhocaGalleryHelperFront::getThumbnailName($filename, $size);
     $displayIconRandomImage = PhocaGalleryHelperFront::getDisplayIconRandomImage();
     $imageBackgroundShadow = PhocaGalleryHelperFront::getImageBackgroundShadow();
     $icon =& PhocaGalleryHelperFront::getFormatIcon();
     // 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
     if (!JFile::exists($file_thumbnail['abs']) || $displayIconRandomImage != 1) {
         if ($imageBackgroundShadow != 'none') {
             $file_thumbnail['rel'] = $path['front_image'] . 'icon-folder-medium' . $key . '.' . $icon;
         } else {
             $file_thumbnail['rel'] = $path['front_image'] . 'icon-folder-medium' . $key . '.' . $icon;
         }
     }
     return $file_thumbnail;
 }