| Current Path : /home/juvelize/www/modules/mod_lofresponsivecarousel/ |
| Current File : /home/juvelize/www/modules/mod_lofresponsivecarousel/mod_lofresponsivecarousel.php |
<?php
/*------------------------------------------------------------------------
# Lof Articles Srcoller Module for Jooml 3.0
# ------------------------------------------------------------------------
# author LandOfCoder
# copyright Copyright (C) 2013 landofcoder.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.landofcoder.com
# Technical Support: Forum - http://www.landofcoder.com/support/forum.html
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'helper.php';
$list = modRespCarouselHelper::getList( $params, $module );
// split pages following the max items display on each page.
// split pages following the max items display on each page.
$cols = (int)$params->get( 'max_items_per_row', 4 );
$maxPages = (int)$params->get( 'max_items_per_carousel', 4 );
$pages = array_chunk( $list, $maxPages );
$totalPages = count($pages);
// calculate width of each row.
// $itemWidth = 100/$maxItemsPerRow -0.1;
$tmp = $params->get( 'module_height', 'auto' );
$moduleHeight = ( $tmp=='100%' ) ? 'auto' : (int)$tmp;
$tmp = $params->get( 'module_width', 'auto' );
$moduleWidth = ( $tmp=='100%') ? 'auto': (int)$tmp;
$openTarget = $params->get( 'open_target', '_parent' );
$class = !$params->get( 'navigator_pos', 0 ) ? '':'lof-'.$params->get( 'navigator_pos', 0 );
$class .= ' '. ($params->get('display_button','horizontal')=='horizontal'?'lof-horizontal':'lof-vertical');
$thumbWidth = (int)$params->get( 'thumbnail_width', 180 );
$thumbHeight = (int)$params->get( 'thumbnail_height', 60 );
$thumbnailAlignment = $params->get( 'thumbnail_alignment', '' );
$displayButton = trim($params->get( 'display_button', '' ));
$itemLayout = 'sliding-image';
$theme = $params->get( 'theme', 'default' );
$showReadmore = $params->get( 'show_readmore', '1' );
$showTitle = $params->get( 'show_title', '1' );
$showImage = $params->get( 'show_image', '1' );
$showCommentCounter = $params->get( 'itemComments', 0 );
modRespCarouselHelper::loadMediaFiles( $params, $module, $theme );
$itemLayoutPath = modRespCarouselHelper::getItemLayoutPath($module->module, $theme, $itemLayout );
$layout = trim($theme).DS.'default';
require( JModuleHelper::getLayoutPath($module->module, $layout ) );
$isrespo = (int)$params->get("enable_responsive",1)==1?"true":"false";
$isauto= (int)$params->get("auto_start",1)==1?"true":"false";
$circular= (int)$params->get("circular",1)==1?"true":"false";
$infinite= (int)$params->get("infinite",1)==1?"true":"false";
$playStyle = $params->get("play_style","left");
if($isrespo && ($playStyle=="left"||$playStyle="right") ){
$moduleWidth = "'100%'";
}
?>