/home/coolpkct/www/websites/cake3.cool.rocks/admin/plugins/listviewer/listviewerimage.inc.php
<?php
/**
 * Part of Showkase web site management package
 *
 * @package Showkase
 * @author Jack Hardie {@link http://www.jhardie.com}
 * @copyright Copyright (c) 2012, SimpleViewer Inc.
 */
defined('SK_ACCESS')||die('<h1>403: Forbidden</h1>');
require_once 'classes'.DIRECTORY_SEPARATOR.'image.php';
 
/**
 * Autoviewer image
 *
 * @package Showkase
 */
class ListviewerImage extends Image
{
    
 /**
  * Create dom document to represent the image
  * @return object
  */
  public function getXml()
  {
    $dom = new domDocument('1.0', 'utf-8');
    $rootElement = $dom->createElement('image');
    $dom->appendChild($rootElement);
    
    $urlElement = $dom->createElement('url');
    $urlText = $dom->createTextNode( str_replace(array('\\', '/'), '/', $this->imagePathRelGallery));
    $urlElement->appendChild($urlText);
    $rootElement->appendChild($urlElement);
    
    $titleElement = $dom->createElement('imageTitle');
    $titleText = $dom->createCDATASection($this->imageTitle);
    $titleElement->appendChild($titleText);
    $rootElement->appendChild($titleElement);
    
    $captionElement = $dom->createElement('imageCaption');
    $captionText = $dom->createCDATASection($this->imageCaption);
    $captionElement->appendChild($captionText);
    $rootElement->appendChild($captionElement);
    
    $widthElement = $dom->createElement('width');
    $widthText = $dom->createTextNode($this->getWidth());
    $widthElement->appendChild($widthText);
    $rootElement->appendChild($widthElement);
    
    $heightElement = $dom->createElement('height');
    $heightText = $dom->createTextNode($this->getHeight());
    $heightElement->appendChild($heightText);
    $rootElement->appendChild($heightElement);
    
    return $dom; 
  }
  
 /**
  * Set image caption
  *
  * @access public
  * @return void
  * @param string caption text
  * @param string acceptable html tags
  */
  function setImageAttributes($title, $caption, $linkUrl, $linkTarget, $i, $okTags)
  {
      $this->imageCaption = $this->formatImageAttributes($caption, $i);
      $this->imageLinkUrl = $this->formatImageAttributes($linkUrl, $i);
      $this->imageTitle = $this->formatImageAttributes($title, $i);
      $this->imageLinkTarget = $linkTarget;
  }
}