Exemplo n.º 1
0
 protected function &getPresentationImage(RokGallery_Model_Slice $slice, JRegistry $params)
 {
     $image = new stdClass();
     $image->id = $slice->id;
     $image->title = $params->get('detail_use_title_from', 'slice') == 'slice' ? $slice->title : $slice->File->title;
     $image->caption = $params->get('detail_use_caption_from', 'slice') == 'slice' ? $slice->caption : $slice->File->description;
     $image->created_at = date('j M Y', strtotime($slice->File->created_at));
     $image->updated_at = date('j M Y', strtotime($slice->updated_at));
     $image->views = $slice->File->Views->count;
     $image->loves = $slice->File->Loves->count;
     $image->thumburl = $slice->thumburl;
     $image->imageurl = $slice->imageurl;
     $image->xsize = $params->get('detail_use_dimensions_from', 'file') == 'slice' ? $slice->xsize : $slice->File->xsize;
     $image->ysize = $params->get('detail_use_dimensions_from', 'file') == 'slice' ? $slice->xsize : $slice->File->xsize;
     $image->filesize = RokGallery_Helper::decodeSize($params->get('detail_use_filesize_from', 'file') == 'slice' ? $slice->filesize : $slice->File->filesize);
     $image->fullimageurl = $slice->File->imageurl;
     $image->doilove = $slice->doilove;
     switch ($params->get('gallery_use_tags_from', 'slice')) {
         case 'slice':
             $tags =& $slice->Tags;
             break;
         case 'file':
             $tags =& $slice->File->Tags;
             break;
         case 'combined':
             $tags =& $slice->getCombinedTags();
             break;
     }
     $image->tags = array();
     foreach ($tags as $tag) {
         if (!($params->get('gallery_remove_gallery_tags', false) && in_array($tag['tag'], $slice->Gallery->filetags))) {
             $image->tags[] = $tag['tag'];
         }
     }
     return $image;
 }
Exemplo n.º 2
0
            <div class="gallery-description">
                <h1 class="image-title"><?php 
echo $file->title;
?>
</h1>
                <div class="image-pixels"><strong><?php 
echo $file->xsize;
?>
</strong>x<strong><?php 
echo $file->ysize;
?>
</strong> (<?php 
echo $file->xsize * $file->ysize;
?>
  pixels)  / <strong><?php 
echo RokGallery_Helper::decodeSize($file->filesize);
?>
</strong></div>
                <div class="image-description"><?php 
echo $file->description;
?>
</div>
                <div class="image-statusbar">
                    <div class="image-date"><?php 
echo date('j M Y (H:i)', strtotime($file->created_at));
?>
</div>
                    <div class="image-close dark button"><span><?php 
rc_e('ROKGALLERY_CLOSE');
?>
</span></div>