<?php
// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * @Name         Theme Joomla Power Slide Display Module
 * @URL          http://powerslide.themejoomla.com
 * @version      $Id: mod_powerslide.php 3 skashi $
 * @package      Joomla (1.5.x)
 * @subpackage   Power Slide Display Module
 * @copyright    Copyright (C) 2008-2020 Theme Joomla. All rights reserved. E & OE
 */

// Include the syndicate functions only once
require_once( 'modules'.DS.'mod_powerslide'.DS.'helper.php' );
$ps_version                          = '1.0.3';
$uri                                 =& JURI::getInstance(); // getting instance of JURI class
$images                              = '';
$checked_out                         = '';
$image_folder_path                   = $params->get( 'image_folder_path', 'images/powerslide/' );
$image_gallery_method                = $params->get( 'image_gallery_method', '1' );
$gallery_width                       = $params->get( 'image_width', '675px' );
$gallery_height                      = $params->get( 'image_height', '250px' );
$thumb_width                         = '100';
$thumb_height                        = '75';
$transition_effect                   = 'fade';
$show_title                          = $params->get( 'show_title', '1' );
$show_controls                       = $params->get( 'show_controls', '1' );
$show_carousel                       = $params->get( 'show_carousel', '1' );
$show_readmore                       = $params->get( 'show_readmore', '1' );
$autoplay                            = $params->get( 'autoplay', '1' );
$use_thumb_generator                 = $params->get( 'use_thumb_generator', '1' );
$use_mootools                        = $params->get( 'use_mootools', '0' );
$image_link_option                   = $params->get( 'image_link_option', '1' );
$carousel_text                       = $params->get( 'carousel_text', '' );
$link_color                          = $params->get( 'link_color', '' );
$title_color                         = $params->get( 'title_color', '' );
$description_color                   = $params->get( 'description_color', '' );
$bg_color                            = $params->get( 'bg_color', '' );
$delay                               = $params->get( 'delay', '6000' );
$image_thumbnail_folder_path         = $params->get( 'image_thumbnail_folder_path', '' );
$image_folder_path                   = $params->get( 'image_folder_path', 'images/powerslide/' );
$image_count                         = count($images);
$thumbnail_method                    = $params->get( 'thumbnail_method', '1' );
$fit_image_to_gallery_dimensions     = 0;
$new_target_window                   = 0;
$slide_info_height                   = $params->get( 'slide_info_height', '25%' );
$stretch_image                       = 0;
$stretch_thumbnail_image             = 0;
if( $image_gallery_method == 1 ) { //Use XML File
  $xml_path         = "modules/mod_powerslide/xml/";
  $images           = modPowerSlideHelper::getImagesFromXMLFile( $params, $xml_path );
} else if( $image_gallery_method == 2 ) { //Use folder path
	$images           = modPowerSlideHelper::getImages( $params, $image_folder_path );
}
if ( $images ) {
	require( 'modules'.DS.'mod_powerslide'.DS.'tmpl'.DS.'default.php' );
}
?>