Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekVolsk committed Feb 22, 2019
1 parent 98a1338 commit f07b361
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 43 deletions.
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# UIkit 3 Slider

### EN:
![Version](https://img.shields.io/badge/VERSION-1.2.0-0366d6.svg?style=for-the-badge)
![Joomla](https://img.shields.io/badge/joomla-3.7+-1A3867.svg?style=for-the-badge)
![Php](https://img.shields.io/badge/php-5.6+-8892BF.svg?style=for-the-badge)

Slider of images, based on the UIkit 3 framework. Module for Joomla! 3
_description in Russian [here](README.ru.md)_

**Warning!** The module does not contain scripts and framework styles, connect them yourself in your template (it is assumed that your template is already based on this framework).

### RU:

Слайдер изображений, основанный на фреймворке UIkit 3. Модуль для Joomla! 3
Slider, based on the UIkit 3 framework. Module for Joomla! 3.

**Внимание!** Модуль не содержит скриптов и стилей фреймворка, подключите их самостоятельно в вашем шаблоне (подразумевается, что ваш шаблон уже основан на данном фреймворке).
The module contains all the basic settings implemented in the UIkit 3 framework, necessary for displaying a full-fledged slider.

<hr>

PHP 5.6+

Joomla 3.6+
**Warning!** The module does not contain scripts and framework styles, connect them yourself in your template (it is assumed that your template is already based on this framework).
11 changes: 11 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# UIkit 3 Slider

![Version](https://img.shields.io/badge/VERSION-1.2.0-0366d6.svg?style=for-the-badge)
![Joomla](https://img.shields.io/badge/joomla-3.7+-1A3867.svg?style=for-the-badge)
![Php](https://img.shields.io/badge/php-5.6+-8892BF.svg?style=for-the-badge)

Слайдер, основанный на фреймворке UIkit 3. Модуль для Joomla! 3.

Модуль содержит все базовые настройки, реализованные в фреймворке UIkit 3, необходимые для вывода полноценного слайдера.

**Внимание!** Модуль не содержит скриптов и стилей фреймворка, подключите их самостоятельно в вашем шаблоне (подразумевается, что ваш шаблон уже основан на данном фреймворке).
2 changes: 1 addition & 1 deletion languages/en-GB/en-GB.mod_uk_slider.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; @package mod_uk_slider
; @copyright Copyright (C) 2018 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @copyright Copyright (C) 2019 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @license GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt

MOD_UK_SLIDER="UIkit 3 Slider"
Expand Down
2 changes: 1 addition & 1 deletion languages/en-GB/en-GB.mod_uk_slider.sys.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; @package mod_uk_slider
; @copyright Copyright (C) 2018 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @copyright Copyright (C) 2019 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @license GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt

MOD_UK_SLIDER="UIkit 3 Slider"
Expand Down
2 changes: 1 addition & 1 deletion languages/ru-RU/ru-RU.mod_uk_slider.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; @package mod_uk_slider
; @copyright Copyright (C) 2018 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @copyright Copyright (C) 2019 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @license GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt

MOD_UK_SLIDER="UIkit 3 Slider"
Expand Down
2 changes: 1 addition & 1 deletion languages/ru-RU/ru-RU.mod_uk_slider.sys.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; @package mod_uk_slider
; @copyright Copyright (C) 2018 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @copyright Copyright (C) 2019 Aleksey A. Morozov (AlekVolsk). All rights reserved.
; @license GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt

MOD_UK_SLIDER="UIkit 3 Slider"
Expand Down
24 changes: 12 additions & 12 deletions mod_uk_slider.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<?php defined('_JEXEC') or die;
/*
* @package mod_uk_slider
* @copyright Copyright (C) 2018 Aleksey A. Morozov (AlekVolsk). All rights reserved.
* @copyright Copyright (C) 2019 Aleksey A. Morozov (AlekVolsk). All rights reserved.
* @license GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt
*/

use Joomla\CMS\Helper\ModuleHelper;

$vars = [
'slider_class', 'item_class', 'dotnav', 'slidenav',
'velocity', 'autoplay', 'autoplay_interval', 'finite', 'pause_on_hover', 'index', 'center', 'sets',
'slider_class', 'item_class', 'dotnav', 'slidenav',
'velocity', 'autoplay', 'autoplay_interval', 'finite', 'pause_on_hover', 'index', 'center', 'sets',
'grid', 'grid_divider', 'cols', 'cols_all', 'cols_s', 'cols_m', 'cols_l', 'cols_xl',
'items'
];

foreach ($vars as $var)
{
foreach ($vars as $var) {
$$var = $params->get($var);
}

Expand All @@ -22,8 +23,7 @@

$sw_params = [];
if ((int)$velocity > 1) $sw_params[] = 'velocity:' . (int)$velocity;
if ($autoplay)
{
if ($autoplay) {
$sw_params[] = 'autoplay:true';
if ((int)$autoplay_interval != 7000 && (int)$autoplay_interval > 0) $sw_params[] = 'autoplay_interval:' . (int)$autoplay_interval;
}
Expand All @@ -35,13 +35,11 @@
$sw_params = $sw_params ? '="' . implode(';', $sw_params) . '"' : '';

$classes = [];
if ($grid != '')
{
if ($grid != '') {
$classes[] = $grid;
if ((int)$grid_divider) $classes[] = 'uk-grid-divider';
}
if ((int)$cols)
{
if ((int)$cols) {
$classes[] = $cols_all;
$classes[] = $cols_s;
$classes[] = $cols_m;
Expand All @@ -50,4 +48,6 @@
}
$classes = $classes ? ' ' . implode(' ', $classes) : '';

require(JModuleHelper::getLayoutPath('mod_uk_slider', $params->get('layout', 'default')));
if ($items) {
require(ModuleHelper::getLayoutPath('mod_uk_slider', $params->get('layout', 'default')));
}
26 changes: 13 additions & 13 deletions mod_uk_slider.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<extension type="module" version="3.6" method="upgrade" client="site">
<extension type="module" version="3.7" method="upgrade" client="site">
<name>UIkit 3 Slider</name>
<author>Aleksey A. Morozov (AlekVolsk)</author>
<copyright>(C) 2018 Aleksey A. Morozov. All rights reserved.</copyright>
<license>GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt</license>
<version>1.1.0</version>
<creationDate>April 2018</creationDate>
<author>Aleksey A. Morozov (AlekVolsk)</author>
<copyright>© 2018 Aleksey A. Morozov. All rights reserved.</copyright>
<license>GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt</license>
<version>1.2.0</version>
<creationDate>February 2019</creationDate>
<description><![CDATA[MOD_UK_SLIDER_XML_DESCRIPTION]]></description>
<files>
<filename module="mod_uk_slider">mod_uk_slider.php</filename>
Expand All @@ -20,7 +20,7 @@
</languages>
<config>
<fields name="params">

<fieldset name="basic">
<field name="slider_class" type="text" label="MOD_UK_SLIDER_CLASS" class="input-xlasrge" />
<field name="item_class" type="text" label="MOD_UK_SLIDER_ITEM_CLASS" class="input-xlasrge" />
Expand Down Expand Up @@ -55,9 +55,9 @@
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="spacer" name="spacer" hr="true" />

<field name="grid" type="list" label="MOD_UK_SLIDER_GRID" default="">
<option value="">MOD_UK_SLIDER_GRID_NONE</option>
<option value="uk-grid">MOD_UK_SLIDER_GRID_DEFAULT</option>
Expand All @@ -70,9 +70,9 @@
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="spacer" name="spacer2" hr="true" />

<field name="cols" type="radio" label="MOD_UK_SLIDER_COLS" default="0" class="btn-group">
<option value="1">JYES</option>
<option value="0">JNO</option>
Expand Down Expand Up @@ -128,11 +128,11 @@
<option value="uk-child-width-1-6@xl">MOD_UK_SLIDER_COL_6</option>
</field>
</fieldset>

<fieldset name="slides">
<field name="items" type="subform" label="COM_MODULES_SLIDES_FIELDSET_LABEL" formsource="/modules/mod_uk_slider/forms/form.xml" multiple="true" min="0" layout="joomla.form.field.subform.repeatable" />
</fieldset>

<fieldset name="advanced">
<field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" description="JFIELD_ALT_MODULE_LAYOUT_DESC"/>
<field name="cache" type="list" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" default="1">
Expand Down
2 changes: 1 addition & 1 deletion tmpl/default.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php defined('_JEXEC') or die;
/*
* @package mod_uk_slider
* @copyright Copyright (C) 2018 Aleksey A. Morozov (AlekVolsk). All rights reserved.
* @copyright Copyright (C) 2019 Aleksey A. Morozov (AlekVolsk). All rights reserved.
* @license GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down

0 comments on commit f07b361

Please sign in to comment.