Beispiel #1
0
 function _determineResources()
 {
     global $rsgConfig;
     require_once JPATH_RSGALLERY2_ADMIN . '/includes/video.utils.php';
     $gallery_path = $this->gallery->getPath("/");
     $thumb = $rsgConfig->get('imgPath_thumb') . $gallery_path . videoUtils::getImgNameThumb($this->name);
     $display = $rsgConfig->get('imgPath_display') . $gallery_path . videoUtils::getImgNameDisplay($this->name);
     $original = $rsgConfig->get('imgPath_original') . $gallery_path . $this->name;
     if (!JFile::exists(JPATH_ROOT . $original)) {
         $this->original = $display;
     }
     $this->thumb = new rsgResource($thumb);
     $this->display = new rsgResource($display);
     $this->original = new rsgResource($original);
 }
Beispiel #2
0
 function determineHandle($filename)
 {
     require_once JPATH_RSGALLERY2_ADMIN . '/includes/audio.utils.php';
     require_once JPATH_RSGALLERY2_ADMIN . '/includes/video.utils.php';
     $ext = strtolower(JFile::getExt($filename));
     if (in_array($ext, imgUtils::allowedFileTypes())) {
         return 'imgUtils';
     } else {
         if (in_array($ext, videoUtils::allowedFileTypes())) {
             return 'videoUtils';
         } else {
             if (in_array($ext, audioUtils::allowedFileTypes())) {
                 return 'audioUtils';
             } else {
                 return false;
             }
         }
     }
 }