mirror of
https://github.com/agenceagerix/mod_agx_slideshow.git
synced 2024-12-22 08:28:54 +00:00
Initial commit
This commit is contained in:
parent
29f4bdf060
commit
338cff68ec
119
helper.php
Normal file
119
helper.php
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_agx_slideshow
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');
|
||||
|
||||
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
|
||||
|
||||
JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel');
|
||||
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Helper for mod_agx_slideshow
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
abstract class ModAgxSlideshowHelper
|
||||
{
|
||||
/**
|
||||
* Retrieve a list of article
|
||||
*
|
||||
* @param \Joomla\Registry\Registry &$params module parameters
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public static function getList(&$params)
|
||||
{
|
||||
// Get the dbo
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Get an instance of the generic articles model
|
||||
$model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
|
||||
|
||||
// Set application parameters in model
|
||||
$app = JFactory::getApplication();
|
||||
$appParams = $app->getParams();
|
||||
$model->setState('params', $appParams);
|
||||
|
||||
// Set the filters based on the module params
|
||||
$model->setState('list.start', 0);
|
||||
$model->setState('list.limit', (int) $params->get('count', 5));
|
||||
$model->setState('filter.published', 1);
|
||||
|
||||
// This module does not use tags data
|
||||
$model->setState('load_tags', false);
|
||||
|
||||
// Access filter
|
||||
$access = !JComponentHelper::getParams('com_content')->get('show_noauth');
|
||||
$authorised = JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id'));
|
||||
$model->setState('filter.access', $access);
|
||||
|
||||
// Category filter
|
||||
$model->setState('filter.category_id', $params->get('catid', array()));
|
||||
|
||||
/*
|
||||
$ordering = 'a.ordering';
|
||||
$dir = 'ASC';
|
||||
*/
|
||||
// Set ordering
|
||||
$order_map = array(
|
||||
'm_dsc' => 'a.modified DESC, a.created',
|
||||
'c_dsc' => 'a.created',
|
||||
'p_dsc' => 'a.publish_up',
|
||||
'ordering' => 'a.ordering ASC, a.id',
|
||||
'random' => $db->getQuery(true)->Rand(),
|
||||
);
|
||||
|
||||
$ordering = ArrayHelper::getValue($order_map, $params->get('ordering'), 'a.publish_up');
|
||||
$dir = 'DESC';
|
||||
|
||||
$model->setState('list.ordering', $ordering);
|
||||
$model->setState('list.direction', $dir);
|
||||
|
||||
$items = $model->getItems();
|
||||
|
||||
|
||||
foreach ($items as &$item)
|
||||
{
|
||||
$item->slug = $item->id . ':' . $item->alias;
|
||||
|
||||
/** @deprecated Catslug is deprecated, use catid instead. 4.0 */
|
||||
$item->catslug = $item->catid . ':' . $item->category_alias;
|
||||
|
||||
if ($access || in_array($item->access, $authorised))
|
||||
{
|
||||
// We know that user has the privilege to view the article
|
||||
$item->link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language));
|
||||
}
|
||||
else
|
||||
{
|
||||
$item->link = JRoute::_('index.php?option=com_users&view=login');
|
||||
}
|
||||
|
||||
$fields = FieldsHelper::getFields('com_content.article', $item, true);
|
||||
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$item->fields[$field->name] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
echo '<pre>';
|
||||
print_r($items[0]->fields['agx-btnstyle']);
|
||||
echo '</pre>';
|
||||
*/
|
||||
return $items;
|
||||
}
|
||||
}
|
7
languages/en-GB/en-GB.mod_agx_slideshow.ini
Normal file
7
languages/en-GB/en-GB.mod_agx_slideshow.ini
Normal file
@ -0,0 +1,7 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8
|
||||
|
||||
MOD_AGX_SLIDESHOW="Agerix - Slideshow"
|
||||
MOD_AGX_SLIDESHOW_XML_DESCRIPTION="<img src='https://agerix.fr/images/logo_vecto_green-180-71.png'><h5>Ce module vous permet d'utiliser les articles de Joomla pour créer un slideshow compatible UiKit v2 & 3</h5>"
|
7
languages/en-GB/en-GB.mod_agx_slideshow.sys.ini
Normal file
7
languages/en-GB/en-GB.mod_agx_slideshow.sys.ini
Normal file
@ -0,0 +1,7 @@
|
||||
; Joomla! Project
|
||||
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
|
||||
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
|
||||
; Note : All ini files need to be saved as UTF-8
|
||||
|
||||
MOD_AGX_SLIDESHOW="Agerix - Slideshow"
|
||||
MOD_AGX_SLIDESHOW_XML_DESCRIPTION="Ce module vous permet d'utiliser les articles de Joomla pour créer un slideshow compatible UiKit v2 & 3"
|
18
mod_agx_slideshow.php
Normal file
18
mod_agx_slideshow.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_agx_slideshow
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the latest functions only once
|
||||
JLoader::register('ModAgxSlideshowHelper', __DIR__ . '/helper.php');
|
||||
|
||||
$list = ModAgxSlideshowHelper::getList($params);
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
require JModuleHelper::getLayoutPath('mod_agx_slideshow', $params->get('layout', 'default'));
|
260
mod_agx_slideshow.xml
Normal file
260
mod_agx_slideshow.xml
Normal file
@ -0,0 +1,260 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="module" version="3.1" client="site" method="upgrade">
|
||||
<name>mod_agx_slideshow</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>October 2018</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<authorEmail>emmanuel.danan@agerix.fr</authorEmail>
|
||||
<authorUrl>www.agerix.fr</authorUrl>
|
||||
<version>1.0.1</version>
|
||||
<description>MOD_AGX_SLIDESHOW_XML_DESCRIPTION</description>
|
||||
|
||||
<files>
|
||||
<filename module="mod_agx_slideshow">mod_agx_slideshow.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<folder>tmpl</folder>
|
||||
<folder>languages</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">languages/en-GB/en-GB.mod_agx_slideshow.ini</language>
|
||||
<language tag="en-GB">languages/en-GB/en-GB.mod_agx_slideshow.sys.ini</language>
|
||||
</languages>
|
||||
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic" label="Paramètres">
|
||||
|
||||
<field
|
||||
name="catid"
|
||||
type="category"
|
||||
extension="com_content"
|
||||
show_root="1"
|
||||
label="Sélectionner une categorie"
|
||||
description="Sélectionner la catégorie à afficher." />
|
||||
|
||||
<field
|
||||
name="count"
|
||||
type="number"
|
||||
label="Nombre d'éléments"
|
||||
description="Sélectionner le nombre d'éléments"
|
||||
default="5"
|
||||
filter="integer"
|
||||
/>
|
||||
<field
|
||||
name="ordering"
|
||||
type="list"
|
||||
label="Trier par"
|
||||
description="Trier les éléments par"
|
||||
default="p_dsc"
|
||||
>
|
||||
<option value="c_dsc">Derniers ajoutés en premier</option>
|
||||
<option value="m_dsc">Derniers modifiés en premier</option>
|
||||
<option value="p_dsc">Derniers publiés en premier</option>
|
||||
<option value="ordering">Classement de la catégorie</option>
|
||||
<option value="random">Aléatoire</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
<fieldset name="options" label="Paramètres">
|
||||
|
||||
<field
|
||||
name="agx_largeur"
|
||||
type="text"
|
||||
default=""
|
||||
label="Largeur"
|
||||
description="Choisissez une largeur (ça aura de l'effet sur l'optimisation des images et leur homotétie"
|
||||
/>
|
||||
<field
|
||||
name="agx_hauteur"
|
||||
type="text"
|
||||
default=""
|
||||
label="Hauteur"
|
||||
description="Choisissez une hauteur (ça aura de l'effet sur l'optimisation des images et leur homotétie"
|
||||
/>
|
||||
<field
|
||||
type="spacer"
|
||||
name="separateur"
|
||||
label="<b>Paramètres des slides</b>" />
|
||||
<field
|
||||
name="agx_animation"
|
||||
type="list"
|
||||
label="Animation"
|
||||
description="Choisissez un type d'animation"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="fade"
|
||||
>
|
||||
<option value="fade">Fade</option>
|
||||
<option value="scale">Scale</option>
|
||||
<option value="scroll">Scroll</option>
|
||||
<option value="swipe">Swipe</option>
|
||||
<option value="fold">Fold</option>
|
||||
<option value="puzzle">Puzzle</option>
|
||||
<option value="boxes">Boxes</option>
|
||||
<option value="swipe">Swipe</option>
|
||||
</field>
|
||||
<field
|
||||
name="agx_duration"
|
||||
type="text"
|
||||
default="500"
|
||||
label="Durée"
|
||||
description="Choisissez une durée"
|
||||
/>
|
||||
<field
|
||||
name="agx_height"
|
||||
type="text"
|
||||
default="auto"
|
||||
label="Hauteur"
|
||||
description="Choisissez une hauteur. auto ou valeur numérique."
|
||||
/>
|
||||
<field
|
||||
name="agx_autoplay"
|
||||
type="radio"
|
||||
label="Lecture automatique"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="agx_pauseOnHover"
|
||||
type="radio"
|
||||
label="Pause au survol."
|
||||
description="Pause autoplay when hovering a slideshow."
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="agx_autoplayInterval"
|
||||
type="text"
|
||||
default="7000"
|
||||
label="Animation"
|
||||
description="Defines the timespan between switching slideshow items."
|
||||
/>
|
||||
<field
|
||||
name="agx_videoautoplay"
|
||||
type="radio"
|
||||
label="Video automatique"
|
||||
description="Defines whether or not a video starts automatically."
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="agx_videomute"
|
||||
type="radio"
|
||||
label="Vidéo silencieuse"
|
||||
description="Defines whether or not a video is muted."
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="agx_kenburns"
|
||||
type="radio"
|
||||
label="Kenburns"
|
||||
description="Defines whether or not the Ken Burns effect is active."
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
type="spacer"
|
||||
name="separateur2"
|
||||
label="<b>Paramètres de navigation</b>" />
|
||||
<field
|
||||
name="agx_nav_arrows"
|
||||
type="radio"
|
||||
label="Fleches de navigation"
|
||||
description="Afficher/Masquer les fleches de navigation"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="agx_nav_color"
|
||||
type="text"
|
||||
default="rgba(255,255,255,0.7)"
|
||||
label="Couleur des fleches"
|
||||
description="Choisir la couleur des fleches"
|
||||
/>
|
||||
<field
|
||||
name="agx_nav_bubbles"
|
||||
type="radio"
|
||||
label="Bulles de navigation"
|
||||
description="Afficher/Masquer les bulles de navigation"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="advanced">
|
||||
<field
|
||||
name="layout"
|
||||
type="modulelayout"
|
||||
label="JFIELD_ALT_LAYOUT_LABEL"
|
||||
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="moduleclass_sfx"
|
||||
type="textarea"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
|
||||
rows="3"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="list"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC"
|
||||
default="1"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="1">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="cache_time"
|
||||
type="number"
|
||||
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
|
||||
default="900"
|
||||
filter="integer"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="cachemode"
|
||||
type="hidden"
|
||||
default="static"
|
||||
>
|
||||
<option value="static"></option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
136
tmpl/default.php
Normal file
136
tmpl/default.php
Normal file
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_agx_slideshow
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
$slideshow_params = array();
|
||||
$slideshow_params[] = 'animation:' . '\'' . $params->get('agx_animation', 'fade') . '\'';
|
||||
$slideshow_params[] = 'duration:' . $params->get('agx_duration', '500');
|
||||
$slideshow_params[] = 'height:' . '\'' . $params->get('agx_height', 'auto') . '\'';
|
||||
$slideshow_params[] = 'autoplayInterval:' . $params->get('agx_autoplayInterval', '7000');
|
||||
$slideshow_params[] = 'autoplay:' . ($params->get('agx_autoplay', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'pauseOnHover:' . ($params->get('agx_pauseOnHover', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'videoautoplay:' . ($params->get('agx_videoautoplay', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'videomute:' . ($params->get('agx_videomute', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'kenburns:' . ($params->get('agx_kenburns', '1') ? 'true' : 'false');
|
||||
?>
|
||||
|
||||
<div class="uk-slidenav-position uk-overlay-active" data-uk-slideshow="{<?php echo implode(', ', $slideshow_params); ?>}">
|
||||
<ul class="uk-slideshow">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<li>
|
||||
|
||||
<?php
|
||||
/*
|
||||
// Redimensionnement dynamique des images
|
||||
jimport('joomla.filesystem.folder');
|
||||
$image = $item->fields['agx-image']->rawvalue;
|
||||
|
||||
$widths = array(
|
||||
800,
|
||||
1000,
|
||||
1200,
|
||||
1600,
|
||||
1920,
|
||||
2560,
|
||||
4000
|
||||
);
|
||||
|
||||
$imageurl = explode('/', $image);
|
||||
$filename = end($imageurl);
|
||||
$pathsrc = implode('/', array_diff($imageurl, array($filename)));
|
||||
|
||||
//echo $filename . '<br>' . $pathsrc . '<br>';
|
||||
|
||||
$panel = new StdClass();
|
||||
|
||||
if (!JFolder::exists(JPATH_SITE . '/' . $pathsrc . '/thumbs')) JFolder::create(JPATH_SITE . '/' . $pathsrc . '/thumbs');
|
||||
$pathdest = $pathsrc . '/thumbs';
|
||||
|
||||
$src = JPATH_SITE . '/' . $pathsrc . '/' . $filename;
|
||||
$thumb = JPATH_SITE . '/' . $pathdest . '/' . $filename;
|
||||
|
||||
$panel->Thumb = $pathdest . '/' . $filename;
|
||||
$panel->Number = $nr;
|
||||
$panel->ImageProperties = array();
|
||||
|
||||
$imageProperties = getimagesize($src);
|
||||
$filenameParts = explode('.', $filename);
|
||||
|
||||
$panel->ImageProperties['extension'] = array_reverse($filenameParts)[0];
|
||||
$panel->ImageProperties['width'] = $imageProperties[0];
|
||||
$panel->ImageProperties['height'] = $imageProperties[1];
|
||||
$panel->ImageProperties['mime'] = $imageProperties['mime'];
|
||||
$panel->ImageProperties['name'] = str_ireplace('.'.$panel->ImageProperties['extension'], '', $filename);
|
||||
$panel->ImageProperties['path_src'] = JPATH_SITE . '/' . $pathsrc;
|
||||
$panel->ImageProperties['path_dest'] = JPATH_SITE . '/' . $pathdest;
|
||||
|
||||
$sources = array();
|
||||
$srcset = array();
|
||||
|
||||
foreach ($widths as $w)
|
||||
{
|
||||
if ((int)$w <= (int)$panel->ImageProperties['width'])
|
||||
{
|
||||
$dest = $panel->ImageProperties['path_dest'] . '/' . $panel->ImageProperties['name'] . '-' . $w . 'w.' . $panel->ImageProperties['extension'];
|
||||
if (!file_exists($dest))
|
||||
{
|
||||
$thumbnail = new Imagick($src);
|
||||
$thumbnail->resizeImage($w,0,Imagick::FILTER_CATROM,1);
|
||||
$thumbnail->writeImage($dest);
|
||||
$thumbnail->destroy();
|
||||
}
|
||||
$sources[$w.'w'] = $pathdest . '/' . $panel->ImageProperties['name'] . '-' . $w . 'w.' . $panel->ImageProperties['extension'];
|
||||
$srcset[] = JURI::root() . $pathdest . '/' . $panel->ImageProperties['name'] . '-' . $w . 'w.' . $panel->ImageProperties['extension'] . ' ' . $w . 'w';
|
||||
}
|
||||
}
|
||||
|
||||
$panel->ImageProperties['sources'] = $sources;
|
||||
$panel->ImageProperties['srcset'] = $srcset;
|
||||
*/
|
||||
?>
|
||||
|
||||
<img src="<?php echo $item->fields['agx-image']->rawvalue; ?>" width="<?php echo $params->get('agx_largeur', '800'); ?>" height="<?php echo $params->get('agx_hauteur', '600'); ?>" alt="">
|
||||
<!--
|
||||
<img
|
||||
src="<?php echo $panel->ImageProperties['sources']['400w']; ?>"
|
||||
width="<?php echo $params->get('agx_largeur', '800'); ?>"
|
||||
height="<?php echo $params->get('agx_hauteur', '600'); ?>"
|
||||
alt="<?php echo $image_alt; ?>"
|
||||
srcset="<?php echo implode(', ', $panel->ImageProperties['srcset']); ?>"
|
||||
sizes="(min-width: 960px) 50vw, 100vw"
|
||||
/>
|
||||
-->
|
||||
|
||||
<div class="uk-overlay-panel uk-overlay-background uk-flex uk-flex-center uk-flex-middle uk-text-center">
|
||||
<div class="uk-width-1-2 uk-container-center">
|
||||
<?php if ($item->fields['agx-title']->rawvalue) : ?>
|
||||
<h2><?php echo $item->fields['agx-title']->rawvalue; ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($item->fields['agx-description']->rawvalue) : ?>
|
||||
<p><?php echo $item->fields['agx-description']->rawvalue; ?><p>
|
||||
<?php endif; ?>
|
||||
<?php if ($item->fields['agx-btntext']->rawvalue) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?Itemid=' . $item->fields['agx-btnlink']->rawvalue); ?>" class="uk-button uk-button-<?php echo $item->fields['agx-btnsize']->rawvalue[0]; ?> uk-button-<?php echo $item->fields['agx-btnstyle']->rawvalue[0]; ?>"><?php echo $item->fields['agx-btntext']->rawvalue; ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if ($params->get('agx_nav_arrows', '1')) : ?>
|
||||
<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous" data-uk-slideshow-item="previous" style="color: <?php echo $params->get('agx_nav_color', 'rgba(255,255,255,0.7)'); ?>"></a>
|
||||
<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next" data-uk-slideshow-item="next" style="color: <?php echo $params->get('agx_nav_color', 'rgba(255,255,255,0.7)'); ?>"></a>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('agx_nav_bubbles', '1')) : ?>
|
||||
<ul class="uk-dotnav uk-dotnav-contrast uk-position-bottom uk-flex-center">
|
||||
<?php foreach ($list as $i => $item) : ?>
|
||||
<li data-uk-slideshow-item="<?php echo $i; ?>"><a href="#"><?php echo $item->title; ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
56
tmpl/sans-overlay-interne.php
Normal file
56
tmpl/sans-overlay-interne.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_agx_slideshow
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
$slideshow_params = array();
|
||||
$slideshow_params[] = 'animation:' . '\'' . $params->get('agx_animation', 'fade') . '\'';
|
||||
$slideshow_params[] = 'duration:' . $params->get('agx_duration', '500');
|
||||
$slideshow_params[] = 'height:' . '\'' . $params->get('agx_height', 'auto') . '\'';
|
||||
$slideshow_params[] = 'autoplayInterval:' . $params->get('agx_autoplayInterval', '7000');
|
||||
$slideshow_params[] = 'autoplay:' . ($params->get('agx_autoplay', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'pauseOnHover:' . ($params->get('agx_pauseOnHover', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'videoautoplay:' . ($params->get('agx_videoautoplay', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'videomute:' . ($params->get('agx_videomute', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'kenburns:' . ($params->get('agx_kenburns', '1') ? 'true' : 'false');
|
||||
?>
|
||||
|
||||
<div class="uk-slidenav-position uk-overlay-active" data-uk-slideshow="{<?php echo implode(', ', $slideshow_params); ?>}">
|
||||
<ul class="uk-slideshow">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<li>
|
||||
<img src="<?php echo $item->fields['agx-image']->rawvalue; ?>" width="<?php echo $params->get('agx_largeur', '800'); ?>" height="<?php echo $params->get('agx_hauteur', '600'); ?>" alt="">
|
||||
<div class="uk-overlay-panel uk-flex uk-flex-center uk-flex-middle uk-text-center">
|
||||
<div class="uk-width-3-4 uk-container-center">
|
||||
<div class="agx-overlay-black">
|
||||
<?php if ($item->fields['agx-title']->rawvalue) : ?>
|
||||
<h2><?php echo $item->fields['agx-title']->rawvalue; ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($item->fields['agx-description']->rawvalue) : ?>
|
||||
<?php echo $item->fields['agx-description']->rawvalue; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($item->fields['agx-btntext']->rawvalue) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?Itemid=' . $item->fields['agx-btnlink']->rawvalue); ?>" class="uk-button uk-button-<?php echo $item->fields['agx-btnsize']->rawvalue[0]; ?> uk-button-<?php echo $item->fields['agx-btnstyle']->rawvalue[0]; ?>"><?php echo $item->fields['agx-btntext']->rawvalue; ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if ($params->get('agx_nav_arrows', '1')) : ?>
|
||||
<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous" data-uk-slideshow-item="previous" style="color: <?php echo $params->get('agx_nav_color', 'rgba(255,255,255,0.7)'); ?>"></a>
|
||||
<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next" data-uk-slideshow-item="next" style="color: <?php echo $params->get('agx_nav_color', 'rgba(255,255,255,0.7)'); ?>"></a>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('agx_nav_bubbles', '1')) : ?>
|
||||
<ul class="uk-dotnav uk-dotnav-contrast uk-position-bottom uk-flex-center">
|
||||
<?php foreach ($list as $i => $item) : ?>
|
||||
<li data-uk-slideshow-item="<?php echo $i; ?>"><a href="#"><?php echo $item->title; ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
56
tmpl/sans-overlay.php
Normal file
56
tmpl/sans-overlay.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_agx_slideshow
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
$slideshow_params = array();
|
||||
$slideshow_params[] = 'animation:' . '\'' . $params->get('agx_animation', 'fade') . '\'';
|
||||
$slideshow_params[] = 'duration:' . $params->get('agx_duration', '500');
|
||||
$slideshow_params[] = 'height:' . '\'' . $params->get('agx_height', 'auto') . '\'';
|
||||
$slideshow_params[] = 'autoplayInterval:' . $params->get('agx_autoplayInterval', '7000');
|
||||
$slideshow_params[] = 'autoplay:' . ($params->get('agx_autoplay', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'pauseOnHover:' . ($params->get('agx_pauseOnHover', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'videoautoplay:' . ($params->get('agx_videoautoplay', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'videomute:' . ($params->get('agx_videomute', '1') ? 'true' : 'false');
|
||||
$slideshow_params[] = 'kenburns:' . ($params->get('agx_kenburns', '1') ? 'true' : 'false');
|
||||
?>
|
||||
|
||||
<div class="uk-slidenav-position uk-overlay-active" data-uk-slideshow="{<?php echo implode(', ', $slideshow_params); ?>}">
|
||||
<ul class="uk-slideshow">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<li>
|
||||
<img src="<?php echo $item->fields['agx-image']->rawvalue; ?>" width="<?php echo $params->get('agx_largeur', '800'); ?>" height="<?php echo $params->get('agx_hauteur', '600'); ?>" alt="">
|
||||
<div class="uk-overlay-panel uk-flex uk-flex-center uk-flex-middle uk-text-center">
|
||||
<div class="uk-width-medium-1-2 uk-width-small-2-3 uk-container-center">
|
||||
<div class="agx-overlay-black">
|
||||
<?php if ($item->fields['agx-title']->rawvalue) : ?>
|
||||
<h2><?php echo $item->fields['agx-title']->rawvalue; ?></h2>
|
||||
<?php endif; ?>
|
||||
<?php if ($item->fields['agx-description']->rawvalue) : ?>
|
||||
<?php echo $item->fields['agx-description']->rawvalue; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($item->fields['agx-btntext']->rawvalue) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?Itemid=' . $item->fields['agx-btnlink']->rawvalue); ?>" class="uk-button uk-button-<?php echo $item->fields['agx-btnsize']->rawvalue[0]; ?> uk-button-<?php echo $item->fields['agx-btnstyle']->rawvalue[0]; ?>"><?php echo $item->fields['agx-btntext']->rawvalue; ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if ($params->get('agx_nav_arrows', '1')) : ?>
|
||||
<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous" data-uk-slideshow-item="previous" style="color: <?php echo $params->get('agx_nav_color', 'rgba(255,255,255,0.7)'); ?>"></a>
|
||||
<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next" data-uk-slideshow-item="next" style="color: <?php echo $params->get('agx_nav_color', 'rgba(255,255,255,0.7)'); ?>"></a>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('agx_nav_bubbles', '1')) : ?>
|
||||
<ul class="uk-dotnav uk-dotnav-contrast uk-position-bottom uk-flex-center">
|
||||
<?php foreach ($list as $i => $item) : ?>
|
||||
<li data-uk-slideshow-item="<?php echo $i; ?>"><a href="#"><?php echo $item->title; ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user