// Get the gallery of the item to show $gallery = new rsgGallery($latestGalleries[$ItemIdx]); // Get the name of the item to show $ItemIdxName = $gallery->thumb->name; // Create HTML for image: get the url (with/without watermark) with img attributes if ($displayType == 1) { // *** display ***: $watermark = $rsgConfig->get('watermark'); //$imageUrl = $watermark ? waterMarker::showMarkedImage( $ItemIdxName ) : imgUtils::getImgDisplayPath( $ItemIdxName ); $imageUrl = $watermark ? waterMarker::showMarkedImage($ItemIdxName) : imgUtils::getImgDisplay($ItemIdxName); $HTML = '<img class="rsg2-displayImage" src="' . $imageUrl . '" alt="' . $ItemIdxName . '" title="' . $ItemIdxName . '" ' . $imgAttributes . '/>'; } elseif ($displayType == 2) { // *** original *** $watermark = $rsgConfig->get('watermark'); //$imageOriginalUrl = $watermark ? waterMarker::showMarkedImage( $ItemIdxName, 'original' ) : imgUtils::getImgOriginalPath( $ItemIdxName ); $imageOriginalUrl = $watermark ? waterMarker::showMarkedImage($ItemIdxName, 'original') : imgUtils::getImgOriginal($ItemIdxName); $HTML = '<img class="rsg2-displayImage" src="' . $imageOriginalUrl . '" alt="' . $ItemIdxName . '" title="' . $ItemIdxName . '" ' . $imgAttributes . '/>'; } else { // *** thumb *** $HTML = galleryUtils::getThumb($gallery->get('id'), $imageHeight, $imageWidth, "mod_rsgallery2_latest_galleries_img"); // thumbid, height, width, class } $name = $gallery->name; $date = $gallery->date; // Show it ?> <div class="mod_rsgallery2_latest_galleries_attributes" <?php echo $divAttributes; ?> > <div class="mod_rsgallery2_latest_galleries-cell">
<?php defined('_JEXEC') or die('Restricted access'); $item = $this->currentItem; $watermark = $rsgConfig->get('watermark'); $imageOriginalUrl = $watermark ? waterMarker::showMarkedImage($item->name, 'original') : imgUtils::getImgOriginal($item->name); $imageUrl = $watermark ? waterMarker::showMarkedImage($item->name) : imgUtils::getImgDisplay($item->name); switch ($rsgConfig->get('displayPopup')) { //No popup case 0: ?> <img class="rsg2-displayImage" src="<?php echo $imageUrl; ?> " alt="<?php echo $item->name; ?> " title="<?php echo $item->name; ?> " /> <?php break; //Normal popup //Normal popup case 1: ?> <a href="<?php echo $imageOriginalUrl; ?> " target="_blank">
/** * shows the image */ function _showImageBox($name, $descr) { global $rsgConfig; if ($rsgConfig->get('watermark') == true) { ?> <img class="rsg2-displayImage" src="<?php echo waterMarker::showMarkedImage($name); ?> " alt="<?php echo $title; ?> " title="<?php echo $title; ?> " /> <?php } else { ?> <img class="rsg2-displayImage" src="<?php echo imgUtils::getImgDisplay($name); ?> " alt="<?php echo $title; ?> " title="<?php echo $title; ?> " /> <?php } }