示例#1
0
<?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">
示例#2
0
    /**
     * 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 
        }
    }