public function tdImage($item, $button, $txtE, $class = '', $avatarAbs = '', $avatarRel = '') { $o = '<td class="' . $class . '">' . "\n"; $o .= '<div class="phocagallery-box-file">' . "\n" . ' <center>' . "\n" . ' <div class="phocagallery-box-file-first">' . "\n" . ' <div class="phocagallery-box-file-second">' . "\n" . ' <div class="phocagallery-box-file-third">' . "\n" . ' <center>' . "\n"; if ($avatarAbs != '' && $avatarRel != '') { // AVATAR if (JFile::exists($avatarAbs . $item->avatar)) { $o .= '<a class="' . $button->modalname . '"' . ' title="' . $button->text . '"' . ' href="' . JURI::root() . $avatarRel . $item->avatar . '" ' . ' rel="' . $button->options . '" >' . '<img src="' . JURI::root() . $avatarRel . $item->avatar . '?imagesid=' . md5(uniqid(time())) . '" alt="' . JText::_($txtE) . '" />' . '</a>'; } else { $o .= JHTML::_('image', '/media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif', ''); } } else { // PICASA if (isset($item->extid) && $item->extid != '') { $resW = explode(',', $item->extw); $resH = explode(',', $item->exth); $correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 50, 50); $imgLink = $item->extl; $o .= '<a class="' . $button->modalname . '" title="' . $button->text . '" href="' . $imgLink . '" rel="' . $button->options . '" >' . '<img src="' . $item->exts . '?imagesid=' . md5(uniqid(time())) . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="' . JText::_($txtE) . '" />' . '</a>' . "\n"; } else { if (isset($item->fileoriginalexist) && $item->fileoriginalexist == 1) { $imageRes = PhocaGalleryImage::getRealImageSize($item->filename, 'small'); $correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50); $imgLink = PhocaGalleryFileThumbnail::getThumbnailName($item->filename, 'large'); $o .= '<a class="' . $button->modalname . '" title="' . $button->text . '" href="' . JURI::root() . $imgLink->rel . '" rel="' . $button->options . '" >' . '<img src="' . JURI::root() . $item->linkthumbnailpath . '?imagesid=' . md5(uniqid(time())) . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="' . JText::_($txtE) . '" />' . '</a>' . "\n"; } else { $o .= JHTML::_('image', 'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif', ''); } } } $o .= ' </center>' . "\n" . ' </div>' . "\n" . ' </div>' . "\n" . ' </div>' . "\n" . ' </center>' . "\n" . '</div>' . "\n"; $o .= '</td>' . "\n"; return $o; }
// - - - - - - - - - - // Image $fileOriginal = PhocaGalleryFile::getFileOriginal($this->item->filename); if (!JFile::exists($fileOriginal)) { $this->item->fileoriginalexist = 0; } else { $fileThumb = PhocaGalleryFileThumbnail::getOrCreateThumbnail($this->item->filename, '', 0, 0, 0); $this->item->linkthumbnailpath = $fileThumb['thumb_name_m_no_rel']; $this->item->fileoriginalexist = 1; } echo '<div style="float:right;margin:5px;">'; // PICASA if (isset($this->item->extid) && $this->item->extid != '') { $resW = explode(',', $this->item->extw); $resH = explode(',', $this->item->exth); $correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 100, 100); $imgLink = $this->item->extl; echo '<img class="img-polaroid" src="' . $this->item->exts . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="" />'; } else { if (isset($this->item->fileoriginalexist) && $this->item->fileoriginalexist == 1) { $imageRes = PhocaGalleryImage::getRealImageSize($this->item->filename, 'medium'); //$correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 100, 100); $imgLink = PhocaGalleryFileThumbnail::getThumbnailName($this->item->filename, 'large'); // TODO check the image echo '<img class="img-polaroid" style="max-width:100px;" src="' . JURI::root() . $this->item->linkthumbnailpath . '?imagesid=' . md5(uniqid(time())) . '" alt="" />' . '</a>'; } else { } } echo '</div>'; echo '</div>'; //end span2
<input type="hidden" id="cb<?php echo $k; ?> " name="cid[]" value="<?php echo $row->id; ?> " /> <?php echo $this->tmpl['imagepagination']->getRowOffset($i); ?> </td> <td align="center" valign="middle"> <?php $row->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($row->filename, 'small'); $imageRes = PhocaGalleryImage::getRealImageSize($row->filename, 'small'); $correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50); //echo JHtml::_( 'image', $row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())),'', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'])); echo '<img src="' . JURI::root() . $row->linkthumbnailpath . '?imagesid=' . md5(uniqid(time())) . '" width="' . $correctImageRes['width'] . '" height="' . $correctImageRes['height'] . '" alt="" />'; ?> </td> <td><a href="<?php echo $linkEdit; ?> " title="<?php echo JText::_('COM_PHOCAGALLERY_EDIT_IMAGE'); ?> "><?php echo $row->title; ?> </a></td>
<?php defined('_JEXEC') or die('Restricted access'); ?> <table border="0" width="100%"> <tr> <td align="center" valign="middle" height="486"><?php if (isset($this->file->extid) && $this->file->extid != '') { $resW = explode(',', $this->file->extw); $resH = explode(',', $this->file->exth); $correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[0], $resH[0], 640, 480); echo '<a href="#" onclick="SqueezeBox.close();">' . JHTML::_('image', $this->file->extl . '?imagesid=' . md5(uniqid(time())), '') . '</a>'; } else { if ($this->file->linkthumbnailpath == '') { echo '<center style="font-size:large;font-weight:bold;color:#b3b3b3;font-family: Helvetica, sans-serif;">' . JText::_('COM_PHOCAGALLERY_FILENAME_NOT_EXISTS') . '</center>'; } else { //echo '<a href="#" onclick="SqueezeBox.close();">'. JHTML::_('image', $this->file->linkthumbnailpath .'?imagesid='.md5(uniqid(time())), '').'</a>'; echo '<a href="#" onclick="SqueezeBox.close();"><img src="' . JURI::root() . $this->file->linkthumbnailpath . '?imagesid=' . md5(uniqid(time())) . '" alt="" /></a>'; } } ?> </td> </tr> </table>