Beispiel #1
0
 /**
  * Returns information about a photo in an album
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public function getItem($uri)
 {
     if (!$this->exists()) {
         return false;
     }
     if ($this->isAlbum($uri)) {
         return $this->getItems($uri);
     }
     // Get the photo id
     $id = (int) EBMM::getFilename($uri);
     $photo = JTable::getInstance('Photo', 'CTable');
     $photo->load($id);
     // Get the filesize
     $size = @filesize(JPATH_ROOT . '/' . $photo->original);
     $album = JTable::getInstance('Album', 'CTable');
     $album->load($photo->albumid);
     $item = EBMM::file($uri, 'image');
     $item->place = 'jomsocial';
     $item->title = $photo->caption;
     $item->url = $photo->getOriginalURI();
     $item->path = 'jomsocial';
     $item->size = $size;
     $item->modified = $photo->created;
     $item->thumbnail = $photo->getThumbURI();
     $item->preview = $photo->getThumbURI();
     $item->size = 0;
     $item->variations = $this->getVariations($photo, $album);
     return $item;
 }