www.archline.hu — clean post-compromise baseline #2
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<access component="com_slideshowck">
|
||||
<section name="component">
|
||||
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
|
||||
</section>
|
||||
</access>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config>
|
||||
<fieldset name="permissions"
|
||||
description="JCONFIG_PERMISSIONS_DESC"
|
||||
label="JCONFIG_PERMISSIONS_LABEL"
|
||||
>
|
||||
<field name="rules" type="rules"
|
||||
component="com_slideshowck"
|
||||
filter="rules"
|
||||
validate="rules"
|
||||
label="JCONFIG_PERMISSIONS_LABEL"
|
||||
section="component" />
|
||||
</fieldset>
|
||||
|
||||
</config>
|
||||
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('CK_LOADED') or die;
|
||||
|
||||
use \Slideshowck\CKController;
|
||||
use \Slideshowck\CKFof;
|
||||
use \Slideshowck\CKText;
|
||||
|
||||
class SlideshowckController extends CKController {
|
||||
|
||||
static function getInstance($prefix = '') {
|
||||
return parent::getInstance('Slideshowck');
|
||||
}
|
||||
|
||||
public function display($cachable = false, $urlparams = false) {
|
||||
$view = $this->input->get('view', 'about');
|
||||
$this->input->set('view', $view);
|
||||
|
||||
parent::display();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function ajaxCreateFolder() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if (CKFof::userCan('create', 'com_media')) {
|
||||
$input = CKFof::getInput();
|
||||
$path = $input->get('path', '', 'string');
|
||||
$name = $input->get('name', '', 'string');
|
||||
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckbrowse.php';
|
||||
if ($result = CKBrowse::createFolder($path, $name)) {
|
||||
$msg = CKText::_('CK_FOLDER_CREATED_SUCCESS');
|
||||
} else {
|
||||
$msg = CKText::_('CK_FOLDER_CREATED_ERROR');
|
||||
}
|
||||
|
||||
echo '{"status" : "' . ($result == false ? '0' : '1') . '", "message" : "' . $msg . '"}';
|
||||
} else {
|
||||
echo '{"status" : "2", "message" : "' . CKText::_('CK_ERROR_USER_NO_AUTH') . '"}';
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the file and store it on the server
|
||||
*
|
||||
* @return mixed, the method return
|
||||
*/
|
||||
public function ajaxAddPicture() {
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckbrowse.php';
|
||||
CKBrowse::ajaxAddPicture();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax method to clean the name of the google font
|
||||
*/
|
||||
public function cleanGfontName() {
|
||||
$input = new \Joomla\CMS\Input\Input();
|
||||
$gfont = $input->get('gfont', '', 'string');
|
||||
|
||||
// <link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
|
||||
// Open+Sans+Condensed:300
|
||||
// Open Sans
|
||||
if ( preg_match( '/family=(.*?) /', $gfont . ' ', $matches) ) {
|
||||
if ( isset($matches[1]) ) {
|
||||
$gfont = $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
$gfont = str_replace(' ', '+', ucwords (trim($gfont)));
|
||||
echo trim(trim($gfont, "'"));
|
||||
die;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('CK_LOADED') or die;
|
||||
|
||||
use \Slideshowck\CKController;
|
||||
use \Slideshowck\CKFof;
|
||||
use \Slideshowck\CKText;
|
||||
|
||||
class SlideshowckControllerAjax extends CKController {
|
||||
|
||||
function __construct() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) exit;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$plugin = $this->input->get('plugin', '', 'cmd');
|
||||
$task = $this->input->get('task', '', 'cmd');
|
||||
|
||||
if ($plugin) {
|
||||
if (file_exists(SLIDESHOWCK_PLUGINS_PATH . '/' . $plugin . '/helper/helper_' . $plugin . '.php')) {
|
||||
require_once(SLIDESHOWCK_PLUGINS_PATH . '/' . $plugin . '/helper/helper_' . $plugin . '.php');
|
||||
$className = 'SlideshowckHelpersource' . ucfirst($plugin);
|
||||
//SlideshowckHelpersourceArticles
|
||||
$class = new $className();
|
||||
if (method_exists($class, $task)) {
|
||||
$class::$task();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
die;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('CK_LOADED') or die;
|
||||
|
||||
use Slideshowck\CKController;
|
||||
use Slideshowck\CKFof;
|
||||
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckbrowse.php';
|
||||
|
||||
class SlideshowckControllerBrowse extends CKController {
|
||||
|
||||
public function getFiles() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$folder = $this->input->get('folder', '', 'string');
|
||||
$type = $this->input->get('type', '', 'string');
|
||||
$filetypes = CKBrowse::getFileTypes($type);
|
||||
$files = CKBrowse::getImagesInFolder(JPATH_SITE . '/' . $folder, implode('|', $filetypes));
|
||||
|
||||
if ($type == 'folder') {
|
||||
$pathway = str_replace('/', '</span><span class="ckfoldertreepath">', $folder);
|
||||
?>
|
||||
<div id="ckfoldertreelistfolderselection">
|
||||
<div class="ckbutton ckbutton-primary" style="font-size:20px;padding: 10px 20px;" onclick="ckSelectFolder('<?php echo ($folder) ?>')"><i class="fas fa-check-square"></i> <?php echo \Joomla\CMS\Language\Text::_('CK_SELECT_FOLDER') ?><br /><small><?php echo $pathway ?></small></div>
|
||||
</div>
|
||||
<?php }
|
||||
if (empty($files)) {
|
||||
echo \Joomla\CMS\Language\Text::_('CK_NO_IMAGE_FOUND');
|
||||
} else {
|
||||
foreach($files as $file) {
|
||||
?>
|
||||
<div class="ckfoldertreefile" data-type="<?php echo $type ?>" onclick="ckSelectFile(this)" data-path="<?php echo iconv('ISO-8859-1', 'UTF-8', $folder) ?>" data-filename="<?php echo iconv('ISO-8859-1', 'UTF-8', $file) ?>">
|
||||
<img src="<?php echo \Joomla\CMS\Uri\Uri::root(true) . '/' . iconv('ISO-8859-1', 'UTF-8', $folder) . '/' . iconv('ISO-8859-1', 'UTF-8', $file) ?>" title="<?php echo iconv('ISO-8859-1', 'UTF-8', $file); ?>" loading="lazy">
|
||||
<div class="ckimagetitle"><?php echo iconv('ISO-8859-1', 'UTF-8', $file); ?></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('CK_LOADED') or die;
|
||||
|
||||
use \Slideshowck\CKController;
|
||||
use \Slideshowck\CKFof;
|
||||
|
||||
class SlideshowckControllerMenus extends CKController {
|
||||
|
||||
function ajaxShowMenuItems() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$parentId = $this->input->get('parentid', 0, 'int');
|
||||
$menutype = $this->input->get('menutype', '', 'string');
|
||||
|
||||
$model = $this->getModel('Menus', 'Slideshowck', array());
|
||||
$items = $model->getChildrenItems($menutype, $parentId);
|
||||
|
||||
$links = array();
|
||||
$imagespath = SLIDESHOWCK_MEDIA_URI .'/images/';
|
||||
?>
|
||||
<div class="cksubfolder">
|
||||
<?php
|
||||
foreach ($items as $item) {
|
||||
// CKFof::dump($item);
|
||||
$aliasId = $item->id;
|
||||
if ($item->type == 'alias') {
|
||||
$itemParams = new \Joomla\Registry\Registry($item->params);
|
||||
$aliasId = $itemParams->get('aliasoptions', 0);
|
||||
}
|
||||
$Itemid = substr($item->link,-7,7) == 'Itemid=' ? $aliasId : '&Itemid=' . $aliasId;
|
||||
?>
|
||||
<div class="ckfoldertree parent">
|
||||
<div class="ckfoldertreetoggler <?php if ($item->rgt - $item->lft <= 1) { echo 'empty'; } ?>" onclick="ckToggleTreeSub(this, <?php echo $item->id ?>)" data-menutype="<?php echo $item->menutype; ?>"></div>
|
||||
<div class="ckfoldertreename hasTip" title="<?php echo $item->link . $Itemid ?>" onclick="ckSetMenuItemUrl('<?php echo $item->link . $Itemid ?>')"><img src="<?php echo $imagespath ?>folder.png" /><?php echo $item->title; ?></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use \Slideshowck\CKController;
|
||||
use \Slideshowck\CKFof;
|
||||
|
||||
class SlideshowckControllerStyle extends CKController {
|
||||
|
||||
// public function add() {
|
||||
// $this->edit(0);
|
||||
// Redirect to the edit screen.
|
||||
// CKFof::redirect(SLIDESHOWCK_ADMIN_URL . '&view=style&layout=edit&id=0&tmpl=component&layout=modal');
|
||||
// }
|
||||
|
||||
// public function edit($id = null, $appendUrl = '') {
|
||||
// parent::edit($id, '&layout=modal&tmpl=component');
|
||||
// }
|
||||
//
|
||||
// public function copy() {
|
||||
// parent::edit('&layout=modal&tmpl=component');
|
||||
// }
|
||||
|
||||
/*
|
||||
* Generate the CSS styles from the settings
|
||||
*/
|
||||
public function save() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$id = $this->input->get('id', 0, 'int');
|
||||
|
||||
$model = $this->getModel();
|
||||
$row = $model->getItem($id);
|
||||
|
||||
// get data
|
||||
$fields = $this->input->get('fields', '', 'raw');
|
||||
$name = $this->input->get('name', '', 'string');
|
||||
if (! $name) $name = 'style' . $id;
|
||||
$layoutcss = trim($this->input->get('layoutcss', '', 'html'));
|
||||
// set data
|
||||
$row->params = $fields;
|
||||
$row->name = $name;
|
||||
$row->layoutcss = $layoutcss;
|
||||
|
||||
if (! $id = $model->save($row)) {
|
||||
echo "{'result': '0', 'id': '" . $row->id . "', 'message': 'Error : Can not save the Styles !'}";
|
||||
echo($this->_db->getErrorMsg());
|
||||
exit;
|
||||
}
|
||||
echo '{"result": "1", "id": "' . $id . '", "message": "Styles saved successfully"}';
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* copy an existing page
|
||||
* @return void
|
||||
*/
|
||||
// function copy() {
|
||||
// $model = $this->getModel();
|
||||
// $cid = $this->input->get('cid', '', 'array');
|
||||
// $this->input->set('id', (int) $cid[0]);
|
||||
// if (!$model->copy()) {
|
||||
// $msg = \Joomla\CMS\Language\Text::_('CK_COPY_ERROR');
|
||||
// $type = 'error';
|
||||
// } else {
|
||||
// $msg = \Joomla\CMS\Language\Text::_('CK_COPY_SUCCESS');
|
||||
// $type = 'message';
|
||||
// }
|
||||
//
|
||||
// $this->setRedirect('index.php?option=com_slideshowck&view=styles', $msg, $type);
|
||||
// }
|
||||
|
||||
/*
|
||||
* Generate the CSS styles from the settings
|
||||
*/
|
||||
public function ajaxRenderCss() {
|
||||
$fields = $this->input->get('fields', '', 'raw');
|
||||
$fields = json_decode($fields);
|
||||
$customstyles = stripslashes( $this->input->get('customstyles', '', 'string'));
|
||||
$customstyles = json_decode($customstyles);
|
||||
$customcss = $this->input->get('customcss', '', 'html');
|
||||
|
||||
$css = $this->renderCss($fields, $customstyles);
|
||||
echo $css . $customcss;
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* Render the CSS from the settings
|
||||
*/
|
||||
public function renderCss($fields, $customstyles) {
|
||||
include_once SLIDESHOWCK_PATH . '/helpers/ckstyles.php';
|
||||
$ckstyles = new \Slideshowck\CKStyles();
|
||||
$css = $ckstyles->create($fields, $customstyles);
|
||||
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax method to save the json data into the .mmck file
|
||||
*
|
||||
* @return boolean - true on success for the file creation
|
||||
*
|
||||
*/
|
||||
public function exportParams() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) {
|
||||
exit();
|
||||
}
|
||||
// create a backup file with all fields stored in it
|
||||
$fields = $this->input->get('jsonfields', '', 'string');
|
||||
$backupfile_path = SLIDESHOWCK_PATH . '/export/exportParamsSlideshowckStyle'. $this->input->get('styleid',0,'int') .'.mmck';
|
||||
if (file_put_contents($backupfile_path, $fields)) {
|
||||
echo '1';
|
||||
} else {
|
||||
echo '0';
|
||||
}
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax method to import the .mmck file into the interface
|
||||
*
|
||||
* @return boolean - true on success for the file creation
|
||||
*
|
||||
*/
|
||||
public function uploadParamsFile() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$file = $this->input->files->get('file', '', 'array');
|
||||
if (!is_array($file))
|
||||
exit();
|
||||
|
||||
$filename = \Joomla\CMS\Filesystem\File::makeSafe($file['name']);
|
||||
|
||||
// check if the file exists
|
||||
if (\Joomla\CMS\Filesystem\File::getExt($filename) != 'mmck') {
|
||||
$msg = \Joomla\CMS\Language\Text::_('CK_NOT_MMCK_FILE', true);
|
||||
echo json_encode(array('error'=> $msg));
|
||||
exit();
|
||||
}
|
||||
|
||||
//Set up the source and destination of the file
|
||||
$src = $file['tmp_name'];
|
||||
|
||||
// check if the file exists
|
||||
if (!$src || !\Joomla\CMS\Filesystem\File::exists($src)) {
|
||||
$msg = \Joomla\CMS\Language\Text::_('CK_FILE_NOT_EXISTS', true);
|
||||
echo json_encode(array('error'=> $msg));
|
||||
exit();
|
||||
}
|
||||
|
||||
// read the file
|
||||
if (!$filecontent = \Joomla\CMS\Filesystem\File::read($src)) {
|
||||
$msg = \Joomla\CMS\Language\Text::_('CK_UNABLE_READ_FILE', true);
|
||||
echo json_encode(array('error'=> $msg));
|
||||
exit();
|
||||
}
|
||||
|
||||
// replace vars to allow data to be moved from another server
|
||||
$filecontent = str_replace("|URIROOT|", \Joomla\CMS\Uri\Uri::root(true), $filecontent);
|
||||
// $filecontent = str_replace("|qq|", '"', $filecontent);
|
||||
|
||||
// echo $filecontent;
|
||||
echo json_encode(array('data'=> $filecontent));
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax method to read the fields values from the selected preset
|
||||
*
|
||||
* @return json -
|
||||
*
|
||||
*/
|
||||
function loadPresetFields() {
|
||||
// security check
|
||||
if (! CKFof::checkAjaxToken()) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$preset = $this->input->get('preset', '', 'string');
|
||||
$folder_path = SLIDESHOWCK_MEDIA_PATH . '/presets/';
|
||||
// load the fields
|
||||
$fields = '{}';
|
||||
if ( file_exists($folder_path . $preset. '.mmck') ) {
|
||||
$fields = @file_get_contents($folder_path . $preset. '.mmck');
|
||||
$fields = str_replace('\n','', $fields);
|
||||
// $fields = str_replace("{", "|ob|", $fields);
|
||||
// $fields = str_replace("}", "|cb|", $fields);
|
||||
} else {
|
||||
echo '{"result" : 0, "message" : "File Not found : '.$folder_path . $preset. '.mmck'.'"}';
|
||||
exit();
|
||||
}
|
||||
|
||||
echo '{"result" : 1, "fields" : "'.$fields.'", "customcss" : ""}';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slider CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2016. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Pages list controller class.
|
||||
*/
|
||||
class SlideshowckControllerStyles extends \Joomla\CMS\MVC\Controller\AdminController {
|
||||
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getModel($name = 'style', $prefix = 'SlideshowckModel', $config = array()) {
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
return $model;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkbackground extends CKFormField {
|
||||
|
||||
protected $type = 'ckbackground';
|
||||
|
||||
protected function getInput() {
|
||||
$styles = $this->element['styles'];
|
||||
$background = $this->element['background'] ? 'background: url(' . $this->mediaPath . $this->element['background'] . ') left top no-repeat;' : '';
|
||||
|
||||
$html = '<p style="' . $background . $styles . '" ></p>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
protected function getLabel() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* Module Maximenu CK
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkcolor extends CKFormField {
|
||||
|
||||
protected $type = 'ckcolor';
|
||||
|
||||
protected function getInput() {
|
||||
$path = 'modules/mod_slideshowck/elements/jscolor/';
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('script', $path.'jscolor.js');
|
||||
|
||||
$html = '<img src="' . $this->getPathToImages() . '/images/color.png" /><input class="color {';
|
||||
$html.= 'required:false,'; // empty possible
|
||||
$html.= 'pickerPosition:\'top\','; // or left / right / top
|
||||
$html.= 'pickerBorder:2,pickerInset:3,'; // or right / top
|
||||
$html.= 'hash:true'; // # behind value
|
||||
$html.= '}" type="text" value="' . $this->value . '" name="' . $this->name . '" style="width:100px;border-radius:3px;-moz-border-radius:3px;" />';
|
||||
return $html;
|
||||
}
|
||||
|
||||
protected function getPathToImages() {
|
||||
$localpath = dirname(__FILE__);
|
||||
$rootpath = JPATH_ROOT;
|
||||
$httppath = trim(\Joomla\CMS\Uri\Uri::root(), "/");
|
||||
$pathtoimages = str_replace("\\", "/", str_replace($rootpath, $httppath, $localpath));
|
||||
return $pathtoimages;
|
||||
}
|
||||
|
||||
protected function getLabel() {
|
||||
$label = '';
|
||||
// Get the label text from the XML element, defaulting to the element name.
|
||||
$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
|
||||
$text = \Joomla\CMS\Language\Text::_($text);
|
||||
|
||||
// Build the class for the label.
|
||||
$class = !empty($this->description) ? 'hasTip hasTooltip' : '';
|
||||
|
||||
$label .= '<label id="' . $this->id . '-lbl" for="' . $this->id . '" class="' . $class . '"';
|
||||
|
||||
// If a description is specified, use it to build a tooltip.
|
||||
if (!empty($this->description)) {
|
||||
$label .= ' title="' . htmlspecialchars(trim($text, ':') . '<br />' .
|
||||
\Joomla\CMS\Language\Text::_($this->description), ENT_COMPAT, 'UTF-8') . '"';
|
||||
}
|
||||
|
||||
$label .= ' style="min-width:150px;max-width:150px;width:150px;display:block;float:left;padding:1px;">' . $text . '</label>';
|
||||
|
||||
return $label;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkdocumentation extends CKFormField {
|
||||
|
||||
protected $type = 'ckdocumentation';
|
||||
|
||||
protected function getLabel() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getInput() {
|
||||
$html = array();
|
||||
|
||||
$icon = $this->element['icon'] ? $this->element['icon'] : 'file-alt';
|
||||
$url = $this->element['url'] ? $this->element['url'] : 'https://www.joomlack.fr/en/documentation';
|
||||
$html[] = '<div class="ckinfo"><i class="fas fa-' . $icon . '"></i><a href="' . $url . '" target="_blank">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_DOCUMENTATION') . '</a></div>';
|
||||
|
||||
return implode('', $html);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* Module Maximenu CK
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
jimport('joomla.html.html');
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.form.formfield');
|
||||
jimport('joomla.form.helper');
|
||||
\Joomla\CMS\Form\FormHelper::loadFieldClass('list');
|
||||
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\Field\ListField')) {
|
||||
class JFormFieldCkfolderListBase extends \Joomla\CMS\Form\Field\ListField {}
|
||||
} else {
|
||||
class JFormFieldCkfolderListBase extends JFormFieldList {}
|
||||
}
|
||||
|
||||
class JFormFieldCkfolderList extends JFormFieldCkfolderListBase
|
||||
{
|
||||
|
||||
public $type = 'ckfolderlist';
|
||||
|
||||
protected function getOptions()
|
||||
{
|
||||
// Initialize variables.
|
||||
$options = array();
|
||||
|
||||
// Initialize some field attributes.
|
||||
$filter = (string) $this->element['filter'];
|
||||
$exclude = (string) $this->element['exclude'];
|
||||
$hideNone = (string) $this->element['hide_none'];
|
||||
$hideDefault = (string) $this->element['hide_default'];
|
||||
|
||||
// Get the path in which to search for file options.
|
||||
$path = (string) $this->element['directory'];
|
||||
if (!is_dir($path)) {
|
||||
$path = JPATH_ROOT.'/'.$path;
|
||||
}
|
||||
|
||||
// Prepend some default options based on field attributes.
|
||||
if (!$hideNone) {
|
||||
$options[] = \Joomla\CMS\HTML\HTMLHelper::_('select.option', '-1', \Joomla\CMS\Language\Text::alt('JOPTION_DO_NOT_USE', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
|
||||
}
|
||||
if (!$hideDefault) {
|
||||
$options[] = \Joomla\CMS\HTML\HTMLHelper::_('select.option', '', \Joomla\CMS\Language\Text::alt('JOPTION_USE_DEFAULT', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
|
||||
}
|
||||
|
||||
// Get a list of folders in the search path with the given filter.
|
||||
$folders = \Joomla\CMS\Filesystem\Folder::folders($path, $filter);
|
||||
|
||||
// Build the options list from the list of folders.
|
||||
if (is_array($folders)) {
|
||||
foreach($folders as $folder) {
|
||||
|
||||
// Check to see if the file is in the exclude mask.
|
||||
if ($exclude) {
|
||||
if (preg_match(chr(1).$exclude.chr(1), $folder)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$options[] = \Joomla\CMS\HTML\HTMLHelper::_('select.option', $folder, $folder);
|
||||
}
|
||||
}
|
||||
|
||||
// Merge any additional options in the XML definition.
|
||||
$options = array_merge(parent::getOptions(), $options);
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\FormField')) {
|
||||
class CKFormFieldBase extends \Joomla\CMS\Form\FormField {}
|
||||
} else {
|
||||
class CKFormFieldBase extends JFormField {}
|
||||
}
|
||||
|
||||
|
||||
class CKFormField extends CKFormFieldBase {
|
||||
|
||||
public $mediaPath;
|
||||
|
||||
public function __construct() {
|
||||
$this->mediaPath = \Joomla\CMS\Uri\Uri::root(true) . '/media/com_slideshowck/images/';
|
||||
// loads the language files from the frontend
|
||||
$lang = \Joomla\CMS\Factory::getLanguage();
|
||||
$lang->load('com_slideshowck', JPATH_SITE . '/components/com_slideshowck', $lang->getTag(), false);
|
||||
$lang->load('com_slideshowck', JPATH_SITE, $lang->getTag(), false);
|
||||
parent::__construct();
|
||||
}
|
||||
protected function getInput() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getLabel() {
|
||||
return parent::getLabel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the field options.
|
||||
*
|
||||
* @return array The field option objects.
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function getOptions() {
|
||||
$options = array();
|
||||
|
||||
foreach ($this->element->children() as $option) {
|
||||
|
||||
// Only add <option /> elements.
|
||||
if ($option->getName() != 'option') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create a new option object based on the <option /> element.
|
||||
$tmp = \Joomla\CMS\HTML\HTMLHelper::_(
|
||||
'select.option', (string) $option['value'],
|
||||
\Joomla\CMS\Language\Text::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)), 'value', 'text',
|
||||
((string) $option['disabled'] == 'true')
|
||||
);
|
||||
|
||||
// Set some option attributes.
|
||||
$tmp->class = (string) $option['class'];
|
||||
|
||||
// Set some JavaScript option attributes.
|
||||
$tmp->onclick = (string) $option['onclick'];
|
||||
|
||||
// Add the option object to the result set.
|
||||
$options[] = $tmp;
|
||||
}
|
||||
|
||||
reset($options);
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\Field\HiddenField')) {
|
||||
class JFormFieldCkheightBase extends \Joomla\CMS\Form\Field\TextField {}
|
||||
} else {
|
||||
class JFormFieldCkheightBase extends JFormFieldText {}
|
||||
}
|
||||
|
||||
class JFormFieldCkheight extends JFormFieldCkheightBase {
|
||||
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected $type = 'ckheight';
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function getInput() {
|
||||
// Initialize some field attributes.
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
|
||||
$html = $icon ? '<div class="slideshowck-field-icon" ' . ($suffix ? 'data-has-suffix="1"' : '') . '><img src="' . SLIDESHOWCK_MEDIA_URI . '/images/' . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
|
||||
$html .= parent::getInput();
|
||||
if ($suffix)
|
||||
$html .= '<span class="slideshowck-field-suffix">' . $suffix . '</span>';
|
||||
|
||||
$html .= '<span class="ckbutton" onclick="CKBox.open({handler: \'inline\', content: \'ckheightfieldhelp\', style: {padding: \'10px\'}, size: {x: \'800px\', y: \'550px\'}})"><i class="fas fa-info"></i></span>';
|
||||
$html .= '<div id="ckheightfieldhelp" style="display: none;"><h3>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_TITLE') . '</h3>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_1') . '</p>
|
||||
<p><b>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_2') . '</b></p>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_3') . '</p>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_4') . '</p>
|
||||
<p style="text-align:center;padding:10px;font-size: 18px;">1280 x 800 px</p>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_5') . '</p>
|
||||
<p><b>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_CALCULATOR') . '</b></p>
|
||||
<p><label for="ckheightfieldhelpheight">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_LABEL') . '</label><input type="text" id="ckheightfieldhelpheight" onchange="ckHeightFieldHelpCalculator()"/></p>
|
||||
<p><label for="ckheightfieldhelpwidth">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_WIDTH_LABEL') . '</label><input type="text" id="ckheightfieldhelpwidth" onchange="ckHeightFieldHelpCalculator()" /></p>
|
||||
<p><label for="ckheightfieldhelpratio">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_RATIO_LABEL') . '</label><input type="text" id="ckheightfieldhelpratio" style="font-size: 18px;" /></p>
|
||||
<script>function ckHeightFieldHelpCalculator() {
|
||||
document.getElementById("ckheightfieldhelpratio").value = parseFloat(document.getElementById("ckheightfieldhelpheight").value) / parseFloat(document.getElementById("ckheightfieldhelpwidth").value) * 100;
|
||||
}</script>
|
||||
</div>';
|
||||
return $html;
|
||||
|
||||
// Initialize some field attributes.
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
$size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
|
||||
$maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
|
||||
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
|
||||
$readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : '';
|
||||
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
|
||||
$defautlwidth = $suffix ? '128px' : '150px';
|
||||
$styles = ' style="width:' . $defautlwidth . ';' . $this->element['styles'] . '"';
|
||||
|
||||
// Initialize JavaScript field attributes.
|
||||
$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
|
||||
$html = $icon ? '<div style="display:inline-block;vertical-align:top;margin-top:4px;width:20px;"><img src="' . $this->mediaPath . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
$html .= '<div class="ckbutton-group"><input type="text" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
|
||||
. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . $styles . '/>';
|
||||
|
||||
|
||||
// $html = parent::getInput();
|
||||
$html .= '<span class="ckbutton" onclick="CKBox.open({handler: \'inline\', content: \'ckheightfieldhelp\', style: {padding: \'10px\'}, size: {x: \'800px\', y: \'550px\'}})"><i class="fas fa-info"></i></span></div>';
|
||||
$html .= '<div id="ckheightfieldhelp" style="display: none;"><h3>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_TITLE') . '</h3>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_1') . '</p>
|
||||
<p><b>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_2') . '</b></p>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_3') . '</p>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_4') . '</p>
|
||||
<p style="text-align:center;padding:10px;font-size: 18px;">1280 x 800 px</p>
|
||||
<p>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_FIELD_HELP_5') . '</p>
|
||||
<p><b>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_CALCULATOR') . '</b></p>
|
||||
<p><label for="ckheightfieldhelpheight">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_HEIGHT_LABEL') . '</label><input type="text" id="ckheightfieldhelpheight" onchange="ckHeightFieldHelpCalculator()"/></p>
|
||||
<p><label for="ckheightfieldhelpwidth">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_WIDTH_LABEL') . '</label><input type="text" id="ckheightfieldhelpwidth" onchange="ckHeightFieldHelpCalculator()" /></p>
|
||||
<p><label for="ckheightfieldhelpratio">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_RATIO_LABEL') . '</label><input type="text" id="ckheightfieldhelpratio" style="font-size: 18px;" /></p>
|
||||
<script>function ckHeightFieldHelpCalculator() {
|
||||
document.getElementById("ckheightfieldhelpratio").value = parseFloat(document.getElementById("ckheightfieldhelpheight").value) / parseFloat(document.getElementById("ckheightfieldhelpwidth").value) * 100;
|
||||
}</script>
|
||||
</div>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2017 Cedric KEIFLIN alias ced1870
|
||||
* http://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkinfo extends CKFormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
*/
|
||||
protected $type = 'ckinfo';
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
*/
|
||||
protected function getLabel()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the field label markup.
|
||||
*
|
||||
* @return string The field label markup.
|
||||
*
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
$styles = '.ckinfo {position:relative;background:#efefef;border: none;border-radius: px;color: #333;font-weight: normal;line-height: 24px;padding: 5px 5px 5px 35px;margin: 3px 0;text-align: left;text-decoration: none;}
|
||||
.ckinfo > .fas {
|
||||
font-size: 15px;
|
||||
padding: 3px 5px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
line-height: 25px;
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.ckinfo img {margin: 0 10px 0 0;}
|
||||
.control-label:empty {display: none;}
|
||||
.control-label:empty + .controls {margin: 0;}
|
||||
';
|
||||
$doc->addStyleDeclaration($styles);
|
||||
|
||||
// get the extension version
|
||||
$current_version = $this->getCurrentVersion(JPATH_SITE .'/administrator/components/com_slideshowck/slideshowck.xml');
|
||||
$html = '';
|
||||
$html .= '<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">';
|
||||
$html .= '<div class="ckinfo"><i class="fas fa-thumbs-up"></i><a href="https://extensions.joomla.org/extensions/extension/photos-a-images/slideshow/slideshow-ck" target="_blank">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_VOTE_JED') . '</a></div>';
|
||||
$html .= '<div class="ckinfo"><i class="fas fa-info"></i><b>SLIDESHOW CK</b> - ' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_CURRENT_VERSION') . ' : <span class="label">' . $current_version . '</span></div>';
|
||||
$html .= '<div class="ckinfo"><i class="fas fa-file-alt"></i><a href="https://www.joomlack.fr/en/documentation/48-slideshow-ck" target="_blank">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_DOCUMENTATION') . '</a></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a variable from the manifest file
|
||||
*
|
||||
* @return the current version
|
||||
*/
|
||||
public static function getCurrentVersion($file_url) {
|
||||
// get the version installed
|
||||
$installed_version = 'UNKOWN';
|
||||
if ($xml_installed = simplexml_load_file($file_url)) {
|
||||
$installed_version = (string)$xml_installed->version;
|
||||
}
|
||||
|
||||
return $installed_version;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2017 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCklight extends CKFormField {
|
||||
|
||||
protected $type = 'cklight';
|
||||
|
||||
protected function getLabel() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getInput() {
|
||||
$html = array();
|
||||
|
||||
// Add the label text and closing tag.
|
||||
$html[] = '<div id="' . $this->id . '-lbl" class="ckinfo">';
|
||||
$html[] = '<i class="fas fa-info" style="color:orange"></i>';
|
||||
$html[] = \Joomla\CMS\Language\Text::_('SLIDESHOWCK_USE_FREE_VERSION');
|
||||
$html[] = ' <a href="https://www.joomlack.fr/en/joomla-extensions/slideshow-ck" target="_blank">';
|
||||
$html[] = '<span class="cklabel cklabel-info"><i class="fas fa-link"></i> ' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_GET_PRO_INFOS') . '</label>';
|
||||
$html[] = '</a>';
|
||||
$html[] = '</div>';
|
||||
|
||||
// if (! $testparams) {
|
||||
$html[] = 'Mettre ici description de la version pro avec les fonctionnalités et le lien';
|
||||
// }
|
||||
|
||||
return implode('', $html);
|
||||
}
|
||||
|
||||
protected function testParams() {
|
||||
if (\Joomla\CMS\Filesystem\File::exists(JPATH_ROOT.'/plugins/system/slideshowckparams/slideshowckparams.php')) {
|
||||
$this->state = 'green';
|
||||
return \Joomla\CMS\Language\Text::_('SLIDESHOWCK_USE_PRO_VERSION');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
jimport('joomla.html.html');
|
||||
jimport('joomla.form.formfield');
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCklist extends CKFormField {
|
||||
|
||||
protected $type = 'cklist';
|
||||
|
||||
protected function getInput() {
|
||||
// Initialize variables.
|
||||
$html = array();
|
||||
$attr = '';
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
|
||||
// Initialize some field attributes.
|
||||
$attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
|
||||
|
||||
// To avoid user's confusion, readonly="true" should imply disabled="true".
|
||||
if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true') {
|
||||
$attr .= ' disabled="disabled"';
|
||||
}
|
||||
|
||||
$attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
|
||||
$attr .= $this->multiple ? ' multiple="multiple"' : '';
|
||||
$attr .= ' style="width:150px;' . $this->element['styles'] . '"';
|
||||
|
||||
// Initialize JavaScript field attributes.
|
||||
$attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
|
||||
|
||||
// Get the field options.
|
||||
$options = (array) $this->getOptions();
|
||||
|
||||
// Create a read-only list (no name) with a hidden input to store the value.
|
||||
if ((string) $this->element['readonly'] == 'true') {
|
||||
$html[] = $icon ? '<div style="display:inline-block;vertical-align:top;margin-top:5px;width:20px;"><img src="' . $this->mediaPath . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
$html[] = \Joomla\CMS\HTML\HTMLHelper::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id);
|
||||
$html[] = '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '"/>';
|
||||
}
|
||||
// Create a regular list.
|
||||
else {
|
||||
$html[] = $icon ? '<div style="display:inline-block;vertical-align:top;width:20px;"><img src="' . $this->mediaPath . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
$html[] = \Joomla\CMS\HTML\HTMLHelper::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
|
||||
}
|
||||
|
||||
return implode($html);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
use \Slideshowck\CKFof;
|
||||
use \Slideshowck\CKFolder;
|
||||
use \Slideshowck\CKFile;
|
||||
use \Slideshowck\CKText;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
require_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/ckfof.php';
|
||||
require_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/ckfolder.php';
|
||||
require_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/ckfile.php';
|
||||
require_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/cktext.php';
|
||||
|
||||
class JFormFieldCkmigrate extends CKFormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
*/
|
||||
protected $type = 'ckmigrate';
|
||||
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
*/
|
||||
protected function getLabel()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the field label markup.
|
||||
*
|
||||
* @return string The field label markup.
|
||||
*
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
$input = \Joomla\CMS\Factory::getApplication()->input;
|
||||
$id = $input->get('id', 0, 'int');
|
||||
$doMigration = $input->get('domigration', 0, 'int');
|
||||
if (! $id) return '';
|
||||
|
||||
$options = $this->getModuleOptions($id);
|
||||
//var_dump($options);die;
|
||||
$params = json_decode($options->params);
|
||||
if (isset($params->slidesssource)) {
|
||||
$this->makeBackup($id, $options->params);
|
||||
if ($doMigration) {
|
||||
$this->doMigration($id, $options->params);
|
||||
} else {
|
||||
CKfof::enqueueMessage(CKText::_('SLIDESHOWCK_MIGRATION_NEEDED'), 'warning');
|
||||
CKfof::enqueueMessage('<a href="' . CKFof::getCurrentUri() . '&domigration=1">' . CKText::_('SLIDESHOWCK_MIGRATION_ACTION') . '</a>', 'warning');
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->isPluginEnabled()) {
|
||||
CKFof::dbExecute("UPDATE #__extensions SET enabled = 0 WHERE element = 'slideshowckparams'");
|
||||
CKfof::enqueueMessage(CKText::_('SLIDESHOWCK_PARAMS_UNPUBLISHED_INFO'), 'warning');
|
||||
CKfof::enqueueMessage('<a href="https://www.joomlack.fr/en/documentation/48-slideshow-ck/246-migration-from-slideshow-ck-version-1-to-version-2" target="_blank">' . CKText::_('SLIDESHOWCK_PARAMS_MIGRATION_LINK') . '</a>', 'warning');
|
||||
CKfof::redirect();
|
||||
}
|
||||
|
||||
$this->alertObsoletePlugin($params, 'hikashop');
|
||||
$this->alertObsoletePlugin($params, 'k2');
|
||||
$this->alertObsoletePlugin($params, 'joomgallery');
|
||||
}
|
||||
|
||||
protected function alertObsoletePlugin($params, $plugin) {
|
||||
if (isset($params->source) && $params->source == $plugin && $this->isPluginEnabled('slideshowck' . $plugin)) {
|
||||
CKfof::enqueueMessage(CKText::_('SLIDESHOWCK_WARNING_PLUGIN_OBSOLETE') . ' : ' . '<b>slideshowck' . $plugin . '</b>', 'warning');
|
||||
CKfof::enqueueMessage('<a href="index.php?option=com_plugins&view=plugins&filter_element=slideshowck' . $plugin . '" target="_blank">' . CKText::_('SLIDESHOWCK_DISABLE_PLUGIN') . '</a>', 'warning');
|
||||
}
|
||||
}
|
||||
|
||||
protected function isPluginEnabled($plugin = 'slideshowckparams') {
|
||||
if (file_exists(JPATH_ROOT . '/plugins/system/' . $plugin)) {
|
||||
$isEnabled = CKFof::dbLoadResult("SELECT enabled FROM #__extensions WHERE element = '" . $plugin . "'");
|
||||
return (bool)$isEnabled;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getModuleOptions($id) {
|
||||
if (empty($this->options)) {
|
||||
$this->options = CKFof::dbLoadObject("SELECT * FROM #__modules WHERE id = " . (int)$id);
|
||||
}
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
protected function doMigration($id, $params) {
|
||||
$find = array('slidesssource', 'imagetarget', 'articlelength', 'showarticletitle', 'lightboxtype', 'lightboxautolinkimages');
|
||||
$replace = array('source', 'linktarget', 'textlength', 'usetitle', 'lightbox', 'linkautoimage');
|
||||
$newparams = str_replace($find, $replace, $params);
|
||||
|
||||
$paramsObj = new \Joomla\Registry\Registry($newparams);
|
||||
if ($paramsObj->get('slideshowckhikashop_enable', '0') == '1') $paramsObj->set('source', 'hikashop');
|
||||
if ($paramsObj->get('slideshowckjoomgallery_enable', '0') == '1') $paramsObj->set('source', 'joomgallery');
|
||||
if ($paramsObj->get('slideshowckk2_enable', '0') == '1') $paramsObj->set('source', 'k2');
|
||||
$newparams = json_encode($paramsObj);
|
||||
|
||||
$data = CKFof::dbLoad('#__modules', $id);
|
||||
$data->id = $id;
|
||||
$data->params = $newparams;
|
||||
|
||||
$return = CKFof::dbStore('#__modules', $data);
|
||||
|
||||
if ($return) {
|
||||
CKfof::enqueueMessage(CKText::_('SLIDESHOWCK_MIGRATION_SUCCESS'), 'success');
|
||||
} else {
|
||||
CKfof::enqueueMessage(CKText::_('SLIDESHOWCK_MIGRATION_ERROR'), 'error');
|
||||
}
|
||||
CKfof::redirect();
|
||||
}
|
||||
|
||||
protected function makeBackup($id, $params) {
|
||||
$path = JPATH_ROOT . '/administrator/components/com_slideshowck/backup/';
|
||||
|
||||
// create the folder
|
||||
if (! CKFolder::exists($path)) {
|
||||
CKFolder::create($path);
|
||||
}
|
||||
|
||||
$exportfiledest = $path . '/backup_' . $id . '_' . date("d-m-Y-G-i-s") . '.ssck';
|
||||
CKFile::write($exportfiledest, $params);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2017 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkpro extends CKFormField {
|
||||
|
||||
protected $type = 'ckpro';
|
||||
|
||||
private $state;
|
||||
|
||||
protected function getLabel() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getInput() {
|
||||
$html = array();
|
||||
|
||||
// Add the label text and closing tag.
|
||||
$html[] = '<div id="' . $this->id . '-lbl" class="ckinfo">';
|
||||
$html[] = '<i class="fas fa-info" style="color:green"></i>';
|
||||
$html[] = \Joomla\CMS\Language\Text::_('SLIDESHOWCK_USE_PRO_VERSION');
|
||||
$html[] = ' <a href="https://www.joomlack.fr/en/documentation/miscellaneous/202-license-code" target="_blank">';
|
||||
$html[] = '<span class="cklabel cklabel-info"><i class="fas fa-link"></i> ' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_GET_LICENCE_INFOS') . '</label>';
|
||||
$html[] = '</a>';
|
||||
$html[] = '</div>';
|
||||
|
||||
return implode('', $html);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2017 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkproducts extends CKFormField {
|
||||
|
||||
protected $type = 'ckproducts';
|
||||
|
||||
protected function getLabel() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getInput() {
|
||||
$html = '<style>
|
||||
.ckproduct {
|
||||
padding: 10px 20px;
|
||||
display: inline-block;
|
||||
color: #1f496e;
|
||||
border: 1px solid #1f496e;
|
||||
margin: 3px;
|
||||
border-radius: 2px;
|
||||
transition: 0.3s all;
|
||||
}
|
||||
.ckproduct:hover {
|
||||
background: #1f496e;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
<h3>' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_VISIT_OTHER_PRODUCTS') . '</h3>
|
||||
<div>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/accordeonmenu-ck">Accordeon Menu CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/beautiful-ck">Beautiful CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/carousel-ck">Carousel CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/download-joomla-extensions/view_category/37-cookies-ck">Cookies CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/floating-module-ck">Floating Module CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/image-effect-ck">Image Effect CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/maximenu-ck">Maximenu CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/mediabox-ck">Mediabox CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/menu-manager-ck">Menu Manager CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/extensions-joomla/mobile-menu-ck">Mobile Menu CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/modules-manager-ck">Modules Manager CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/page-builder-ck">Page Builder CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/en/joomla-extensions/scroll-to-ck">Scroll To CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr/extensions-joomla/tooltip-gc">Tooltip CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.template-creator.com">Template Creator CK</a>
|
||||
<a class="ckproduct" target="_blank" href="https://www.joomlack.fr">And more...</a>
|
||||
</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2017 Cedric KEIFLIN alias ced1870
|
||||
* http://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkproonly extends CKFormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
*/
|
||||
protected $type = 'ckproonly';
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
*/
|
||||
protected function getLabel()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the field label markup.
|
||||
*
|
||||
* @return string The field label markup.
|
||||
*
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
$html = '<div class="ckinfo"><i class="fas fa-info"></i><a href="https://www.joomlack.fr/en/joomla-extensions/slideshow-ck" target="_blank">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_ONLY_PRO') . '</a></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a variable from the manifest file
|
||||
*
|
||||
* @return the current version
|
||||
*/
|
||||
public static function getCurrentVersion($file_url) {
|
||||
// get the version installed
|
||||
$installed_version = 'UNKOWN';
|
||||
if ($xml_installed = simplexml_load_file($file_url)) {
|
||||
$installed_version = (string)$xml_installed->version;
|
||||
}
|
||||
|
||||
return $installed_version;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkradio extends CKFormField {
|
||||
|
||||
protected $type = 'ckradio';
|
||||
|
||||
protected function getInput() {
|
||||
$html = array();
|
||||
|
||||
// Initialize some field attributes.
|
||||
$class = $this->element['class'] ? ' class="radio ' . (string) $this->element['class'] . '"' : ' class="radio"';
|
||||
$icon = $this->element['icon'];
|
||||
|
||||
// Start the radio field output.
|
||||
$html[] = $icon ? '<div style="display:inline-block;vertical-align:top;margin-top:5px;width:20px;"><img src="' . $this->mediaPath . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
$html[] = '<fieldset id="' . $this->id . '-fieldset"' . $class . ' style="display:inline-block;">';
|
||||
$html[] = '<input type="hidden" isradio="1" id="' . $this->id . '" class="' . $this->element['class'] . '" value="' . $this->value . '" />';
|
||||
|
||||
// Get the field options.
|
||||
$options = $this->getOptions();
|
||||
|
||||
// Build the radio field output.
|
||||
foreach ($options as $i => $option) {
|
||||
|
||||
if (stristr($option->text, "img:"))
|
||||
$option->text = '<img src="' . $this->mediaPath . str_replace("img:", "", $option->text) . '" style="margin:0; float:none;" />';
|
||||
|
||||
// Initialize some option attributes.
|
||||
$checked = ((string) $option->value == (string) $this->value) ? ' checked="checked"' : '';
|
||||
$class = !empty($option->class) ? ' class="' . $option->class . '"' : '';
|
||||
$disabled = !empty($option->disable) ? ' disabled="disabled"' : '';
|
||||
|
||||
// Initialize some JavaScript option attributes.
|
||||
$onclick = !empty($option->onclick) ? ' onclick="' . $option->onclick . '"' : '';
|
||||
$onclick = ' onclick="$(\'' . $this->id . '\').setProperty(\'value\',this.value);"';
|
||||
|
||||
$html[] = '<input type="radio" id="' . $this->id . $i . '" name="' . $this->name . '"' . ' value="'
|
||||
. htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8') . '"' . $checked . $class . $onclick . $disabled . '/>';
|
||||
|
||||
$html[] = '<label for="' . $this->id . $i . '"' . $class . '>'
|
||||
. \Joomla\CMS\Language\Text::alt($option->text, preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)) . '</label>';
|
||||
}
|
||||
|
||||
// End the radio field output.
|
||||
$html[] = '</fieldset>';
|
||||
|
||||
return implode($html);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
require_once JPATH_ADMINISTRATOR . '/components/com_slideshowck/helpers/ckframework.php';
|
||||
require_once JPATH_ADMINISTRATOR . '/components/com_slideshowck/helpers/helper.php';
|
||||
|
||||
Slideshowck\CKFramework::load();
|
||||
SlideshowckHelper::loadCkbox();
|
||||
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_ADDSLIDE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SELECTIMAGE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SELECT_LINK');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_REMOVE2');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SELECT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_CAPTION');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_USETOSHOW');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_IMAGE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_VIDEO');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TEXTOPTIONS');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_IMAGEOPTIONS');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_LINKOPTIONS');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_VIDEOOPTIONS');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_ALIGNEMENT_LABEL');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TOPLEFT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TOPCENTER');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TOPRIGHT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_MIDDLELEFT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_CENTER');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_MIDDLERIGHT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_BOTTOMLEFT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_BOTTOMCENTER');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_BOTTOMRIGHT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_LINK');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TARGET');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SAMEWINDOW');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_NEWWINDOW');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_VIDEOURL');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_REMOVE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_IMPORTFROMFOLDER');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_ARTICLEOPTIONS');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SLIDETIME');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_CLEAR');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SELECT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TITLE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_STARTDATE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_ENDDATE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SAVE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TEXT_CUSTOM');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_ARTICLE');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_TEXT');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_VIDEO_AUTOPLAY');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_VIDEO_LOOP');
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_VIDEO_CONTROLS');
|
||||
\Joomla\CMS\Language\Text::script('CK_SAVE_CLOSE');
|
||||
|
||||
class JFormFieldCkslidesmanager extends CKFormField {
|
||||
|
||||
protected $type = 'ckslidesmanager';
|
||||
|
||||
protected function getInput() {
|
||||
|
||||
// loads the language files from the frontend
|
||||
$lang = \Joomla\CMS\Factory::getLanguage();
|
||||
$lang->load('com_slideshowck', JPATH_SITE . '/components/com_slideshowck', $lang->getTag(), false);
|
||||
$lang->load('com_slideshowck', JPATH_SITE, $lang->getTag(), false);
|
||||
|
||||
require_once(JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/defines.js.php');
|
||||
$path = 'media/com_slideshowck/assets/elements/ckslidesmanager/';
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('jquery.framework');
|
||||
// \Joomla\CMS\HTML\HTMLHelper::_('jquery.ui', array('core', 'sortable'));
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('script', 'media/com_slideshowck/assets/jquery-uick-custom.js');
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('script', 'media/com_slideshowck/assets/admin.js');
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('script', $path . 'ckslidesmanager.js');
|
||||
if (\Slideshowck\CKFof::isSite()) {
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('stylesheet', 'media/com_slideshowck/assets/front-edition.css');
|
||||
}
|
||||
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('stylesheet', 'media/com_slideshowck/assets/jquery-ui.min.css');
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('stylesheet', $path . 'ckslidesmanager.css');
|
||||
|
||||
$html = '<input name="' . $this->name . '" id="ckslides" type="hidden" value="' . $this->value . '" />'
|
||||
. '<div class="ckaddslide ckbutton ckbutton-success" onclick="javascript:ckAddSlide(false, \'top\');"><i class="far fa-plus-square"></i> ' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_ADDSLIDE') . '</div>'
|
||||
. '<ul id="ckslideslist" class="ckinterface" style="clear:both;"></ul>'
|
||||
. '<div class="ckaddslide ckbutton ckbutton-success" onclick="javascript:ckAddSlide();"><i class="far fa-plus-square"></i> ' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_ADDSLIDE') . '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
protected function getLabel() {
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
include_once 'slideshowcklist.php';
|
||||
|
||||
class JFormFieldCksource extends JFormFieldSlideshowcklistBase
|
||||
{
|
||||
|
||||
protected $type = 'cksource';
|
||||
|
||||
private $options;
|
||||
|
||||
function __construct($form = null) {
|
||||
parent::__construct($form);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the field options.
|
||||
*
|
||||
* @return array The field option objects.
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function getOptions() {
|
||||
$options = array();
|
||||
|
||||
foreach ($this->element->children() as $option) {
|
||||
|
||||
// Only add <option /> elements.
|
||||
if ($option->getName() != 'option') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create a new option object based on the <option /> element.
|
||||
$tmp = \Joomla\CMS\HTML\HTMLHelper::_(
|
||||
'select.option', (string) $option['value'], \Joomla\CMS\Language\Text::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)), 'value', 'text', ((string) $option['disabled'] == 'true')
|
||||
);
|
||||
|
||||
// Set some option attributes.
|
||||
$tmp->class = (string) $option['class'];
|
||||
|
||||
// Set some JavaScript option attributes.
|
||||
$tmp->onclick = (string) $option['onclick'];
|
||||
|
||||
// Add the option object to the result set.
|
||||
$options[] = $tmp;
|
||||
}
|
||||
|
||||
$this->options = $options;
|
||||
|
||||
// load the custom plugins
|
||||
if (\Joomla\CMS\Plugin\PluginHelper::isEnabled('system', 'slideshowck')) {
|
||||
// load the custom plugins
|
||||
require_once(JPATH_ADMINISTRATOR . '/components/com_slideshowck/helpers/ckfof.php');
|
||||
Slideshowck\CKFof::importPlugin('slideshowck');
|
||||
$sources = Slideshowck\CKFof::triggerEvent('onSlideshowckGetSourceName');
|
||||
|
||||
if (count($sources)) {
|
||||
foreach ($sources as $source) {
|
||||
|
||||
if (! $this->findOption($source)) {
|
||||
$tmp = \Joomla\CMS\HTML\HTMLHelper::_(
|
||||
'select.option', (string) $source, \Joomla\CMS\Language\Text::alt(trim((string) 'SLIDESHOWCK_SOURCE_' . strtoupper($source)), preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)), 'value', 'text', '0'
|
||||
);
|
||||
// Add the option object to the result set.
|
||||
$this->options[] = $tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reset($this->options);
|
||||
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function findOption($source) {
|
||||
foreach ($this->options as $o) {
|
||||
if ($o->value == $source) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCkspacer extends CKFormField {
|
||||
|
||||
protected $type = 'ckspacer';
|
||||
|
||||
protected function getLabel() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getInput() {
|
||||
$html = array();
|
||||
$class = $this->element['class'] ? (string) $this->element['class'] : '';
|
||||
|
||||
$style = $this->element['style'] ? $this->element['style'] : '';
|
||||
|
||||
if ($style == 'title') {
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
$styles = '.ckinfo.cktitle {
|
||||
background:#666;
|
||||
color: #eee;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
';
|
||||
$doc->addStyleDeclaration($styles);
|
||||
}
|
||||
|
||||
if ((string) $this->element['hr'] == 'true') {
|
||||
$html[] = '<hr class="' . $class . '" />';
|
||||
} else {
|
||||
$label = '';
|
||||
// Get the label text from the XML element, defaulting to the element name.
|
||||
$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
|
||||
$text = $this->translateLabel ? \Joomla\CMS\Language\Text::_($text) : $text;
|
||||
|
||||
// Test to see if the patch is installed
|
||||
$testpatch = $this->element['testpatch'] ? $this->testPatch($this->element['testpatch']) : null;
|
||||
$text = $testpatch ? $testpatch : $text;
|
||||
|
||||
// set the icon
|
||||
$icon = $this->element['icon'] ? $this->element['icon'] : 'info';
|
||||
$html[] = '<div class="ckinfo' . ($style == 'title' ? ' cktitle' : '') . '">' . ($style == 'title' ? '' : '<i class="fas fa-' . $icon . '"></i>') . $text . '</div>';
|
||||
}
|
||||
|
||||
return implode('', $html);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2016 Cedric KEIFLIN alias ced1870
|
||||
* http://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
require_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/helper.php';
|
||||
|
||||
\Joomla\CMS\Language\Text::script('SLIDESHOWCK_SAVE_CLOSE');
|
||||
|
||||
class JFormFieldCkstyle extends CKFormField {
|
||||
|
||||
protected $type = 'ckstyle';
|
||||
|
||||
protected function getInput() {
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
// Initialize some field attributes.
|
||||
$js = 'function ckSelectStyle(id, name, close) {
|
||||
if (!close && close != false) close = true;
|
||||
jQuery("#' . $this->id . '").val(id);
|
||||
jQuery("#' . $this->id . 'name").val(name);
|
||||
if (close) CKBox.close(\'#ckstylesmodal .ckboxmodal-button\');
|
||||
}';
|
||||
$doc->addScriptDeclaration($js);
|
||||
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
$size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
|
||||
$maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
|
||||
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
|
||||
$readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : '';
|
||||
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
|
||||
$defautlwidth = $suffix ? '128px' : '150px';
|
||||
$styles = ' style="width:'.$defautlwidth.';'.$this->element['styles'].'"';
|
||||
$styleName = SlideshowckHelper::getStyleNameById($this->value);
|
||||
|
||||
// Initialize JavaScript field attributes.
|
||||
$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
|
||||
$html = $icon ? '<div style="display:inline-block;vertical-align:top;margin-top:4px;width:20px;"><img src="' . SLIDESHOWCK_MEDIA_URI . '/images/' . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
|
||||
$html .= '<div class="ckbutton-group">';
|
||||
$html .= '<input type="hidden" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
|
||||
. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . $styles . '/>';
|
||||
$html .= '<input type="text" disabled name="' . $this->name . 'name" id="' . $this->id . 'name"' . ' value="'
|
||||
. htmlspecialchars($styleName) . '"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . $styles . '/>';
|
||||
$footerHtml = '<a class="ckboxmodal-button" href="javascript:void(0)" onclick="ckSaveIframe(\'test\')">' . \Joomla\CMS\Language\Text::_('CK_CREATE_NEW') . '</a>';
|
||||
$html .= '<div class="ckbutton" onclick="CKBox.open({id: \'ckstylesmodal\', url: \'index.php?option=com_slideshowck&view=styles&tmpl=component&layout=modal\', style: {padding: \'0px\'}})"><i class="fas fa-mouse-pointer "></i> ' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_SELECT') . '</div>';
|
||||
$html .= '<div class="ckbutton" onclick="CKBox.open({url: \'index.php?option=com_slideshowck&view=style&tmpl=component&layout=modal&id=\'+jQuery(\'#' . $this->id . '\').val()+\'\'})"><i class="fas fa-edit"></i> ' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_EDIT') . '</div>';
|
||||
$html .= '<div class="ckbutton cktip" onclick="jQuery(\'#' . $this->id . '\').val(\'\');jQuery(\'#' . $this->id . 'name\').val(\'\');" title="' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_REMOVE') . '"><i class="fas fa-times"></i></div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldCktext extends CKFormField {
|
||||
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected $type = 'cktext';
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function getInput() {
|
||||
// Initialize some field attributes.
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
$size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
|
||||
$maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : '';
|
||||
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
|
||||
$readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : '';
|
||||
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
|
||||
$defautlwidth = $suffix ? '128px' : '150px';
|
||||
$styles = ' style="width:' . $defautlwidth . ';' . $this->element['styles'] . '"';
|
||||
|
||||
// Initialize JavaScript field attributes.
|
||||
$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';
|
||||
$html = $icon ? '<div style="display:inline-block;vertical-align:top;margin-top:4px;width:20px;"><img src="' . $this->mediaPath . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
$html .= '<input type="text" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
|
||||
. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . $styles . '/>';
|
||||
if ($suffix)
|
||||
$html .= '<span style="display:inline-block;line-height:25px;">' . $suffix . '</span>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* Module Maximenu CK
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
\Joomla\CMS\Form\FormHelper::loadFieldClass('color');
|
||||
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\Field\ColorField')) {
|
||||
class JFormFieldSlideshowckcolorBase extends \Joomla\CMS\Form\Field\ColorField {}
|
||||
} else {
|
||||
class JFormFieldSlideshowckcolorBase extends JFormFieldColor {}
|
||||
}
|
||||
|
||||
class JFormFieldSlideshowckcolor extends JFormFieldSlideshowckcolorBase {
|
||||
|
||||
protected $type = 'slideshowckcolor';
|
||||
|
||||
protected function getInput() {
|
||||
// Initialize some field attributes.
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
|
||||
$html = '';
|
||||
if (version_compare(JVERSION, '4') < 0) {
|
||||
$html .= '<div style="display:inline-block;vertical-align:top;margin-top:4px;width:20px;"><img src="' . SLIDESHOWCK_MEDIA_URI . '/images/color.png" style="margin-right:5px;" /></div>';
|
||||
}
|
||||
|
||||
$html .= parent::getInput();
|
||||
if ($suffix)
|
||||
$html .= '<span style="display:inline-block;line-height:25px;">' . $suffix . '</span>';
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2017 Cedric KEIFLIN alias ced1870
|
||||
* http://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
use Slideshowck\CKFramework;
|
||||
|
||||
include_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/ckframework.php';
|
||||
include_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/defines.php';
|
||||
|
||||
\Joomla\CMS\Form\FormHelper::loadFieldClass('hidden');
|
||||
CKFramework::load();
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\Field\HiddenField')) {
|
||||
class JFormFieldSlideshowckinterfaceBase extends \Joomla\CMS\Form\Field\HiddenField {}
|
||||
} else {
|
||||
class JFormFieldSlideshowckinterfaceBase extends JFormFieldHidden {}
|
||||
}
|
||||
|
||||
class JFormFieldSlideshowckinterface extends JFormFieldSlideshowckinterfaceBase
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
*/
|
||||
protected $type = 'slideshowckinterface';
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
*/
|
||||
protected function getLabel()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the field label markup.
|
||||
*
|
||||
* @return string The field label markup.
|
||||
*
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// loads the language files from the frontend
|
||||
$lang = \Joomla\CMS\Factory::getLanguage();
|
||||
$lang->load('com_slideshowck', JPATH_SITE . '/components/com_slideshowck', $lang->getTag(), false);
|
||||
$lang->load('com_slideshowck', JPATH_SITE, $lang->getTag(), false);
|
||||
|
||||
if (version_compare(JVERSION, '4') >= 0) {
|
||||
$css = '.slideshowck-field-suffix {
|
||||
display: inline-block;
|
||||
line-height: 25px;
|
||||
transform: translate(0, -50%);
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
height: 25px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.slideshowck-field-icon {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: 10px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.slideshowck-field-icon + input,
|
||||
.slideshowck-field-icon + fieldset,
|
||||
.slideshowck-field-icon + select {
|
||||
display: inline-block;
|
||||
width: calc(100% - 30px);
|
||||
}
|
||||
|
||||
.ckbutton-group input[type="text"] {
|
||||
min-height: 28px;
|
||||
box-sizing: border-box;
|
||||
font-size: 13px;
|
||||
}';
|
||||
} else {
|
||||
$css = '.slideshowck-field-icon {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: 4px;
|
||||
width: 20px;
|
||||
}';
|
||||
}
|
||||
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
$doc->addStyleDeclaration($css);
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
jimport('joomla.html.html');
|
||||
jimport('joomla.form.formfield');
|
||||
|
||||
include_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/defines.php';
|
||||
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\Field\ListField')) {
|
||||
class JFormFieldSlideshowcklistBase extends \Joomla\CMS\Form\Field\ListField {}
|
||||
} else {
|
||||
class JFormFieldSlideshowcklistBase extends JFormFieldList {}
|
||||
}
|
||||
|
||||
class JFormFieldSlideshowcklist extends JFormFieldSlideshowcklistBase {
|
||||
|
||||
protected $type = 'slideshowcklist';
|
||||
|
||||
protected function getInput() {
|
||||
// Initialize some field attributes.
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
|
||||
$html = $icon ? '<div class="slideshowck-field-icon" ' . ($suffix ? 'data-has-suffix="1"' : '') . '><img src="' . SLIDESHOWCK_MEDIA_URI . '/images/' . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
|
||||
$html .= parent::getInput();
|
||||
if ($suffix)
|
||||
$html .= '<span class="slideshowck-field-suffix">' . $suffix . '</span>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
\Joomla\CMS\Form\FormHelper::loadFieldClass('radio');
|
||||
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\Field\RadioField')) {
|
||||
class JFormFieldSlideshowckradioBase extends \Joomla\CMS\Form\Field\RadioField {}
|
||||
} else {
|
||||
class JFormFieldSlideshowckradioBase extends JFormFieldRadio {}
|
||||
}
|
||||
|
||||
class JFormFieldSlideshowckradio extends JFormFieldSlideshowckradioBase {
|
||||
|
||||
protected $type = 'slideshowckradio';
|
||||
|
||||
protected function getInput() {
|
||||
// Initialize some field attributes.
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
|
||||
$html = $icon ? '<div class="slideshowck-field-icon" ' . ($suffix ? 'data-has-suffix="1"' : '') . '><img src="' . SLIDESHOWCK_MEDIA_URI . '/images/' . $icon . '" style="margin-right:5px;" /></div>' : '<div style="display:inline-block;width:20px;"></div>';
|
||||
|
||||
$html .= parent::getInput();
|
||||
if ($suffix)
|
||||
$html .= '<span class="slideshowck-field-suffix">' . $suffix . '</span>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
protected function getOptions()
|
||||
{
|
||||
$options = parent::getOptions();
|
||||
foreach ($options as $option) {
|
||||
if (stristr($option->text, "img:"))
|
||||
$option->text = '<img src="' . SLIDESHOWCK_MEDIA_URI . '/images/' . str_replace("img:", "", $option->text) . '" style="margin:0; float:none;" />';
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once 'ckformfield.php';
|
||||
|
||||
class JFormFieldSlideshowckspacer extends CKFormField {
|
||||
|
||||
protected $type = 'slideshowckspacer';
|
||||
|
||||
protected function getLabel() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getInput() {
|
||||
$html = array();
|
||||
$class = $this->element['class'] ? (string) $this->element['class'] : '';
|
||||
|
||||
$style = $this->element['style'] ? $this->element['style'] : '';
|
||||
|
||||
if ($style == 'title') {
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
$styles = '.ckinfo.cktitle {
|
||||
background:#666;
|
||||
color: #eee;
|
||||
text-transform: uppercase;
|
||||
font-weight: normal;
|
||||
line-height: 24px;
|
||||
padding: 8px 5px 8px 35px;
|
||||
margin: 3px 0;
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
';
|
||||
$doc->addStyleDeclaration($styles);
|
||||
}
|
||||
|
||||
if ((string) $this->element['hr'] == 'true') {
|
||||
$html[] = '<hr class="' . $class . '" />';
|
||||
} else {
|
||||
$label = '';
|
||||
// Get the label text from the XML element, defaulting to the element name.
|
||||
$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
|
||||
$text = $this->translateLabel ? \Joomla\CMS\Language\Text::_($text) : $text;
|
||||
|
||||
// set the icon
|
||||
$icon = $this->element['icon'] ? $this->element['icon'] : 'info';
|
||||
$html[] = '<div class="ckinfo' . ($style == 'title' ? ' cktitle' : '') . '">' . ($style == 'title' ? '' : '<i class="fas fa-' . $icon . '"></i>') . $text . '</div>';
|
||||
}
|
||||
|
||||
return implode('', $html);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2011-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
// custom class extension for J3 compatibility
|
||||
if (class_exists('\Joomla\CMS\Form\Field\TextField')) {
|
||||
class JFormFieldSlideshowcktextBase extends \Joomla\CMS\Form\Field\TextField {}
|
||||
} else {
|
||||
class JFormFieldSlideshowcktextBase extends JFormFieldText {}
|
||||
}
|
||||
|
||||
class JFormFieldSlideshowcktext extends JFormFieldSlideshowcktextBase {
|
||||
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'slideshowcktext';
|
||||
|
||||
protected function getInput() {
|
||||
// Initialize some field attributes.
|
||||
$icon = $this->element['icon'];
|
||||
$suffix = $this->element['suffix'];
|
||||
|
||||
$html = $icon ? '<div class="slideshowck-field-icon" ' . ($suffix ? 'data-has-suffix="1"' : '') . '><img src="' . SLIDESHOWCK_MEDIA_URI . '/images/' . $icon . '" style="margin-right:5px;" /></div>' : '<div class="slideshowck-field-icon"></div>';
|
||||
|
||||
$html .= parent::getInput();
|
||||
if ($suffix)
|
||||
$html .= '<span class="slideshowck-field-suffix">' . $suffix . '</span>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,439 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
SLIDESHOWCK_XML_DESCRIPTION = "Slideshow CK displays a slideshow with some nice effects. It is mobile compatible and responsive design. Its width adapts itself and you can slide it with your fingers."
|
||||
SLIDESHOWCK_OPTIONS_SLIDES = "Slides manager"
|
||||
SLIDESHOWCK_OPTIONS_STYLES = "Styles options"
|
||||
SLIDESHOWCK_OPTIONS_EFFECTS = "Effects options"
|
||||
SLIDESHOWCK_SKIN_LABEL = "Skin"
|
||||
SLIDESHOWCK_SKIN_DESC = "Choose a color"
|
||||
SLIDESHOWCK_ALIGNEMENT_LABEL = "Image alignment"
|
||||
SLIDESHOWCK_ALIGNEMENT_DESC = "Choose where you want to place the image"
|
||||
SLIDESHOWCK_TOP = "top"
|
||||
SLIDESHOWCK_BOTTOM = "bottom"
|
||||
SLIDESHOWCK_TOPLEFT = "top left"
|
||||
SLIDESHOWCK_TOPCENTER = "top center"
|
||||
SLIDESHOWCK_TOPRIGHT = "top right"
|
||||
SLIDESHOWCK_MIDDLELEFT = "center left"
|
||||
SLIDESHOWCK_CENTER = "center"
|
||||
SLIDESHOWCK_MIDDLERIGHT = "center right"
|
||||
SLIDESHOWCK_BOTTOMLEFT = "bottom left"
|
||||
SLIDESHOWCK_BOTTOMCENTER = "bottom center"
|
||||
SLIDESHOWCK_BOTTOMRIGHT = "bottom right"
|
||||
SLIDESHOWCK_LOADER_LABEL = "Loader icon"
|
||||
SLIDESHOWCK_LOADER_DESC = "Choose what sort of icon you want to display"
|
||||
SLIDESHOWCK_LOADER_PIE = "pie"
|
||||
SLIDESHOWCK_LOADER_BAR = "bar"
|
||||
SLIDESHOWCK_LOADER_NONE = "none"
|
||||
SLIDESHOWCK_WIDTH_LABEL = "Width"
|
||||
SLIDESHOWCK_WIDTH_DESC = "Width of the slideshow in px, you can also use the value'auto' to let it as responsive design for mobiles"
|
||||
SLIDESHOWCK_HEIGHT_LABEL = "Height"
|
||||
SLIDESHOWCK_HEIGHT_DESC = "Height of the slideshow, you can set it in px or %"
|
||||
SLIDESHOWCK_THUMBNAILS_LABEL = "Thumbnails"
|
||||
SLIDESHOWCK_THUMBNAILS_DESC = "Show the thumbnails under the slideshow"
|
||||
SLIDESHOWCK_PAGINATION_LABEL = "Pagination"
|
||||
SLIDESHOWCK_PAGINATION_DESC = "Show the buttons for pagination"
|
||||
SLIDESHOWCK_EFFECT_LABEL = "Animation effect"
|
||||
SLIDESHOWCK_EFFECT_DESC = "Choose which effect to apply. You can make a multiselection with the CTRL keyboard key"
|
||||
SLIDESHOWCK_TRANSITION_LABEL = "Transition"
|
||||
SLIDESHOWCK_TRANSITION_DESC = "Effect transition"
|
||||
SLIDESHOWCK_TIME_LABEL = "Display time"
|
||||
SLIDESHOWCK_TIME_DESC = "Time to show each image"
|
||||
SLIDESHOWCK_TRANSPERIOD_LABEL = "Transition duration"
|
||||
SLIDESHOWCK_TRANSPERIOD_DESC = "Time between two images"
|
||||
SLIDESHOWCK_AUTOADVANCE_LABEL = "Autoplay"
|
||||
SLIDESHOWCK_AUTOADVANCE_DESC = "The slideshow starts automatically"
|
||||
SLIDESHOWCK_PORTRAIT_LABEL = "Adjust the images"
|
||||
SLIDESHOWCK_PORTRAIT_DESC = "if no, the images will keep their original size"
|
||||
SLIDESHOWCK_ADDSLIDE = "Add a slide"
|
||||
SLIDESHOWCK_SELECTIMAGE = "Select an image"
|
||||
SLIDESHOWCK_CAPTION = "Caption"
|
||||
SLIDESHOWCK_USETOSHOW = "Display"
|
||||
SLIDESHOWCK_IMAGE = "Image"
|
||||
SLIDESHOWCK_VIDEO = "Video"
|
||||
SLIDESHOWCK_IMAGEOPTIONS = "Image options"
|
||||
SLIDESHOWCK_LINKOPTIONS = "Link options"
|
||||
SLIDESHOWCK_VIDEOOPTIONS = "Video options"
|
||||
SLIDESHOWCK_ALIGNEMENT_LABEL = "Alignment"
|
||||
SLIDESHOWCK_LINK = "Link url"
|
||||
SLIDESHOWCK_TARGET = "Target"
|
||||
SLIDESHOWCK_SAMEWINDOW = "open in the same window"
|
||||
SLIDESHOWCK_NEWWINDOW = "open in a new window"
|
||||
SLIDESHOWCK_VIDEOURL = "Video url"
|
||||
SLIDESHOWCK_REMOVE = "Remove this slide"
|
||||
SLIDESHOWCK_IMPORTFROMFOLDER = "Import from a folder"
|
||||
SLIDESHOWCK_LOADJQUERY_LABEL = "Load JQuery"
|
||||
SLIDESHOWCK_LOADJQUERY_DESC = "If you already have an extension that load Jquery you can choose to not load it in Slideshow CK"
|
||||
SLIDESHOWCK_LOADJQUERYEASING_LABEL = "Load JQuery Easing"
|
||||
SLIDESHOWCK_LOADJQUERYEASING_DESC = "Choose to load the script for the transitions"
|
||||
SLIDESHOWCK_LOADJQUERYMOBILE_LABEL = "Load JQuery mobile"
|
||||
SLIDESHOWCK_LOADJQUERYMOBILE_DESC = "Choose to load the script for mobiles"
|
||||
SLIDESHOWCK_THUMBNAILWIDTH_LABEL = "Thumbnail width"
|
||||
SLIDESHOWCK_THUMBNAILWIDTH_DESC = "Give the thumbnail width in px"
|
||||
SLIDESHOWCK_THUMBNAILHEIGHT_LABEL = "Thumbnail height"
|
||||
SLIDESHOWCK_THUMBNAILHEIGHT_DESC = "Give the thumbnail height in px"
|
||||
SLIDESHOWCK_NAVIGATION_HOVER = "mouseover"
|
||||
SLIDESHOWCK_NAVIGATION_ALWAYS = "always"
|
||||
SLIDESHOWCK_NAVIGATION_NONE = "none"
|
||||
SLIDESHOWCK_NAVIGATION_LABEL = "Navigation"
|
||||
SLIDESHOWCK_NAVIGATION_DESC = "Choose if you want to show the navigation buttons"
|
||||
SLIDESHOWCK_DISPLAYORDER_LABEL = "Display order"
|
||||
SLIDESHOWCK_DISPLAYORDER_DESC = "Choose the way to display the images"
|
||||
SLIDESHOWCK_DISPLAYORDER_NORMAL = "in order"
|
||||
SLIDESHOWCK_DISPLAYORDER_SHUFFLE = "shuffle"
|
||||
SLIDESHOWCK_THEME_LABEL="Theme"
|
||||
SLIDESHOWCK_THEME_DESC="Choose a theme for the slideshow"
|
||||
SLIDESHOWCK_CAPTIONEFFECT_LABEL="Caption effect"
|
||||
SLIDESHOWCK_CAPTIONEFFECT_DESC="Choose how the caption will appear"
|
||||
SLIDESHOWCK_HOVER_LABEL="Pause on mouseover"
|
||||
SLIDESHOWCK_HOVER_DESC="Pause the slideshow on mouseover"
|
||||
SLIDESHOWCK_CAPTIONSTYLES="Caption styles"
|
||||
SLIDESHOWCK_FULLPAGE_LABEL="Use it as full page background"
|
||||
SLIDESHOWCK_FULLPAGE_DESC="Load the slideshow as background of the page"
|
||||
SLIDESHOWCK_SHOWARTICLETITLE_LABEL="Show the article title"
|
||||
SLIDESHOWCK_SHOWARTICLETITLE_DESC="Choose if you want to show the article title"
|
||||
SLIDESHOWCK_OPTIONS_FROMFOLDER="Load the slides from a folder"
|
||||
SLIDESHOWCK_CHECKPARAMSPLUGIN="You must download and install the <a href="_QQ_"https://www.joomlack.fr/en/slideshowck/slideshow-params-plugin"_QQ_" target="_QQ_"_blank"_QQ_">plugin Slideshow Params</a>"
|
||||
SLIDESHOWCK_SPACER_SLIDESHOWCKPARAMS_PATCH_INSTALLED="Plugin Slideshow CK installed"
|
||||
SLIDESHOWCK_FROMFOLDERNAME_LABEL="Load from the folder"
|
||||
SLIDESHOWCK_FROMFOLDERNAME_DESC="Choose the folder from which to load the images (type the folder path, then save the module, then click on the import button)"
|
||||
SLIDESHOWCK_SLIDESSOURCE_LABEL="Images source"
|
||||
SLIDESHOWCK_SLIDESSOURCE_DESC="Choose if you want to load the images from the slides manager or a folder"
|
||||
SLIDESHOWCK_SLIDEMANAGER="Slides manager"
|
||||
SLIDESHOWCK_FOLDER="Import from a folder"
|
||||
SLIDESHOWCK_IMPORT="Import"
|
||||
SLIDESHOWCK_OPTIONS_LIGHTBOX="Lightbox Options"
|
||||
SLIDESHOWCK_LIGHTBOXTYPE_LABEL="Lightbox type"
|
||||
SLIDESHOWCK_LIGHTBOXTYPE_DESC="Choose the lightbox to use to open the links in a popup. Squeezebox is the natve script in Joomla!. Mediabox CK is the advanced Lightbox that you can download on https://www.joomlack.fr"
|
||||
SLIDESHOWCK_SQUEEZEBOX="Squeezebox"
|
||||
SLIDESHOWCK_MEDIABOXCK="Mediabox CK"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTION_LABEL="Show the caption"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTION_DESC="The caption is defined in the slide options, it can be shown in the slideshow, or in the lightbox (only if you use Mediabox CK), or both"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTION="In the slideshow"
|
||||
SLIDESHOWCK_LIGHTBOXTITLE="In the lightbox (Mediabox CK)"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTIONANDTITLE="In both"
|
||||
SLIDESHOWCK_SPACERFOLDERAUTOLOAD_LABEL="Autoload images from a folder"
|
||||
SLIDESHOWCK_SPACERFOLDERIMPORT_LABEL="Import images from a folder"
|
||||
SLIDESHOWCK_AUTOLOADFOLDERNAME_LABEL="Autoload from the folder"
|
||||
SLIDESHOWCK_AUTOLOADFOLDERNAME_DESC="Choose the folder from which to load the images automatically"
|
||||
SLIDESHOWCK_AUTOLOADFOLDER="Autoload from a folder"
|
||||
SLIDESHOWCK_MOBILEIMAGE_SPACER_LABEL="Specific images for Mobile Options"
|
||||
SLIDESHOWCK_USEMOBILEIMAGE_LABEL="Use specific images for Mobile"
|
||||
SLIDESHOWCK_USEMOBILEIMAGE_DESC="If you use this option the slideshow will detect the resolution and load an image with a prefix. For example if you set the resolution of 640px under this resolution the image 'folder/640/image.jpg' will be loaded instead of 'folder/image.jpg'. BE CAREFUL that both images exists !"
|
||||
SLIDESHOWCK_MOBILEIMAGERESOLUTION_LABEL="Max resolution for images for Mobile"
|
||||
SLIDESHOWCK_MOBILEIMAGERESOLUTION_DESC="Under this value the alternative image will be used"
|
||||
SLIDESHOWCK_LIMITSLIDES_LABEL="Number of slides"
|
||||
SLIDESHOWCK_LIMITSLIDES_DESC="This option will only be used if you set the display order on Shuffle. Then you can limit the number of slides to show."
|
||||
SLIDESHOWCK_IMAGETARGET_LABEL="Default image target"
|
||||
SLIDESHOWCK_IMAGETARGET_DESC="Choose how you want to set the link target by default for all slides"
|
||||
SLIDESHOWCK_DEFAULT="default"
|
||||
SLIDESHOWCK_LIGHTBOX="in a Lightbox"
|
||||
SLIDESHOWCK_HIKASHOP_FIELDSET_LABEL="Hikashop Options"
|
||||
SLIDESHOWCKHIKASHOP_CHECKPLUGIN="You must download and install the <a href="_QQ_"https://www.joomlack.fr/en/slideshowck/slideshow-hikashop-plugin"_QQ_" target="_QQ_"_blank"_QQ_">plugin Slideshow CK Hikashop</a>"
|
||||
|
||||
;styles
|
||||
SLIDESHOWCK_BOLD = "bold"
|
||||
SLIDESHOWCK_NORMAL = "normal"
|
||||
SLIDESHOWCK_SPACER_STYLESBACKGROUND="Background"
|
||||
SLIDESHOWCK_SPACER_STYLESROUNDEDCORNERS="Rounded corners"
|
||||
SLIDESHOWCK_SPACER_STYLESSHADOW="Shadow"
|
||||
SLIDESHOWCK_SPACER_STYLESBORDERS="Borders"
|
||||
SLIDESHOWCK_MARGIN_LABEL="External margins"
|
||||
SLIDESHOWCK_MARGIN_DESC="Margin value in px"
|
||||
SLIDESHOWCK_PADDING_LABEL="Internal margins"
|
||||
SLIDESHOWCK_PADDING_DESC="Padding value in px"
|
||||
SLIDESHOWCK_BGCOLOR1_LABEL="Background color"
|
||||
SLIDESHOWCK_BGCOLOR1_DESC="Choose the background color"
|
||||
SLIDESHOWCK_BGCOLOR2_LABEL="Gradient color"
|
||||
SLIDESHOWCK_BGCOLOR2_DESC="Choose the gradient color that will be used starting from the background color"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTL_LABEL="Top left corner"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTL_DESC="Radius value for the corner in px"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTR_LABEL="Top right corner"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTR_DESC="Radius value for the corner in px"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBR_LABEL="Bottom right corner"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBR_DESC="Radius value for the corner in px"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBL_LABEL="bottom left corner"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBL_DESC="Radius value for the corner in px"
|
||||
SLIDESHOWCK_SHADOWCOLOR_LABEL="Shadow color"
|
||||
SLIDESHOWCK_SHADOWCOLOR_DESC="Choose the color for the shadow"
|
||||
SLIDESHOWCK_SHADOWBLUR_LABEL="Shadow width"
|
||||
SLIDESHOWCK_SHADOWBLUR_DESC="Shadow width in px"
|
||||
SLIDESHOWCK_SHADOWSPREAD_LABEL="Blur"
|
||||
SLIDESHOWCK_SHADOWSPREAD_DESC="Blur value for the shadow"
|
||||
SLIDESHOWCK_OFFSETX_LABEL="Horizontal offset"
|
||||
SLIDESHOWCK_OFFSETX_DESC="Offset on the X axis, can take a negative value"
|
||||
SLIDESHOWCK_OFFSETY_LABEL="Vertical offset"
|
||||
SLIDESHOWCK_OFFSETY_DESC="Offset on the Y axis, can take a negative value"
|
||||
SLIDESHOWCK_SHADOWINSET_LABEL="Inset"
|
||||
SLIDESHOWCK_SHADOWINSET_DESC="Use the inset attribtue to create the shadow inside"
|
||||
SLIDESHOWCK_BORDERCOLOR_LABEL="Border color"
|
||||
SLIDESHOWCK_BORDERCOLOR_DESC="Choose the color for the border"
|
||||
SLIDESHOWCK_BORDERWIDTH_LABEL="Border width"
|
||||
SLIDESHOWCK_BORDERWIDTH_DESC="Width in px for the border"
|
||||
SLIDESHOWCK_SPACER_STYLESMARGIN = "Margins"
|
||||
SLIDESHOWCK_USEMARGIN_LABEL = "Use margins"
|
||||
SLIDESHOWCK_USEMARGIN_DESC = ""
|
||||
SLIDESHOWCK_USEBACKGROUND_LABEL = "Use background color"
|
||||
SLIDESHOWCK_USEBACKGROUND_DESC = ""
|
||||
SLIDESHOWCK_USEGRADIENT_LABEL = "Use gradient color"
|
||||
SLIDESHOWCK_USEGRADIENT_DESC = ""
|
||||
SLIDESHOWCK_USEROUNDEDCORNERS_LABEL = "Use rounded corners"
|
||||
SLIDESHOWCK_USEROUNDEDCORNERS_DESC = ""
|
||||
SLIDESHOWCK_USESHADOW_LABEL = "Use shadow"
|
||||
SLIDESHOWCK_USESHADOW_DESC = ""
|
||||
SLIDESHOWCK_USEBORDERS_LABEL = "Use borders"
|
||||
SLIDESHOWCK_USEBORDERS_DESC = ""
|
||||
SLIDESHOWCK_SPACER_STYLESFONT = "Font style"
|
||||
SLIDESHOWCK_USEFONT_LABEL = "Use font"
|
||||
SLIDESHOWCK_USEFONT_DESC = ""
|
||||
SLIDESHOWCK_GFONT_LABEL = "Font"
|
||||
SLIDESHOWCK_GFONT_DESC = "Choose the google font to use"
|
||||
SLIDESHOWCK_FONTWEIGHT_LABEL = "Font weight"
|
||||
SLIDESHOWCK_FONTWEIGHT_DESC = "Choose if you want the text to be bold or normal"
|
||||
SLIDESHOWCK_FONTSIZE_LABEL = "Font size"
|
||||
SLIDESHOWCK_FONTSIZE_DESC = "Give the size you want with unit (px, em, %)"
|
||||
SLIDESHOWCK_FONTCOLOR_LABEL = "Font color"
|
||||
SLIDESHOWCK_FONTCOLOR_DESC = "Choose the color for the font"
|
||||
SLIDESHOWCK_DESCFONTSIZE_LABEL = "Description font size"
|
||||
SLIDESHOWCK_DESCFONTSIZE_DESC = "Size of the description added to the link"
|
||||
SLIDESHOWCK_DESCFONTCOLOR_LABEL = "Description color"
|
||||
SLIDESHOWCK_DESCFONTCOLOR_DESC = "Color of the description added to the link"
|
||||
SLIDESHOWCK_MARGINTOP_LABEL="Margin top"
|
||||
SLIDESHOWCK_MARGINTOP_DESC="margin in px"
|
||||
SLIDESHOWCK_MARGINRIGHT_LABEL="Margin right"
|
||||
SLIDESHOWCK_MARGINRIGHT_DESC="margin in px"
|
||||
SLIDESHOWCK_MARGINBOTTOM_LABEL="Margin bottom"
|
||||
SLIDESHOWCK_MARGINBOTTOM_DESC="margin in px"
|
||||
SLIDESHOWCK_MARGINLEFT_LABEL="Margin left"
|
||||
SLIDESHOWCK_MARGINLEFT_DESC="margin in px"
|
||||
SLIDESHOWCK_PADDINGTOP_LABEL="Padding top"
|
||||
SLIDESHOWCK_PADDINGTOP_DESC="margin in px"
|
||||
SLIDESHOWCK_PADDINGRIGHT_LABEL="Padding right"
|
||||
SLIDESHOWCK_PADDINGRIGHT_DESC="margin in px"
|
||||
SLIDESHOWCK_PADDINGBOTTOM_LABEL="Padding bottom"
|
||||
SLIDESHOWCK_PADDINGBOTTOM_DESC="margin in px"
|
||||
SLIDESHOWCK_PADDINGLEFT_LABEL="Padding left"
|
||||
SLIDESHOWCK_PADDINGLEFT_DESC="margin in px"
|
||||
SLIDESHOWCK_BACKGROUNDIMAGE_LABEL="Background image"
|
||||
SLIDESHOWCK_BACKGROUNDIMAGE_DESC="Select an image to apply as background"
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONX_LABEL="Poxition X"
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONX_DESC="Choose a value with px (ex: 25px) or left, right, center, etc..."
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONY_LABEL="Poxition Y"
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONY_DESC="Choose a value with px (ex: 25px) or left, right, center, etc..."
|
||||
SLIDESHOWCK_ARTICLEOPTIONS="Article options"
|
||||
SLIDESHOWCK_ARTICLELENGTH_LABEL="Character length"
|
||||
SLIDESHOWCK_ARTICLELENGTH_DESC="The article text will be truncated after the number of characters"
|
||||
SLIDESHOWCK_ARTICLELINK_LABEL="Article link on"
|
||||
SLIDESHOWCK_ARTICLELINK_DESC="Choose if you want the link of the article to be added to the title or with a readmore link"
|
||||
SLIDESHOWCK_READMORE_OPTION="readmore link"
|
||||
SLIDESHOWCK_TITLE_OPTION="article title"
|
||||
SLIDESHOWCK_ARTICLETITLE_LABEL="Article title tag"
|
||||
SLIDESHOWCK_ARTICLETITLE_DESC="Choose which tag to use to render the title"
|
||||
SLIDESHOWCK_SLIDETIME="enter a specific time value for this slide, else it will be the default time"
|
||||
|
||||
; added 1.3.11
|
||||
SLIDESHOWCK_LIGHTBOXGROUPALBUM_LABEL="Group links into an album"
|
||||
SLIDESHOWCK_LIGHTBOXGROUPALBUM_DESC="ONLY FOR MEDIABOX CK : This will group all links into an album and enable the navigation"
|
||||
SLIDESHOWCK_CLEAR="Clear"
|
||||
SLIDESHOWCK_SELECT="Select"
|
||||
|
||||
;added 1.4.0
|
||||
SLIDESHOWCK_ARTICLEOPTIONS="Article Options"
|
||||
SLIDESHOWCK_ARTICLE_ID="Article ID"
|
||||
SLIDESHOWCK_TITLE_ONLY="title only"
|
||||
SLIDESHOWCK_DESC_ONLY="description only"
|
||||
SLIDESHOWCK_OPTIONS_SLIDESSOURCE="<img src=../modules/mod_slideshowck/elements/images/pictures.png />Slides source"
|
||||
SLIDESHOWCK_OPTIONS_FROMARTICLECATEGORY="<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin:2px 5px 0 2px; />Autoload from a category of articles"
|
||||
SLIDESHOWCK_OPTIONS_FROMFOLDER="<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin:2px 5px 0 2px; />Autoload from a folder"
|
||||
SLIDESHOWCK_OPTIONS_STYLES = "<img src=../modules/mod_slideshowck/elements/images/css.png style=display:inline-block;margin:2px 5px 0 2px; />Styles options"
|
||||
SLIDESHOWCK_OPTIONS_EFFECTS = "<img src=../modules/mod_slideshowck/elements/images/chart_curve.png style=display:inline-block;margin:2px 5px 0 2px; />Effects options"
|
||||
SLIDESHOWCK_OPTIONS_LIGHTBOX="<img src=../modules/mod_slideshowck/elements/images/magnifier_zoom_in.png style=display:inline-block;margin:2px 5px 0 2px; />Lightbox Options"
|
||||
SLIDESHOWCK_OPTIONS_ADVANCED="<img src=../modules/mod_slideshowck/elements/images/wrench.png style=display:inline-block;margin:2px 5px 0 2px; />Avanced Options"
|
||||
SLIDESHOWCK_ARTICLEOPTIONS="<img src=../modules/mod_slideshowck/elements/images/text_signature.png style=display:inline-block;margin:2px 5px 0 2px; />Article options"
|
||||
SLIDESHOWCK_CAPTIONSTYLES="<img src=../modules/mod_slideshowck/elements/images/style.png style=display:inline-block;margin:2px 5px 0 2px; />Caption styles"
|
||||
SLIDESHOWCK_HIKASHOP_FIELDSET_LABEL="<img src=../modules/mod_slideshowck/elements/images/basket.png style=display:inline-block;margin:2px 5px 0 2px; />Hikashop Options"
|
||||
SLIDESHOWCK_SLIDEMANAGER="Slides manager"
|
||||
SLIDESHOWCK_SLIDESSOURCE_LABEL="Images source"
|
||||
SLIDESHOWCK_SLIDESSOURCE_DESC="Choose if you want to load the images from the slides manager or a folder"
|
||||
SLIDESHOWCK_SPACERFOLDERIMPORT_LABEL="Import images from a folder"
|
||||
SLIDESHOWCK_TITLE="Title"
|
||||
SLIDESHOWCK_OPTIONS_SLIDES = "<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin-top:2px;margin-right:5px;margin-left:2px; />Slides manager"
|
||||
SLIDESHOWCK_CAPTION="Description"
|
||||
SLIDESHOWCK_AUTOCREATETHUMBS_LABEL="Create the thumbnails automatically"
|
||||
SLIDESHOWCK_AUTOCREATETHUMBS_DESC="The server will automatically create the thumbnail images if needed. This can cause some server overload"
|
||||
SLIDESHOWCK_BGOPACITY_LABEL="Opacity"
|
||||
SLIDESHOWCK_BGOPACITY_LABEL="Set the opacity for the background"
|
||||
|
||||
;added 1.4.6
|
||||
SLIDESHOWCK_IMAGE_OPTION="Image"
|
||||
|
||||
;added 1.4.7
|
||||
SLIDESHOWCK_CONTAINER_LABEL="Load as block background"
|
||||
SLIDESHOWCK_CONTAINER_DESC="<strong>For advanced users :</strong>Give the CSS selector for the block where you want to load the slideshow as background. For example if you want to load into a block that has an ID 'top', write '#top'. If you want to load into a block that has as css class 'top', write '.top'."
|
||||
|
||||
;added 1.4.15
|
||||
SLIDESHOWCK_SPACER_RESPONSIVE="Responsive caption"
|
||||
SLIDESHOWCK_USERESPONSIVECAPTION_LABEL="Activate the responsive caption"
|
||||
SLIDESHOWCK_USERESPONSIVECAPTION_DESC="Activate this option if you want to use the following settings for the responsive caption"
|
||||
SLIDESHOWCK_RESPONSIVERESOLUTION_LABEL="Responsive resolution"
|
||||
SLIDESHOWCK_RESPONSIVERESOLUTION_DESC="Choose a resolution value under which the following settings will apply."
|
||||
SLIDESHOWCK_RESPONSIVEFONTSIZE_LABEL="Font size"
|
||||
SLIDESHOWCK_RESPONSIVEFONTSIZE_DESC="Set the font-size to apply to the caption under the resolution that you have defined above"
|
||||
SLIDESHOWCK_RESPONSIVEHIDECAPTION_LABEL="Hide caption"
|
||||
SLIDESHOWCK_RESPONSIVEHIDECAPTION_DESC="If you don't want to show the caption at all under the resolution you have set above, then activate this option"
|
||||
|
||||
;added 1.4.21
|
||||
SLIDESHOWCK_OPTIONS_FROMFLICKR="<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin:2px 5px 0 2px; />Autoload from Flickr"
|
||||
SLIDESHOWCK_VOTE_JED="If you are using Slideshow CK, please vote on the JED."
|
||||
SLIDESHOWCK_CURRENT_VERSION="You are using the version"
|
||||
SLIDESHOWCK_NEW_VERSION_AVAILABLE="Update available"
|
||||
SLIDESHOWCK_DOWNLOAD="Download"
|
||||
SLIDESHOWCK_DOWNLOAD_DOCUMENTATTION="Download the documentation of the module"
|
||||
SLIDESHOWCK_DOWNLOAD_THEMES="Download a graphic theme for the module"
|
||||
SLIDESHOWCK_NEED_UPDATE="This extension must be updated"
|
||||
SLIDESHOWCK_REQUIRED_VERSION="You must at least install the version"
|
||||
|
||||
;added 1.4.22
|
||||
SLIDESHOWCK_MINHEIGHT_LABEL="Min-height"
|
||||
SLIDESHOWCK_MINHEIGHT_DESC="Set a min-height value to limit the size of the slideshow on small devices. This must be in px"
|
||||
SLIDESHOWCK_RESOLUTION_ADAPTATIVE="Adaptative"
|
||||
SLIDESHOWCK_RESOLUTION_STEP="Resolution step"
|
||||
SLIDESHOWCK_STARTDATE="Start date"
|
||||
SLIDESHOWCK_ENDDATE="End date"
|
||||
|
||||
;added 1.4.37
|
||||
SLIDESHOWCK_USECAPTION_LABEL="Show the caption"
|
||||
SLIDESHOWCK_USECAPTION_DESC="Select if you want to show the caption, or totally disable it"
|
||||
SLIDESHOWCK_USECAPTIONDESC_LABEL="Show description"
|
||||
SLIDESHOWCK_USECAPTIONDESC_DESC="Select if you want to show the caption description, or only the title"
|
||||
|
||||
;added 1.4.41
|
||||
SLIDESHOWCK_K2_NOTFOUND="K2 not found"
|
||||
|
||||
;added 1.4.42
|
||||
SLIDESHOWCK_LINK_POSITION_LABEL="Link position"
|
||||
SLIDESHOWCK_LINK_POSITION_DESC="Set where you want the slide link to take place"
|
||||
SLIDESHOWCK_LINK_FULLSLIDE="Full slide"
|
||||
SLIDESHOWCK_LINK_CAPTION="Caption"
|
||||
SLIDESHOWCK_LINK_TITLE="Title"
|
||||
SLIDESHOWCK_LINK_BUTTON="Button"
|
||||
|
||||
;added 1.4.43
|
||||
SLIDESHOWCK_FIXHTML_LABEL="Fix html"
|
||||
SLIDESHOWCK_FIXHTML_DESC="Fix the html code in the caption. Usefull when the text is truncated."
|
||||
|
||||
;added 1.4.52
|
||||
SLIDESHOWCK_KEYBOARD_CONTROL_LABEL="Enable keyboard control"
|
||||
SLIDESHOWCK_KEYBOARD_CONTROL_DESC="You can use the keyboard to control the slideshow (left = previous, right = next, P = play/pause)"
|
||||
|
||||
;added 1.4.63
|
||||
PLG_SLIDESHOWCK_READMORE="Read more"
|
||||
SLIDESHOWCK_STRIPTAGS_LABEL="Strip HTML tags"
|
||||
SLIDESHOWCK_STRIPTAGS_DESC="Remove all HTML formatting in the text"
|
||||
|
||||
;added 2.0.0
|
||||
SLIDESHOWCK_SOURCE_FIELDSET_LABEL="Source"
|
||||
SLIDESHOWCK_USE_FREE_VERSION="You are using the FREE version"
|
||||
SLIDESHOWCK_USE_PRO_VERSION="You are using the PRO version"
|
||||
SLIDESHOWCK_DOCUMENTATION="Read the documentation"
|
||||
SLIDESHOWCK_TEXT="Text"
|
||||
SLIDESHOWCK_IMAGE="Image"
|
||||
SLIDESHOWCK_LINK="Link"
|
||||
SLIDESHOWCK_VIDEO="Video"
|
||||
SLIDESHOWCK_ARTICLE="Article"
|
||||
SLIDESHOWCK_DATES="Dates"
|
||||
SLIDESHOWCK_REMOVE2="Remove"
|
||||
SLIDESHOWCK_SELECT_LINK="Select a link"
|
||||
SLIDESHOWCK_SOURCE_SLIDESMANAGER="Slides manager"
|
||||
SLIDESHOWCK_SOURCE_FOLDER="Folder"
|
||||
SLIDESHOWCK_SELECT="Select"
|
||||
SLIDESHOWCK_USETITLE_LABEL="Show the title"
|
||||
SLIDESHOWCK_USETITLE_DESC="Select if you want to show the title in the caption"
|
||||
SLIDESHOWCK_DISPLAY_OPTIONS_LABEL="Display"
|
||||
SLIDESHOWCK_TEXT_OPTIONS_LABEL="Text"
|
||||
SLIDESHOWCK_LINK_OPTIONS_LABEL="Link"
|
||||
SLIDESHOWCK_NUMBER_SLIDES_LABEL="Number of slides"
|
||||
SLIDESHOWCK_NUMBER_SLIDES_DESC="Give the number of slides to be shown. Leave the field empty to show all slides"
|
||||
SLIDESHOWCK_NONE="None"
|
||||
SLIDESHOWCK_LINK_BUTTON_TEXT_LABEL="Button text"
|
||||
SLIDESHOWCK_LINK_BUTTON_TEXT_DESC="Write the text to be shown in the button. You can write a STRING that will be translated using the language files with your own values"
|
||||
SLIDESHOWCK_LIGHTBOX_SPACER_LABEL="Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_LABEL="Lightbox to use"
|
||||
SLIDESHOWCK_LIGHTBOX_DESC="Choose if you want to use the Mediabox CK lightbox available on JoomlaCK.fr, or if you want to use another one"
|
||||
SLIDESHOWCK_LIGHTBOX_MEDIABOX="Mediabox CK"
|
||||
SLIDESHOWCK_LIGHTBOX_OTHER="Other"
|
||||
SLIDESHOWCK_LINK_BUTTON_TEXT="Read more"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_LABEL="Lightbox attribute"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_DESC="Set the attibute to use according to your lightbox setttings"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_VALUE_LABEL="Lightbox attribute value"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_VALUE_DESC="Set the attibute value to use according to your lightbox setttings"
|
||||
SLIDESHOWCK_LINK_BUTTON_CLASS_LABEL="Button CSS class"
|
||||
SLIDESHOWCK_LINK_BUTTON_CLASS_DESC="Write a CSS class to add to the button"
|
||||
SLIDESHOWCK_LINK_AUTOIMAGE_LABEL="Link auto to image"
|
||||
SLIDESHOWCK_LINK_AUTOIMAGE_DESC="If set to yes, it will automatically create a link to the slide image itself"
|
||||
SLIDESHOWCK_LINK_TARGET_LABEL="Link target"
|
||||
SLIDESHOWCK_LINK_TARGET_DESC="Choose if you want to open the link in the same window or in a new window"
|
||||
SLIDESHOWCK_LINK_SAME_WINDOW="Same window"
|
||||
SLIDESHOWCK_LINK_NEW_WINDOW="New window"
|
||||
SLIDESHOWCK_TITLE_TAG_LABEL="Title tag"
|
||||
SLIDESHOWCK_TITLE_TAG_DESC="Choose which tag to use to render the title"
|
||||
SLIDESHOWCK_OPTIONS_FIELDSET_LABEL="Options"
|
||||
SLIDESHOWCK_RESPONSIVE="Responsive"
|
||||
SLIDESHOWCK_EFFECTS_OPTIONS="Effects"
|
||||
SLIDESHOWCK_VISIT_OTHER_PRODUCTS="Visit the other products available on JoomlaCK"
|
||||
SLIDESHOWCK_GET_LICENCE_INFOS="See how to manage your licence key"
|
||||
SLIDESHOWCK_GET_PRO_INFOS="Get infos on the Pro version"
|
||||
SLIDESHOWCK_STYLES="Styles"
|
||||
SLIDESHOWCK_EDIT="Edit"
|
||||
SLIDESHOWCK_SELECT_STYLE_LABEL="Style"
|
||||
SLIDESHOWCK_SELECT_STYLE_DESC="Select the style to apply to your slideshow and edit it directly here"
|
||||
SLIDESHOWCK_OTHER="Other"
|
||||
SLIDESHOWCK_LIGHTBOX_LABEL="Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_DESC="Select which lightbox to use to open your links"
|
||||
SLIDESHOWCK_PORTRAIT_LABEL="Contain the images"
|
||||
SLIDESHOWCK_PORTRAIT_DESC="The images will be contained into the slideshow area without resizing"
|
||||
SLIDESHOWCK_ONLY_PRO="Only available in the Pro version. Click here to read more infos"
|
||||
SLIDESHOWCK_SOURCE_ARTICLES="Articles"
|
||||
SLIDESHOWCK_THUMBSTYPE_LABEL="Thumbnails to use"
|
||||
SLIDESHOWCK_THUMBSTYPE_DESC="Choose between reduced size image or normal size image"
|
||||
SLIDESHOWCK_THUMBSTYPE_MINI="Mini"
|
||||
SLIDESHOWCK_THUMBSTYPE_NORMAL="Normal"
|
||||
SLIDESHOWCK_MIGRATION_NEEDED="A migration is needed ! We have detected that you are editing a module that has been created with Slideshow CK V1."
|
||||
SLIDESHOWCK_MIGRATION_ACTION="Please click here to automatically update the module. If you don't do it, you may loose some configuration."
|
||||
SLIDESHOWCK_MIGRATION_SUCCESS="Migration done with success !"
|
||||
SLIDESHOWCK_MIGRATION_ERROR="Error when trying to migrate the module to the V2. Please contact the developper."
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_TITLE="How to calculate the height"
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_1="You can set up the height in <b>px</b> or <b>%</b>. If you use %, the height will be responsive and it will keep the image ratio. If you use px, then the height will always stay the same and it will crop the image."
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_2="How to calculate the height in %"
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_3="The percentage is the ratio between the height and width of your image. Note that this value is used for all images in the slideshow, so it is recommended to have all images with the same dimensions."
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_4="Take an example with an image that has the following dimensions :"
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_5="To calculate the ratio : 800 / 1280 = <b>62%</b>. Then in the height option, set the value to 62%."
|
||||
SLIDESHOWCK_RATIO_LABEL="Image ratio"
|
||||
SLIDESHOWCK_CALCULATOR="Calculator"
|
||||
SLIDESHOWCK_SAVE="Save"
|
||||
SLIDESHOWCK_PARAMS_UNPUBLISHED_INFO="Are you updating this module from the V1 to V2 of Slideshow CK ? The plugin Slideshow CK Params has been detected and it has automatically been deactivated because not compatible with the V2."
|
||||
SLIDESHOWCK_PARAMS_MIGRATION_LINK="Click here to read the instructions on how to migrate"
|
||||
SLIDESHOWCK_TEXT_CUSTOM="Custom text"
|
||||
SLIDESHOWCK_TEXT="Text"
|
||||
SLIDESHOWCK_WARNING_PLUGIN_OBSOLETE="You have a plugin that is obsolete that was working the Version 1 of Slideshow CK. This plugin is no more compatible with the Version 2 of Slideshow CK, please unpublish it."
|
||||
SLIDESHOWCK_DISABLE_PLUGIN="Click here to unpublish the plugin"
|
||||
;added 2.0.5
|
||||
SLIDESHOWCK_DEBUG_LABEL="Show debug messages"
|
||||
SLIDESHOWCK_DEBUG_DESC="Disable it if you don't want any message from the slideshow"
|
||||
;added 2.0.16
|
||||
SLIDESHOWCK_LOAD_INLINE_LABEL="Load script inline"
|
||||
SLIDESHOWCK_LOAD_INLINE_DESC="If you have some problems to render the slidehow when loaded into an article, you can use this option"
|
||||
;added 2.1.1
|
||||
SLIDESHOWCK_CONTENT_PREPARE_LABEL="Prepare content"
|
||||
SLIDESHOWCK_CONTENT_PREPARE_DESC="Call the content plugins to be triggered on the rendered content"
|
||||
;added 2.2.1
|
||||
SLIDESHOWCK_VIDEO_AUTOPLAY="Autoplay"
|
||||
SLIDESHOWCK_VIDEO_LOOP="Loop"
|
||||
SLIDESHOWCK_VIDEO_CONTROLS="Controls"
|
||||
;added 2.3.11
|
||||
SLIDESHOWCK_TITLE_IN_THUMBNAILS_LABEL="Show title in thumbs"
|
||||
;added 2.4.1
|
||||
SLIDESHOWCK_RESPONSIVEHIDEDESCRIPTION_LABEL="Hide description"
|
||||
SLIDESHOWCK_RESPONSIVEHIDEDESCRIPTION_DESC="Hide description on mobile"
|
||||
@ -0,0 +1,6 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
SLIDESHOWCK_XML_DESCRIPTION = "Slideshow CK displays a slideshow with some nice effects. It is mobile compatible and responsive design. Its width adapts itself and you can slide it with your fingers."
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,439 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
SLIDESHOWCK_XML_DESCRIPTION = "Slideshow CK affiche un slideshow avec de superbes effets. Il est compatible mobiles et responsive design. Sa largeur s'adapte à la largeur de l'écran et vous pouvez faire défiler les images en glissant le doigt sur l'écran."
|
||||
SLIDESHOWCK_OPTIONS_SLIDES = "Gestion des slides"
|
||||
SLIDESHOWCK_OPTIONS_STYLES = "Options de styles"
|
||||
SLIDESHOWCK_OPTIONS_EFFECTS = "Options des effets"
|
||||
SLIDESHOWCK_SKIN_LABEL = "Apparence"
|
||||
SLIDESHOWCK_SKIN_DESC = "Choisir une couleur"
|
||||
SLIDESHOWCK_ALIGNEMENT_LABEL = "Alignement de l'image"
|
||||
SLIDESHOWCK_ALIGNEMENT_DESC = "Permet de positionner l'image dans la zone du slideshow"
|
||||
SLIDESHOWCK_TOP = "haut"
|
||||
SLIDESHOWCK_BOTTOM = "bas"
|
||||
SLIDESHOWCK_TOPLEFT = "haut gauche"
|
||||
SLIDESHOWCK_TOPCENTER = "haut milieu"
|
||||
SLIDESHOWCK_TOPRIGHT = "haut droite"
|
||||
SLIDESHOWCK_MIDDLELEFT = "milieu gauche"
|
||||
SLIDESHOWCK_CENTER = "centre"
|
||||
SLIDESHOWCK_MIDDLERIGHT = "milieu droite"
|
||||
SLIDESHOWCK_BOTTOMLEFT = "bas gauche"
|
||||
SLIDESHOWCK_BOTTOMCENTER = "bas milieu"
|
||||
SLIDESHOWCK_BOTTOMRIGHT = "bas droite"
|
||||
SLIDESHOWCK_LOADER_LABEL = "Icône de chargement"
|
||||
SLIDESHOWCK_LOADER_DESC = "Choisir quel type d'icône afficher"
|
||||
SLIDESHOWCK_LOADER_PIE = "cercle"
|
||||
SLIDESHOWCK_LOADER_BAR = "barre"
|
||||
SLIDESHOWCK_LOADER_NONE = "aucun"
|
||||
SLIDESHOWCK_WIDTH_LABEL = "Largeur"
|
||||
SLIDESHOWCK_WIDTH_DESC = "Largeur du slideshow en px, peut aussi prendre la valeur 'auto'"
|
||||
SLIDESHOWCK_HEIGHT_LABEL = "Hauteur"
|
||||
SLIDESHOWCK_HEIGHT_DESC = "Hauteur du slideshow, peut aussi prendre une valeur en px ou en %"
|
||||
SLIDESHOWCK_THUMBNAILS_LABEL = "Miniatures"
|
||||
SLIDESHOWCK_THUMBNAILS_DESC = "Afficher les miniatures sous le slideshow"
|
||||
SLIDESHOWCK_PAGINATION_LABEL = "Pagination"
|
||||
SLIDESHOWCK_PAGINATION_DESC = "Afficher les boutons de navigation"
|
||||
SLIDESHOWCK_EFFECT_LABEL = "Effet d'animation"
|
||||
SLIDESHOWCK_EFFECT_DESC = "Choisir un effet à appliquer. On peut sélectionner plusieurs effets en maintenant la touche CTRL"
|
||||
SLIDESHOWCK_TRANSITION_LABEL = "Transition"
|
||||
SLIDESHOWCK_TRANSITION_DESC = "Transition de l'effet"
|
||||
SLIDESHOWCK_TIME_LABEL = "Durée d'affichage"
|
||||
SLIDESHOWCK_TIME_DESC = "Durée d'affichage de chaque image"
|
||||
SLIDESHOWCK_TRANSPERIOD_LABEL = "Durée de la transition"
|
||||
SLIDESHOWCK_TRANSPERIOD_DESC = "Temps nécessaire pour passer d'une image à l'autre"
|
||||
SLIDESHOWCK_AUTOADVANCE_LABEL = "Lecture automatique"
|
||||
SLIDESHOWCK_AUTOADVANCE_DESC = "Le slideshow démarre automatiquement au chargement de la page"
|
||||
SLIDESHOWCK_PORTRAIT_LABEL = "Ajuster les images"
|
||||
SLIDESHOWCK_PORTRAIT_DESC = "Si non les images conservent leur taille d'origine"
|
||||
SLIDESHOWCK_ADDSLIDE = "Ajouter un slide"
|
||||
SLIDESHOWCK_SELECTIMAGE = "Sélectionner l'image"
|
||||
SLIDESHOWCK_CAPTION = "Légende"
|
||||
SLIDESHOWCK_USETOSHOW = "Afficher"
|
||||
SLIDESHOWCK_IMAGE = "Image"
|
||||
SLIDESHOWCK_VIDEO = "Vidéo"
|
||||
SLIDESHOWCK_IMAGEOPTIONS = "Options de l'image"
|
||||
SLIDESHOWCK_LINKOPTIONS = "Options du lien"
|
||||
SLIDESHOWCK_VIDEOOPTIONS = "Options de la vidéo"
|
||||
SLIDESHOWCK_ALIGNEMENT_LABEL = "Alignement"
|
||||
SLIDESHOWCK_LINK = "Url du lien"
|
||||
SLIDESHOWCK_TARGET = "Cible"
|
||||
SLIDESHOWCK_SAMEWINDOW = "s'ouvre dans la même fenêtre"
|
||||
SLIDESHOWCK_NEWWINDOW = "s'ouvre dans une nouvelle fenêtre"
|
||||
SLIDESHOWCK_VIDEOURL = "Url de la vidéo"
|
||||
SLIDESHOWCK_REMOVE = "Supprimer ce slide"
|
||||
SLIDESHOWCK_IMPORTFROMFOLDER = "Importer d'un dossier"
|
||||
SLIDESHOWCK_LOADJQUERY_LABEL = "Charger JQuery"
|
||||
SLIDESHOWCK_LOADJQUERY_DESC = "Si vous avez une extension qui charge déjà JQuery vous pouvez choisir de ne pas charger le script de Slideshow CK"
|
||||
SLIDESHOWCK_LOADJQUERYEASING_LABEL = "Charger JQuery Easing"
|
||||
SLIDESHOWCK_LOADJQUERYEASING_DESC = "Choisissez si vous voulez charger le script pour les transitions"
|
||||
SLIDESHOWCK_LOADJQUERYMOBILE_LABEL = "Charger JQuery mobile"
|
||||
SLIDESHOWCK_LOADJQUERYMOBILE_DESC = "Choisissez de charger le script pour mobiles"
|
||||
SLIDESHOWCK_THUMBNAILWIDTH_LABEL = "Largeur de la miniature"
|
||||
SLIDESHOWCK_THUMBNAILWIDTH_DESC = "Donnez la largeur de la miniature en px"
|
||||
SLIDESHOWCK_THUMBNAILHEIGHT_LABEL = "Hauteur de la miniature"
|
||||
SLIDESHOWCK_THUMBNAILHEIGHT_DESC = "Donnez la hauteur de la miniature en px"
|
||||
SLIDESHOWCK_NAVIGATION_HOVER = "au survol"
|
||||
SLIDESHOWCK_NAVIGATION_ALWAYS = "toujours"
|
||||
SLIDESHOWCK_NAVIGATION_NONE = "aucune"
|
||||
SLIDESHOWCK_NAVIGATION_LABEL = "Navigation"
|
||||
SLIDESHOWCK_NAVIGATION_DESC = "Choisissez si vous voulez afficher les boutons de navigation"
|
||||
SLIDESHOWCK_DISPLAYORDER_LABEL = "Ordre d'affichage"
|
||||
SLIDESHOWCK_DISPLAYORDER_DESC = "Choisissez la manière d'afficher les images"
|
||||
SLIDESHOWCK_DISPLAYORDER_NORMAL = "dans l'ordre"
|
||||
SLIDESHOWCK_DISPLAYORDER_SHUFFLE = "aléatoire"
|
||||
SLIDESHOWCK_THEME_LABEL="Thème"
|
||||
SLIDESHOWCK_THEME_DESC="Choisir un thème pour le slideshow"
|
||||
SLIDESHOWCK_CAPTIONEFFECT_LABEL="Animation de la légende"
|
||||
SLIDESHOWCK_CAPTIONEFFECT_DESC="Choisir comment la légende s'anime"
|
||||
SLIDESHOWCK_HOVER_LABEL="Pause au survol"
|
||||
SLIDESHOWCK_HOVER_DESC="Met le slideshow en pause lorsque la souris le survol"
|
||||
SLIDESHOWCK_CAPTIONSTYLES="Styles de la légende"
|
||||
SLIDESHOWCK_FULLPAGE_LABEL="Utiliser comme fond de page"
|
||||
SLIDESHOWCK_FULLPAGE_DESC="Charger le slideshow en fond de page en plein écran"
|
||||
SLIDESHOWCK_SHOWARTICLETITLE_LABEL="Montrer le titre de l'article"
|
||||
SLIDESHOWCK_SHOWARTICLETITLE_DESC="Choisissez si vous voulez afficher le titre de l'article"
|
||||
SLIDESHOWCK_OPTIONS_FROMFOLDER="Charger les slides depuis un dossier"
|
||||
SLIDESHOWCK_CHECKPARAMSPLUGIN="Vous devez télécharger et installer le <a href="_QQ_"https://www.joomlack.fr/slideshowck/plugin-slideshow-params"_QQ_" target="_QQ_"_blank"_QQ_">plugin Slideshow Params</a>"
|
||||
SLIDESHOWCK_SPACER_SLIDESHOWCKPARAMS_PATCH_INSTALLED="Plugin Slideshow CK installé"
|
||||
SLIDESHOWCK_FROMFOLDERNAME_LABEL="Charger à partir du dossier"
|
||||
SLIDESHOWCK_FROMFOLDERNAME_DESC="Choisir le dossier à partir duquel charger les images (entrez le chemin à partir de la base du site puis enregistrez le module, ensuite vous pouvez importer les images)"
|
||||
SLIDESHOWCK_SLIDESSOURCE_LABEL="Sources des images"
|
||||
SLIDESHOWCK_SLIDESSOURCE_DESC="Choisir si vous voulez charger les images à partir du gestionnaire de slides ou d'un dossier"
|
||||
SLIDESHOWCK_SLIDEMANAGER="Gestionnaire de slides"
|
||||
SLIDESHOWCK_FOLDER="Importer depuis un dossier"
|
||||
SLIDESHOWCK_IMPORT="Importer"
|
||||
SLIDESHOWCK_OPTIONS_LIGHTBOX="Options pour la Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOXTYPE_LABEL="Type de Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOXTYPE_DESC="Sélectionner la lightbox à utiliser pour afficher les liens dans une popup. Squeezebox est le script natif de Joomla!. Mediabox CK est la lightbox avancée que vous pouvez télécharger sur https://www.joomlack.fr"
|
||||
SLIDESHOWCK_SQUEEZEBOX="Squeezebox"
|
||||
SLIDESHOWCK_MEDIABOXCK="Mediabox CK"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTION_LABEL="Où afficher la légende"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTION_DESC="La légende qui est définie dans les options du slide peut être affichée soit sur le slideshow, ou dans la lightbox (uniquement si vous utilisez Mediabox CK), ou les deux"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTION="Dans le slideshow"
|
||||
SLIDESHOWCK_LIGHTBOXTITLE="Dans la lightbox (Mediabox CK)"
|
||||
SLIDESHOWCK_LIGHTBOXCAPTIONANDTITLE="Dans les deux"
|
||||
SLIDESHOWCK_SPACERFOLDERAUTOLOAD_LABEL="Charger automatiquement depuis un dossier"
|
||||
SLIDESHOWCK_SPACERFOLDERIMPORT_LABEL="Importer les images depuis un dossier"
|
||||
SLIDESHOWCK_AUTOLOADFOLDERNAME_LABEL="Charger les images automatiquement depuis un dossier"
|
||||
SLIDESHOWCK_AUTOLOADFOLDERNAME_DESC="Choisir le dossier à partir duquel charger les images automatiquement"
|
||||
SLIDESHOWCK_AUTOLOADFOLDER="Charger automatiquement depuis un dossier"
|
||||
SLIDESHOWCK_MOBILEIMAGE_SPACER_LABEL="Options pour images pour Mobile"
|
||||
SLIDESHOWCK_USEMOBILEIMAGE_LABEL="Utiliser des images pour Mobile"
|
||||
SLIDESHOWCK_USEMOBILEIMAGE_DESC="Si vous activez cette option le slideshow va détecter la largeur de l'écran et charger une image alternative en dessous de cette valeur. Par exemple pour une résolution de 640px il chargera l'image 'dossier/640/image.jpg' à la place de l'image 'dossier/image.jpg'. ATTENTION à ce que les deux images existent !"
|
||||
SLIDESHOWCK_MOBILEIMAGERESOLUTION_LABEL="Resolution maxi pour les images pour Mobile"
|
||||
SLIDESHOWCK_MOBILEIMAGERESOLUTION_DESC="Sous cette largeur d'écran ce seront les images alternatives qui seront chargées"
|
||||
SLIDESHOWCK_LIMITSLIDES_LABEL="Nombre de slides"
|
||||
SLIDESHOWCK_LIMITSLIDES_DESC="Cette option n'est active que si vous avez choisi un ordre d'affichage Aléatoire. Alors vous pouvez limiter le nombre de slides à afficher."
|
||||
SLIDESHOWCK_IMAGETARGET_LABEL="Cible par défaut des liens"
|
||||
SLIDESHOWCK_IMAGETARGET_DESC="Choisir la cible par défaut des liens pour tous les slides"
|
||||
SLIDESHOWCK_DEFAULT="defaut"
|
||||
SLIDESHOWCK_LIGHTBOX="dans une Lightbox"
|
||||
SLIDESHOWCK_HIKASHOP_FIELDSET_LABEL="Options pour Hikashop"
|
||||
SLIDESHOWCKHIKASHOP_CHECKPLUGIN="Vous devez télécharger et installer le <a href="_QQ_"https://www.joomlack.fr/slideshowck/plugin-slideshow-hikashop"_QQ_" target="_QQ_"_blank"_QQ_">plugin Slideshow CK Hikashop</a>"
|
||||
|
||||
;styles
|
||||
SLIDESHOWCK_BOLD = "gras"
|
||||
SLIDESHOWCK_NORMAL = "normal"
|
||||
SLIDESHOWCK_SPACER_STYLESBACKGROUND="Arrière plan"
|
||||
SLIDESHOWCK_SPACER_STYLESROUNDEDCORNERS="Coins arrondis"
|
||||
SLIDESHOWCK_SPACER_STYLESSHADOW="Ombre"
|
||||
SLIDESHOWCK_SPACER_STYLESBORDERS="Bordures"
|
||||
SLIDESHOWCK_MARGIN_LABEL="Marges externes"
|
||||
SLIDESHOWCK_MARGIN_DESC="Valeur en px"
|
||||
SLIDESHOWCK_PADDING_LABEL="Marges internes"
|
||||
SLIDESHOWCK_PADDING_DESC="Valeur en px"
|
||||
SLIDESHOWCK_BGCOLOR1_LABEL="Couleur de fond"
|
||||
SLIDESHOWCK_BGCOLOR1_DESC="Choisir une couleur"
|
||||
SLIDESHOWCK_BGCOLOR2_LABEL="Couleur de dégradé"
|
||||
SLIDESHOWCK_BGCOLOR2_DESC="Choisir une couleur qui sera utilisé pour créer un dégradé à partir de la couleur de fond"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTL_LABEL="Haut gauche"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTL_DESC="Valeur du rayon en px"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTR_LABEL="Haut droite"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSTR_DESC="Valeur du rayon en px"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBR_LABEL="Bas droite"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBR_DESC="Valeur du rayon en px"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBL_LABEL="Bas gauche"
|
||||
SLIDESHOWCK_ROUNDEDCORNERSBL_DESC="Valeur du rayon en px"
|
||||
SLIDESHOWCK_SHADOWCOLOR_LABEL="Couleur de l'ombre"
|
||||
SLIDESHOWCK_SHADOWCOLOR_DESC="Choisir une couleur"
|
||||
SLIDESHOWCK_SHADOWBLUR_LABEL="Largeur de l'ombre"
|
||||
SLIDESHOWCK_SHADOWBLUR_DESC="Valeur en px"
|
||||
SLIDESHOWCK_SHADOWSPREAD_LABEL="Propagation"
|
||||
SLIDESHOWCK_SHADOWSPREAD_DESC="Valeur en px"
|
||||
SLIDESHOWCK_OFFSETX_LABEL="Décalage horizontal"
|
||||
SLIDESHOWCK_OFFSETX_DESC="Décalage sur l'axe X, peut aussi prendre une valeur négative"
|
||||
SLIDESHOWCK_OFFSETY_LABEL="Décalage vertical"
|
||||
SLIDESHOWCK_OFFSETY_DESC="Décalage sur l'axe Y, peut aussi prendre une valeur négative"
|
||||
SLIDESHOWCK_SHADOWINSET_LABEL="Interne"
|
||||
SLIDESHOWCK_SHADOWINSET_DESC="Ajoute l'attribut 'inset' pour créer l'ombre vers l'intérieur"
|
||||
SLIDESHOWCK_BORDERCOLOR_LABEL="Couleur de bordure"
|
||||
SLIDESHOWCK_BORDERCOLOR_DESC="Choisir une couleur"
|
||||
SLIDESHOWCK_BORDERWIDTH_LABEL="Largeur de bordure"
|
||||
SLIDESHOWCK_BORDERWIDTH_DESC="Valeur en px"
|
||||
SLIDESHOWCK_SPACER_STYLESMARGIN = "Marges"
|
||||
SLIDESHOWCK_USEMARGIN_LABEL = "Utiliser les marges"
|
||||
SLIDESHOWCK_USEMARGIN_DESC = ""
|
||||
SLIDESHOWCK_USEBACKGROUND_LABEL = "Utiliser la couleur de fond"
|
||||
SLIDESHOWCK_USEBACKGROUND_DESC = ""
|
||||
SLIDESHOWCK_USEGRADIENT_LABEL = "Utiliser la couleur de dégradé"
|
||||
SLIDESHOWCK_USEGRADIENT_DESC = ""
|
||||
SLIDESHOWCK_USEROUNDEDCORNERS_LABEL = "Utiliser les coins arrondis"
|
||||
SLIDESHOWCK_USEROUNDEDCORNERS_DESC = ""
|
||||
SLIDESHOWCK_USESHADOW_LABEL = "Utiliser l'ombre"
|
||||
SLIDESHOWCK_USESHADOW_DESC = ""
|
||||
SLIDESHOWCK_USEBORDERS_LABEL = "Utiliser les bordures"
|
||||
SLIDESHOWCK_USEBORDERS_DESC = ""
|
||||
SLIDESHOWCK_SPACER_STYLESFONT = "Style de police"
|
||||
SLIDESHOWCK_USEFONT_LABEL = "Utiliser la police"
|
||||
SLIDESHOWCK_USEFONT_DESC = ""
|
||||
SLIDESHOWCK_GFONT_LABEL = "Police"
|
||||
SLIDESHOWCK_GFONT_DESC = "Choisissez la police google à utiliser"
|
||||
SLIDESHOWCK_FONTSIZE_LABEL = "Taille de police"
|
||||
SLIDESHOWCK_FONTSIZE_DESC = "Donner la taille que vous voulez en précisant l'unité (px, em, %)"
|
||||
SLIDESHOWCK_FONTWEIGHT_LABEL = "Style de police"
|
||||
SLIDESHOWCK_FONTWEIGHT_DESC = "Choisissez si vous voulez la police en normal ou gras"
|
||||
SLIDESHOWCK_FONTCOLOR_LABEL = "Couleur de police"
|
||||
SLIDESHOWCK_FONTCOLOR_DESC = "Choisissez la couleur"
|
||||
SLIDESHOWCK_DESCFONTSIZE_LABEL = "Taille de la description"
|
||||
SLIDESHOWCK_DESCFONTSIZE_DESC = "Taille de police de la description"
|
||||
SLIDESHOWCK_DESCFONTCOLOR_LABEL = "Couleur de la description"
|
||||
SLIDESHOWCK_DESCFONTCOLOR_DESC = "Choisissez la couleur pour la description"
|
||||
SLIDESHOWCK_MARGINTOP_LABEL="Marge haute"
|
||||
SLIDESHOWCK_MARGINTOP_DESC="marge en px"
|
||||
SLIDESHOWCK_MARGINRIGHT_LABEL="Marge droite"
|
||||
SLIDESHOWCK_MARGINRIGHT_DESC="marge en px"
|
||||
SLIDESHOWCK_MARGINBOTTOM_LABEL="Marge bas"
|
||||
SLIDESHOWCK_MARGINBOTTOM_DESC="marge en px"
|
||||
SLIDESHOWCK_MARGINLEFT_LABEL="Marge gauche"
|
||||
SLIDESHOWCK_MARGINLEFT_DESC="marge en px"
|
||||
SLIDESHOWCK_PADDINGTOP_LABEL="Marge interne haut"
|
||||
SLIDESHOWCK_PADDINGTOP_DESC="marge en px"
|
||||
SLIDESHOWCK_PADDINGRIGHT_LABEL="Marge interne droite"
|
||||
SLIDESHOWCK_PADDINGRIGHT_DESC="marge en px"
|
||||
SLIDESHOWCK_PADDINGBOTTOM_LABEL="Marge interne bas"
|
||||
SLIDESHOWCK_PADDINGBOTTOM_DESC="marge en px"
|
||||
SLIDESHOWCK_PADDINGLEFT_LABEL="Marge interne gauche"
|
||||
SLIDESHOWCK_PADDINGLEFT_DESC="marge en px"
|
||||
SLIDESHOWCK_BACKGROUNDIMAGE_LABEL="Background image"
|
||||
SLIDESHOWCK_BACKGROUNDIMAGE_DESC="Select an image to apply as background"
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONX_LABEL="Poxition X"
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONX_DESC="Choose a value with px (ex: 25px) or left, right, center, etc..."
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONY_LABEL="Poxition Y"
|
||||
SLIDESHOWCK_BACKGROUNDPOSITIONY_DESC="Choose a value with px (ex: 25px) or left, right, center, etc..."
|
||||
SLIDESHOWCK_ARTICLEOPTIONS="Options de l'article"
|
||||
SLIDESHOWCK_ARTICLELENGTH_LABEL="Nombre de caractères"
|
||||
SLIDESHOWCK_ARTICLELENGTH_DESC="L'article sera coupé après le nombre de caractèrese"
|
||||
SLIDESHOWCK_ARTICLELINK_LABEL="Lien de l'article sur"
|
||||
SLIDESHOWCK_ARTICLELINK_DESC="Choisir si vous voulez que le lien de l'article soit sur le titre ou sur un lien 'Lire la suite'"
|
||||
SLIDESHOWCK_READMORE_OPTION="lien lire la suite"
|
||||
SLIDESHOWCK_TITLE_OPTION="titre de l'article"
|
||||
SLIDESHOWCK_ARTICLETITLE_LABEL="Tag du titre de l'article"
|
||||
SLIDESHOWCK_ARTICLETITLE_DESC="Choisir quel tag html utiliser pour écrire le titre de l'article"
|
||||
SLIDESHOWCK_SLIDETIME="entrez une valeur de durée d'affichage spécifique pour ce slide, sinon la durée par défaut sera utlisée"
|
||||
|
||||
; added 1.3.11
|
||||
SLIDESHOWCK_LIGHTBOXGROUPALBUM_LABEL="Grouper les liens dans un album"
|
||||
SLIDESHOWCK_LIGHTBOXGROUPALBUM_DESC="SEULEMENT POUR MEDIABOX CK : Groupe les liens dans un album et active la navigation"
|
||||
SLIDESHOWCK_CLEAR="Effacer"
|
||||
SLIDESHOWCK_SELECT="Sélectionner"
|
||||
|
||||
;added 1.4.0
|
||||
SLIDESHOWCK_ARTICLEOPTIONS="Options d'article"
|
||||
SLIDESHOWCK_ARTICLE_ID="Article ID"
|
||||
SLIDESHOWCK_TITLE_ONLY="titre seulement"
|
||||
SLIDESHOWCK_DESC_ONLY="description seulement"
|
||||
SLIDESHOWCK_OPTIONS_SLIDESSOURCE="<img src=../modules/mod_slideshowck/elements/images/pictures.png style=display:inline-block;margin:2px 5px 0 2px; />Source des slides"
|
||||
SLIDESHOWCK_OPTIONS_FROMARTICLECATEGORY="<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin:2px 5px 0 2px; />Charger automatiquement depuis une catégorie d'articles"
|
||||
SLIDESHOWCK_OPTIONS_FROMFOLDER="<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin:2px 5px 0 2px; />Charger automatiquement depuis un dossier"
|
||||
SLIDESHOWCK_OPTIONS_STYLES = "<img src=../modules/mod_slideshowck/elements/images/css.png style=display:inline-block;margin:2px 5px 0 2px; />Options de styles"
|
||||
SLIDESHOWCK_OPTIONS_EFFECTS = "<img src=../modules/mod_slideshowck/elements/images/chart_curve.png style=display:inline-block;margin:2px 5px 0 2px; />Options des effets"
|
||||
SLIDESHOWCK_OPTIONS_LIGHTBOX="<img src=../modules/mod_slideshowck/elements/images/magnifier_zoom_in.png style=display:inline-block;margin:2px 5px 0 2px; />Options pour la Lightbox"
|
||||
SLIDESHOWCK_OPTIONS_ADVANCED="<img src=../modules/mod_slideshowck/elements/images/wrench.png style=display:inline-block;margin:2px 5px 0 2px; />Options avancées"
|
||||
SLIDESHOWCK_ARTICLEOPTIONS="<img src=../modules/mod_slideshowck/elements/images/text_signature.png style=display:inline-block;margin:2px 5px 0 2px; />Options de l'article"
|
||||
SLIDESHOWCK_CAPTIONSTYLES="<img src=../modules/mod_slideshowck/elements/images/style.png style=display:inline-block;margin:2px 5px 0 2px; />Styles de la légende"
|
||||
SLIDESHOWCK_HIKASHOP_FIELDSET_LABEL="<img src=../modules/mod_slideshowck/elements/images/basket.png style=display:inline-block;margin:2px 5px 0 2px; />Options pour Hikashop"
|
||||
SLIDESHOWCK_SLIDEMANAGER="Gestionnaire de slides"
|
||||
SLIDESHOWCK_SLIDESSOURCE_LABEL="Sources des images"
|
||||
SLIDESHOWCK_SLIDESSOURCE_DESC="Choisir si vous voulez charger les images à partir du gestionnaire de slides ou d'un dossier"
|
||||
SLIDESHOWCK_SPACERFOLDERIMPORT_LABEL="Importer les images depuis un dossier"
|
||||
SLIDESHOWCK_TITLE="Titre"
|
||||
SLIDESHOWCK_OPTIONS_SLIDES = "<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin-top:2px;margin-right:5px;margin-left:2px; />Gestionnaire de slides"
|
||||
SLIDESHOWCK_CAPTION="Description"
|
||||
SLIDESHOWCK_AUTOCREATETHUMBS_LABEL="Créer les miniatures automatiquement"
|
||||
SLIDESHOWCK_AUTOCREATETHUMBS_DESC="Le serveur va créer automatiquement les miniatures. Attention cela peut générer une surcharge de votre serveur"
|
||||
SLIDESHOWCK_BGOPACITY_LABEL="Opacité"
|
||||
SLIDESHOWCK_BGOPACITY_LABEL="Définir l'opacité de l'arrière plan"
|
||||
|
||||
;added 1.4.6
|
||||
SLIDESHOWCK_IMAGE_OPTION="Image"
|
||||
|
||||
;added 1.4.7
|
||||
SLIDESHOWCK_CONTAINER_LABEL="Charger en fond de conteneur"
|
||||
SLIDESHOWCK_CONTAINER_DESC="<strong>Pour les utilisateurs avancés :</strong>Renseignez le sélecteur CSS du bloc dans lequel vous voulez charger le slideshow en arrière plan. Par exemple pour charger dans un bloc ayant pour ID 'top', écrivez '#top'. Pour un élément ayant la classe 'top', écrivez '.top'."
|
||||
|
||||
;added 1.4.15
|
||||
SLIDESHOWCK_SPACER_RESPONSIVE="Légende responsive"
|
||||
SLIDESHOWCK_USERESPONSIVECAPTION_LABEL="Activer la légende responsive"
|
||||
SLIDESHOWCK_USERESPONSIVECAPTION_DESC="Activez cette option si vous voulez utiliser les paramètres suivants pour la légende responsive"
|
||||
SLIDESHOWCK_RESPONSIVERESOLUTION_LABEL="Résolution responsive"
|
||||
SLIDESHOWCK_RESPONSIVERESOLUTION_DESC="Choisir une résolution en dessous de laquelle les paramètres suivants s'appliquent"
|
||||
SLIDESHOWCK_RESPONSIVEFONTSIZE_LABEL="Taille de police"
|
||||
SLIDESHOWCK_RESPONSIVEFONTSIZE_DESC="Définir une taille de police à appliquer à la légende en dessous de la résolution définie ci-dessus"
|
||||
SLIDESHOWCK_RESPONSIVEHIDECAPTION_LABEL="Cacher la légende"
|
||||
SLIDESHOWCK_RESPONSIVEHIDECAPTION_DESC="Si vous ne voulez pas montrer du tout la légende en dessous de la résolution définie ci-dessus, alors activez cette option"
|
||||
|
||||
;added 1.4.21
|
||||
SLIDESHOWCK_OPTIONS_FROMFLICKR="<img src=../modules/mod_slideshowck/elements/images/picture_add.png style=display:inline-block;margin:2px 5px 0 2px; />Charger automatiquement depuis Flickr"
|
||||
SLIDESHOWCK_VOTE_JED="Si vous utilisez Slideshow CK, merci de voter dans la JED."
|
||||
SLIDESHOWCK_CURRENT_VERSION="Vous utilisez la version"
|
||||
SLIDESHOWCK_NEW_VERSION_AVAILABLE="Mise à jour disponible"
|
||||
SLIDESHOWCK_DOWNLOAD="Télécharger"
|
||||
SLIDESHOWCK_DOWNLOAD_DOCUMENTATTION="Télécharger la documentation du module"
|
||||
SLIDESHOWCK_DOWNLOAD_THEMES="Télécharger un thème graphique pour le module"
|
||||
SLIDESHOWCK_NEED_UPDATE="Cette extension doit être mise à jour"
|
||||
SLIDESHOWCK_REQUIRED_VERSION="Vous devez installer au minimum la version"
|
||||
|
||||
;added 1.4.22
|
||||
SLIDESHOWCK_MINHEIGHT_LABEL="Hauteur mini"
|
||||
SLIDESHOWCK_MINHEIGHT_DESC="Définir une hauteur minimale pour le slideshow afin de limiter sa taille sur petites résolutions. La valeur doit être en px"
|
||||
SLIDESHOWCK_RESOLUTION_ADAPTATIVE="Adaptatif"
|
||||
SLIDESHOWCK_RESOLUTION_STEP="Palier de résolution"
|
||||
SLIDESHOWCK_STARTDATE="Date début"
|
||||
SLIDESHOWCK_ENDDATE="Date fin"
|
||||
|
||||
;added 1.4.37
|
||||
SLIDESHOWCK_USECAPTION_LABEL="Afficher la légende"
|
||||
SLIDESHOWCK_USECAPTION_DESC="Selectionner si vous voulez afficher la légende, ou totalement la désactiver"
|
||||
SLIDESHOWCK_USECAPTIONDESC_LABEL="Afficher la description"
|
||||
SLIDESHOWCK_USECAPTIONDESC_DESC="Selectionner si vous voulez afficher la description dans la légende, ou uniquement le titre"
|
||||
|
||||
;added 1.4.41
|
||||
SLIDESHOWCK_K2_NOTFOUND="K2 non trouvé"
|
||||
|
||||
;added 1.4.42
|
||||
SLIDESHOWCK_LINK_POSITION_LABEL="Emplacement du lien"
|
||||
SLIDESHOWCK_LINK_POSITION_DESC="Choisir où ajouter le lien"
|
||||
SLIDESHOWCK_LINK_FULLSLIDE="Slide complet"
|
||||
SLIDESHOWCK_LINK_CAPTION="Légende"
|
||||
SLIDESHOWCK_LINK_TITLE="Titre"
|
||||
SLIDESHOWCK_LINK_BUTTON="Bouton"
|
||||
|
||||
;added 1.4.43
|
||||
SLIDESHOWCK_FIXHTML_LABEL="Corriger html"
|
||||
SLIDESHOWCK_FIXHTML_DESC="Corriger le code html dans la légende. Utile lorsque le texte est trunqué."
|
||||
|
||||
;added 1.4.52
|
||||
SLIDESHOWCK_KEYBOARD_CONTROL_LABEL="Activer le contrôle clavier"
|
||||
SLIDESHOWCK_KEYBOARD_CONTROL_DESC="Vous pouvez utiliser le clavier pour contrôler le slideshow (gauche = précédent, droite = suivant, P = lecture/pause)"
|
||||
|
||||
;added 1.4.63
|
||||
PLG_SLIDESHOWCK_READMORE="Lire la suite"
|
||||
SLIDESHOWCK_STRIPTAGS_LABEL="Enlever les tags HTML"
|
||||
SLIDESHOWCK_STRIPTAGS_DESC="Supprime toutes les balises HTML du texte"
|
||||
|
||||
;added 2.0.0
|
||||
SLIDESHOWCK_SOURCE_FIELDSET_LABEL="Source"
|
||||
SLIDESHOWCK_USE_FREE_VERSION="Vous utilisez la version GRATUITE"
|
||||
SLIDESHOWCK_USE_PRO_VERSION="Vous utilisez la version PRO"
|
||||
SLIDESHOWCK_DOCUMENTATION="Consulter la documentation"
|
||||
SLIDESHOWCK_TEXT="Texte"
|
||||
SLIDESHOWCK_IMAGE="Image"
|
||||
SLIDESHOWCK_LINK="Lien"
|
||||
SLIDESHOWCK_VIDEO="Vidéo"
|
||||
SLIDESHOWCK_ARTICLE="Article"
|
||||
SLIDESHOWCK_DATES="Dates"
|
||||
SLIDESHOWCK_REMOVE2="Supprimer"
|
||||
SLIDESHOWCK_SELECT_LINK="Sélectionner un lien"
|
||||
SLIDESHOWCK_SOURCE_SLIDESMANAGER="Gestionnaire de slides"
|
||||
SLIDESHOWCK_SOURCE_FOLDER="Dossier"
|
||||
SLIDESHOWCK_SELECT="Sélectionner"
|
||||
SLIDESHOWCK_USETITLE_LABEL="Afficher le titre"
|
||||
SLIDESHOWCK_USETITLE_DESC="Selectionner si vous voulez afficher le titre dans la légende"
|
||||
SLIDESHOWCK_DISPLAY_OPTIONS_LABEL="Affichage"
|
||||
SLIDESHOWCK_TEXT_OPTIONS_LABEL="Texte"
|
||||
SLIDESHOWCK_LINK_OPTIONS_LABEL="Lien"
|
||||
SLIDESHOWCK_NUMBER_SLIDES_LABEL="Nombre de slides"
|
||||
SLIDESHOWCK_NUMBER_SLIDES_DESC="Déterminer le nombre de slides à afficher. Laissez vide pour afficher tous les slides"
|
||||
SLIDESHOWCK_NONE="Aucun"
|
||||
SLIDESHOWCK_LINK_BUTTON_TEXT_LABEL="Texte du bouton"
|
||||
SLIDESHOWCK_LINK_BUTTON_TEXT_DESC="Texte à afficher dans le bouton du lien. Vous pouvez utiliser une CHAINE à traduire dans vos fichiers de langue"
|
||||
SLIDESHOWCK_LIGHTBOX_SPACER_LABEL="Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_LABEL="Lightbox à utiliser"
|
||||
SLIDESHOWCK_LIGHTBOX_DESC="Choisir si vous voulez utiliser Mediabox CK disponible sur JoomlaCK.fr, ou une autre lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_MEDIABOX="Mediabox CK"
|
||||
SLIDESHOWCK_LIGHTBOX_OTHER="Autre"
|
||||
SLIDESHOWCK_LINK_BUTTON_TEXT="Lire la suite"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_LABEL="Attribut Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_DESC="Définir l'attribut à ajouter en fonction de votre lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_VALUE_LABEL="Valeur de l'attribut Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_ATTRIB_VALUE_DESC="Définir la valeur de l'attribut à ajouter en fonction de votre lightbox"
|
||||
SLIDESHOWCK_LINK_BUTTON_CLASS_LABEL="Classe CSS du bouton"
|
||||
SLIDESHOWCK_LINK_BUTTON_CLASS_DESC="Ecrire une classe CSS à appliquer au bouton"
|
||||
SLIDESHOWCK_LINK_AUTOIMAGE_LABEL="Lien auto sur image"
|
||||
SLIDESHOWCK_LINK_AUTOIMAGE_DESC="Si activé, cette option génère automatiquement un lien vers l'image du slide"
|
||||
SLIDESHOWCK_LINK_TARGET_LABEL="Cible du lien"
|
||||
SLIDESHOWCK_LINK_TARGET_DESC="Choisir si vous voulez ouvrir le lien dans une nouvelle fenêtre ou dans la même"
|
||||
SLIDESHOWCK_LINK_SAME_WINDOW="Même fenêtre"
|
||||
SLIDESHOWCK_LINK_NEW_WINDOW="Nouvelle fenêtre"
|
||||
SLIDESHOWCK_TITLE_TAG_LABEL="Title tag"
|
||||
SLIDESHOWCK_TITLE_TAG_DESC="Choisir quel tag HTML utiliser pour afficher le titre"
|
||||
SLIDESHOWCK_OPTIONS_FIELDSET_LABEL="Options"
|
||||
SLIDESHOWCK_RESPONSIVE="Responsive"
|
||||
SLIDESHOWCK_EFFECTS_OPTIONS="Effets"
|
||||
SLIDESHOWCK_VISIT_OTHER_PRODUCTS="Jetez un oeil aux autres produits disponibles sur JoomlaCK"
|
||||
SLIDESHOWCK_GET_LICENCE_INFOS="Voir comment gérer la clé de licence"
|
||||
SLIDESHOWCK_GET_PRO_INFOS="Obtenir des infos sur la version Pro"
|
||||
SLIDESHOWCK_STYLES="Styles"
|
||||
SLIDESHOWCK_EDIT="Editer"
|
||||
SLIDESHOWCK_SELECT_STYLE_LABEL="Style"
|
||||
SLIDESHOWCK_SELECT_STYLE_DESC="Selectionner le style à applliquer à votre slideshow"
|
||||
SLIDESHOWCK_OTHER="Autre"
|
||||
SLIDESHOWCK_LIGHTBOX_LABEL="Lightbox"
|
||||
SLIDESHOWCK_LIGHTBOX_DESC="Selectionner quelle lightbox utiliser pour ouvrir les liens"
|
||||
SLIDESHOWCK_PORTRAIT_LABEL="Contenir les images"
|
||||
SLIDESHOWCK_PORTRAIT_DESC="Les images vont être réduites à la zone du slideshow, sans déformation"
|
||||
SLIDESHOWCK_ONLY_PRO="Seulement disponible dans la version Pro. Cliquez ici pour en savoir plus."
|
||||
SLIDESHOWCK_SOURCE_ARTICLES="Articles"
|
||||
SLIDESHOWCK_THUMBSTYPE_LABEL="Miniatures à utiliser"
|
||||
SLIDESHOWCK_THUMBSTYPE_DESC="Choisir entre l'image de taille normale et l'image de taille réduite"
|
||||
SLIDESHOWCK_THUMBSTYPE_MINI="Mini"
|
||||
SLIDESHOWCK_THUMBSTYPE_NORMAL="Normal"
|
||||
SLIDESHOWCK_MIGRATION_NEEDED="Une migration est nécessaire ! Nous avons détecté que vous éditez un module qui a été créé avec Slideshow CK V1."
|
||||
SLIDESHOWCK_MIGRATION_ACTION="Veuillez cliquer ici pour mettre à jour automatiquement les options du slideshow. Si vous ne le faites pas vous risquez de perdre certains paramétrages."
|
||||
SLIDESHOWCK_MIGRATION_SUCCESS="Migration réalisée avec succès !"
|
||||
SLIDESHOWCK_MIGRATION_ERROR="Erreur lors de la tentative de mivration à la V2. Merci de contacter le développeur."
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_TITLE="Comment calculer la hauteur"
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_1="Vous pouvez définir la hauteur en <b>px</b> ou <b>%</b>. Si vous utilisez des %, la hauteur sera responsive et l'image conservera son ratio. Si vous utilisez des px, alors la hauteur restera toujours la même et l'image sera coupée."
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_2="Comment calculer la hauteur en %"
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_3="Le pourcentage est le ratio entre la hauteur et la largeur de votre image. Notez que cette valeur sera utilsée pour toutes les images, il est donc conseillé d'utiliser des images qui ont toutes les mêmes dimensions."
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_4="Prenons comme exemple une image qui a les dimensions suivantes :"
|
||||
SLIDESHOWCK_HEIGHT_FIELD_HELP_5="Pour calculer le ratio : 800 / 1280 = <b>62%</b>. Donc dans le champ de hauteur, saisissez 62% comme valeur."
|
||||
SLIDESHOWCK_RATIO_LABEL="Ratio de l'image"
|
||||
SLIDESHOWCK_CALCULATOR="Calculateur"
|
||||
SLIDESHOWCK_SAVE="Enregistrer"
|
||||
SLIDESHOWCK_PARAMS_UNPUBLISHED_INFO="Etes vous en train de migrer de la V1 à la V2 de Slideshow CK ? Le plugin Slideshow CK Params a été détecté et a été automatiquement désactivé car il n'est pas compatible avec la V2."
|
||||
SLIDESHOWCK_PARAMS_MIGRATION_LINK="Cliquez ici pour suivre les instructions sur la migration de la V1 à la V2"
|
||||
SLIDESHOWCK_TEXT_CUSTOM="Texte perso"
|
||||
SLIDESHOWCK_TEXT="Texte"
|
||||
SLIDESHOWCK_WARNING_PLUGIN_OBSOLETE="Vous avez un plugin obsolète qui fonctionnait avec la version 1 de Slideshow CK. Ce plugin ,n'est plus compatible avec la version 2, veuillez le désactiver."
|
||||
SLIDESHOWCK_DISABLE_PLUGIN="Cliquez ici pour désactiver le plugin"
|
||||
;added 2.0.5
|
||||
SLIDESHOWCK_DEBUG_LABEL="Voir les messages de débogage"
|
||||
SLIDESHOWCK_DEBUG_DESC="Désactivez cette option si vous ne voulez voir aucun message dans le slideshow"
|
||||
;added 2.0.16
|
||||
SLIDESHOWCK_LOAD_INLINE_LABEL="Charger les scripts en direct"
|
||||
SLIDESHOWCK_LOAD_INLINE_DESC="Si vous rencontrez des soucis de chargement lors de l'appel depuis un article, vous pouvez activer cette option"
|
||||
;added 2.1.1
|
||||
SLIDESHOWCK_CONTENT_PREPARE_LABEL="Préparer le contenu"
|
||||
SLIDESHOWCK_CONTENT_PREPARE_DESC="Charge les plugins de contenu pour qu'ils s'appliquent lors du rendu"
|
||||
;added 2.2.1
|
||||
SLIDESHOWCK_VIDEO_AUTOPLAY="Lecture auto"
|
||||
SLIDESHOWCK_VIDEO_LOOP="Boucler"
|
||||
SLIDESHOWCK_VIDEO_CONTROLS="Contrôles"
|
||||
;added 2.3.11
|
||||
SLIDESHOWCK_TITLE_IN_THUMBNAILS_LABEL="Afficher le titre sur les miniatures"
|
||||
;added 2.4.1
|
||||
SLIDESHOWCK_RESPONSIVEHIDEDESCRIPTION_LABEL="Cacher la description"
|
||||
SLIDESHOWCK_RESPONSIVEHIDEDESCRIPTION_DESC="Cacher la description sur mobile"
|
||||
@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.ck-web-creation-alsace.com
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"_QQ_"_QQ_"
|
||||
|
||||
SLIDESHOWCK_XML_DESCRIPTION = "Slideshow CK affiche un slideshow avec de superbes effets. Il est compatible mobiles et responsive design. Sa largeur s'adapte à la largeur de l'écran et vous pouvez faire défiler les images en glissant le doigt sur l'écran."
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2012-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* Module Slideshow CK
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if ($params->get('slideshowckhikashop_enable', '0') == '1') {
|
||||
if (\Joomla\CMS\Filesystem\File::exists(JPATH_ROOT . '/plugins/system/slideshowckhikashop/helper/helper_slideshowckhikashop.php')) {
|
||||
require_once JPATH_ROOT . '/plugins/system/slideshowckhikashop/helper/helper_slideshowckhikashop.php';
|
||||
$items = modSlideshowckhikashopHelper::getItems($params);
|
||||
} else {
|
||||
echo '<p style="color:red;font-weight:bold;">File /plugins/system/slideshowckhikashop/helper/helper_slideshowckhikashop.php not found ! Please download the patch for Slideshow CK - Hikashop on <a href="https://www.joomlack.fr">https://www.joomlack.fr</a></p>';
|
||||
return false;
|
||||
}
|
||||
} else if ($params->get('slideshowckjoomgallery_enable', '0') == '1') {
|
||||
if (\Joomla\CMS\Filesystem\File::exists(JPATH_ROOT . '/plugins/system/slideshowckjoomgallery/helper/helper_slideshowckjoomgallery.php')) {
|
||||
require_once JPATH_ROOT . '/plugins/system/slideshowckjoomgallery/helper/helper_slideshowckjoomgallery.php';
|
||||
$items = modSlideshowckjoomgalleryHelper::getItems($params);
|
||||
} else {
|
||||
echo '<p style="color:red;font-weight:bold;">File /plugins/system/slideshowckjoomgallery/helper/helper_slideshowckjoomgallery.php not found ! Please download the patch for Slideshow CK - Joomgallery on <a href="https://www.joomlack.fr">https://www.joomlack.fr</a></p>';
|
||||
return false;
|
||||
}
|
||||
} else if ($params->get('slideshowckvirtuemart_enable', '0') == '1') {
|
||||
if (\Joomla\CMS\Filesystem\File::exists(JPATH_ROOT . '/plugins/system/slideshowckvirtuemart/helper/helper_slideshowckvirtuemart.php')) {
|
||||
require_once JPATH_ROOT . '/plugins/system/slideshowckvirtuemart/helper/helper_slideshowckvirtuemart.php';
|
||||
$items = modSlideshowckvirtuemartHelper::getItems($params);
|
||||
} else {
|
||||
echo '<p style="color:red;font-weight:bold;">File /plugins/system/slideshowckvirtuemart/helper/helper_slideshowckvirtuemart.php not found ! Please download the patch for Slideshow CK - Virtuemart on <a href="https://www.joomlack.fr">https://www.joomlack.fr</a></p>';
|
||||
return false;
|
||||
}
|
||||
} else if ($params->get('slideshowckk2_enable', '0') == '1') {
|
||||
if (\Joomla\CMS\Filesystem\File::exists(JPATH_ROOT . '/plugins/system/slideshowckk2/helper/helper_slideshowckk2.php')) {
|
||||
require_once JPATH_ROOT . '/plugins/system/slideshowckk2/helper/helper_slideshowckk2.php';
|
||||
$items = modSlideshowckk2Helper::getItems($params);
|
||||
} else {
|
||||
echo '<p style="color:red;font-weight:bold;">File /plugins/system/slideshowckk2/helper/helper_slideshowckk2.php not found ! Please download the patch for Slideshow CK - K2 on <a href="https://www.joomlack.fr">https://www.joomlack.fr</a></p>';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
switch ($params->get('slidesssource', 'slidesmanager')) {
|
||||
case 'folder':
|
||||
$items = modSlideshowckHelper::getItemsFromfolder($params);
|
||||
|
||||
break;
|
||||
case 'autoloadfolder':
|
||||
$items = modSlideshowckHelper::getItemsAutoloadfolder($params);
|
||||
|
||||
break;
|
||||
case 'autoloadarticlecategory':
|
||||
$items = modSlideshowckHelper::getItemsAutoloadarticlecategory($params);
|
||||
break;
|
||||
case 'flickr':
|
||||
$items = modSlideshowckHelper::getItemsAutoloadflickr($params);
|
||||
break;
|
||||
case 'googlephotos':
|
||||
include_once(JPATH_SITE. '/plugins/system/slideshowckparams/helper/class-helpersource-google.php');
|
||||
$items = SlideshowckHelpersourceGoogle::getItems($params);
|
||||
break;
|
||||
default:
|
||||
// $items = modSlideshowckHelper::getItems($params);
|
||||
break;
|
||||
}
|
||||
|
||||
// if ($params->get('displayorder', 'normal') == 'shuffle')
|
||||
// shuffle($items);
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@ -0,0 +1,204 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2012-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* Module Slideshow CK
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
include_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/defines.php';
|
||||
include_once JPATH_ROOT . '/administrator/components/com_slideshowck/helpers/helper.php';
|
||||
|
||||
if (version_compare(JVERSION, '4', '<')) include_once dirname(__FILE__) . '/helper.php';
|
||||
if (! defined('SLIDESHOWCK_PATH')) define('SLIDESHOWCK_PATH', JPATH_ROOT . '/administrator/components/com_slideshowck');
|
||||
|
||||
// load the items
|
||||
$source = $params->get('source', 'slidesmanager');
|
||||
if ($source != 'slidesmanager') {
|
||||
$sourceFile = JPATH_ROOT . '/plugins/slideshowck/' . strtolower($source) . '/helper/helper_' . strtolower($source) . '.php';
|
||||
if (! file_exists($sourceFile)) {
|
||||
echo '<p syle="color:red;">Error : File plugins/slideshowck/' . strtolower($source) . '/helper/helper_' . strtolower($source) . '.php not found !</p>';
|
||||
return;
|
||||
}
|
||||
include_once $sourceFile;
|
||||
} else {
|
||||
include_once SLIDESHOWCK_PATH . '/helpers/source/' . $source . '.php';
|
||||
}
|
||||
// store the module ID in the params
|
||||
$params->set('moduleid', $module->id);
|
||||
$loaderClass = 'SlideshowckHelpersource' . ucfirst($source);
|
||||
$items = $loaderClass::getItems($params);
|
||||
|
||||
// load items for B/C if the save action has not yet been triggered
|
||||
if (version_compare(JVERSION, '4', '<')) require dirname(__FILE__) . '/legacy.php';
|
||||
|
||||
if (empty($items) || $items === false) {
|
||||
if ($params->get('debug', true) === true) echo '<p>SLIDESHOW CK : No items found.</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
if ($params->get('displayorder', 'normal') == 'shuffle')
|
||||
shuffle($items);
|
||||
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
\Joomla\CMS\HTML\HTMLHelper::_("jquery.framework", true);
|
||||
if ($params->get('loadjqueryeasing', '1')) {
|
||||
$doc->addScript(SLIDESHOWCK_MEDIA_URI . '/assets/jquery.easing.1.3.js');
|
||||
}
|
||||
|
||||
$debug = false;
|
||||
if ($debug) {
|
||||
$doc->addScript(SLIDESHOWCK_MEDIA_URI . '/assets/camera.js');
|
||||
} else {
|
||||
$doc->addScript(SLIDESHOWCK_MEDIA_URI . '/assets/camera.min.js?ver=' . SLIDESHOWCK_VERSION);
|
||||
}
|
||||
|
||||
$theme = $params->get('theme', 'default');
|
||||
$langdirection = $doc->getDirection();
|
||||
|
||||
if ($theme == 'default' && file_exists(JPATH_ROOT . '/templates/' . $doc->template . '/css/camera.css')) {
|
||||
if ($langdirection == 'rtl' && file_exists(JPATH_ROOT . '/templates/' . $doc->template . '/css/camera_rtl.css')) {
|
||||
$cssfilesrc = 'templates/' . $doc->template . '/css/camera_rtl.css';
|
||||
} else {
|
||||
$cssfilesrc = 'templates/' . $doc->template . '/css/camera.css';
|
||||
}
|
||||
} else {
|
||||
if ($langdirection == 'rtl' && file_exists(JPATH_ROOT . '/modules/mod_slideshowck/themes/' . $theme . '/css/camera_rtl.css')) {
|
||||
$cssfilesrc = 'modules/mod_slideshowck/themes/' . $theme . '/css/camera_rtl.css';
|
||||
} else {
|
||||
$cssfilesrc = 'modules/mod_slideshowck/themes/' . $theme . '/css/camera.css';
|
||||
}
|
||||
}
|
||||
$doc->addStylesheet(\Joomla\CMS\Uri\Uri::root(true) . '/' . $cssfilesrc);
|
||||
|
||||
// set the navigation variables
|
||||
if (count($items) == 1) { // for only one slide, no navigation, no button
|
||||
$navigation = "navigationHover: false,
|
||||
mobileNavHover: false,
|
||||
navigation: false,
|
||||
playPause: false,";
|
||||
} else {
|
||||
switch ($params->get('navigation', '2')) {
|
||||
case 0:
|
||||
// aucune
|
||||
$navigation = "navigationHover: false,
|
||||
mobileNavHover: false,
|
||||
navigation: false,
|
||||
playPause: false,";
|
||||
break;
|
||||
case 1:
|
||||
// toujours
|
||||
$navigation = "navigationHover: false,
|
||||
mobileNavHover: false,
|
||||
navigation: true,
|
||||
playPause: true,";
|
||||
break;
|
||||
case 2:
|
||||
default:
|
||||
// on mouseover
|
||||
$navigation = "navigationHover: true,
|
||||
mobileNavHover: true,
|
||||
navigation: true,
|
||||
playPause: true,";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$autoAdvance = (count($items) > 1) ? $params->get('autoAdvance', '1') : '0';
|
||||
// load the slideshow script
|
||||
$js = "
|
||||
jQuery(document).ready(function(){
|
||||
new Slideshowck('#camera_wrap_" . $module->id . "', {
|
||||
height: '" . $params->get('height', '400') . "',
|
||||
minHeight: '" . $params->get('minheight', '150') . "',
|
||||
pauseOnClick: false,
|
||||
hover: " . $params->get('hover', '1') . ",
|
||||
fx: '" . implode(",", $params->get('effect', array('linear'))) . "',
|
||||
loader: '" . $params->get('loader', 'pie') . "',
|
||||
pagination: " . $params->get('pagination', '1') . ",
|
||||
thumbnails: " . $params->get('thumbnails', '1') . ",
|
||||
thumbheight: " . $params->get('thumbnailheight', '100') . ",
|
||||
thumbwidth: " . $params->get('thumbnailwidth', '75') . ",
|
||||
time: " . $params->get('time', '7000') . ",
|
||||
transPeriod: " . $params->get('transperiod', '1500') . ",
|
||||
alignment: '" . $params->get('alignment', 'center') . "',
|
||||
autoAdvance: " . $autoAdvance . ",
|
||||
mobileAutoAdvance: " . $params->get('autoAdvance', '1') . ",
|
||||
portrait: " . $params->get('portrait', '0') . ",
|
||||
barDirection: '" . $params->get('barDirection', 'leftToRight') . "',
|
||||
imagePath: '" . \Joomla\CMS\Uri\Uri::base(true) . "/media/com_slideshowck/images/',
|
||||
lightbox: '" . $params->get('lightboxtype', 'mediaboxck') . "',
|
||||
fullpage: " . $params->get('fullpage', '0') . ",
|
||||
mobileimageresolution: '" . ($params->get('usemobileimage', '0') ? $params->get('mobileimageresolution', '640') : '0') . "',
|
||||
" . $navigation . "
|
||||
barPosition: '" . $params->get('barPosition', 'bottom') . "',
|
||||
responsiveCaption: " . ($params->get('usecaptionresponsive') == '2' ? '1' : '0') . ",
|
||||
keyboardNavigation: " . $params->get('keyboardnavigation', '0') . ",
|
||||
titleInThumbs: " . $params->get('titleInThumbs', '0') . ",
|
||||
container: '" . $params->get('container', '') . "'
|
||||
});
|
||||
});
|
||||
";
|
||||
|
||||
if ($params->get('loadinline', '0') == '1') {
|
||||
echo '<script>' . $js . '</script>';
|
||||
} else {
|
||||
$doc->addScriptDeclaration($js);
|
||||
}
|
||||
|
||||
$css = '';
|
||||
// load some css
|
||||
$css = "#camera_wrap_" . $module->id . " .camera_pag_ul li img, #camera_wrap_" . $module->id . " .camera_thumbs_cont ul li > img {height:" . SlideshowckHelper::testUnit($params->get('thumbnailheight', '75')) . ";}";
|
||||
|
||||
// load the caption styles
|
||||
if (version_compare(JVERSION, '4', '<')) {
|
||||
$captioncss = modSlideshowckHelper::createCss($params, 'captionstyles');
|
||||
$fontfamily = ($params->get('captionstylesusefont','0') && $params->get('captionstylestextgfont', '0')) ? "font-family:'" . $params->get('captionstylestextgfont', 'Droid Sans') . "';" : '';
|
||||
if ($fontfamily) {
|
||||
$gfonturl = str_replace(" ", "+", $params->get('captionstylestextgfont', 'Droid Sans'));
|
||||
$doc->addStylesheet('https://fonts.googleapis.com/css?family=' . $gfonturl);
|
||||
}
|
||||
|
||||
$css .= "
|
||||
#camera_wrap_" . $module->id . " .camera_caption {
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
#camera_wrap_" . $module->id . " .camera_caption > div {
|
||||
" . $captioncss['padding'] . $captioncss['margin'] . $captioncss['background'] . $captioncss['gradient'] . $captioncss['borderradius'] . $captioncss['shadow'] . $captioncss['border'] . $fontfamily . "
|
||||
}
|
||||
#camera_wrap_" . $module->id . " .camera_caption > div div.camera_caption_title {
|
||||
" . $captioncss['fontcolor'] . $captioncss['fontsize'] . "
|
||||
}
|
||||
#camera_wrap_" . $module->id . " .camera_caption > div div.camera_caption_desc {
|
||||
" . $captioncss['descfontcolor'] . $captioncss['descfontsize'] . "
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
if ($params->get('usecaptionresponsive') == '1' || $params->get('usecaptionresponsive') == '2') {
|
||||
$css .= "
|
||||
@media screen and (max-width: " . str_replace("px", "", $params->get('captionresponsiveresolution', '480')) . "px) {
|
||||
#camera_wrap_" . $module->id . " .camera_caption {
|
||||
" . ( $params->get('captionresponsivehidecaption', '0') == '1' ? "display: none !important;" : ($params->get('usecaptionresponsive') == '1' ? "font-size: " . $params->get('captionresponsivefontsize', '0.6em') ." !important;" : "") ) . "
|
||||
}
|
||||
" . ( $params->get('captionresponsivehidedescription', '0') == '1' ? "#camera_wrap_" . $module->id . " .camera_caption_desc {display: none !important;}" : "") . "
|
||||
}";
|
||||
}
|
||||
|
||||
// load the style
|
||||
if ($styleId = $params->get('styles', '')) {
|
||||
$layoutcss = str_replace('|ID|', '#camera_wrap_' . $module->id, SlideshowckHelper::getStyleLayoutcss($styleId) );
|
||||
$css .= $layoutcss;
|
||||
}
|
||||
|
||||
$doc->addStyleDeclaration($css);
|
||||
|
||||
// load the php Class for the html fixer
|
||||
if ($params->get('fixhtml', '0') == '1') include_once SLIDESHOWCK_PATH . '/helpers/htmlfixer.php';
|
||||
|
||||
// display the module
|
||||
require \Joomla\CMS\Helper\ModuleHelper::getLayoutPath('mod_slideshowck', $params->get('layout', 'default'));
|
||||
@ -0,0 +1,816 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension
|
||||
type="module"
|
||||
version="3.0"
|
||||
client="site"
|
||||
method="upgrade">
|
||||
<name>Slideshow CK</name>
|
||||
<author>Cédric KEIFLIN</author>
|
||||
<creationDate>Avril 2012</creationDate>
|
||||
<copyright>Cédric KEIFLIN</copyright>
|
||||
<license>GNU/GPL 3 http://www.gnu.org/licenses/gpl.html</license>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>2.5.0</version>
|
||||
<description>SLIDESHOWCK_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<folder>language</folder>
|
||||
<folder>themes</folder>
|
||||
<folder>tmpl</folder>
|
||||
<filename>helper.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>legacy.php</filename>
|
||||
<filename>logo_slideshowck.png</filename>
|
||||
<filename module="mod_slideshowck">mod_slideshowck.php</filename>
|
||||
<filename>mod_slideshowck.xml</filename>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">language/en-GB/en-GB.mod_slideshowck.ini</language>
|
||||
<language tag="en-GB">language/en-GB/en-GB.mod_slideshowck.sys.ini</language>
|
||||
<language tag="fr-FR">language/fr-FR/fr-FR.mod_slideshowck.ini</language>
|
||||
<language tag="fr-FR">language/fr-FR/fr-FR.mod_slideshowck.sys.ini</language>
|
||||
</languages>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic" addfieldpath="/administrator/components/com_slideshowck/elements">
|
||||
<field
|
||||
name="slideshowckinterface"
|
||||
type="slideshowckinterface"
|
||||
/>
|
||||
<field
|
||||
name="infos"
|
||||
type="ckinfo"
|
||||
/>
|
||||
<field
|
||||
name="infospro"
|
||||
type="cklight"
|
||||
/>
|
||||
<field
|
||||
name="joomlackproducts"
|
||||
type="ckproducts"
|
||||
/>
|
||||
<field
|
||||
name="v1tov2migration"
|
||||
type="ckmigrate"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset name="editionfieldset" label="SLIDESHOWCK_SOURCE_FIELDSET_LABEL">
|
||||
<field
|
||||
name="source"
|
||||
type="cksource"
|
||||
default="slidesmanager"
|
||||
label="SLIDESHOWCK_SLIDESSOURCE_LABEL"
|
||||
description="SLIDESHOWCK_SLIDESSOURCE_DESC"
|
||||
icon="image_link.png"
|
||||
>
|
||||
<option value="slidesmanager">SLIDESHOWCK_SOURCE_SLIDESMANAGER</option>
|
||||
</field>
|
||||
<field
|
||||
name="sourceproonly"
|
||||
type="ckproonly"
|
||||
label="SLIDESHOWCK_SLIDESSOURCE_PRO_ONLY"
|
||||
/>
|
||||
<field
|
||||
name="slides"
|
||||
type="ckslidesmanager"
|
||||
label="SLIDESHOWCK_SLIDES_LABEL"
|
||||
default="[{|qq|imgname|qq|:|qq|media/com_slideshowck/images/slides/bridge.jpg|qq|,|qq|imgcaption|qq|:|qq|This bridge is very long|qq|,|qq|imgtitle|qq|:|qq|This is a bridge|qq|,|qq|imgthumb|qq|:|qq|../media/com_slideshowck/images/slides/bridge.jpg|qq|,|qq|imglink|qq|:|qq||qq|,|qq|imgtarget|qq|:|qq|default|qq|,|qq|imgalignment|qq|:|qq|default|qq|,|qq|imgvideo|qq|:|qq||qq|,|qq|slidearticleid|qq|:|qq||qq|,|qq|slidearticlename|qq|:|qq||qq|,|qq|imgtime|qq|:|qq||qq|},{|qq|imgname|qq|:|qq|media/com_slideshowck/images/slides/road.jpg|qq|,|qq|imgcaption|qq|:|qq|This slideshow uses a JQuery script adapted from Pixedelic|qq|,|qq|imgtitle|qq|:|qq|On the road again|qq|,|qq|imgthumb|qq|:|qq|../media/com_slideshowck/images/slides/road.jpg|qq|,|qq|imglink|qq|:|qq||qq|,|qq|imgtarget|qq|:|qq|default|qq|,|qq|imgalignment|qq|:|qq|default|qq|,|qq|imgvideo|qq|:|qq||qq|,|qq|slidearticleid|qq|:|qq||qq|,|qq|slidearticlename|qq|:|qq||qq|,|qq|imgtime|qq|:|qq||qq|},{|qq|imgname|qq|:|qq|media/com_slideshowck/images/slides2/sea.jpg|qq|,|qq|imgcaption|qq|:|qq||qq|,|qq|imgtitle|qq|:|qq||qq|,|qq|imgthumb|qq|:|qq|../media/com_slideshowck/images/slides2/sea.jpg|qq|,|qq|imglink|qq|:|qq||qq|,|qq|imgtarget|qq|:|qq|default|qq|,|qq|imgalignment|qq|:|qq|default|qq|,|qq|imgvideo|qq|:|qq||qq|,|qq|slidearticleid|qq|:|qq||qq|,|qq|slidearticlename|qq|:|qq||qq|,|qq|imgtime|qq|:|qq||qq|}]"
|
||||
filter="raw"
|
||||
showon="source:slidesmanager"
|
||||
/>
|
||||
<field
|
||||
name="spacerfolderimport"
|
||||
type="slideshowckspacer"
|
||||
style="title"
|
||||
label="SLIDESHOWCK_SPACERFOLDERIMPORT_LABEL"
|
||||
showon="source:slidesmanager"
|
||||
/>
|
||||
<field
|
||||
type="ckproonly"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset name="optionsfieldset" label="SLIDESHOWCK_OPTIONS_FIELDSET_LABEL" >
|
||||
<field
|
||||
name="spacerdisplay"
|
||||
type="slideshowckspacer"
|
||||
label="SLIDESHOWCK_DISPLAY_OPTIONS_LABEL"
|
||||
style="title"
|
||||
/>
|
||||
<field
|
||||
name="theme"
|
||||
type="ckfolderlist"
|
||||
directory="modules/mod_slideshowck/themes"
|
||||
hide_none="true"
|
||||
hide_default="true"
|
||||
label="SLIDESHOWCK_THEME_LABEL"
|
||||
description="SLIDESHOWCK_THEME_DESC"
|
||||
icon="photo.png" />
|
||||
<field
|
||||
name="styles"
|
||||
type="ckstyle"
|
||||
label="SLIDESHOWCK_SELECT_STYLE_LABEL"
|
||||
description="SLIDESHOWCK_SELECT_STYLE_DESC"
|
||||
icon="palette.png"
|
||||
default=""
|
||||
/>
|
||||
|
||||
<field
|
||||
name="alignment"
|
||||
type="slideshowcklist"
|
||||
default="center"
|
||||
label="SLIDESHOWCK_ALIGNEMENT_LABEL"
|
||||
description="SLIDESHOWCK_ALIGNEMENT_DESC"
|
||||
icon="image_alignment.png"
|
||||
>
|
||||
<option value="topLeft">SLIDESHOWCK_TOPLEFT</option>
|
||||
<option value="topCenter">SLIDESHOWCK_TOPCENTER</option>
|
||||
<option value="topRight">SLIDESHOWCK_TOPRIGHT</option>
|
||||
<option value="centerLeft">SLIDESHOWCK_MIDDLELEFT</option>
|
||||
<option value="center">SLIDESHOWCK_CENTER</option>
|
||||
<option value="centerRight">SLIDESHOWCK_MIDDLERIGHT</option>
|
||||
<option value="bottomLeft">SLIDESHOWCK_BOTTOMLEFT</option>
|
||||
<option value="bottomCenter">SLIDESHOWCK_BOTTOMCENTER</option>
|
||||
<option value="bottomRight">SLIDESHOWCK_BOTTOMRIGHT</option>
|
||||
</field>
|
||||
<field
|
||||
name="slideshowstylesillustration"
|
||||
type="ckbackground"
|
||||
background="slideshowck_styles.png"
|
||||
styles="height:264px;width:356px;"
|
||||
/>
|
||||
<field
|
||||
name="loader"
|
||||
type="slideshowcklist"
|
||||
default="pie"
|
||||
label="SLIDESHOWCK_LOADER_LABEL"
|
||||
description="SLIDESHOWCK_LOADER_DESC"
|
||||
icon="arrow_rotate_clockwise.png"
|
||||
>
|
||||
<option value="pie">SLIDESHOWCK_LOADER_PIE</option>
|
||||
<option value="bar">SLIDESHOWCK_LOADER_BAR</option>
|
||||
<option value="none">SLIDESHOWCK_LOADER_NONE</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="width"
|
||||
type="slideshowcktext"
|
||||
default="auto"
|
||||
label="SLIDESHOWCK_WIDTH_LABEL"
|
||||
description="SLIDESHOWCK_WIDTH_DESC"
|
||||
icon="width.png"
|
||||
suffix=""
|
||||
/>
|
||||
<field
|
||||
name="height"
|
||||
type="ckheight"
|
||||
default="62%"
|
||||
label="SLIDESHOWCK_HEIGHT_LABEL"
|
||||
description="SLIDESHOWCK_HEIGHT_DESC"
|
||||
icon="height.png"
|
||||
suffix=""
|
||||
/>
|
||||
<field
|
||||
name="minheight"
|
||||
type="slideshowcktext"
|
||||
default="150"
|
||||
label="SLIDESHOWCK_MINHEIGHT_LABEL"
|
||||
description="SLIDESHOWCK_MINHEIGHT_DESC"
|
||||
suffix="px"
|
||||
/>
|
||||
<field
|
||||
name="navigation"
|
||||
type="slideshowckradio"
|
||||
default="2"
|
||||
label="SLIDESHOWCK_NAVIGATION_LABEL"
|
||||
description="SLIDESHOWCK_NAVIGATION_DESC"
|
||||
class="btn-group"
|
||||
icon="resultset_next.png"
|
||||
>
|
||||
<option value="2">SLIDESHOWCK_NAVIGATION_HOVER</option>
|
||||
<option value="1">SLIDESHOWCK_NAVIGATION_ALWAYS</option>
|
||||
<option value="0">SLIDESHOWCK_NAVIGATION_NONE</option>
|
||||
</field>
|
||||
<field
|
||||
name="skin"
|
||||
type="slideshowcklist"
|
||||
default="camera_amber_skin"
|
||||
label="SLIDESHOWCK_SKIN_LABEL"
|
||||
description="SLIDESHOWCK_SKIN_DESC"
|
||||
icon="palette.png" >
|
||||
<option value="camera_amber_skin">amber</option>
|
||||
<option value="camera_ash_skin">ash</option>
|
||||
<option value="camera_azure_skin">azure</option>
|
||||
<option value="camera_beige_skin">beige</option>
|
||||
<option value="camera_black_skin">black</option>
|
||||
<option value="camera_blue_skin">blue</option>
|
||||
<option value="camera_brown_skin">brown</option>
|
||||
<option value="camera_burgundy_skin">burgundy</option>
|
||||
<option value="camera_charcoal_skin">charcoal</option>
|
||||
<option value="camera_chocolate_skin">chocolate</option>
|
||||
<option value="camera_coffee_skin">coffee</option>
|
||||
<option value="camera_cyan_skin">cyan</option>
|
||||
<option value="camera_fuchsia_skin">fuchsia</option>
|
||||
<option value="camera_gold_skin">gold</option>
|
||||
<option value="camera_green_skin">green</option>
|
||||
<option value="camera_grey_skin">grey</option>
|
||||
<option value="camera_indigo_skin">indigo</option>
|
||||
<option value="camera_khaki_skin">khaki</option>
|
||||
<option value="camera_lime_skin">lime</option>
|
||||
<option value="camera_magenta_skin">magenta</option>
|
||||
<option value="camera_maroon_skin">maroon</option>
|
||||
<option value="camera_orange_skin">orange</option>
|
||||
<option value="camera_olive_skin">olive</option>
|
||||
<option value="camera_pink_skin">pink</option>
|
||||
<option value="camera_pistachio_skin">pistachio</option>
|
||||
<option value="camera_pink_skin">pink</option>
|
||||
<option value="camera_red_skin">red</option>
|
||||
<option value="camera_tangerine_skin">tangerine</option>
|
||||
<option value="camera_turquoise_skin">turquoise</option>
|
||||
<option value="camera_violet_skin">violet</option>
|
||||
<option value="camera_white_skin">white</option>
|
||||
<option value="camera_yellow_skin">yellow</option>
|
||||
</field>
|
||||
<field
|
||||
name="thumbnails"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_THUMBNAILS_LABEL"
|
||||
description="SLIDESHOWCK_THUMBNAILS_DESC"
|
||||
class="btn-group"
|
||||
icon="pictures.png"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="titleInThumbs"
|
||||
type="slideshowckradio"
|
||||
default="0"
|
||||
label="SLIDESHOWCK_TITLE_IN_THUMBNAILS_LABEL"
|
||||
class="btn-group"
|
||||
showon="thumbnails:1"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="thumbnailwidth"
|
||||
type="slideshowcktext"
|
||||
default="100"
|
||||
label="SLIDESHOWCK_THUMBNAILWIDTH_LABEL"
|
||||
description="SLIDESHOWCK_THUMBNAILWIDTH_DESC"
|
||||
suffix="px"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="thumbnailheight"
|
||||
type="slideshowcktext"
|
||||
default="75"
|
||||
label="SLIDESHOWCK_THUMBNAILHEIGHT_LABEL"
|
||||
description="SLIDESHOWCK_THUMBNAILHEIGHT_DESC"
|
||||
suffix="px"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="pagination"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_PAGINATION_LABEL"
|
||||
description="SLIDESHOWCK_PAGINATION_DESC"
|
||||
class="btn-group"
|
||||
icon="edit-list-order.png"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="displayorder"
|
||||
type="slideshowcklist"
|
||||
default="normal"
|
||||
label="SLIDESHOWCK_DISPLAYORDER_LABEL"
|
||||
description="SLIDESHOWCK_DISPLAYORDER_DESC"
|
||||
icon="control_repeat.png"
|
||||
>
|
||||
<option value="normal">SLIDESHOWCK_DISPLAYORDER_NORMAL</option>
|
||||
<option value="shuffle">SLIDESHOWCK_DISPLAYORDER_SHUFFLE</option>
|
||||
</field>
|
||||
<field
|
||||
name="limitslides"
|
||||
type="slideshowcktext"
|
||||
default=""
|
||||
label="SLIDESHOWCK_NUMBER_SLIDES_LABEL"
|
||||
description="SLIDESHOWCK_NUMBER_SLIDES_DESC"
|
||||
icon="application_cascade.png"
|
||||
|
||||
/>
|
||||
<field
|
||||
name="spacertext"
|
||||
type="slideshowckspacer"
|
||||
label="SLIDESHOWCK_TEXT_OPTIONS_LABEL"
|
||||
style="title"
|
||||
/>
|
||||
<field
|
||||
name="usecaption"
|
||||
type="slideshowckradio"
|
||||
label="SLIDESHOWCK_USECAPTION_LABEL"
|
||||
description="SLIDESHOWCK_USECAPTION_DESC"
|
||||
icon="switch.png"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="usetitle"
|
||||
type="slideshowckradio"
|
||||
label="SLIDESHOWCK_USETITLE_LABEL"
|
||||
description="SLIDESHOWCK_USETITLE_DESC"
|
||||
icon="switch.png"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
showon="usecaption:1"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="usecaptiondesc"
|
||||
type="slideshowckradio"
|
||||
label="SLIDESHOWCK_USECAPTIONDESC_LABEL"
|
||||
description="SLIDESHOWCK_USECAPTIONDESC_DESC"
|
||||
icon="switch.png"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
showon="usecaption:1"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="textlength"
|
||||
type="slideshowcktext"
|
||||
default=""
|
||||
label="SLIDESHOWCK_ARTICLELENGTH_LABEL"
|
||||
description="SLIDESHOWCK_ARTICLELENGTH_DESC"
|
||||
icon="text_signature.png"
|
||||
showon="usecaption:1"
|
||||
/>
|
||||
<field
|
||||
name="striptags"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_STRIPTAGS_LABEL"
|
||||
description="SLIDESHOWCK_STRIPTAGS_DESC"
|
||||
icon="html.png"
|
||||
class="btn-group"
|
||||
showon="usecaption:1"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="spacerlink"
|
||||
type="slideshowckspacer"
|
||||
label="SLIDESHOWCK_LINK_OPTIONS_LABEL"
|
||||
style="title"
|
||||
/>
|
||||
<field
|
||||
name="linkposition"
|
||||
type="slideshowcklist"
|
||||
label="SLIDESHOWCK_LINK_POSITION_LABEL"
|
||||
description="SLIDESHOWCK_LINK_POSITION_DESC"
|
||||
icon="link.png"
|
||||
default="fullslide"
|
||||
>
|
||||
<option value="fullslide">SLIDESHOWCK_LINK_FULLSLIDE</option>
|
||||
<option value="title">SLIDESHOWCK_LINK_TITLE</option>
|
||||
<option value="button">SLIDESHOWCK_LINK_BUTTON</option>
|
||||
<option value="none">SLIDESHOWCK_NONE</option>
|
||||
</field>
|
||||
<field
|
||||
name="linkbuttontext"
|
||||
type="slideshowcktext"
|
||||
label="SLIDESHOWCK_LINK_BUTTON_TEXT_LABEL"
|
||||
description="SLIDESHOWCK_LINK_BUTTON_TEXT_DESC"
|
||||
icon="text_signature.png"
|
||||
default="SLIDESHOWCK_LINK_BUTTON_TEXT"
|
||||
showon="linkposition:button"
|
||||
/>
|
||||
<field
|
||||
name="linkbuttonclass"
|
||||
type="slideshowcktext"
|
||||
label="SLIDESHOWCK_LINK_BUTTON_CLASS_LABEL"
|
||||
description="SLIDESHOWCK_LINK_BUTTON_CLASS_DESC"
|
||||
icon="css.png"
|
||||
default="btn"
|
||||
showon="linkposition:button"
|
||||
/>
|
||||
<field
|
||||
name="linkautoimage"
|
||||
type="slideshowckradio"
|
||||
label="SLIDESHOWCK_LINK_AUTOIMAGE_LABEL"
|
||||
description="SLIDESHOWCK_LINK_AUTOIMAGE_DESC"
|
||||
icon="link_add.png"
|
||||
default="0"
|
||||
class="btn-group"
|
||||
showon="linkposition!:none"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="linktarget"
|
||||
type="slideshowcklist"
|
||||
label="SLIDESHOWCK_LINK_TARGET_LABEL"
|
||||
description="SLIDESHOWCK_LINK_TARGET_DESC"
|
||||
icon="link_go.png"
|
||||
default="_parent"
|
||||
showon="linkposition!:none"
|
||||
>
|
||||
<option value="_parent">SLIDESHOWCK_LINK_SAME_WINDOW</option>
|
||||
<option value="_blank">SLIDESHOWCK_LINK_NEW_WINDOW</option>
|
||||
</field>
|
||||
<field
|
||||
name="spacerlightbox"
|
||||
type="slideshowckspacer"
|
||||
label="SLIDESHOWCK_LIGHTBOX_SPACER_LABEL"
|
||||
style="title"
|
||||
/>
|
||||
<field
|
||||
type="ckproonly"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="effects" label="SLIDESHOWCK_EFFECTS_OPTIONS">
|
||||
|
||||
<field
|
||||
name="effect"
|
||||
type="slideshowcklist"
|
||||
default="random"
|
||||
multiple="true"
|
||||
label="SLIDESHOWCK_EFFECT_LABEL"
|
||||
description="SLIDESHOWCK_EFFECT_DESC"
|
||||
icon="application_view_gallery.png"
|
||||
styles="width:200px;"
|
||||
>
|
||||
<option value="random">random</option>
|
||||
<option value="kenburns">kenburns</option>
|
||||
<option value="simpleFade">simpleFade</option>
|
||||
<option value="curtainTopLeft">curtainTopLeft</option>
|
||||
<option value="curtainTopRight">curtainTopRight</option>
|
||||
<option value="curtainBottomLeft">curtainBottomLeft</option>
|
||||
<option value="curtainBottomRight">curtainBottomRight</option>
|
||||
<option value="curtainSliceLeft">curtainSliceLeft</option>
|
||||
<option value="curtainSliceRight">curtainSliceRight</option>
|
||||
<option value="blindCurtainTopLeft">blindCurtainTopLeft</option>
|
||||
<option value="blindCurtainTopRight">blindCurtainTopRight</option>
|
||||
<option value="blindCurtainBottomLeft">blindCurtainBottomLeft</option>
|
||||
<option value="blindCurtainBottomRight">blindCurtainBottomRight</option>
|
||||
<option value="blindCurtainSliceBottom">blindCurtainSliceBottom</option>
|
||||
<option value="blindCurtainSliceTop">blindCurtainSliceTop</option>
|
||||
<option value="stampede">stampede</option>
|
||||
<option value="mosaic">mosaic</option>
|
||||
<option value="mosaicReverse">mosaicReverse</option>
|
||||
<option value="mosaicRandom">mosaicRandom</option>
|
||||
<option value="mosaicSpiral">mosaicSpiral</option>
|
||||
<option value="mosaicSpiralReverse">mosaicSpiralReverse</option>
|
||||
<option value="topLeftBottomRight">topLeftBottomRight</option>
|
||||
<option value="bottomRightTopLeft">bottomRightTopLeft</option>
|
||||
<option value="bottomLeftTopRight">bottomLeftTopRight</option>
|
||||
<option value="bottomLeftTopRight">bottomLeftTopRight</option>
|
||||
<option value="scrollLeft">scrollLeft</option>
|
||||
<option value="scrollRight">scrollRight</option>
|
||||
<option value="scrollHorz">scrollHorz</option>
|
||||
<option value="scrollBottom">scrollBottom</option>
|
||||
<option value="scrollTop">scrollTop</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="time"
|
||||
type="slideshowcktext"
|
||||
default="7000"
|
||||
label="SLIDESHOWCK_TIME_LABEL"
|
||||
description="SLIDESHOWCK_TIME_DESC"
|
||||
icon="hourglass.png"
|
||||
suffix="ms" />
|
||||
|
||||
<field
|
||||
name="transperiod"
|
||||
type="slideshowcktext"
|
||||
default="1500"
|
||||
label="SLIDESHOWCK_TRANSPERIOD_LABEL"
|
||||
description="SLIDESHOWCK_TRANSPERIOD_DESC"
|
||||
icon="hourglass.png"
|
||||
suffix="ms" />
|
||||
<field
|
||||
name="captioneffect"
|
||||
type="slideshowcklist"
|
||||
default="random"
|
||||
label="SLIDESHOWCK_CAPTIONEFFECT_LABEL"
|
||||
description="SLIDESHOWCK_CAPTIONEFFECT_DESC"
|
||||
icon="application_view_gallery.png"
|
||||
styles=""
|
||||
>
|
||||
<option value="moveFromLeft">moveFromLeft</option>
|
||||
<option value="moveFromRight">moveFromRight</option>
|
||||
<option value="moveFromTop">moveFromTop</option>
|
||||
<option value="moveFromBottom">moveFromBottom</option>
|
||||
<option value="fadeIn">fadeIn</option>
|
||||
<option value="fadeFromLeft">fadeFromLeft</option>
|
||||
<option value="fadeFromRight">fadeFromRight</option>
|
||||
<option value="fadeFromTop">fadeFromTop</option>
|
||||
<option value="fadeFromBottom">fadeFromBottom</option>
|
||||
<option value="none">none</option>
|
||||
</field>
|
||||
<field
|
||||
name="portrait"
|
||||
type="slideshowckradio"
|
||||
default="0"
|
||||
label="SLIDESHOWCK_PORTRAIT_LABEL"
|
||||
description="SLIDESHOWCK_PORTRAIT_DESC"
|
||||
icon="shape_handles.png"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="autoAdvance"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_AUTOADVANCE_LABEL"
|
||||
description="SLIDESHOWCK_AUTOADVANCE_DESC"
|
||||
icon="control_play.png"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="hover"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_HOVER_LABEL"
|
||||
description="SLIDESHOWCK_HOVER_DESC"
|
||||
icon="control_pause.png"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="keyboardnavigation"
|
||||
type="slideshowckradio"
|
||||
default="0"
|
||||
label="SLIDESHOWCK_KEYBOARD_CONTROL_LABEL"
|
||||
description="SLIDESHOWCK_KEYBOARD_CONTROL_DESC"
|
||||
class="btn-group"
|
||||
icon="keyboard.png"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="fullpage"
|
||||
type="slideshowckradio"
|
||||
default="0"
|
||||
label="SLIDESHOWCK_FULLPAGE_LABEL"
|
||||
description="SLIDESHOWCK_FULLPAGE_DESC"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="container"
|
||||
type="slideshowcktext"
|
||||
default=""
|
||||
label="SLIDESHOWCK_CONTAINER_LABEL"
|
||||
description="SLIDESHOWCK_CONTAINER_DESC"
|
||||
class="btn-group"
|
||||
/>
|
||||
|
||||
|
||||
</fieldset>
|
||||
<fieldset name="responsiveoptions" label="SLIDESHOWCK_RESPONSIVE">
|
||||
<field
|
||||
name="mobileimagespacer"
|
||||
label="SLIDESHOWCK_MOBILEIMAGE_SPACER_LABEL"
|
||||
type="slideshowckspacer"
|
||||
style="title"
|
||||
/>
|
||||
<field
|
||||
name="usemobileimage"
|
||||
type="slideshowckradio"
|
||||
default="0"
|
||||
label="SLIDESHOWCK_USEMOBILEIMAGE_LABEL"
|
||||
description="SLIDESHOWCK_USEMOBILEIMAGE_DESC"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="mobileimageresolution"
|
||||
type="slideshowcktext"
|
||||
default="640"
|
||||
label="SLIDESHOWCK_MOBILEIMAGERESOLUTION_LABEL"
|
||||
description="SLIDESHOWCK_MOBILEIMAGERESOLUTION_DESC"
|
||||
icon="width.png"
|
||||
suffix="px"
|
||||
/>
|
||||
<field
|
||||
name="captionresponsiveckspacer"
|
||||
type="slideshowckspacer"
|
||||
label="SLIDESHOWCK_SPACER_RESPONSIVE"
|
||||
style="title"
|
||||
/>
|
||||
<field
|
||||
name="usecaptionresponsive"
|
||||
type="slideshowcklist"
|
||||
label="SLIDESHOWCK_USERESPONSIVECAPTION_LABEL"
|
||||
description="SLIDESHOWCK_USERESPONSIVECAPTION_DESC"
|
||||
icon="ipod.png"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
>
|
||||
<option value="2">SLIDESHOWCK_RESOLUTION_ADAPTATIVE</option>
|
||||
<option value="1">SLIDESHOWCK_RESOLUTION_STEP</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="captionresponsiveresolution"
|
||||
type="slideshowcktext"
|
||||
label="SLIDESHOWCK_RESPONSIVERESOLUTION_LABEL"
|
||||
description="SLIDESHOWCK_RESPONSIVERESOLUTION_DESC"
|
||||
icon="width.png"
|
||||
default="480"
|
||||
showon="usecaptionresponsive!:0"
|
||||
/>
|
||||
<field
|
||||
name="captionresponsivefontsize"
|
||||
type="slideshowcktext"
|
||||
label="SLIDESHOWCK_RESPONSIVEFONTSIZE_LABEL"
|
||||
description="SLIDESHOWCK_RESPONSIVEFONTSIZE_DESC"
|
||||
icon="style.png"
|
||||
default="0.6em"
|
||||
showon="usecaptionresponsive:1"
|
||||
/>
|
||||
<field
|
||||
name="captionresponsivehidecaption"
|
||||
type="slideshowckradio"
|
||||
label="SLIDESHOWCK_RESPONSIVEHIDECAPTION_LABEL"
|
||||
description="SLIDESHOWCK_RESPONSIVEHIDECAPTION_DESC"
|
||||
icon="style_delete.png"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
showon="usecaptionresponsive!:0"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="captionresponsivehidedescription"
|
||||
type="slideshowckradio"
|
||||
label="SLIDESHOWCK_RESPONSIVEHIDEDESCRIPTION_LABEL"
|
||||
description="SLIDESHOWCK_RESPONSIVEHIDEDESCRIPTION_DESC"
|
||||
icon="style_delete.png"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
showon="usecaptionresponsive!:0[AND]captionresponsivehidecaption:0"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset name="advanced">
|
||||
<field
|
||||
name="loadjqueryeasing"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_LOADJQUERYEASING_LABEL"
|
||||
description="SLIDESHOWCK_LOADJQUERYEASING_DESC"
|
||||
icon="page_white_wrench.png"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="autocreatethumbs"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_AUTOCREATETHUMBS_LABEL"
|
||||
description="SLIDESHOWCK_AUTOCREATETHUMBS_DESC"
|
||||
icon="application_cascade.png"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="usethumbstype"
|
||||
type="slideshowckradio"
|
||||
default="mini"
|
||||
label="SLIDESHOWCK_THUMBSTYPE_LABEL"
|
||||
description="SLIDESHOWCK_THUMBSTYPE_DESC"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="mini">SLIDESHOWCK_THUMBSTYPE_MINI</option>
|
||||
<option value="normal">SLIDESHOWCK_THUMBSTYPE_NORMAL</option>
|
||||
</field>
|
||||
<field
|
||||
name="fixhtml"
|
||||
type="slideshowckradio"
|
||||
default="0"
|
||||
label="SLIDESHOWCK_FIXHTML_LABEL"
|
||||
description="SLIDESHOWCK_FIXHTML_DESC"
|
||||
icon="bug_delete.png"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="content_prepare"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_CONTENT_PREPARE_LABEL"
|
||||
description="SLIDESHOWCK_CONTENT_PREPARE_DESC"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="debug"
|
||||
type="slideshowckradio"
|
||||
default="1"
|
||||
label="SLIDESHOWCK_DEBUG_LABEL"
|
||||
description="SLIDESHOWCK_DEBUG_DESC"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="loadinline"
|
||||
type="slideshowckradio"
|
||||
default="0"
|
||||
label="SLIDESHOWCK_LOAD_INLINE_LABEL"
|
||||
description="SLIDESHOWCK_LOAD_INLINE_DESC"
|
||||
class="btn-group"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
<field
|
||||
name="layout"
|
||||
type="modulelayout"
|
||||
label="JFIELD_ALT_LAYOUT_LABEL"
|
||||
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
|
||||
icon="layout.png" />
|
||||
|
||||
<field
|
||||
name="moduleclass_sfx"
|
||||
type="slideshowcktext"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
|
||||
icon="text_signature.png" />
|
||||
|
||||
<field
|
||||
name="cache"
|
||||
type="slideshowcklist"
|
||||
default="1"
|
||||
label="COM_MODULES_FIELD_CACHING_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHING_DESC" >
|
||||
<option value="1">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="cache_time"
|
||||
type="slideshowcktext"
|
||||
default="900"
|
||||
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_MODULES_FIELD_CACHE_TIME_DESC"
|
||||
icon="hourglass.png"
|
||||
suffix="min" />
|
||||
|
||||
<field
|
||||
name="cachemode"
|
||||
type="hidden"
|
||||
default="itemid" >
|
||||
<option value="itemid"></option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,34 @@
|
||||
/* IE specific css for Slideshow CK */
|
||||
.camera_wrap:after {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.camera_wrap .camera_pag .camera_pag_ul li {
|
||||
float:left !important;
|
||||
}
|
||||
|
||||
div.camera_thumbs_cont {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
|
||||
.camera_caption {
|
||||
bottom: 10px;
|
||||
display: block;
|
||||
position: relative !important;
|
||||
/*width: 100%;*/
|
||||
}
|
||||
.camera_caption > div {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.camera_caption {
|
||||
color: #fff;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
.camera_caption > div {
|
||||
background: #000;
|
||||
background: rgba(0,0,0, 0.7);
|
||||
border-radius: 0 5px 5px 0;
|
||||
-moz-border-radius: 0 5px 5px 0;
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
/* IE8 specific css for Slideshow CK */
|
||||
.camera_wrap:after {
|
||||
background: none;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2012-2019 Cedric KEIFLIN alias ced1870
|
||||
* https://www.joomlack.fr
|
||||
* Module Slideshow CK
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// get the slideshow width
|
||||
$width = ($params->get('width') AND $params->get('width') != 'auto') ? ' style="width:' . SlideshowckHelper::testUnit($params->get('width')) . ';"' : '';
|
||||
?>
|
||||
<div class="slideshowck <?php echo $params->get('moduleclass_sfx'); ?> camera_wrap <?php echo $params->get('skin'); ?>" id="camera_wrap_<?php echo $module->id; ?>"<?php echo $width; ?>>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($items as $item) {
|
||||
if ($params->get('limitslides', '') && $i >= $params->get('limitslides', ''))
|
||||
break;
|
||||
|
||||
// B/C for V1
|
||||
if (isset($item->imgname) && ! isset($item->image)) SlideshowckHelper::legacyUpdateItem($item);
|
||||
|
||||
// automatically create the minified thumb and use it
|
||||
$item->thumb = $item->image;
|
||||
if ($params->get('thumbnails', '1') == '1' && $params->get('autocreatethumbs','1') && $params->get('usethumbstype', 'mini') == 'mini') {
|
||||
$item->thumb = SlideshowckHelper::resizeImage($item->image, $params->get('thumbnailwidth', '182'), $params->get('thumbnailheight', '187'));
|
||||
}
|
||||
// use the minified thumb but don't create it
|
||||
else if ($params->get('thumbnails', '1') == '1' && $params->get('usethumbstype','mini') == 'mini'){
|
||||
$thumbext = explode(".", $item->image);
|
||||
$thumbext = end($thumbext);
|
||||
$thumbfile = str_replace(basename($item->image), "th/" . basename($item->image), $item->image);
|
||||
$thumbfile = str_replace("." . $thumbext, "_th." . $thumbext, $thumbfile);
|
||||
if (\Joomla\CMS\Uri\Uri::root(true) && substr($thumbfile, 0, (int)strlen(\Joomla\CMS\Uri\Uri::root(true) . '/')) == (\Joomla\CMS\Uri\Uri::root(true) . '/')) {
|
||||
$thumbfile = str_replace(\Joomla\CMS\Uri\Uri::root(true) . '/', '', $thumbfile);
|
||||
}
|
||||
if (file_exists(JPATH_ROOT . '/' . trim($thumbfile, '/'))) {
|
||||
$item->thumb = \Joomla\CMS\Uri\Uri::root(true) . '/' . trim($thumbfile, '/');
|
||||
}
|
||||
}
|
||||
|
||||
// create new images for mobile
|
||||
if ($params->get('usemobileimage', '0') && $params->get('autocreatethumbs','1')) {
|
||||
$resolutions = explode(',', $params->get('mobileimageresolution', '640'));
|
||||
foreach ($resolutions as $resolution) {
|
||||
SlideshowckHelper::resizeImage($item->image, (int)$resolution, '', (int)$resolution, '');
|
||||
}
|
||||
}
|
||||
|
||||
if ($item->alignment != 'default') {
|
||||
$alignment = ' data-alignment="' . $item->alignment . '"';
|
||||
} else {
|
||||
$alignment = '';
|
||||
}
|
||||
$datacaptiontitle = str_replace("|dq|", "\"", (string)$item->title);
|
||||
$datacaptiontext = str_replace("|dq|", "\"", (string)$item->text);
|
||||
$datacaptionforlightbox = $datacaptiontitle . ( $datacaptiontext ? '::' . $datacaptiontext : '');
|
||||
$dataalt = htmlspecialchars(str_replace("\"", """, str_replace(">", ">", str_replace("<", "<", $datacaptiontitle))));
|
||||
$datatitle = ($params->get('lightboxcaption', 'caption') != 'caption') ? 'data-title="' . htmlspecialchars(str_replace("\"", """, str_replace(">", ">", str_replace("<", "<", $datacaptionforlightbox)))) . '" ' : '';
|
||||
$album = ($params->get('lightboxgroupalbum', '0')) ? '[albumslideshowck' .$module->id .']' : '';
|
||||
$target = ($item->target == 'default') ? $params->get('linktarget') : $item->target;
|
||||
$datarel = ($target == 'lightbox') ? 'data-rel="lightbox' . $album . '" ' : '';
|
||||
$datarel .= ($target == '_blank') ? 'data-rel="noopener noreferrer" ' : '';
|
||||
$datatime = ($item->time) ? ' data-time="' . $item->time . '"' : '';
|
||||
$link = $params->get('linkautoimage', '0') == '1' && $item->image && !$item->link ? $item->image : $item->link;
|
||||
|
||||
if ($params->get('lightboxautolinkimages', '0') == '1') {
|
||||
$item->link = $item->link ? $item->link : $item->image;
|
||||
}
|
||||
|
||||
$linkposition = $params->get('linkposition', 'fullslide');
|
||||
$linkClass = ( $linkposition == 'button' ? $params->get('linkbuttonclass', '') . ' camera-button' : ' camera-link' );
|
||||
$linkTarget = ( $target == '_blank' ? ' target="_blank" rel="noopener noreferrer"' : '' );
|
||||
$startLink = '<a class="' . $linkClass .'" href="' . $link . '"' . $linkTarget . '>';
|
||||
?>
|
||||
<div <?php echo $datarel . $datatitle; ?>data-alt="<?php echo $dataalt; ?>" data-thumb="<?php echo $item->thumb; ?>" data-src="<?php echo $item->image; ?>" <?php if ($link && $linkposition == 'fullslide') echo 'data-link="' . $link . '" data-target="' . $target . '"'; echo $alignment . $datatime; ?>>
|
||||
<?php if ($params->get('imageforseo', '0')) { ?>
|
||||
<img src="<?php echo $item->image; ?>" style="display:none" alt="<?php echo htmlspecialchars($item->title) ?>" />
|
||||
<?php } ?>
|
||||
<?php if ($item->video) { ?>
|
||||
<?php if (strpos($item->video, 'http') !== 0) {
|
||||
$autoplay = $item->videoautoplay == '1' ? 'data-autoplay="1" muted="muted"' : '';
|
||||
$videoloop = $item->videoloop == '1' ? ' loop' : '';
|
||||
$videocontrols = $item->videocontrols == '0' ? ($autoplay ? '' : ' onclick="this.play()"') : ' controls';
|
||||
?>
|
||||
<video src="<?php echo $item->video; ?>" width="100%" height="100%" playsinline <?php echo $autoplay ?><?php echo $videoloop ?><?php echo $videocontrols ?>>
|
||||
<source src="<?php echo $item->video ?>" >
|
||||
</video>
|
||||
<?php } else { ?>
|
||||
<iframe src="<?php echo $item->video; ?>" width="100%" height="100%" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
if (($params->get('usecaption', '1') == '1') && ($item->title || $item->text) && (($params->get('lightboxcaption', 'caption') != 'title' || $target != 'lightbox') || !$link)) {
|
||||
?>
|
||||
<?php if ($params->get('usecaption', '1')) { ?>
|
||||
<div class="camera_caption <?php echo $params->get('captioneffect', 'moveFromBottom')?>">
|
||||
<?php
|
||||
// $showcaption = $params->get('usecaption', '1') == '1' && ($item->title || $item->desc);
|
||||
$showtitle = $params->get('usetitle', '1') == '1' && $item->title;
|
||||
$showdescription = $params->get('usecaptiondesc', '1') == '1' && $item->text;
|
||||
if ($showtitle) { ?>
|
||||
<div class="camera_caption_title">
|
||||
<?php
|
||||
$item->title = str_replace("|dq|", "\"", $item->title);
|
||||
if ($link && $linkposition == 'title') {
|
||||
echo $startLink . $item->title . '</a>';
|
||||
} else {
|
||||
echo $item->title;
|
||||
} ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($showdescription) { ?>
|
||||
<div class="camera_caption_desc">
|
||||
<?php
|
||||
$caption = str_replace("|dq|", "\"", $item->text);
|
||||
if ($params->get('content_prepare', 0)) $caption = \Joomla\CMS\HTML\HTMLHelper::_('content.prepare', $caption);
|
||||
$textlength = (int)$params->get('textlength', '0');
|
||||
if ($params->get('fixhtml', '0') == '1' && trim($caption)) {
|
||||
// Parse the html code of the text into a fixer to avoid bad rendering issues
|
||||
$htmlfixer = new SlideshowCKHtmlFixer();
|
||||
$captionFixed = $htmlfixer->getFixedHtml(trim($caption));
|
||||
$caption = $captionFixed;
|
||||
}
|
||||
if ($params->get('striptags', '0') == '1' && $item->texttype != 'pagebuilderck') {
|
||||
$caption = strip_tags($caption);
|
||||
}
|
||||
if ($textlength > 0) {
|
||||
$caption = SlideshowckHelper::substring($caption, $textlength, '...', false);
|
||||
}
|
||||
echo $caption;
|
||||
?>
|
||||
<?php
|
||||
if (isset($item->more) && count($item->more)) {
|
||||
foreach ($item->more as $m) {
|
||||
echo $m;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($link && $linkposition == 'caption') {
|
||||
echo $startLink . '</a>';
|
||||
} ?>
|
||||
<?php if ($link && $linkposition == 'button') { ?>
|
||||
<?php echo $startLink . \Joomla\CMS\Language\Text::_($params->get('linkbuttontext', 'MOD_SLIDESHOWCK_LINK_BUTTON_TEXT')) . '</a>'; ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,267 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
use Slideshowck\CKPath;
|
||||
use Slideshowck\CKFolder;
|
||||
use Slideshowck\CKFile;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
class CKBrowse {
|
||||
|
||||
static $isRestrictedUser = false;
|
||||
|
||||
public static function getFileTypes($type) {
|
||||
$input = \Joomla\CMS\Factory::getApplication()->input;
|
||||
$type = $input->get('type', $type, 'string');
|
||||
|
||||
switch ($type) {
|
||||
case 'video' :
|
||||
$filetypes = array('.mp4', '.ogv', '.webm', '.MP4', '.OGV', '.WEBM');
|
||||
break;
|
||||
case 'audio' :
|
||||
$filetypes = array('.mp3', '.ogg', '.MP3', '.OGG');
|
||||
break;
|
||||
case 'image' :
|
||||
default :
|
||||
$filetypes = array('.jpg', '.jpeg', '.png', '.gif', '.tiff', '.JPG', '.JPEG', '.PNG', '.GIF', '.TIFF', '.ico', '.webp', '.WEBP');
|
||||
break;
|
||||
}
|
||||
|
||||
return $filetypes;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a list of folders and files
|
||||
*/
|
||||
public static function getItemsList($type = 'image') {
|
||||
$input = \Joomla\CMS\Factory::getApplication()->input;
|
||||
|
||||
$type = $input->get('type', $type, 'string');
|
||||
|
||||
switch ($type) {
|
||||
case 'video' :
|
||||
$filetypes = array('.mp4', '.ogv', '.webm', '.MP4', '.OGV', '.WEBM');
|
||||
break;
|
||||
case 'audio' :
|
||||
$filetypes = array('.mp3', '.ogg', '.MP3', '.OGG');
|
||||
break;
|
||||
case 'image' :
|
||||
default :
|
||||
$filetypes = array('.jpg', '.jpeg', '.png', '.gif', '.tiff', '.JPG', '.JPEG', '.PNG', '.GIF', '.TIFF', '.ico', '.webp', '.WEBP');
|
||||
break;
|
||||
}
|
||||
|
||||
$folder = $input->get('folder', '', 'string') ? '/' . trim($input->get('folder', '', 'string'), '/') : '/' . trim(\Joomla\CMS\Component\ComponentHelper::getParams('com_slideshowck')->get('imagespath', 'images/slideshowck'), '/');
|
||||
|
||||
// makes replacement if specific user management is set
|
||||
if (stristr($folder, '$userid')) {
|
||||
self::$isRestrictedUser = true;
|
||||
$user = \Joomla\CMS\Factory::getUser();
|
||||
$folder = str_replace('$userid', 'user_' . $user->id, $folder);
|
||||
if (! file_exists(JPATH_SITE . '/' . $folder)) {
|
||||
\Joomla\CMS\Filesystem\Folder::create(JPATH_SITE . '/' . $folder);
|
||||
}
|
||||
}
|
||||
|
||||
// no folder filtering
|
||||
if (\Joomla\CMS\Component\ComponentHelper::getParams('com_slideshowck')->get('imagespathexclusive', '0') == '0') {
|
||||
$folder = $input->get('folder', 'images', 'string');
|
||||
}
|
||||
|
||||
$tree = new stdClass();
|
||||
|
||||
// list the files in the root folder
|
||||
$fName = self::createFolderObj(JPATH_SITE . '/' . $folder, $tree, 1);
|
||||
$tree->$fName->files = self::getImagesInFolder(JPATH_SITE . '/' . $folder, implode('|', $filetypes));
|
||||
|
||||
// look for all folder and files
|
||||
self::getSubfolder(JPATH_SITE . '/' . $folder, $tree, implode('|', $filetypes), 2);
|
||||
$tree = self::prepareList($tree);
|
||||
|
||||
return $tree;
|
||||
}
|
||||
|
||||
/*
|
||||
* List the subfolders and files according to the filter
|
||||
*/
|
||||
private static function getSubfolder($folder, &$tree, $filter, $level) {
|
||||
$folders = \Joomla\CMS\Filesystem\Folder::folders($folder, '.', $recurse = false, $fullpath = true);
|
||||
natcasesort($folders);
|
||||
|
||||
if (! count($folders)) return;
|
||||
|
||||
foreach ($folders as $f) {
|
||||
$fName = self::createFolderObj($f, $tree, $level);
|
||||
|
||||
// list all authorized files from the folder
|
||||
// self::getImagesInFolder($f, $tree, $fName, $filter, $level);
|
||||
|
||||
// recursive loop
|
||||
self::getSubfolder($f, $tree, $filter, $level+1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
private static function createFolderObj($f, &$tree, $level) {
|
||||
$fName = \Joomla\CMS\Filesystem\File::makeSafe(str_replace(JPATH_SITE, '', $f));
|
||||
$tree->$fName = new stdClass();
|
||||
$name = explode('/', $f);
|
||||
$name = end($name);
|
||||
$tree->$fName->name = ($level == 1 && self::$isRestrictedUser == true) ? 'images' : $name;
|
||||
$tree->$fName->path = $f;
|
||||
$tree->$fName->level = $level;
|
||||
$tree->$fName->files = false;
|
||||
|
||||
return $fName;
|
||||
}
|
||||
|
||||
/*
|
||||
* List the subfolders and files according to the filter
|
||||
*/
|
||||
public static function getImagesInFolder($f, $filter = '.') {
|
||||
|
||||
// list all authorized files from the folder
|
||||
$files = \Joomla\CMS\Filesystem\Folder::files($f, $filter, $recurse = false, $fullpath = false);
|
||||
if (is_array($files)) natcasesort($files);
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set level diff and check for depth
|
||||
*/
|
||||
private static function prepareList($items) {
|
||||
if (! $items) return $items;
|
||||
|
||||
$lastitem = 0;
|
||||
foreach ($items as $i => $item)
|
||||
{
|
||||
self::prepareItem($item);
|
||||
|
||||
if ($item->level != 0) {
|
||||
if (isset($items->$lastitem))
|
||||
{
|
||||
$items->$lastitem->deeper = ($item->level > $items->$lastitem->level);
|
||||
$items->$lastitem->shallower = ($item->level < $items->$lastitem->level);
|
||||
$items->$lastitem->level_diff = ($items->$lastitem->level - $item->level);
|
||||
}
|
||||
}
|
||||
$lastitem = $i;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// for the last item
|
||||
if (isset($items->$lastitem))
|
||||
{
|
||||
$items->$lastitem->deeper = (1 > $items->$lastitem->level);
|
||||
$items->$lastitem->shallower = (1 < $items->$lastitem->level);
|
||||
$items->$lastitem->level_diff = ($item->level - 1);
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the default values
|
||||
*/
|
||||
private static function prepareItem(&$item) {
|
||||
$item->deeper = false;
|
||||
$item->shallower = false;
|
||||
$item->level_diff = 0;
|
||||
$item->basepath = str_replace(JPATH_SITE, '', $item->path);
|
||||
$item->basepath = str_replace('\\', '/', $item->basepath);
|
||||
$item->basepath = trim($item->basepath, '/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the file and store it on the server
|
||||
*
|
||||
* @return mixed, the method return
|
||||
*/
|
||||
public static function ajaxAddPicture() {
|
||||
// check the token for security
|
||||
if (! \Joomla\CMS\Session\Session::checkToken('get')) {
|
||||
$msg = \Joomla\CMS\Language\Text::_('JINVALID_TOKEN');
|
||||
echo '{"error" : "' . $msg . '"}';
|
||||
exit;
|
||||
}
|
||||
|
||||
$app = \Joomla\CMS\Factory::getApplication();
|
||||
$input = $app->input;
|
||||
$file = $input->files->get('file', '', 'array');
|
||||
// $imgpath = '/' . trim($input->get('path', '', 'string'), '/') . '/';
|
||||
$imgpath = $input->get('path', '', 'string') ? '/' . trim($input->get('path', '', 'string'), '/') . '/' : '/' . trim(\Joomla\CMS\Component\ComponentHelper::getParams('com_slideshowck')->get('imagespath', 'images/slideshowck'), '/') . '/';
|
||||
|
||||
// makes replacement if specific user management is set
|
||||
$user = \Joomla\CMS\Factory::getUser();
|
||||
$imgpath = str_replace('$userid', 'user_' . $user->id, $imgpath);
|
||||
|
||||
if (!is_array($file)) {
|
||||
$msg = \Joomla\CMS\Language\Text::_('CK_NO_FILE_RECEIVED');
|
||||
echo '{"error" : "' . $msg . '"}';
|
||||
exit;
|
||||
}
|
||||
|
||||
$filename = \Joomla\CMS\Filesystem\File::makeSafe($file['name']);
|
||||
|
||||
// check the file extension // TODO recup preg_match de local dev
|
||||
// if (\Joomla\CMS\Filesystem\File::getExt($filename) != 'jpg') {
|
||||
// $msg = \Joomla\CMS\Language\Text::_('CK_NOT_JPG_FILE');
|
||||
// echo '{"error" : "' $msg '"}';
|
||||
// exit;
|
||||
// }
|
||||
|
||||
//Set up the source and destination of the file
|
||||
$src = $file['tmp_name'];
|
||||
|
||||
// check if the file exists
|
||||
if (!$src || !\Joomla\CMS\Filesystem\File::exists($src)) {
|
||||
$msg = \Joomla\CMS\Language\Text::_('CK_FILE_NOT_EXISTS');
|
||||
echo '{"error" : "' . $msg . '"}';
|
||||
exit;
|
||||
}
|
||||
|
||||
// check if folder exists, if not then create it
|
||||
if (!\Joomla\CMS\Filesystem\Folder::exists(JPATH_SITE . $imgpath)) {
|
||||
if (!\Joomla\CMS\Filesystem\Folder::create(JPATH_SITE . $imgpath)) {
|
||||
$msg = \Joomla\CMS\Language\Text::_('CK_UNABLE_TO_CREATE_FOLDER') . ' : ' . $imgpath;
|
||||
echo '{"error" : "' . $msg . '"}';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// write the file
|
||||
if (! \Joomla\CMS\Filesystem\File::copy($src, JPATH_SITE . $imgpath . $filename)) {
|
||||
$msg = \Joomla\CMS\Language\Text::_('CK_UNABLE_WRITE_FILE');
|
||||
echo '{"error" : "' . $msg . '"}';
|
||||
exit;
|
||||
}
|
||||
echo '{"img" : "' . $imgpath . $filename . '", "filename" : "' . $filename . '"}';
|
||||
exit;
|
||||
}
|
||||
|
||||
public static function createFolder($path, $folder) {
|
||||
$path = CKPath::clean(JPATH_SITE . '/' . $path . '/' . $folder);
|
||||
|
||||
if (!is_dir($path) && !is_file($path))
|
||||
{
|
||||
if (CKFolder::create($path))
|
||||
{
|
||||
$data = "<html>\n<body bgcolor=\"#FFFFFF\">\n</body>\n</html>";
|
||||
CKFile::write($path . '/index.html', $data);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,330 @@
|
||||
<?php
|
||||
Namespace Slideshowck;
|
||||
|
||||
defined('CK_LOADED') or die;
|
||||
|
||||
// class CKController extends \Joomla\CMS\MVC\Controller\BaseController {
|
||||
class CKController {
|
||||
|
||||
protected $input;
|
||||
|
||||
protected $model;
|
||||
|
||||
protected $name;
|
||||
|
||||
protected $prefix;
|
||||
|
||||
protected $view;
|
||||
|
||||
protected static $instance;
|
||||
|
||||
protected static $views;
|
||||
|
||||
function __construct() {
|
||||
$this->input = CKFof::getInput();
|
||||
}
|
||||
|
||||
static function getInstance($prefix) {
|
||||
|
||||
if (is_object(self::$instance))
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
$basePath = SLIDESHOWCK_PATH;
|
||||
// Check for a controller.task command.
|
||||
$input = CKFof::getInput();
|
||||
|
||||
$cmd = $input->get('task', '', 'cmd');
|
||||
if (strpos($cmd, '.') !== false)
|
||||
{
|
||||
// Explode the controller.task command.
|
||||
list ($name, $task) = explode('.', $cmd);
|
||||
|
||||
// Define the controller filename and path.
|
||||
$file = self::createFileName('controller', array('name' => $name));
|
||||
$path = $basePath . '/controllers/' . $file;
|
||||
$backuppath = $basePath . '/controller/' . $file;
|
||||
// Reset the task without the controller context.
|
||||
$input->set('task', $task);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Base controller.
|
||||
$name = null;
|
||||
|
||||
// Define the controller filename and path.
|
||||
$file = self::createFileName('controller', array('name' => 'controller'));
|
||||
$path = $basePath . '/' . $file;
|
||||
}
|
||||
|
||||
// Get the controller class name.
|
||||
$class = ucfirst((string) $prefix) . 'Controller' . ucfirst((string) $name);
|
||||
|
||||
// Include the class if not present.
|
||||
if (!class_exists($class))
|
||||
{
|
||||
// If the controller file path exists, include it.
|
||||
if (file_exists($path))
|
||||
{
|
||||
require_once $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new \InvalidArgumentException(\Joomla\CMS\Language\Text::sprintf('ERROR_INVALID_CONTROLLER', $type, $format));
|
||||
}
|
||||
}
|
||||
|
||||
// Instantiate the class.
|
||||
if (!class_exists($class))
|
||||
{
|
||||
throw new \InvalidArgumentException(\Joomla\CMS\Language\Text::sprintf('ERROR_INVALID_CONTROLLER_CLASS', $class));
|
||||
}
|
||||
|
||||
// Instantiate the class, store it to the static container, and return it
|
||||
return self::$instance = new $class();
|
||||
}
|
||||
|
||||
protected static function createFileName($type, $parts = array())
|
||||
{
|
||||
$filename = '';
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'controller':
|
||||
|
||||
$filename = strtolower($parts['name'] . '.php');
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
|
||||
$filename = strtolower($parts['name'] . '/view.html.php');
|
||||
break;
|
||||
}
|
||||
|
||||
return $filename;
|
||||
}
|
||||
|
||||
// public function getModel($base = '\Slideshowck\CKModel') {
|
||||
// if (empty($this->model)) {
|
||||
// $name = $this->getName();
|
||||
// require_once(SLIDESHOWCK_PATH . '/helpers/ckmodel.php');
|
||||
// require_once(SLIDESHOWCK_PATH . '/models/' . strtolower($name) . '.php');
|
||||
// $className = ucfirst($base) . ucfirst($name);
|
||||
// $this->model = new $className;
|
||||
// }
|
||||
// return $this->model;
|
||||
// }
|
||||
|
||||
public function getView($name = '', $type = 'html', $prefix = '')
|
||||
{
|
||||
// @note We use self so we only access stuff in this class rather than in all classes.
|
||||
if (!isset(self::$views))
|
||||
{
|
||||
self::$views = array();
|
||||
}
|
||||
|
||||
if (empty($name))
|
||||
{
|
||||
$name = $this->getName();
|
||||
}
|
||||
|
||||
if (empty($prefix))
|
||||
{
|
||||
$prefix = $this->getPrefix() . 'View';
|
||||
}
|
||||
|
||||
if (empty(self::$views[$name][$type][$prefix]))
|
||||
{
|
||||
if ($view = $this->createView($name, $prefix))
|
||||
{
|
||||
self::$views[$name][$type][$prefix] = & $view;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new \Exception(\Joomla\CMS\Language\Text::sprintf('ERROR_VIEW_NOT_FOUND', $name, $type, $prefix), 404);
|
||||
}
|
||||
}
|
||||
|
||||
return self::$views[$name][$type][$prefix];
|
||||
}
|
||||
|
||||
protected function createView($name, $prefix = '')
|
||||
{
|
||||
// Clean the view name
|
||||
$viewName = preg_replace('/[^A-Z0-9_]/i', '', $name);
|
||||
$classPrefix = preg_replace('/[^A-Z0-9_]/i', '', $prefix);
|
||||
|
||||
// Build the view class name
|
||||
$viewClass = $classPrefix . ucfirst($viewName);
|
||||
|
||||
if (!class_exists($viewClass))
|
||||
{
|
||||
$path = SLIDESHOWCK_PATH . '/views/' . $this->createFileName('view', array('name' => $viewName));
|
||||
|
||||
if (!$path)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
require_once $path;
|
||||
|
||||
if (!class_exists($viewClass))
|
||||
{
|
||||
throw new \Exception(\Joomla\CMS\Language\Text::_('ERROR_VIEW_CLASS_NOT_FOUND : ' . $viewClass . ' - ' . $path), 500);
|
||||
}
|
||||
}
|
||||
|
||||
return new $viewClass();
|
||||
}
|
||||
|
||||
public function display() {
|
||||
$viewName = $this->input->get('view', $this->getName());
|
||||
$viewLayout = $this->input->get('layout', 'default', 'string');
|
||||
|
||||
$view = $this->getView($viewName, 'html', '');
|
||||
$view->setName($viewName);
|
||||
|
||||
// Get/Create the model
|
||||
if ($model = $this->getModel($viewName))
|
||||
{
|
||||
// Push the model into the view (as default)
|
||||
$view->setModel($model);
|
||||
}
|
||||
|
||||
|
||||
$view->display();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getModel($name = '', $prefix = '', $config = array())
|
||||
{
|
||||
if (empty($name))
|
||||
{
|
||||
$name = ucfirst($this->getName());
|
||||
}
|
||||
|
||||
if (empty($prefix))
|
||||
{
|
||||
$prefix = ucfirst($this->getPrefix());
|
||||
}
|
||||
|
||||
$model = $this->createModel($name, $prefix, $config);
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
protected function createModel($name, $prefix = '', $config = array())
|
||||
{
|
||||
// Clean the model name
|
||||
$modelName = preg_replace('/[^A-Z0-9_]/i', '', $name);
|
||||
$classPrefix = preg_replace('/[^A-Z0-9_]/i', '', $prefix);
|
||||
|
||||
return CKModel::getInstance($modelName, $classPrefix, $config);
|
||||
}
|
||||
|
||||
|
||||
public function execute($task) {
|
||||
if (! $task) $task = 'display';
|
||||
if (is_callable(array($this, $task))) {
|
||||
return $this->$task();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new \Exception(\Joomla\CMS\Language\Text::sprintf('ERROR_TASK_NOT_FOUND', $task), 404);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function setName($name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
if (empty($this->name))
|
||||
{
|
||||
$r = null;
|
||||
|
||||
if (!preg_match('/Controller(.*)/i', get_class($this), $r))
|
||||
{
|
||||
throw new \Exception(\CKText::_('Error : Can not get controller name'), 500);
|
||||
}
|
||||
|
||||
$this->name = strtolower($r[1]);
|
||||
}
|
||||
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getPrefix()
|
||||
{
|
||||
if (empty($this->prefix))
|
||||
{
|
||||
$r = null;
|
||||
|
||||
if (!preg_match('/(.*)Controller/i', get_class($this), $r))
|
||||
{
|
||||
throw new \Exception(\CKText::_('Error : Can not get controller name'), 500);
|
||||
}
|
||||
|
||||
$this->prefix = strtolower($r[1]);
|
||||
}
|
||||
|
||||
return $this->prefix;
|
||||
}
|
||||
|
||||
public function add() {
|
||||
return $this->edit(0);
|
||||
}
|
||||
|
||||
public function edit($id = null, $appendUrl = '') {
|
||||
$editIds = $this->input->get('cid', $id, 'array');
|
||||
if (! empty($editIds)) {
|
||||
$editId = (int) $editIds[0];
|
||||
} else {
|
||||
$editId = (int) $this->input->get('id', $id, 'int');
|
||||
}
|
||||
|
||||
// Redirect to the edit screen.
|
||||
CKFof::redirect(SLIDESHOWCK_ADMIN_URL . '&view=' . $this->getName() . '&layout=edit&id=' . $editId . $appendUrl);
|
||||
}
|
||||
|
||||
public function copy() {
|
||||
$editIds = $this->input->get('cid', null, 'array');
|
||||
if (count($editIds)) {
|
||||
$id = (int) $editIds[0];
|
||||
} else {
|
||||
$id = (int) $this->input->get('id', null, 'int');
|
||||
}
|
||||
$model = $this->getModel($this->getName());
|
||||
|
||||
if ($model->copy($id)) {
|
||||
CKFof::enqueueMessage('Item copied with success');
|
||||
} else {
|
||||
CKFof::enqueueMessage('Error : Item not copied', 'error');
|
||||
}
|
||||
|
||||
// Redirect to the edit screen.
|
||||
CKFof::redirect(SLIDESHOWCK_ADMIN_URL);
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
$editIds = $this->input->get('cid', null, 'array');
|
||||
if (count($editIds)) {
|
||||
$id = (int) $editIds[0];
|
||||
} else {
|
||||
$id = (int) $this->input->get('id', null, 'int');
|
||||
}
|
||||
$model = $this->getModel($this->getName());
|
||||
if ($model->delete($id)) {
|
||||
CKFof::enqueueMessage('Item deleted with success');
|
||||
} else {
|
||||
CKFof::enqueueMessage('Error : Item not deleted', 'error');
|
||||
}
|
||||
|
||||
// Redirect to the edit screen.
|
||||
CKFof::redirect(SLIDESHOWCK_ADMIN_URL);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Slideshowck;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
class CKFile extends \Joomla\CMS\Filesystem\File {
|
||||
|
||||
}
|
||||
@ -0,0 +1,543 @@
|
||||
<?php
|
||||
namespace Slideshowck;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Slideshowck\CKInput;
|
||||
use Slideshowck\CKText;
|
||||
|
||||
/**
|
||||
* CK Development Framework layer
|
||||
*/
|
||||
class CKFof {
|
||||
|
||||
static $keepMessages = false;
|
||||
|
||||
static protected $environment = 'com_slideshowck'; // for joomla only
|
||||
|
||||
static protected $input;
|
||||
|
||||
public static function loadHelper($name) {
|
||||
require_once(SLIDESHOWCK_PATH . '/helpers/ck' . $name . '.php');
|
||||
}
|
||||
|
||||
public static function getInput() {
|
||||
if (empty(self::$input)) {
|
||||
self::$input = Factory::getApplication()->input;
|
||||
}
|
||||
return self::$input;
|
||||
}
|
||||
|
||||
public static function userCan($task, $environment = false) {
|
||||
$environment = $environment ? $environment : self::$environment;
|
||||
$user = CKFof::getUser();
|
||||
switch ($task) {
|
||||
case 'edit' :
|
||||
default :
|
||||
return $user->authorise('core.edit', $environment);
|
||||
break;
|
||||
case 'create' :
|
||||
return $user->authorise('core.create', $environment);
|
||||
break;
|
||||
case 'manage' :
|
||||
return $user->authorise('core.manage', $environment);
|
||||
break;
|
||||
case 'admin' :
|
||||
return $user->authorise('core.admin', $environment);
|
||||
case 'delete' :
|
||||
return $user->authorise('core.delete', $environment);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getUser($id = 0) {
|
||||
if ($id) {
|
||||
return $user = Factory::getUser($id);
|
||||
}
|
||||
return $user = Factory::getUser();
|
||||
}
|
||||
|
||||
public static function isAdmin() {
|
||||
return Factory::getApplication()->isClient('administrator') ;
|
||||
}
|
||||
|
||||
public static function isSite() {
|
||||
return Factory::getApplication()->isClient('site') ;
|
||||
}
|
||||
|
||||
public static function _die($msg = '') {
|
||||
$msg = $msg ? $msg : CKText::_('JERROR_ALERTNOAUTHOR');
|
||||
jexit($msg);
|
||||
}
|
||||
|
||||
public static function getCurrentUri() {
|
||||
// $uri = \Joomla\CMS\Factory::getURI();
|
||||
$uri = \Joomla\CMS\Uri\Uri::getInstance();
|
||||
return $uri->toString();
|
||||
}
|
||||
|
||||
public static function redirect($url = '', $msg = '', $type = '') {
|
||||
if (! $url) {
|
||||
$url = self::getCurrentUri();
|
||||
}
|
||||
if ($msg) {
|
||||
self::enqueueMessage($msg, $type);
|
||||
}
|
||||
Factory::getApplication()->redirect($url);
|
||||
// If the headers have been sent, then we cannot send an additional location header
|
||||
// so we will output a javascript redirect statement.
|
||||
/*if (headers_sent())
|
||||
{
|
||||
self::$keepMessages = true;
|
||||
echo "<script>document.location.href='" . str_replace("'", ''', $url) . "';</script>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$keepMessages = true;
|
||||
// All other browsers, use the more efficient HTTP header method
|
||||
header('HTTP/1.1 303 See other');
|
||||
header('Location: ' . $url);
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $msg
|
||||
* @param type $type
|
||||
'message' (ou vide) - vert
|
||||
'notice' - bleu
|
||||
'warning' - jaune
|
||||
'error' - rouge
|
||||
*/
|
||||
public static function enqueueMessage($msg, $type = 'message') {
|
||||
// add the information message
|
||||
Factory::getApplication()->enqueueMessage($msg, $type);
|
||||
}
|
||||
|
||||
public static function displayMessages() {
|
||||
// manage the information messages
|
||||
// not needed in joomla
|
||||
}
|
||||
|
||||
public static function getToken($name = '') {
|
||||
return \Joomla\CMS\Factory::getSession()->getFormToken() . '=1';
|
||||
}
|
||||
|
||||
public static function renderToken($name = '') {
|
||||
echo \Joomla\CMS\HTML\HTMLHelper::_('form.token');
|
||||
}
|
||||
|
||||
public static function checkToken($token = '') {
|
||||
if (! \Joomla\CMS\Session\Session::checkToken()) {
|
||||
$msg = CKText::_('Invalid token');
|
||||
jexit($msg);
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkAjaxToken($json = true) {
|
||||
// check the token for security
|
||||
if (! \Joomla\CMS\Session\Session::checkToken('get')) {
|
||||
$msg = CKText::_('JINVALID_TOKEN');
|
||||
if ($json === false) {
|
||||
jexit($msg);
|
||||
}
|
||||
echo '{"result": "0", "message": "' . $msg . '"}';
|
||||
exit;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function getDbo() {
|
||||
return Factory::getDbo();
|
||||
}
|
||||
|
||||
public static function dbQuote($name) {
|
||||
$db = self::getDbo();
|
||||
return $db->quoteName($name);
|
||||
}
|
||||
|
||||
public static function dbLoadObjectList($query, $key = '') {
|
||||
$db = self::getDbo();
|
||||
// $query = $db->getQuery(true);
|
||||
$db->setQuery($query);
|
||||
$results = $db->loadObjectList($key);
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
public static function dbLoadObject($query) {
|
||||
$db = self::getDbo();
|
||||
// $query = $db->getQuery(true);
|
||||
$db->setQuery($query);
|
||||
$results = $db->loadObject();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
public static function dbLoadResult($query) {
|
||||
$db = self::getDbo();
|
||||
// $query = $db->getQuery(true);
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadResult();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function dbExecute($query) {
|
||||
$db = self::getDbo();
|
||||
$db->setQuery($query);
|
||||
$result = $db->execute();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function dbLoadColumn($tableName, $column) {
|
||||
$db = self::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($column);
|
||||
$query->from($tableName);
|
||||
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadColumn();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function dbCheckTableExists($tableName) {
|
||||
$db = self::getDbo();
|
||||
$tablesList = $db->getTableList();
|
||||
|
||||
$tableName = str_replace('#__', $db->getPrefix(), $tableName);
|
||||
$tableExists = in_array($tableName, $tablesList);
|
||||
return $tableExists;
|
||||
}
|
||||
|
||||
public static function dbLoadTable($tableName) {
|
||||
$db = self::getDbo();
|
||||
$tableName = self::getTableName($tableName);
|
||||
$query = "DESCRIBE " . $tableName;
|
||||
$db->setQuery($query);
|
||||
$columns = $db->loadObjectList();
|
||||
|
||||
$table = new \stdClass();
|
||||
foreach ($columns as $col) {
|
||||
$table->{$col->Field} = '';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
public static function dbLoad($tableName, $id) {
|
||||
// if no existing row, then load empty table
|
||||
if ($id == 0) return self::dbLoadTable($tableName);
|
||||
|
||||
$db = self::getDbo();
|
||||
$query = "SELECT * FROM " . $tableName . " WHERE id = " . (int)$id;
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadAssoc();
|
||||
|
||||
if (! $result) return self::dbLoadTable($tableName);
|
||||
|
||||
$result = self::convertArrayToObject($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function dbBindData($table, $data) {
|
||||
if (is_object($table)) $table = self::convertObjectToArray($table);
|
||||
if (is_object($data)) $data = self::convertObjectToArray($data);
|
||||
|
||||
foreach ($table as $col => $val) {
|
||||
if (isset($data[$col])) $table[$col] = $data[$col];
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
public static function getTableName($tableName) {
|
||||
return $tableName;
|
||||
}
|
||||
|
||||
public static function getTableStructure($tableName) {
|
||||
$db = self::getDbo();
|
||||
$query = "SHOW COLUMNS FROM " . $tableName;
|
||||
$db->setQuery($query);
|
||||
|
||||
return $db->loadObjectList('Field');
|
||||
}
|
||||
|
||||
public static function dbStore($tableName, $data, $format = array()) {
|
||||
$db = self::getDbo();
|
||||
if (is_object($data)) $data = self::convertObjectToArray($data);
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$columsData = self::getTableStructure($tableName);
|
||||
|
||||
if ((int)$data['id'] === 0) {
|
||||
$columns = array();
|
||||
$values = array();
|
||||
$fields = self::dbLoadTable($tableName);
|
||||
|
||||
|
||||
|
||||
foreach($fields as $key => $val) {
|
||||
$columns[] = $key;
|
||||
if (isset($data[$key]) && !empty($data[$key])) {
|
||||
$values[] = is_numeric($data[$key]) ? $data[$key] : $db->quote($data[$key]);
|
||||
} else {
|
||||
if (strpos($columsData[$key]->Type, 'int') === 0 || strpos($columsData[$key]->Type, 'tinyint') === 0) {
|
||||
$values[] = '0';
|
||||
} else if (strpos($columsData[$key]->Type, 'date') === 0) {
|
||||
$values[] = $db->quote('0000-00-00 00:00:00');
|
||||
} else {
|
||||
$values[] = $db->quote('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the insert query.
|
||||
$query
|
||||
->insert($db->quoteName($tableName))
|
||||
->columns($db->quoteName($columns))
|
||||
->values(implode(',', $values));
|
||||
|
||||
// Set the query using our newly populated query object and execute it.
|
||||
$db->setQuery($query);
|
||||
if ($db->execute()) {
|
||||
$id = $db->insertid();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Fields to update.
|
||||
$fields = self::dbLoadTable($tableName);
|
||||
$fieldsToInsert = array();
|
||||
foreach($fields as $key => $val) {
|
||||
if (strpos($columsData[$key]->Type, 'date') === 0 && empty($data[$key])) {
|
||||
continue;
|
||||
}
|
||||
if (isset($data[$key])) {
|
||||
$value = is_numeric($data[$key]) ? (int)$data[$key] : $db->quote($data[$key]);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
$fieldsToInsert[] = $db->quoteName($key) . ' = ' . $value;
|
||||
}
|
||||
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . $data['id']
|
||||
);
|
||||
|
||||
$query->update($db->quoteName($tableName))->set($fieldsToInsert)->where($conditions);
|
||||
|
||||
// Set the query using our newly populated query object and execute it.
|
||||
$db->setQuery($query);
|
||||
if ($db->execute()) {
|
||||
$id = $data['id'];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
public static function dbUpdate($tableName, $id, $fields) {
|
||||
// Create a new query object.
|
||||
$db = self::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . $id
|
||||
);
|
||||
|
||||
$fieldsToInsert = array();
|
||||
foreach ($fields as $key => $value) {
|
||||
$fieldsToInsert[] = $db->quoteName($key) . ' = ' . $value;
|
||||
}
|
||||
|
||||
$query->update($db->quoteName($tableName))->set($fieldsToInsert)->where($conditions);
|
||||
|
||||
// Set the query using our newly populated query object and execute it.
|
||||
$db->setQuery($query);
|
||||
if ($db->execute()) {
|
||||
$id = $data['id'];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static function dbDelete($tableName, $id) {
|
||||
$db = CKFof::getDbo();
|
||||
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . (int) $id
|
||||
// , $db->quoteName('profile_key') . ' = ' . $db->quote('custom.%')
|
||||
);
|
||||
|
||||
$query->delete($db->quoteName($tableName));
|
||||
$query->where($conditions);
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
$result = $db->execute();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function convertObjectToArray($data) {
|
||||
return (array) $data;
|
||||
}
|
||||
|
||||
public static function convertArrayToObject(array $array, $class = 'stdClass', $recursive = true)
|
||||
{
|
||||
$obj = new $class;
|
||||
|
||||
foreach ($array as $k => $v)
|
||||
{
|
||||
if ($recursive && is_array($v))
|
||||
{
|
||||
$obj->$k = static::convertArrayToObject($v, $class);
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->$k = $v;
|
||||
}
|
||||
}
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public static function dump($anything){
|
||||
echo "<pre>";
|
||||
var_dump($anything);
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
public static function print_r($anything){
|
||||
echo "<pre>";
|
||||
print_r($anything);
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
public static function addToolbarTitle($title, $image = '') {
|
||||
\Joomla\CMS\Toolbar\ToolbarHelper::title($title, $image);
|
||||
}
|
||||
|
||||
private static function getToolbar() {
|
||||
// Get the toolbar object instance
|
||||
$bar = \Joomla\CMS\Toolbar\Toolbar::getInstance('toolbar');
|
||||
return $bar;
|
||||
}
|
||||
|
||||
public static function addToolbarButton($name, $html, $id) {
|
||||
$bar = self::getToolbar();
|
||||
$bar->appendButton($name, $html, $id);
|
||||
}
|
||||
|
||||
public static function addToolbarPreferences() {
|
||||
$bar = self::getToolbar();
|
||||
// add the options of the component
|
||||
if (self::userCan('admin')) {
|
||||
\Joomla\CMS\Toolbar\ToolbarHelper::preferences(self::$environment);
|
||||
}
|
||||
}
|
||||
|
||||
private static function getFileName($file) {
|
||||
$f = explode('/', $file);
|
||||
$fileName = end($f);
|
||||
$f = explode('.', $fileName);
|
||||
$ext = end($f);
|
||||
$fileName = str_replace('.' . $ext, '', $fileName);
|
||||
|
||||
return $fileName;
|
||||
}
|
||||
|
||||
public static function addScriptDeclaration($js) {
|
||||
$doc = Factory::getDocument();
|
||||
$doc->addScriptDeclaration($js);
|
||||
}
|
||||
|
||||
public static function addScriptDeclarationInline($js) {
|
||||
echo '<script>' . $js . '</script>';
|
||||
}
|
||||
|
||||
public static function addScript($file) {
|
||||
$doc = Factory::getDocument();
|
||||
$doc->addScript($file);
|
||||
}
|
||||
|
||||
public static function addScriptInline($file) {
|
||||
echo '<script src="' . $file . '"></script>';
|
||||
}
|
||||
|
||||
public static function addStyleDeclaration($css) {
|
||||
$doc = Factory::getDocument();
|
||||
$doc->addStyleDeclaration($css);
|
||||
}
|
||||
|
||||
public static function addStyleDeclarationInline($css) {
|
||||
echo '<style>' . $css . '</style>';
|
||||
}
|
||||
|
||||
public static function addStylesheet($file) {
|
||||
$doc = Factory::getDocument();
|
||||
$doc->addStylesheet($file);
|
||||
}
|
||||
|
||||
public static function addStylesheetInline($file) {
|
||||
echo '<link href="' . $file . '"" rel="stylesheet" />';
|
||||
}
|
||||
|
||||
public static function error($msg) {
|
||||
throw new \Exception($msg);
|
||||
}
|
||||
|
||||
public static function triggerEvent($name, $e = array()) {
|
||||
if (version_compare(JVERSION,'4') < 1) {
|
||||
$dispatcher = \JEventDispatcher::getInstance();
|
||||
return $dispatcher->trigger($name, $e);
|
||||
} else {
|
||||
return Factory::getApplication()->triggerEvent($name, $e);
|
||||
}
|
||||
}
|
||||
|
||||
public static function importPlugin($group) {
|
||||
if (version_compare(JVERSION,'4') < 1) {
|
||||
\Joomla\CMS\Plugin\PluginHelper::importPlugin($group);
|
||||
} else {
|
||||
PluginHelper::importPlugin($group);
|
||||
}
|
||||
}
|
||||
|
||||
public static function cleanCache($group = '') {
|
||||
$conf = \Joomla\CMS\Factory::getConfig();
|
||||
|
||||
$options = [
|
||||
'defaultgroup' => '',
|
||||
'storage' => $conf->get('cache_handler', ''),
|
||||
'caching' => true,
|
||||
'cachebase' => $conf->get('cache_path', JPATH_SITE . '/cache'),
|
||||
];
|
||||
|
||||
$cache = \Joomla\CMS\Cache\Cache::getInstance('callback', $options);
|
||||
|
||||
foreach ($cache->getAll() as $group)
|
||||
{
|
||||
if ($group && $group->group == $group);
|
||||
$cache->clean($group->group);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getModel($modelName, $classPrefix = 'Slideshowck') {
|
||||
return CKModel::getInstance($modelName, $classPrefix);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Slideshowck;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
jimport('joomla.filesystem.folder');
|
||||
|
||||
class CKFolder extends \Joomla\CMS\Filesystem\Folder {
|
||||
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/**
|
||||
* @name CK Framework
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
namespace Slideshowck;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once 'ckuri.php';
|
||||
|
||||
//use Joomla\CMS\Language\Text as CKText;
|
||||
// use Joomla\CMS\Uri\Uri as CKUri;
|
||||
use \Slideshowck\CKUri;
|
||||
|
||||
/**
|
||||
* Framework Helper
|
||||
*/
|
||||
class CKFramework {
|
||||
|
||||
private static $assetsPath = '/media/com_slideshowck/assets';
|
||||
|
||||
private static $version = '1.0.0';
|
||||
|
||||
private static $doload;
|
||||
|
||||
public static function init() {
|
||||
global $ckframeworkloaded;
|
||||
global $ckframeworkloadedversion;
|
||||
|
||||
// if the framework is already loaded with a same or better version, do nothing
|
||||
if ($ckframeworkloaded && version_compare($ckframeworkloadedversion, self::$version, '>=')) {
|
||||
self::$doload = false;
|
||||
}
|
||||
|
||||
self::$doload = true;
|
||||
}
|
||||
|
||||
public static function getInline() {
|
||||
if (self::$doload === false) return '';
|
||||
|
||||
$assets = self::getInlineCss() . self::getInlineJs();
|
||||
|
||||
return $assets;
|
||||
}
|
||||
|
||||
public static function getInlineCss() {
|
||||
if (self::$doload === false) return '';
|
||||
|
||||
$assets = '<link rel="stylesheet" href="' . CKUri::root(true) . self::$assetsPath . '/ckframework.css" type="text/css" />';
|
||||
|
||||
return $assets;
|
||||
}
|
||||
|
||||
public static function getInlineJs() {
|
||||
if (self::$doload === false) return '';
|
||||
|
||||
$assets = '<script src="' . CKUri::root(true) . self::$assetsPath . '/ckframework.js" type="text/javascript"></script>';
|
||||
|
||||
return $assets;
|
||||
}
|
||||
|
||||
public static function loadInline() {
|
||||
echo self::getInline();
|
||||
}
|
||||
|
||||
public static function load() {
|
||||
if (self::$doload === false) return;
|
||||
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('jquery.framework');
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
$doc->addStylesheet(CKUri::root(true) . self::$assetsPath . '/ckframework.css');
|
||||
$doc->addScript(CKUri::root(true) . self::$assetsPath . '/ckframework.js');
|
||||
}
|
||||
|
||||
public static function loadCss() {
|
||||
if (self::$doload === false) return;
|
||||
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
$doc->addStylesheet(CKUri::root(true) . self::$assetsPath . '/ckframework.css');
|
||||
}
|
||||
|
||||
public static function loadJs() {
|
||||
if (self::$doload === false) return;
|
||||
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
$doc->addScript(CKUri::root(true) . self::$assetsPath . '/ckframework.js');
|
||||
}
|
||||
|
||||
public static function getFaIconsInline() {
|
||||
return '<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous" />';
|
||||
}
|
||||
|
||||
public static function loadFaIconsInline() {
|
||||
echo self::getFaIconsInline();
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the JS and CSS files needed to use CKBox
|
||||
*
|
||||
* Return void
|
||||
*/
|
||||
public static function loadCkbox() {
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('jquery.framework');
|
||||
$doc->addStyleSheet(CKUri::root(true) . self::$assetsPath . '/ckbox.css');
|
||||
$doc->addScript(CKUri::root(true) . self::$assetsPath . '/ckbox.js');
|
||||
}
|
||||
}
|
||||
|
||||
CKFramework::init();
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Slideshowck;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class CKInput extends \Joomla\CMS\Input\Input {
|
||||
|
||||
}
|
||||
@ -0,0 +1,511 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slider CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2016. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
|
||||
*/
|
||||
namespace Slideshowck;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Slideshowck\CKUri;
|
||||
|
||||
class CKInterface extends \stdClass {
|
||||
|
||||
public $imagespath;
|
||||
|
||||
public $colorpicker_class = 'color {required:false,pickerPosition:\'top\',pickerBorder:2,pickerInset:3,hash:true}';
|
||||
|
||||
public function __construct($properties = null) {
|
||||
$this->imagespath = SLIDESHOWCK_MEDIA_URI . '/images';
|
||||
}
|
||||
|
||||
public function createAll($prefix) {
|
||||
?>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_TEXT_LABEL'); ?></div>
|
||||
<?php
|
||||
$this->createText($prefix);
|
||||
?>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_APPEARANCE_LABEL'); ?></div>
|
||||
<?php
|
||||
$this->createBackgroundColor($prefix);
|
||||
$this->createBackgroundImage($prefix);
|
||||
$this->createBorders($prefix);
|
||||
$this->createRoundedCorners($prefix);
|
||||
$this->createShadow($prefix);
|
||||
// $this->createTextShadow($prefix);
|
||||
?>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_DIMENSIONS_LABEL'); ?></div>
|
||||
<?php
|
||||
$this->createMargins($prefix);
|
||||
$this->createDimensions($prefix);
|
||||
/*
|
||||
?>
|
||||
<!--<div class="ckheading"><?php echo CKText::_('CK_ANIMATIONS_LABEL'); ?></div>-->
|
||||
<?php
|
||||
$this->createAnimations($prefix);*/
|
||||
}
|
||||
|
||||
public function createBackgroundColor($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>backgroundcolorstart"><?php echo CKText::_('CK_BGCOLOR_LABEL'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<input type="text" id="<?php echo $prefix; ?>backgroundcolorstart" name="<?php echo $prefix; ?>backgroundcolorstart" class="cktip <?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" title="<?php echo CKText::_('CK_BGCOLOR_DESC'); ?>"/>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<input type="text" id="<?php echo $prefix; ?>backgroundcolorend" name="<?php echo $prefix; ?>backgroundcolorend" class="cktip <?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" title="<?php echo CKText::_('CK_BGCOLOR2_DESC'); ?>" onchange="ckCheckGradientImageConflict(this, '<?php echo $prefix; ?>backgroundimageurl')"/>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/layers.png" />
|
||||
<input type="text" id="<?php echo $prefix; ?>backgroundopacity" name="<?php echo $prefix; ?>backgroundopacity" class="cktip <?php echo $prefix; ?>" style="width:45px;" title="<?php echo CKText::_('CK_BGOPACITY_DESC'); ?>"/>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function createBackgroundImage($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>backgroundimageurl"><?php echo CKText::_('CK_BACKGROUNDIMAGE_LABEL'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/image.png" />
|
||||
<div class="ckbutton-group">
|
||||
<input type="text" id="<?php echo $prefix; ?>backgroundimageurl" name="<?php echo $prefix; ?>backgroundimageurl" class="cktip <?php echo $prefix; ?>" title="<?php echo CKText::_('CK_BACKGROUNDIMAGE_DESC'); ?>" onchange="ckCheckGradientImageConflict(this, '<?php echo $prefix; ?>backgroundcolorend')" style="max-width: none; width: 150px;"/>
|
||||
<a class="ckbutton" onclick="ckCallImageManagerPopup('<?php echo $prefix; ?>backgroundimageurl')" href="javascript:void(0)" ><?php echo CKText::_('CK_SELECT'); ?></a>
|
||||
<a class="ckbutton" href="javascript:void(0)" onclick="$ck(this).parent().find('input').val('');"><?php echo CKText::_('CK_CLEAR'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label></label>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/offsetx.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>backgroundimageleft" name="<?php echo $prefix; ?>backgroundimageleft" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_BACKGROUNDPOSITIONX_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/offsety.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>backgroundimagetop" name="<?php echo $prefix; ?>backgroundimagetop" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_BACKGROUNDPOSITIONY_DESC'); ?>" /></span>
|
||||
<div class="ckbutton-group">
|
||||
<input class="" type="radio" value="repeat" id="<?php echo $prefix; ?>backgroundimagerepeat" name="<?php echo $prefix; ?>backgroundimagerepeat" class="<?php echo $prefix; ?>" />
|
||||
<label class="ckbutton first" for="<?php echo $prefix; ?>backgroundimagerepeat"><img class="ckicon" src="<?php echo $this->imagespath ?>/bg_repeat.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="repeat-x" id="<?php echo $prefix; ?>backgroundimagerepeat-x" name="<?php echo $prefix; ?>backgroundimagerepeat" />
|
||||
<label class="ckbutton" for="<?php echo $prefix; ?>backgroundimagerepeat-x"><img class="ckicon" src="<?php echo $this->imagespath ?>/bg_repeat-x.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="repeat-y" id="<?php echo $prefix; ?>backgroundimagerepeat-y" name="<?php echo $prefix; ?>backgroundimagerepeat" />
|
||||
<label class="ckbutton last" for="<?php echo $prefix; ?>backgroundimagerepeat-y"><img class="ckicon" src="<?php echo $this->imagespath ?>/bg_repeat-y.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="no-repeat" id="<?php echo $prefix; ?>backgroundimagerepeatno-repeat" name="<?php echo $prefix; ?>backgroundimagerepeat" />
|
||||
<label class="ckbutton last" for="<?php echo $prefix; ?>backgroundimagerepeatno-repeat"><img class="ckicon" src="<?php echo $this->imagespath ?>/bg_no-repeat.png" /></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
public function createRoundedCorners($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>borderradiustopleft"><?php echo CKText::_('CK_ROUNDEDCORNERS_LABEL'); ?></label>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/border_radius_tl.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>borderradiustopleft" name="<?php echo $prefix; ?>borderradiustopleft" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_ROUNDEDCORNERSTL_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/border_radius_tr.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>borderradiustopright" name="<?php echo $prefix; ?>borderradiustopright" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_ROUNDEDCORNERSTR_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/border_radius_br.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>borderradiusbottomright" name="<?php echo $prefix; ?>borderradiusbottomright" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_ROUNDEDCORNERSBR_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/border_radius_bl.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>borderradiusbottomleft" name="<?php echo $prefix; ?>borderradiusbottomleft" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_ROUNDEDCORNERSBL_DESC'); ?>" /></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
public function createShadow($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>shadowcolor"><?php echo CKText::_('CK_SHADOW_LABEL'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<span><input type="text" id="<?php echo $prefix; ?>shadowcolor" name="<?php echo $prefix; ?>shadowcolor" class="<?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/shadow_blur.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>shadowblur" name="<?php echo $prefix; ?>shadowblur" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_SHADOWBLUR_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/shadow_spread.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>shadowspread" name="<?php echo $prefix; ?>shadowspread" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_SHADOWSPREAD_DESC'); ?>" /></span>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label></label>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/offsetx.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>shadowoffseth" name="<?php echo $prefix; ?>shadowoffseth" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_OFFSETX_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/offsety.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>shadowoffsetv" name="<?php echo $prefix; ?>shadowoffsetv" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_OFFSETY_DESC'); ?>" /></span>
|
||||
<div class="ckbutton-group">
|
||||
<input class="<?php echo $prefix; ?>" type="radio" value="0" id="<?php echo $prefix; ?>shadowinsetno" name="<?php echo $prefix; ?>shadowinset" />
|
||||
<label class="ckbutton last" for="<?php echo $prefix; ?>shadowinsetno" style="width:auto;"><?php echo CKText::_('CK_OUT'); ?>
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="1" id="<?php echo $prefix; ?>shadowinsetyes" name="<?php echo $prefix; ?>shadowinset" />
|
||||
<label class="ckbutton last" for="<?php echo $prefix; ?>shadowinsetyes" style="width:auto;"><?php echo CKText::_('CK_IN'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
public function createTextShadow($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>textshadowcolor"><?php echo CKText::_('CK_TEXTSHADOW_LABEL'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<span><input type="text" id="<?php echo $prefix; ?>textshadowcolor" name="<?php echo $prefix; ?>textshadowcolor" class="<?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/shadow_blur.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>textshadowblur" name="<?php echo $prefix; ?>textshadowblur" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_SHADOWBLUR_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/offsetx.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>textshadowoffsetx" name="<?php echo $prefix; ?>textshadowoffsetx" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_OFFSETX_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/offsety.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>textshadowoffsety" name="<?php echo $prefix; ?>textshadowoffsety" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_OFFSETY_DESC'); ?>" /></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function createDimensions($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>width"><?php echo CKText::_('CK_WIDTH_LABEL'); ?></label>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/width.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>width" name="<?php echo $prefix; ?>width" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_WIDTH_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/height.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>height" name="<?php echo $prefix; ?>height" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_HEIGHT_DESC'); ?>" /></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function createMargins($prefix, $margin = true, $padding = true) {
|
||||
?>
|
||||
<?php if ($margin) { ?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>margintop"><?php echo CKText::_('CK_MARGIN_LABEL'); ?></label>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/margin_top.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>margintop" name="<?php echo $prefix; ?>margintop" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_MARGINTOP_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/margin_right.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>marginright" name="<?php echo $prefix; ?>marginright" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_MARGINRIGHT_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/margin_bottom.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>marginbottom" name="<?php echo $prefix; ?>marginbottom" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_MARGINBOTTOM_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/margin_left.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>marginleft" name="<?php echo $prefix; ?>marginleft" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_MARGINLEFT_DESC'); ?>" /></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($padding) { ?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>paddingtop"><?php echo CKText::_('CK_PADDING_LABEL'); ?></label>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/padding_top.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>paddingtop" name="<?php echo $prefix; ?>paddingtop" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_PADDINGTOP_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/padding_right.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>paddingright" name="<?php echo $prefix; ?>paddingright" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_PADDINGRIGHT_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/padding_bottom.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>paddingbottom" name="<?php echo $prefix; ?>paddingbottom" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_PADDINGBOTTOM_DESC'); ?>" /></span>
|
||||
<span><img class="ckicon" src="<?php echo $this->imagespath ?>/padding_left.png" /></span><span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>paddingleft" name="<?php echo $prefix; ?>paddingleft" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_PADDINGLEFT_DESC'); ?>" /></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function createBorders($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>bordertopcolor"><?php echo CKText::_('CK_BORDERCOLOR_LABEL'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<span><input type="text" id="<?php echo $prefix; ?>bordertopcolor" name="<?php echo $prefix; ?>bordertopcolor" class="<?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" title="<?php echo CKText::_('CK_BORDERCOLOR_DESC'); ?>"/></span>
|
||||
<span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>bordertopsize" name="<?php echo $prefix; ?>bordertopsize" class="<?php echo $prefix; ?> cktip" style="width:45px;border-top-color:#237CA4;" title="<?php echo CKText::_('CK_BORDERTOPWIDTH_DESC'); ?>" /></span>
|
||||
<span>
|
||||
<select id="<?php echo $prefix; ?>bordertopstyle" name="<?php echo $prefix; ?>bordertopstyle" class="<?php echo $prefix; ?> cktip" style="width: 70px; border-radius: 0px;">
|
||||
<option value="solid">solid</option>
|
||||
<option value="dotted">dotted</option>
|
||||
<option value="dashed">dashed</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<span><input type="text" id="<?php echo $prefix; ?>borderrightcolor" name="<?php echo $prefix; ?>borderrightcolor" class="<?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" title="<?php echo CKText::_('CK_BORDERCOLOR_DESC'); ?>"/></span>
|
||||
<span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>borderrightsize" name="<?php echo $prefix; ?>borderrightsize" class="<?php echo $prefix; ?> cktip" style="width:45px;border-right-color:#237CA4;" title="<?php echo CKText::_('CK_BORDERRIGHTWIDTH_DESC'); ?>" /></span>
|
||||
<span>
|
||||
<select id="<?php echo $prefix; ?>borderrightstyle" name="<?php echo $prefix; ?>borderrightstyle" class="<?php echo $prefix; ?> cktip" style="width: 70px; border-radius: 0px;">
|
||||
<option value="solid">solid</option>
|
||||
<option value="dotted">dotted</option>
|
||||
<option value="dashed">dashed</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<span><input type="text" id="<?php echo $prefix; ?>borderbottomcolor" name="<?php echo $prefix; ?>borderbottomcolor" class="<?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" title="<?php echo CKText::_('CK_BORDERCOLOR_DESC'); ?>"/></span>
|
||||
<span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>borderbottomsize" name="<?php echo $prefix; ?>borderbottomsize" class="<?php echo $prefix; ?> cktip" style="width:45px;border-bottom-color:#237CA4;" title="<?php echo CKText::_('CK_BORDERBOTTOMWIDTH_DESC'); ?>" /></span>
|
||||
<span>
|
||||
<select id="<?php echo $prefix; ?>borderbottomstyle" name="<?php echo $prefix; ?>borderbottomstyle" class="<?php echo $prefix; ?> cktip" style="width: 70px; border-radius: 0px;">
|
||||
<option value="solid">solid</option>
|
||||
<option value="dotted">dotted</option>
|
||||
<option value="dashed">dashed</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<span><input type="text" id="<?php echo $prefix; ?>borderleftcolor" name="<?php echo $prefix; ?>borderleftcolor" class="<?php echo $prefix; ?> <?php echo $this->colorpicker_class; ?>" title="<?php echo CKText::_('CK_BORDERCOLOR_DESC'); ?>"/></span>
|
||||
<span style="width:45px;"><input type="text" id="<?php echo $prefix; ?>borderleftsize" name="<?php echo $prefix; ?>borderleftsize" class="<?php echo $prefix; ?> cktip" style="width:45px;border-left-color:#237CA4;" title="<?php echo CKText::_('CK_BORDERLEFTWIDTH_DESC'); ?>" /></span>
|
||||
<span>
|
||||
<select id="<?php echo $prefix; ?>borderleftstyle" name="<?php echo $prefix; ?>borderleftstyle" class="<?php echo $prefix; ?> cktip" style="width: 70px; border-radius: 0px;">
|
||||
<option value="solid">solid</option>
|
||||
<option value="dotted">dotted</option>
|
||||
<option value="dashed">dashed</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function createText($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>textgfont"><?php echo CKText::_('CK_FONTSTYLE_LABEL'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/font_add.png" />
|
||||
<input type="text" id="<?php echo $prefix; ?>textgfont" name="<?php echo $prefix; ?>textgfont" class="<?php echo $prefix; ?> cktip gfonturl" title="<?php echo CKText::_('CK_GFONT_DESC'); ?>" style="max-width:none;width:250px;" />
|
||||
<input type="hidden" id="<?php echo $prefix; ?>textisgfont" name="<?php echo $prefix; ?>textisgfont" class="isgfont <?php echo $prefix; ?>" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/style.png" />
|
||||
<input type="text" id="<?php echo $prefix; ?>fontsize" name="<?php echo $prefix; ?>fontsize" class="<?php echo $prefix; ?> cktip" style="width:45px;" title="<?php echo CKText::_('CK_FONTSIZE_DESC'); ?>" />
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/color.png" />
|
||||
<span><?php echo CKText::_('CK_NORMAL'); ?></span>
|
||||
<input type="text" id="<?php echo $prefix; ?>color" name="<?php echo $prefix; ?>color" class="<?php echo $prefix; ?> cktip <?php echo $this->colorpicker_class; ?>" title="<?php echo CKText::_('CK_FONTCOLOR_DESC'); ?>" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for=""> </label><img class="ckicon" src="<?php echo $this->imagespath ?>/font.png" />
|
||||
<div class="ckbutton-group">
|
||||
<input class="<?php echo $prefix; ?>" type="radio" value="left" id="<?php echo $prefix; ?>textalignleft" name="<?php echo $prefix; ?>textalign" />
|
||||
<label class="ckbutton first" for="<?php echo $prefix; ?>textalignleft"><img class="ckicon" src="<?php echo $this->imagespath ?>/text_align_left.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="center" id="<?php echo $prefix; ?>textaligncenter" name="<?php echo $prefix; ?>textalign" />
|
||||
<label class="ckbutton" for="<?php echo $prefix; ?>textaligncenter"><img class="ckicon" src="<?php echo $this->imagespath ?>/text_align_center.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="right" id="<?php echo $prefix; ?>textalignright" name="<?php echo $prefix; ?>textalign" />
|
||||
<label class="ckbutton last" for="<?php echo $prefix; ?>textalignright"><img class="ckicon" src="<?php echo $this->imagespath ?>/text_align_right.png" /></label>
|
||||
</div>
|
||||
<div class="ckbutton-group">
|
||||
<input class="<?php echo $prefix; ?>" type="radio" value="lowercase" id="<?php echo $prefix; ?>texttransformlowercase" name="<?php echo $prefix; ?>texttransform" />
|
||||
<label class="ckbutton first cktip" title="<?php echo CKText::_('CK_LOWERCASE'); ?>" for="<?php echo $prefix; ?>texttransformlowercase"><img class="ckicon" src="<?php echo $this->imagespath ?>/text_lowercase.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="uppercase" id="<?php echo $prefix; ?>texttransformuppercase" name="<?php echo $prefix; ?>texttransform" />
|
||||
<label class="ckbutton cktip" title="<?php echo CKText::_('CK_UPPERCASE'); ?>" for="<?php echo $prefix; ?>texttransformuppercase"><img class="ckicon" src="<?php echo $this->imagespath ?>/text_uppercase.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="capitalize" id="<?php echo $prefix; ?>texttransformcapitalize" name="<?php echo $prefix; ?>texttransform" />
|
||||
<label class="ckbutton cktip" title="<?php echo CKText::_('CK_CAPITALIZE'); ?>" for="<?php echo $prefix; ?>texttransformcapitalize"><img class="ckicon" src="<?php echo $this->imagespath ?>/text_capitalize.png" />
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="default" id="<?php echo $prefix; ?>texttransformdefault" name="<?php echo $prefix; ?>texttransform" />
|
||||
<label class="ckbutton cktip" title="<?php echo CKText::_('CK_DEFAULT'); ?>" for="<?php echo $prefix; ?>texttransformdefault"><img class="ckicon" src="<?php echo $this->imagespath ?>/text_default.png" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fontweightbold"></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/text_bold.png" />
|
||||
<div class="ckbutton-group">
|
||||
<input class="<?php echo $prefix; ?>" type="radio" value="bold" id="<?php echo $prefix; ?>fontweightbold" name="<?php echo $prefix; ?>fontweight" />
|
||||
<label class="ckbutton first cktip" title="" for="<?php echo $prefix; ?>fontweightbold" style="width:auto;"><?php echo CKText::_('CK_BOLD'); ?>
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="normal" id="<?php echo $prefix; ?>fontweightnormal" name="<?php echo $prefix; ?>fontweight" />
|
||||
<label class="ckbutton cktip" title="" for="<?php echo $prefix; ?>fontweightnormal" style="width:auto;"><?php echo CKText::_('CK_NORMAL'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/text_underline.png" />
|
||||
<div class="ckbutton-group">
|
||||
<input class="<?php echo $prefix; ?>" type="radio" value="underline" id="<?php echo $prefix; ?>fontunderlineunderline" name="<?php echo $prefix; ?>fontunderline" />
|
||||
<label class="ckbutton first cktip" title="" for="<?php echo $prefix; ?>fontunderlineunderline" style="width:auto;"><?php echo ucfirst(CKText::_('CK_UNDERLINE')); ?>
|
||||
</label><input class="<?php echo $prefix; ?>" type="radio" value="none" id="<?php echo $prefix; ?>fontunderlinenone" name="<?php echo $prefix; ?>fontunderline" />
|
||||
<label class="ckbutton cktip" title="" for="<?php echo $prefix; ?>fontunderlinenone" style="width:auto;"><?php echo CKText::_('CK_NORMAL'); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function createAnimations($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>animdur"><?php echo CKText::_('CK_DURATION'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/hourglass.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>animdur" id="<?php echo $prefix; ?>animdur" value="1" /> [s]
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>animdelay"><?php echo CKText::_('CK_DELAY'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/hourglass.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>animdelay" id="<?php echo $prefix; ?>animdelay" value="0" /> [s]
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>animfade"><?php echo CKText::_('CK_FADE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shading.png" />
|
||||
<select class="<?php echo $prefix; ?>" type="list" name="<?php echo $prefix; ?>animfade" id="<?php echo $prefix; ?>animfade" value="" style="width: 100px;" >
|
||||
<option value="0"><?php echo CKText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo CKText::_('JYES'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>animmove"><?php echo CKText::_('CK_MOVE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_square_go.png" />
|
||||
<select class="<?php echo $prefix; ?>" type="list" name="<?php echo $prefix; ?>animmove" id="<?php echo $prefix; ?>animmove" value="" style="width: 100px;" >
|
||||
<option value="0"><?php echo CKText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo CKText::_('JYES'); ?></option>
|
||||
</select>
|
||||
<select class="<?php echo $prefix; ?> cktip" title="<?php echo CKText::_('CK_DIRECTION'); ?>" type="list" name="<?php echo $prefix; ?>animmovedir" id="<?php echo $prefix; ?>animmovedir" value="" style="width: 100px;" >
|
||||
<option value="ltrck"><?php echo CKText::_('CK_LEFT_TO_RIGHT'); ?></option>
|
||||
<option value="rtlck"><?php echo CKText::_('CK_RIGHT_TO_LEFT'); ?></option>
|
||||
<option value="ttbck"><?php echo CKText::_('CK_TOP_TO_BOTTOM'); ?></option>
|
||||
<option value="bttck"><?php echo CKText::_('CK_BOTTOM_TO_TOP'); ?></option>
|
||||
</select>
|
||||
<input class="<?php echo $prefix; ?> cktip" title="<?php echo CKText::_('CK_DISTANCE'); ?>" type="text" name="<?php echo $prefix; ?>animmovedist" id="<?php echo $prefix; ?>animmovedist" value="40" /> [px]
|
||||
</div>
|
||||
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>animrot"><?php echo CKText::_('CK_ROTATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_rotate_clockwise.png" />
|
||||
<select class="<?php echo $prefix; ?>" type="list" name="<?php echo $prefix; ?>animrot" id="<?php echo $prefix; ?>animrot" value="" style="width: 100px;" >
|
||||
<option value="0"><?php echo CKText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo CKText::_('JYES'); ?></option>
|
||||
</select>
|
||||
<select class="<?php echo $prefix; ?>" type="list" name="<?php echo $prefix; ?>animrotrad" id="<?php echo $prefix; ?>animrotrad" value="" style="width: 100px;" >
|
||||
<option value="45">45°</option>
|
||||
<option value="90">90°</option>
|
||||
<option value="180">180°</option>
|
||||
<option value="270">270°</option>
|
||||
<option value="360">360°</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>animscale"><?php echo CKText::_('CK_SCALE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_handles.png" />
|
||||
<select class="<?php echo $prefix; ?>" type="list" name="<?php echo $prefix; ?>animscale" id="<?php echo $prefix; ?>animscale" value="" style="width:100px;" >
|
||||
<option value="0"><?php echo CKText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo CKText::_('JYES'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<a class="ckbutton" href="javascript:void(0)" onclick="ckPlayAnimationPreview('<?php echo $prefix; ?>')"><i class="icon icon-play"></i><?php echo CKText::_('CK_PLAY_ANIMATION'); ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function createEffects($prefix) {
|
||||
?>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxdur"><?php echo CKText::_('CK_DURATION'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/hourglass.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxdur" id="<?php echo $prefix; ?>fxdur" value="1" /> [s]
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxdelay"><?php echo CKText::_('CK_DELAY'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/hourglass.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxdelay" id="<?php echo $prefix; ?>fxdelay" value="0" /> [s]
|
||||
</div>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_OPACITY'); ?></div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxopacity"><?php echo CKText::_('CK_NORMAL_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shading.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxopacity" id="<?php echo $prefix; ?>fxopacity" value="" >
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxopacity"><?php echo CKText::_('CK_HOVER_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shading.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>hoverfxopacity" id="<?php echo $prefix; ?>hoverfxopacity" value="" >
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxopacity"><?php echo CKText::_('CK_ACTIVE_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shading.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>activefxopacity" id="<?php echo $prefix; ?>activefxopacity" value="" >
|
||||
</div>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_MOVE'); ?></div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxmove"><?php echo CKText::_('CK_NORMAL_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_square_go.png" />
|
||||
<select class="<?php echo $prefix; ?> cktip" title="<?php echo CKText::_('CK_DIRECTION'); ?>" type="list" name="<?php echo $prefix; ?>fxmovedir" id="<?php echo $prefix; ?>fxmovedir" value="" style="width: 100px;" >
|
||||
<option value="ltrck"><?php echo CKText::_('CK_LEFT_TO_RIGHT'); ?></option>
|
||||
<option value="rtlck"><?php echo CKText::_('CK_RIGHT_TO_LEFT'); ?></option>
|
||||
<option value="ttbck"><?php echo CKText::_('CK_TOP_TO_BOTTOM'); ?></option>
|
||||
<option value="bttck"><?php echo CKText::_('CK_BOTTOM_TO_TOP'); ?></option>
|
||||
</select>
|
||||
<input class="<?php echo $prefix; ?> cktip" title="<?php echo CKText::_('CK_DISTANCE'); ?>" type="text" name="<?php echo $prefix; ?>fxmovedist" id="<?php echo $prefix; ?>fxmovedist" value="" /> [px]
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>hoverfxmove"><?php echo CKText::_('CK_HOVER_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_square_go.png" />
|
||||
<select class="<?php echo $prefix; ?>hover cktip" title="<?php echo CKText::_('CK_DIRECTION'); ?>" type="list" name="<?php echo $prefix; ?>hoverfxmovedir" id="<?php echo $prefix; ?>hoverfxmovedir" value="" style="width: 100px;" >
|
||||
<option value="ltrck"><?php echo CKText::_('CK_LEFT_TO_RIGHT'); ?></option>
|
||||
<option value="rtlck"><?php echo CKText::_('CK_RIGHT_TO_LEFT'); ?></option>
|
||||
<option value="ttbck"><?php echo CKText::_('CK_TOP_TO_BOTTOM'); ?></option>
|
||||
<option value="bttck"><?php echo CKText::_('CK_BOTTOM_TO_TOP'); ?></option>
|
||||
</select>
|
||||
<input class="<?php echo $prefix; ?>hover cktip" title="<?php echo CKText::_('CK_DISTANCE'); ?>" type="text" name="<?php echo $prefix; ?>hoverfxmovedist" id="<?php echo $prefix; ?>hoverfxmovedist" value="" /> [px]
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>activefxmove"><?php echo CKText::_('CK_ACTIVE_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_square_go.png" />
|
||||
<select class="<?php echo $prefix; ?>active cktip" title="<?php echo CKText::_('CK_DIRECTION'); ?>" type="list" name="<?php echo $prefix; ?>activefxmovedir" id="<?php echo $prefix; ?>activefxmovedir" value="" style="width: 100px;" >
|
||||
<option value="ltrck"><?php echo CKText::_('CK_LEFT_TO_RIGHT'); ?></option>
|
||||
<option value="rtlck"><?php echo CKText::_('CK_RIGHT_TO_LEFT'); ?></option>
|
||||
<option value="ttbck"><?php echo CKText::_('CK_TOP_TO_BOTTOM'); ?></option>
|
||||
<option value="bttck"><?php echo CKText::_('CK_BOTTOM_TO_TOP'); ?></option>
|
||||
</select>
|
||||
<input class="<?php echo $prefix; ?>active cktip" title="<?php echo CKText::_('CK_DISTANCE'); ?>" type="text" name="<?php echo $prefix; ?>activefxmovedist" id="<?php echo $prefix; ?>activefxmovedist" value="" /> [px]
|
||||
</div>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_ROTATE'); ?></div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxrot"><?php echo CKText::_('CK_NORMAL_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_rotate_clockwise.png" />
|
||||
<select class="<?php echo $prefix; ?>" type="list" name="<?php echo $prefix; ?>fxrot" id="<?php echo $prefix; ?>fxrot" value="" style="width: 100px;" >
|
||||
<option value="0"><?php echo CKText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo CKText::_('JYES'); ?></option>
|
||||
</select>
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxrotrad" id="<?php echo $prefix; ?>fxrotrad" value="" /> °
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>hoverfxrot"><?php echo CKText::_('CK_HOVER_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_rotate_clockwise.png" />
|
||||
<select class="<?php echo $prefix; ?>hover" type="list" name="<?php echo $prefix; ?>hoverfxrot" id="<?php echo $prefix; ?>hoverfxrot" value="" style="width: 100px;" >
|
||||
<option value="0"><?php echo CKText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo CKText::_('JYES'); ?></option>
|
||||
</select>
|
||||
<input class="<?php echo $prefix; ?>hover" type="text" name="<?php echo $prefix; ?>hoverfxrotrad" id="<?php echo $prefix; ?>hoverfxrotrad" value="" /> °
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>activefxrot"><?php echo CKText::_('CK_ACTIVE_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_rotate_clockwise.png" />
|
||||
<select class="<?php echo $prefix; ?>active" type="list" name="<?php echo $prefix; ?>activefxrot" id="<?php echo $prefix; ?>activefxrot" value="" style="width: 100px;" >
|
||||
<option value="0"><?php echo CKText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo CKText::_('JYES'); ?></option>
|
||||
</select>
|
||||
<input class="<?php echo $prefix; ?>active" type="text" name="<?php echo $prefix; ?>activefxrotrad" id="<?php echo $prefix; ?>activefxrotrad" value="" /> °
|
||||
</div>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_SCALE'); ?></div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxscale"><?php echo CKText::_('CK_NORMAL_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_handles.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxscale" id="<?php echo $prefix; ?>fxscale" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>hoverfxscale"><?php echo CKText::_('CK_HOVER_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_handles.png" />
|
||||
<input class="<?php echo $prefix; ?>hover" type="text" name="<?php echo $prefix; ?>hoverfxscale" id="<?php echo $prefix; ?>hoverfxscale" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>activefxscale"><?php echo CKText::_('CK_ACTIVE_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/shape_handles.png" />
|
||||
<input class="<?php echo $prefix; ?>active" type="text" name="<?php echo $prefix; ?>activefxscale" id="<?php echo $prefix; ?>activefxscale" value="" />
|
||||
</div>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_BLUR'); ?></div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxblur"><?php echo CKText::_('CK_NORMAL_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/wrap-behind.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxblur" id="<?php echo $prefix; ?>fxblur" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>hoverfxblur"><?php echo CKText::_('CK_HOVER_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/wrap-behind.png" />
|
||||
<input class="<?php echo $prefix; ?>hover" type="text" name="<?php echo $prefix; ?>hoverfxblur" id="<?php echo $prefix; ?>hoverfxblur" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>activefxblur"><?php echo CKText::_('CK_ACTIVE_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/wrap-behind.png" />
|
||||
<input class="<?php echo $prefix; ?>active" type="text" name="<?php echo $prefix; ?>activefxblur" id="<?php echo $prefix; ?>activefxblur" value="" />
|
||||
</div>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_BRIGHTNESS'); ?></div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxbrightness"><?php echo CKText::_('CK_NORMAL_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/lightbulb.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxbrightness" id="<?php echo $prefix; ?>fxbrightness" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>hoverfxbrightness"><?php echo CKText::_('CK_HOVER_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/lightbulb.png" />
|
||||
<input class="<?php echo $prefix; ?>hover" type="text" name="<?php echo $prefix; ?>hoverfxbrightness" id="<?php echo $prefix; ?>hoverfxbrightness" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>activefxbrightness"><?php echo CKText::_('CK_ACTIVE_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/lightbulb.png" />
|
||||
<input class="<?php echo $prefix; ?>active" type="text" name="<?php echo $prefix; ?>activefxbrightness" id="<?php echo $prefix; ?>activefxbrightness" value="" />
|
||||
</div>
|
||||
<div class="ckheading"><?php echo CKText::_('CK_GRAYSCALE'); ?></div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>fxgrayscale"><?php echo CKText::_('CK_NORMAL_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/lightbulb_off.png" />
|
||||
<input class="<?php echo $prefix; ?>" type="text" name="<?php echo $prefix; ?>fxgrayscale" id="<?php echo $prefix; ?>fxgrayscale" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>hoverfxgrayscale"><?php echo CKText::_('CK_HOVER_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/lightbulb_off.png" />
|
||||
<input class="<?php echo $prefix; ?>hover" type="text" name="<?php echo $prefix; ?>hoverfxgrayscale" id="<?php echo $prefix; ?>hoverfxgrayscale" value="" />
|
||||
</div>
|
||||
<div class="ckrow">
|
||||
<label for="<?php echo $prefix; ?>activefxgrayscale"><?php echo CKText::_('CK_ACTIVE_STATE'); ?></label>
|
||||
<img class="ckicon" src="<?php echo $this->imagespath ?>/lightbulb_off.png" />
|
||||
<input class="<?php echo $prefix; ?>active" type="text" name="<?php echo $prefix; ?>activefxgrayscale" id="<?php echo $prefix; ?>activefxgrayscale" value="" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,143 @@
|
||||
<?php
|
||||
Namespace Slideshowck;
|
||||
|
||||
defined('CK_LOADED') or die;
|
||||
|
||||
use \Slideshowck\CKFof;
|
||||
|
||||
class CKModel {
|
||||
|
||||
var $_item = null;
|
||||
|
||||
private static $instance;
|
||||
|
||||
protected $input;
|
||||
|
||||
protected $table;
|
||||
|
||||
protected $__state_set = null;
|
||||
|
||||
protected $state;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
function __construct() {
|
||||
$this->input = CKFof::getInput();
|
||||
$this->state = new \Joomla\CMS\Object\CMSObject;
|
||||
}
|
||||
|
||||
static function getInstance($name, $prefix, $config) {
|
||||
|
||||
if (is_object(self::$instance))
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
$basePath = SLIDESHOWCK_PATH;
|
||||
// Check for a controller.task command.
|
||||
$input = CKFof::getInput();
|
||||
|
||||
// Define the controller filename and path.
|
||||
$file = strtolower($name . '.php');
|
||||
$path = $basePath . '/models/' . $file;
|
||||
|
||||
// Get the controller class name.
|
||||
$class = ucfirst($prefix) . 'Model' . ucfirst($name);
|
||||
|
||||
// Include the class if not present.
|
||||
if (!class_exists($class))
|
||||
{
|
||||
// If the controller file path exists, include it.
|
||||
if (file_exists($path))
|
||||
{
|
||||
require_once $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
// throw new \InvalidArgumentException(\Joomla\CMS\Language\Text::sprintf('ERROR_INVALID_MODEL', $type, $format));
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Instantiate the class.
|
||||
if (!class_exists($class))
|
||||
{
|
||||
throw new \InvalidArgumentException(\Joomla\CMS\Language\Text::sprintf('ERROR_INVALID_MODEL_CLASS', $class));
|
||||
}
|
||||
|
||||
// Instantiate the class, store it to the static container, and return it
|
||||
return self::$instance = new $class();
|
||||
}
|
||||
|
||||
public function save($data) {
|
||||
|
||||
}
|
||||
|
||||
public function delete($id) {
|
||||
return CKFof::dbDelete( $this->table, (int)$id );
|
||||
}
|
||||
|
||||
public function setState($property, $value = null)
|
||||
{
|
||||
return $this->state->set($property, $value);
|
||||
}
|
||||
|
||||
public function getState($property = null, $default = null)
|
||||
{
|
||||
if (!$this->__state_set)
|
||||
{
|
||||
// Protected method to auto-populate the model state.
|
||||
$this->populateState();
|
||||
|
||||
// Set the model state set flag to true.
|
||||
$this->__state_set = true;
|
||||
}
|
||||
|
||||
return $property === null ? $this->state : $this->state->get($property, $default);
|
||||
}
|
||||
|
||||
protected function populateState()
|
||||
{
|
||||
$this->state->set('filter_order', $this->input->get('filter_order', 'a.id'));
|
||||
$this->state->set('filter_order_Dir', $this->input->get('filter_order_Dir', 'asc'));
|
||||
$this->state->set('filter_search', $this->input->get('filter_search', ''));
|
||||
$this->state->set('limitstart', $this->input->get('limitstart', 0));
|
||||
$this->state->set('limit_total', $this->input->get('limittotal', 0));
|
||||
$this->state->set('limit', $this->input->get('limit', 20));
|
||||
}
|
||||
|
||||
public function getPagination($total = null, $start = null, $limit = null)
|
||||
{
|
||||
if (!$this->pagination)
|
||||
{
|
||||
$total = $this->state->get('limit_total', $total);
|
||||
// $total = $this->getTotal();
|
||||
$start = $this->state->get('limitstart', $start);
|
||||
$limit = $this->state->get('limit', $limit);
|
||||
|
||||
$this->pagination = new \Joomla\CMS\Pagination\Pagination($total, $start, $limit);
|
||||
}
|
||||
|
||||
return $this->pagination;
|
||||
}
|
||||
|
||||
public function getTotal($query) {
|
||||
$db = CKFof::getDbo();
|
||||
$query = clone $query;
|
||||
$query->clear('select')->clear('order')->clear('limit')->clear('offset')->select('COUNT(*)');
|
||||
$db->setQuery($query);
|
||||
|
||||
return (int) $db->loadResult();
|
||||
}
|
||||
|
||||
public function copy($id) {
|
||||
$row = CKFof::dbLoad($this->table, (int)$id);
|
||||
$row->id = 0;
|
||||
$row->name = $row->name . ' - copy';
|
||||
|
||||
$newid = CKFof::dbStore($this->table, $row);
|
||||
|
||||
return $newid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace Slideshowck;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
class CKPath extends \Joomla\CMS\Filesystem\Path {
|
||||
|
||||
}
|
||||
@ -0,0 +1,903 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2016. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
|
||||
*/
|
||||
Namespace Slideshowck;
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
/**
|
||||
* CKStyles is a class to manage the styles
|
||||
*
|
||||
* @author Cedric KEIFLIN http://www.joomlack.fr
|
||||
*/
|
||||
class CKStyles extends \stdClass {
|
||||
|
||||
public function create($fields, $customstyles, $direction = 'ltr') {
|
||||
|
||||
$styles = "";
|
||||
$customprefixes = array();
|
||||
if (! empty($customstyles)) {
|
||||
// look for the custom styles to manage from plugins for example
|
||||
foreach ($customstyles as $prefix => $selector) {
|
||||
$customprefixes[] = $prefix;
|
||||
}
|
||||
// merge the existing prefix and the new one
|
||||
// $prefixes = array_merge($prefixes, $customprefixes);
|
||||
}
|
||||
$prefixes = $customprefixes;
|
||||
|
||||
$cssstyles = new \stdClass();
|
||||
foreach ($prefixes as $prefix) {
|
||||
$cssstyles->$prefix = new \stdClass();
|
||||
$cssstyles->$prefix->css = self::genCss($fields, $prefix, $direction);
|
||||
}
|
||||
|
||||
|
||||
if (! empty($customstyles)) {
|
||||
$id = '|ID|';
|
||||
// loop through all custom styles from plugins or other elements
|
||||
foreach ($customstyles as $prefix => $selector) {
|
||||
$selectors = explode('|', str_replace('|qq|', '"', $selector));
|
||||
$fullselector = $id . ' ' . implode(',' . $id . ' ', $selectors);
|
||||
// $fullselector = implode(',', $selectors);
|
||||
|
||||
$properties = $cssstyles->$prefix->css['background']
|
||||
. $cssstyles->$prefix->css['gradient']
|
||||
. $cssstyles->$prefix->css['borders']
|
||||
. $cssstyles->$prefix->css['borderradius']
|
||||
. $cssstyles->$prefix->css['height']
|
||||
. $cssstyles->$prefix->css['width']
|
||||
. $cssstyles->$prefix->css['color']
|
||||
. $cssstyles->$prefix->css['margins']
|
||||
. $cssstyles->$prefix->css['paddings']
|
||||
. $cssstyles->$prefix->css['alignement']
|
||||
. $cssstyles->$prefix->css['shadow']
|
||||
. $cssstyles->$prefix->css['fontbold']
|
||||
. $cssstyles->$prefix->css['fontitalic']
|
||||
. $cssstyles->$prefix->css['fontunderline']
|
||||
. $cssstyles->$prefix->css['fontuppercase']
|
||||
. $cssstyles->$prefix->css['letterspacing']
|
||||
. $cssstyles->$prefix->css['wordspacing']
|
||||
. $cssstyles->$prefix->css['textindent']
|
||||
. $cssstyles->$prefix->css['lineheight']
|
||||
. $cssstyles->$prefix->css['fontsize']
|
||||
. $cssstyles->$prefix->css['fontfamily']
|
||||
. $cssstyles->$prefix->css['custom']
|
||||
;
|
||||
if ( !(empty(trim($properties)))) {
|
||||
$styles .= "
|
||||
" . $fullselector . " {
|
||||
"
|
||||
. $properties
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
// add the animations to the element
|
||||
$styles .= $this->genAnimations($fields, $prefix, $fullselector);
|
||||
$styles .= $this->genEffects($fields, $prefix, $fullselector);
|
||||
}
|
||||
}
|
||||
|
||||
// Arrows
|
||||
// normal state arrows
|
||||
// $arrowcolor = (isset($fields->navigationarrowcolor) AND $fields->navigationarrowcolor != '') ? str_replace('#', '', $fields->navigationarrowcolor) : "";
|
||||
// $arrowopacity = (isset($fields->navigationarrowopacity) AND $fields->navigationarrowopacity != '') ? $fields->navigationarrowopacity : "";
|
||||
// if ($arrowcolor || $arrowopacity) {
|
||||
// $styles .= "|ID| .camera_prev > span {"
|
||||
// . ($arrowcolor ? "background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23" . $arrowcolor . "'%2F%3E%3C%2Fsvg%3E\");" : "")
|
||||
// . ($arrowopacity ? "opacity: " . $arrowopacity . ";" : "")
|
||||
// . "}
|
||||
// ";
|
||||
// $styles .= "|ID| .camera_next > span {"
|
||||
// . ($arrowcolor ? "background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23" . $arrowcolor . "'%2F%3E%3C%2Fsvg%3E\");" : "")
|
||||
// . ($arrowopacity ? "opacity: " . $arrowopacity . ";" : "")
|
||||
// . "}
|
||||
// ";
|
||||
// }
|
||||
|
||||
// navigation
|
||||
$arrowcolor = (isset($fields->navigationarrowcolor) AND $fields->navigationarrowcolor != '') ? str_replace('#', '', $fields->navigationarrowcolor) : "";
|
||||
$arrowopacity = (isset($fields->navigationarrowopacity) AND $fields->navigationarrowopacity != '') ? $fields->navigationarrowopacity : "1";
|
||||
if ($arrowcolor) {
|
||||
$styles .= "|ID| .camera_prev, |ID| .camera_next, |ID| .camera_commands {"
|
||||
. ($arrowcolor ? "background: " . $this->hex2RGB($arrowcolor, $arrowopacity) . ";" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
// navigation hover
|
||||
$arrowhovercolor = (isset($fields->navigationarrowhovercolor) AND $fields->navigationarrowhovercolor != '') ? str_replace('#', '', $fields->navigationarrowhovercolor) : "";
|
||||
$arrowhoveropacity = (isset($fields->navigationarrowhoveropacity) AND $fields->navigationarrowhoveropacity != '') ? $fields->navigationarrowhoveropacity : "1";
|
||||
if ($arrowcolor) {
|
||||
$styles .= "|ID| .camera_prev:hover, |ID| .camera_next:hover, |ID| .camera_commands:hover {"
|
||||
. ($arrowcolor ? "background: " . $this->hex2RGB($arrowhovercolor, $arrowhoveropacity) . ";" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
//paginationdotimage
|
||||
$paginationcolor = (isset($fields->paginationdotimagecolor) AND $fields->paginationdotimagecolor != '') ? $fields->paginationdotimagecolor : "";
|
||||
$paginationopacity = (isset($fields->paginationdotimageopacity) AND $fields->paginationdotimageopacity != '') ? $fields->paginationdotimageopacity : "1";
|
||||
$paginationdotimageborderwidth = (isset($fields->paginationdotimageborderwidth) AND $fields->paginationdotimageborderwidth != '') ? $fields->paginationdotimageborderwidth : "";
|
||||
|
||||
if ($paginationcolor || $paginationopacity) {
|
||||
$styles .= "|ID| .camera_pag_ul li img {"
|
||||
. ($paginationcolor ? "border-color: " . $this->hex2RGB($paginationcolor, $paginationopacity) . ";" : "")
|
||||
. ($paginationdotimageborderwidth ? "border-width: " . $this->testUnit($paginationdotimageborderwidth) . ";" : "")
|
||||
. "}
|
||||
";
|
||||
$styles .= "|ID| .camera_pag_ul .thumb_arrow {"
|
||||
. ($paginationcolor ? "border-top-color: " . $this->hex2RGB($paginationcolor, $paginationopacity) . ";" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
//paginationdot
|
||||
$paginationdotcolor1 = (isset($fields->paginationdotcolor1) AND $fields->paginationdotcolor1 != '') ? $fields->paginationdotcolor1 : "";
|
||||
$paginationdotborderradius1 = (isset($fields->paginationdotborderradius1) AND $fields->paginationdotborderradius1 !== '') ? $fields->paginationdotborderradius1 : "";
|
||||
$paginationdotcolor2 = (isset($fields->paginationdotcolor2) AND $fields->paginationdotcolor2 != '') ? $fields->paginationdotcolor2 : "";
|
||||
$paginationdotborderradius2 = (isset($fields->paginationdotborderradius2) AND $fields->paginationdotborderradius2 !== '') ? $fields->paginationdotborderradius2 : "";
|
||||
|
||||
if ($paginationdotcolor1 || $paginationdotborderradius1 !== '') {
|
||||
$styles .= "|ID|.camera_wrap .camera_pag .camera_pag_ul li {"
|
||||
. ($paginationdotcolor1 ? "background: " . $paginationdotcolor1 . ";" : "")
|
||||
. ($paginationdotborderradius1 !== '' ? "border-radius: " . $this->testUnit($paginationdotborderradius1) . ";" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
if ($paginationdotcolor2 || $paginationdotborderradius2 !== '') {
|
||||
$styles .= "|ID|.camera_wrap .camera_pag .camera_pag_ul li.cameracurrent > span, |ID| .camera_wrap .camera_pag .camera_pag_ul li:hover > span {"
|
||||
. ($paginationdotcolor2 ? "background: " . $paginationdotcolor2 . ";" : "")
|
||||
. ($paginationdotborderradius2 !== '' ? "border-radius: " . $this->testUnit($paginationdotborderradius2) . ";" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
// paginationdot position
|
||||
$paginationposition = (isset($fields->paginationdotposition) AND $fields->paginationdotposition != '') ? $fields->paginationdotposition : "";
|
||||
if ($paginationposition === 'inside') {
|
||||
$styles .= "|ID| .camera_pag {"
|
||||
. ($paginationposition ? "margin-top: -50px;" : "")
|
||||
. "}
|
||||
";
|
||||
$styles .= "|ID| {"
|
||||
. ($paginationposition ? "margin-bottom: 0px !important;" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
// paginationdot alignment
|
||||
$paginationalign = (isset($fields->paginationdotalign) AND $fields->paginationdotalign != '') ? $fields->paginationdotalign : "";
|
||||
if ($paginationalign) {
|
||||
$styles .= "|ID| .camera_pag .camera_pag_ul {"
|
||||
. ($paginationalign ? "text-align: " . $paginationalign . ";" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
// caption
|
||||
$layoutposition = (isset($fields->layoutposition) AND $fields->layoutposition != '') ? $fields->layoutposition : "";
|
||||
if ($layoutposition) {
|
||||
$styles .= "|ID| .camera_caption {"
|
||||
. ($layoutposition == 'bottom' ? "bottom: 0; top: auto;" : "")
|
||||
. ($layoutposition == 'top' ? "bottom: auto; top: 0;" : "")
|
||||
. ($layoutposition == 'middle' ? "bottom: auto; top: 50%; transform: translateY(-50%);" : "")
|
||||
. ($layoutposition == 'fullscreen' ? "bottom: 0; top: 0;" : "")
|
||||
. "}
|
||||
";
|
||||
}
|
||||
|
||||
/* ---- fin des css ------ */
|
||||
return $styles;
|
||||
}
|
||||
|
||||
function genCss($fields, $prefix, $direction) {
|
||||
$input = CKFof::getInput();
|
||||
$action = 'preview';
|
||||
|
||||
// construct variable names
|
||||
$backgroundimageurl = $prefix . 'backgroundimageurl';
|
||||
$backgroundimageleft = $prefix . 'backgroundimageleft';
|
||||
$backgroundimagetop = $prefix . 'backgroundimagetop';
|
||||
$backgroundimagerepeat = $prefix . 'backgroundimagerepeat';
|
||||
$backgroundimageattachment = $prefix . 'backgroundimageattachment';
|
||||
$backgroundcolor = $prefix . 'backgroundcolorstart';
|
||||
$backgroundopacity = $prefix . 'backgroundopacity';
|
||||
$gradientcolor = $prefix . 'backgroundcolorend';
|
||||
$gradient1position = $prefix . 'backgroundpositionend';
|
||||
$gradient1opacity = $prefix . 'backgroundopacityend';
|
||||
$gradient2color = $prefix . 'backgroundcolorstop1';
|
||||
$gradient2position = $prefix . 'backgroundpositionstop1';
|
||||
$gradient2opacity = $prefix . 'backgroundopacitystop1';
|
||||
$gradient3color = $prefix . 'backgroundcolorstop2';
|
||||
$gradient3position = $prefix . 'backgroundpositionstop2';
|
||||
$gradient3opacity = $prefix . 'backgroundopacitystop2';
|
||||
$gradientdirection = $prefix . 'backgrounddirection';
|
||||
$hasopacity = false;
|
||||
$backgroundimagesize = $prefix . 'backgroundimagesize';
|
||||
$opacity = $prefix . 'opacity';
|
||||
|
||||
// set the background color
|
||||
$css['background'] = (isset($fields->$backgroundcolor) AND $fields->$backgroundcolor != '') ? "\tbackground: " . $fields->$backgroundcolor . ";\r\n" : "";
|
||||
$backgroundcolorvalue = (isset($fields->$backgroundcolor) AND $fields->$backgroundcolor) ? $fields->$backgroundcolor : "";
|
||||
|
||||
// manage rgba color for opacity
|
||||
if (isset($fields->$backgroundopacity) AND $fields->$backgroundopacity != '' AND isset($fields->$backgroundcolor)) {
|
||||
$hasopacity = true;
|
||||
$rgbavalue = $this->hex2RGB($fields->$backgroundcolor, $fields->$backgroundopacity);
|
||||
$css['background'] .= (isset($fields->$backgroundcolor) AND $fields->$backgroundcolor) ? "\tbackground: " . $rgbavalue . ";\r\n\t-pie-background: " . $rgbavalue . ";\r\n" : "";
|
||||
}
|
||||
if (isset($fields->$backgroundopacity) AND $fields->$backgroundopacity == '0') {
|
||||
$css['background'] .= "\tbackground: none;\r\n";
|
||||
}
|
||||
|
||||
$imageurl = "";
|
||||
if (isset($fields->$backgroundimageurl) AND $fields->$backgroundimageurl) {
|
||||
if ($action == 'preview') {
|
||||
$imageurl = substr($fields->$backgroundimageurl, 0, 4) == 'http' ? $fields->$backgroundimageurl : \Joomla\CMS\Uri\Uri::root(true) . '/' . $fields->$backgroundimageurl;
|
||||
} else {
|
||||
$imageurl = explode("/", $fields->$backgroundimageurl);
|
||||
$imageurl = end($imageurl);
|
||||
$imageurl = "../images/" . $imageurl;
|
||||
}
|
||||
}
|
||||
|
||||
// set the background image
|
||||
$backgroundimageleftvalue = (isset($fields->$backgroundimageleft) AND $fields->$backgroundimageleft != null) ? $fields->$backgroundimageleft : "center";
|
||||
$backgroundimagetopvalue = (isset($fields->$backgroundimagetop) AND $fields->$backgroundimagetop != null) ? $fields->$backgroundimagetop : "center";
|
||||
$backgroundimagerepeatvalue = (isset($fields->$backgroundimagerepeat) AND $fields->$backgroundimagerepeat) ? $fields->$backgroundimagerepeat : "no-repeat";
|
||||
$backgroundimageurlvalue = (isset($fields->$backgroundimageurl) AND $fields->$backgroundimageurl) ? $fields->$backgroundimageurl : "";
|
||||
$backgroundimageattachmentvalue = (isset($fields->$backgroundimageattachment) AND $fields->$backgroundimageattachment) ? $fields->$backgroundimageattachment : "";
|
||||
|
||||
if ($backgroundimageleftvalue != 'top' AND $backgroundimageleftvalue != 'right' AND $backgroundimageleftvalue != 'bottom' AND $backgroundimageleftvalue != 'left' AND $backgroundimageleftvalue != 'center' AND !stristr($backgroundimageleftvalue, "px")
|
||||
)
|
||||
$backgroundimageleftvalue = $this->testUnit($backgroundimageleftvalue);
|
||||
|
||||
if ($backgroundimagetopvalue != 'top' AND $backgroundimagetopvalue != 'right' AND $backgroundimagetopvalue != 'bottom' AND $backgroundimagetopvalue != 'left' AND $backgroundimagetopvalue != 'center' AND !stristr($backgroundimagetopvalue, "px")
|
||||
)
|
||||
$backgroundimagetopvalue = $this->testUnit($backgroundimagetopvalue);
|
||||
|
||||
// set the background color
|
||||
if ((isset($fields->class) AND !stristr($fields->class, 'bannerlogo')) OR !isset($fields->class)) {
|
||||
$css['background'] = (isset($fields->$backgroundimageurl) AND $fields->$backgroundimageurl) ? "\tbackground: " . $backgroundcolorvalue . " url(" . $imageurl . ") " . $backgroundimageleftvalue . " " . $backgroundimagetopvalue . " " . $backgroundimagerepeatvalue . " " . $backgroundimageattachmentvalue . ";\r\n" : $css['background'];
|
||||
if ($hasopacity)
|
||||
$css['background'] .= (isset($fields->$backgroundimageurl) AND $fields->$backgroundimageurl) ? "\tbackground: " . $rgbavalue . " url(" . $imageurl . ") " . $backgroundimageleftvalue . " " . $backgroundimagetopvalue . " " . $backgroundimagerepeatvalue . " " . $backgroundimageattachmentvalue . ";\r\n" : "";
|
||||
}
|
||||
|
||||
//set the background size
|
||||
if (isset($fields->$backgroundimageurl) AND $fields->$backgroundimageurl AND isset($fields->$backgroundimagesize) AND $fields->$backgroundimagesize != 'none') {
|
||||
$css['background'] .= "\tbackground-size: " . $fields->$backgroundimagesize . ";\r\n";
|
||||
}
|
||||
|
||||
$css['background'] .= (isset($fields->$opacity) AND $fields->$opacity) ? "\topacity: " . ($fields->$opacity / 100) . ";" : "";
|
||||
|
||||
$gradient0colorvalue = (isset($fields->$backgroundcolor) AND $fields->$backgroundcolor) ? $fields->$backgroundcolor : "";
|
||||
$gradient1colorvalue = (isset($fields->$gradientcolor) AND $fields->$gradientcolor) ? $fields->$gradientcolor : "";
|
||||
$gradient1positionvalue = (isset($fields->$gradient1position) AND $fields->$gradient1position) ? $fields->$gradient1position . "%" : "100%";
|
||||
$gradient2colorvalue = (isset($fields->$gradient2color) AND $fields->$gradient2color) ? $fields->$gradient2color : "";
|
||||
$gradient2positionvalue = (isset($fields->$gradient2position) AND $fields->$gradient2position) ? $fields->$gradient2position . "%" : "";
|
||||
$gradient3colorvalue = (isset($fields->$gradient3color) AND $fields->$gradient3color) ? $fields->$gradient3color : "";
|
||||
$gradient3positionvalue = (isset($fields->$gradient3position) AND $fields->$gradient3position) ? $fields->$gradient3position . "%" : "";
|
||||
|
||||
if (isset($fields->$gradientdirection)) {
|
||||
switch ($fields->$gradientdirection) {
|
||||
case 'bottomtop':
|
||||
$gradientdirectionvalue = 'center bottom';
|
||||
$gradientdirectionvaluebis = 'left bottom, left top';
|
||||
$gradientdirectionvaluebis2 = 'x1="0%" y1="100%"
|
||||
x2="0%" y2="0%"';
|
||||
$gradientdirectionvalue3 = 'to top';
|
||||
break;
|
||||
case 'leftright':
|
||||
$gradientdirectionvalue = 'center left';
|
||||
$gradientdirectionvaluebis = 'left top, right top';
|
||||
$gradientdirectionvaluebis2 = 'x1="0%" y1="0%"
|
||||
x2="100%" y2="0%"';
|
||||
$gradientdirectionvalue3 = 'to right';
|
||||
break;
|
||||
case 'rightleft':
|
||||
$gradientdirectionvalue = 'center right';
|
||||
$gradientdirectionvaluebis = 'right top, left top';
|
||||
$gradientdirectionvaluebis2 = 'x1="100%" y1="0%"
|
||||
x2="0%" y2="0%"';
|
||||
$gradientdirectionvalue3 = 'to left';
|
||||
break;
|
||||
case 'topbottom':
|
||||
default :
|
||||
$gradientdirectionvalue = 'center top';
|
||||
$gradientdirectionvaluebis = 'left top, left bottom';
|
||||
$gradientdirectionvaluebis2 = 'x1="0%" y1="0%"
|
||||
x2="0%" y2="100%"';
|
||||
$gradientdirectionvalue3 = 'to bottom';
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$gradientdirectionvalue = 'center top';
|
||||
$gradientdirectionvaluebis = 'left top, left bottom';
|
||||
$gradientdirectionvaluebis2 = 'x1="0%" y1="0%"
|
||||
x2="0%" y2="100%"';
|
||||
$gradientdirectionvalue3 = 'to bottom';
|
||||
}
|
||||
|
||||
|
||||
$gradientstop2 = '';
|
||||
$gradientstop2webkit = '';
|
||||
$gradientstop2bis = '';
|
||||
$gradientstop3 = '';
|
||||
$gradientstop3webkit = '';
|
||||
$gradientstop3bis = '';
|
||||
if ($gradient2colorvalue AND $gradient2positionvalue) {
|
||||
$gradientstop2 = ',' . $gradient2colorvalue . ' ' . $gradient2positionvalue;
|
||||
$gradientstop2webkit = ',color-stop(' . $gradient2positionvalue . ',' . $gradient2colorvalue . ')';
|
||||
$gradientstop2bis = '<stop offset="' . $gradient2positionvalue . '" stop-color="' . $gradient2colorvalue . '" stop-opacity="1"/>';
|
||||
}
|
||||
if ($gradient3colorvalue AND $gradient3positionvalue) {
|
||||
$gradientstop3 = ',' . $gradient3colorvalue . ' ' . $gradient3positionvalue;
|
||||
$gradientstop3webkit = ',color-stop(' . $gradient3positionvalue . ',' . $gradient3colorvalue . ')';
|
||||
$gradientstop3bis = '<stop offset="' . $gradient3positionvalue . '" stop-color="' . $gradient3colorvalue . '" stop-opacity="1"/>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($gradient0colorvalue && $gradient1colorvalue) {
|
||||
// $css['gradient'] = "\tbackground-image: url(\"" . $prefix . $id . "-gradient.svg\");\r\n"
|
||||
$css['gradient'] = ""
|
||||
. "\tbackground-image: -o-linear-gradient(" . $gradientdirectionvalue . "," . $gradient0colorvalue . $gradientstop2 . $gradientstop3 . ", " . $gradient1colorvalue . ' ' . $gradient1positionvalue . ");\r\n"
|
||||
. "\tbackground-image: -webkit-gradient(linear, " . $gradientdirectionvaluebis . ",from(" . $gradient0colorvalue . ")" . $gradientstop2webkit . $gradientstop3webkit . ", color-stop(" . $gradient1positionvalue . ', ' . $gradient1colorvalue . "));\r\n"
|
||||
. "\tbackground-image: -moz-linear-gradient(" . $gradientdirectionvalue . "," . $gradient0colorvalue . $gradientstop2 . $gradientstop3 . ", " . $gradient1colorvalue . ' ' . $gradient1positionvalue . ");\r\n"
|
||||
. "\tbackground-image: linear-gradient(" . $gradientdirectionvalue3 . "," . $gradient0colorvalue . $gradientstop2 . $gradientstop3 . ", " . $gradient1colorvalue . ' ' . $gradient1positionvalue . ");\r\n";
|
||||
// . "\t-pie-background: linear-gradient(" . $gradientdirectionvalue . "," . $gradient0colorvalue . $gradientstop2 . $gradientstop3 . ", " . $gradient1colorvalue . ' ' . $gradient1positionvalue . ");\r\n";
|
||||
|
||||
/*
|
||||
// create the file svg for IE9 and Opera gradient compatibility
|
||||
$svgie9cssdest = $path . '/css/' . $prefix . $id . '-gradient.svg';
|
||||
$svgie9csstext = '<?xml version="1.0" ?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%"
|
||||
height="100%"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<defs>
|
||||
<linearGradient id="' . $prefix . $id . '"
|
||||
' . $gradientdirectionvaluebis2 . '
|
||||
spreadMethod="pad">
|
||||
<stop offset="0%" stop-color="' . $gradient0colorvalue . '" stop-opacity="1"/>
|
||||
' . $gradientstop2bis . '
|
||||
' . $gradientstop3bis . '
|
||||
<stop offset="' . $gradient1positionvalue . '" stop-color="' . $gradient1colorvalue . '" stop-opacity="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<rect width="100%" height="100%"
|
||||
style="fill:url(#' . $prefix . $id . ');" />
|
||||
</svg>
|
||||
';
|
||||
if (!\Joomla\CMS\Filesystem\File::write($svgie9cssdest, $svgie9csstext)) {
|
||||
echo '<p class="error">' . \Joomla\CMS\Language\Text::_('CK_ERROR_CREATING_SVGIE9CSS') . '</p>';
|
||||
}*/
|
||||
} else {
|
||||
$css['gradient'] = "";
|
||||
}
|
||||
|
||||
|
||||
// construct variable names
|
||||
$borderscolor = $prefix . 'borderscolor';
|
||||
$borderssize = $prefix . 'borderssize';
|
||||
$bordersstyle = $prefix . 'bordersstyle';
|
||||
$bordertopcolor = $prefix . 'bordertopcolor';
|
||||
$bordertopsize = $prefix . 'bordertopsize';
|
||||
$bordertopstyle = $prefix . 'bordertopstyle';
|
||||
$borderbottomcolor = $prefix . 'borderbottomcolor';
|
||||
$borderbottomsize = $prefix . 'borderbottomsize';
|
||||
$borderbottomstyle = $prefix . 'borderbottomstyle';
|
||||
$borderleftcolor = $prefix . 'borderleftcolor';
|
||||
$borderleftsize = $prefix . 'borderleftsize';
|
||||
$borderleftstyle = $prefix . 'borderleftstyle';
|
||||
$borderrightcolor = $prefix . 'borderrightcolor';
|
||||
$borderrightsize = $prefix . 'borderrightsize';
|
||||
$borderrightstyle = $prefix . 'borderrightstyle';
|
||||
// for border radius
|
||||
$borderradius = $prefix . 'borderradius';
|
||||
$borderradiustopleft = $prefix . 'borderradiustopleft';
|
||||
$borderradiustopright = $prefix . 'borderradiustopright';
|
||||
$borderradiusbottomleft = $prefix . 'borderradiusbottomleft';
|
||||
$borderradiusbottomright = $prefix . 'borderradiusbottomright';
|
||||
|
||||
$fields->$bordersstyle = isset($fields->$bordersstyle) ? $fields->$bordersstyle : 'solid';
|
||||
$fields->$bordertopstyle = isset($fields->$bordertopstyle) ? $fields->$bordertopstyle : 'solid';
|
||||
$fields->$borderbottomstyle = isset($fields->$borderbottomstyle) ? $fields->$borderbottomstyle : 'solid';
|
||||
$fields->$borderleftstyle = isset($fields->$borderleftstyle) ? $fields->$borderleftstyle : 'solid';
|
||||
$fields->$borderrightstyle = isset($fields->$borderrightstyle) ? $fields->$borderrightstyle : 'solid';
|
||||
|
||||
$css['borders'] = (isset($fields->$borderssize) AND $fields->$borderssize == '0') ? "\tborder: none;\r\n" : "";
|
||||
$css['bordertop'] = (isset($fields->$bordertopsize) AND $fields->$bordertopsize == '0') ? "\tborder-top: none;\r\n" : "";
|
||||
$css['borderbottom'] = (isset($fields->$borderbottomsize) AND $fields->$borderbottomsize == '0') ? "\tborder-bottom: none;\r\n" : "";
|
||||
$css['borderleft'] = (isset($fields->$borderleftsize) AND $fields->$borderleftsize == '0') ? "\tborder-left: none;\r\n" : "";
|
||||
$css['borderright'] = (isset($fields->$borderrightsize) AND $fields->$borderrightsize == '0') ? "\tborder-right: none;\r\n" : "";
|
||||
|
||||
$css['borders'] = (isset($fields->$borderscolor) AND $fields->$borderscolor AND isset($fields->$borderssize) AND $fields->$borderssize) ? "\tborder: " . $fields->$borderscolor . " " . $this->testUnit($fields->$borderssize) . " " . $fields->$bordersstyle . ";\r\n" : $css['borders'];
|
||||
$css['bordertop'] = (isset($fields->$bordertopcolor) AND $fields->$bordertopcolor AND isset($fields->$bordertopsize) AND $fields->$bordertopsize) ? "\tborder-top: " . $fields->$bordertopcolor . " " . $this->testUnit($fields->$bordertopsize) . " " . $fields->$bordertopstyle . ";\r\n" : $css['bordertop'];
|
||||
$css['borderbottom'] = (isset($fields->$borderbottomcolor) AND $fields->$borderbottomcolor AND isset($fields->$borderbottomsize) AND $fields->$borderbottomsize) ? "\tborder-bottom: " . $fields->$borderbottomcolor . " " . $this->testUnit($fields->$borderbottomsize) . " " . $fields->$borderbottomstyle . ";\r\n" : $css['borderbottom'];
|
||||
$css['borderleft'] = (isset($fields->$borderleftcolor) AND $fields->$borderleftcolor AND isset($fields->$borderleftsize) AND $fields->$borderleftsize) ? "\tborder-left: " . $fields->$borderleftcolor . " " . $this->testUnit($fields->$borderleftsize) . " " . $fields->$borderleftstyle . ";\r\n" : $css['borderleft'];
|
||||
$css['borderright'] = (isset($fields->$borderrightcolor) AND $fields->$borderrightcolor AND isset($fields->$borderrightsize) AND $fields->$borderrightsize) ? "\tborder-right: " . $fields->$borderrightcolor . " " . $this->testUnit($fields->$borderrightsize) . " " . $fields->$borderrightstyle . ";\r\n" : $css['borderright'];
|
||||
|
||||
// compile all borders
|
||||
$css['borders'] .= $css['bordertop'] . $css['borderbottom'] . $css['borderleft'] . $css['borderright'];
|
||||
|
||||
// $borderradiusvalue = (isset($fields->$borderradius) AND ($fields->$borderradius || $fields->$borderradius == "0")) ? $fields->$borderradius : "0";
|
||||
$borderradiusvalue = "0";
|
||||
$borderradiustopleftvalue = (isset($fields->$borderradiustopleft) AND ($fields->$borderradiustopleft || $fields->$borderradiustopleft == "0")) ? $fields->$borderradiustopleft : $borderradiusvalue;
|
||||
$borderradiustoprightvalue = (isset($fields->$borderradiustopright) AND ($fields->$borderradiustopright || $fields->$borderradiustopleft == "0")) ? $fields->$borderradiustopright : $borderradiusvalue;
|
||||
$borderradiusbottomleftvalue = (isset($fields->$borderradiusbottomleft) AND ($fields->$borderradiusbottomleft || $fields->$borderradiustopleft == "0")) ? $fields->$borderradiusbottomleft : $borderradiusvalue;
|
||||
$borderradiusbottomrightvalue = (isset($fields->$borderradiusbottomright) AND ($fields->$borderradiusbottomright || $fields->$borderradiustopleft == "0")) ? $fields->$borderradiusbottomright : $borderradiusvalue;
|
||||
|
||||
if ( (isset($fields->$borderradiustopleft) AND $fields->$borderradiustopleft != "")
|
||||
|| (isset($fields->$borderradiustopright) AND $fields->$borderradiustopright != "")
|
||||
|| (isset($fields->$borderradiusbottomleft) AND $fields->$borderradiusbottomleft != "")
|
||||
|| (isset($fields->$borderradiusbottomright) AND $fields->$borderradiusbottomright != "")
|
||||
) {
|
||||
// $css['borderradius'] = "\t-moz-border-radius: " . $this->testUnit($borderradiusvalue) . ";\r\n"
|
||||
// . "\t-o-border-radius: " . $this->testUnit($borderradiusvalue) . ";\r\n"
|
||||
// . "\t-webkit-border-radius: " . $this->testUnit($borderradiusvalue) . ";\r\n"
|
||||
// . "\tborder-radius: " . $this->testUnit($borderradiusvalue) . ";\r\n"
|
||||
$css['borderradius'] = "\t-moz-border-radius: " . $this->testUnit($borderradiustopleftvalue) . " " . $this->testUnit($borderradiustoprightvalue) . " " . $this->testUnit($borderradiusbottomrightvalue) . " " . $this->testUnit($borderradiusbottomleftvalue) . ";\r\n"
|
||||
. "\t-o-border-radius: " . $this->testUnit($borderradiustopleftvalue) . " " . $this->testUnit($borderradiustoprightvalue) . " " . $this->testUnit($borderradiusbottomrightvalue) . " " . $this->testUnit($borderradiusbottomleftvalue) . ";\r\n"
|
||||
. "\t-webkit-border-radius: " . $this->testUnit($borderradiustopleftvalue) . " " . $this->testUnit($borderradiustoprightvalue) . " " . $this->testUnit($borderradiusbottomrightvalue) . " " . $this->testUnit($borderradiusbottomleftvalue) . ";\r\n"
|
||||
. "\tborder-radius: " . $this->testUnit($borderradiustopleftvalue) . " " . $this->testUnit($borderradiustoprightvalue) . " " . $this->testUnit($borderradiusbottomrightvalue) . " " . $this->testUnit($borderradiusbottomleftvalue) . ";\r\n";
|
||||
} else {
|
||||
$css['borderradius'] = "";
|
||||
}
|
||||
|
||||
// construct variable names
|
||||
$height = $prefix . 'height';
|
||||
$width = $prefix . 'width';
|
||||
$color = $prefix . 'color';
|
||||
$lineheight = $prefix . 'lineheight';
|
||||
$margintop = $prefix . 'margintop';
|
||||
$marginbottom = $prefix . 'marginbottom';
|
||||
$marginleft = $prefix . 'marginleft';
|
||||
$marginright = $prefix . 'marginright';
|
||||
$margins = $prefix . 'margins';
|
||||
$paddingtop = $prefix . 'paddingtop';
|
||||
$paddingbottom = $prefix . 'paddingbottom';
|
||||
$paddingleft = $prefix . 'paddingleft';
|
||||
$paddingright = $prefix . 'paddingright';
|
||||
$paddings = $prefix . 'paddings';
|
||||
|
||||
$css['height'] = (isset($fields->$height) AND $fields->$height) ? "\theight: " . $this->testUnit($fields->$height) . ";\r\n" : "";
|
||||
$css['width'] = (isset($fields->$width) AND $fields->$width) ? "\twidth: " . $this->testUnit($fields->$width) . ";\r\n" : "";
|
||||
$css['color'] = (isset($fields->$color) AND $fields->$color) ? "\tcolor: " . $fields->$color . ";\r\n" : "";
|
||||
$css['lineheight'] = (isset($fields->$lineheight) AND $fields->$lineheight) ? "\tline-height: " . $this->testUnit($fields->$lineheight) . ";\r\n" : "";
|
||||
$css['margintop'] = (isset($fields->$margintop) AND ($fields->$margintop OR $fields->$margintop == '0')) ? "\tmargin-top: " . $this->testUnit($fields->$margintop) . ";\r\n" : "";
|
||||
$css['marginbottom'] = (isset($fields->$marginbottom) AND ($fields->$marginbottom OR $fields->$marginbottom == '0')) ? "\tmargin-bottom: " . $this->testUnit($fields->$marginbottom) . ";\r\n" : "";
|
||||
$css['marginleft'] = (isset($fields->$marginleft) AND ($fields->$marginleft OR $fields->$marginleft == '0')) ? "\tmargin-left: " . $this->testUnit($fields->$marginleft) . ";\r\n" : "";
|
||||
$css['margins'] = (isset($fields->$margins) AND ($fields->$margins OR $fields->$margins == '0')) ? "\tmargin: " . $this->testUnit($fields->$margins) . ";\r\n" : "";
|
||||
$css['marginright'] = (isset($fields->$marginright) AND ($fields->$marginright OR $fields->$marginright == '0')) ? "\tmargin-right: " . $this->testUnit($fields->$marginright) . ";\r\n" : "";
|
||||
$css['paddingtop'] = (isset($fields->$paddingtop) AND ($fields->$paddingtop OR $fields->$paddingtop == '0')) ? "\tpadding-top: " . $this->testUnit($fields->$paddingtop) . ";\r\n" : "";
|
||||
$css['paddingbottom'] = (isset($fields->$paddingbottom) AND ($fields->$paddingbottom OR $fields->$paddingbottom == '0')) ? "\tpadding-bottom: " . $this->testUnit($fields->$paddingbottom) . ";\r\n" : "";
|
||||
$css['paddingleft'] = (isset($fields->$paddingleft) AND ($fields->$paddingleft OR $fields->$paddingleft == '0')) ? "\tpadding-left: " . $this->testUnit($fields->$paddingleft) . ";\r\n" : "";
|
||||
$css['paddingright'] = (isset($fields->$paddingright) AND ($fields->$paddingright OR $fields->$paddingright == '0')) ? "\tpadding-right: " . $this->testUnit($fields->$paddingright) . ";\r\n" : "";
|
||||
$css['paddings'] = (isset($fields->$paddings) AND ($fields->$paddings OR $fields->$paddings == '0')) ? "\tpadding: " . $this->testUnit($fields->$paddings) . ";\r\n" : "";
|
||||
|
||||
$css['margins'] .= $css['margintop'] . $css['marginright'] . $css['marginbottom'] . $css['marginleft'];
|
||||
$css['paddings'] .= $css['paddingtop'] . $css['paddingright'] . $css['paddingbottom'] . $css['paddingleft'];
|
||||
|
||||
// construct variable names
|
||||
$shadowcolor = $prefix . 'shadowcolor';
|
||||
$shadowhoffset = $prefix . 'shadowoffseth';
|
||||
$shadowvoffset = $prefix . 'shadowoffsetv';
|
||||
$shadowblur = $prefix . 'shadowblur';
|
||||
$shadowspread = $prefix . 'shadowspread';
|
||||
$shadowinset = $prefix . 'shadowinset';
|
||||
$shadowopacity = $prefix . 'shadowopacity';
|
||||
|
||||
// manage shadow box
|
||||
$shadowcolorvalue = (isset($fields->$shadowcolor) AND $fields->$shadowcolor) ? $fields->$shadowcolor : "";
|
||||
$shadowhoffsetvalue = (isset($fields->$shadowhoffset) AND $fields->$shadowhoffset) ? $fields->$shadowhoffset : "0";
|
||||
$shadowvoffsetvalue = (isset($fields->$shadowvoffset) AND $fields->$shadowvoffset) ? $fields->$shadowvoffset : "0";
|
||||
$shadowblurvalue = (isset($fields->$shadowblur) AND $fields->$shadowblur) ? $fields->$shadowblur : "";
|
||||
$shadowspreadvalue = (isset($fields->$shadowspread) AND $fields->$shadowspread) ? $fields->$shadowspread : "0";
|
||||
$shadowinsetvalue = (isset($fields->$shadowinset) AND $fields->$shadowinset === '1') ? ' inset' : '';
|
||||
|
||||
// manage rgba color for opacity
|
||||
if (isset($fields->$shadowopacity) AND $fields->$shadowopacity !== '' AND $shadowcolorvalue !== '') {
|
||||
$shadowcolorvalue = $this->hex2RGB($shadowcolorvalue, $fields->$shadowopacity);
|
||||
}
|
||||
|
||||
if ($shadowcolorvalue && $shadowblurvalue) {
|
||||
$css['shadow'] = "\tbox-shadow: " . $shadowcolorvalue . " " . $this->testUnit($shadowhoffsetvalue) . " " . $this->testUnit($shadowvoffsetvalue) . " " . $this->testUnit($shadowblurvalue) . " " . $this->testUnit($shadowspreadvalue) . $shadowinsetvalue . ";\r\n"
|
||||
. "\t-moz-box-shadow: " . $shadowcolorvalue . " " . $this->testUnit($shadowhoffsetvalue) . " " . $this->testUnit($shadowvoffsetvalue) . " " . $this->testUnit($shadowblurvalue) . " " . $this->testUnit($shadowspreadvalue) . $shadowinsetvalue . ";\r\n"
|
||||
. "\t-webkit-box-shadow: " . $shadowcolorvalue . " " . $this->testUnit($shadowhoffsetvalue) . " " . $this->testUnit($shadowvoffsetvalue) . " " . $this->testUnit($shadowblurvalue) . " " . $this->testUnit($shadowspreadvalue) . $shadowinsetvalue . ";\r\n";
|
||||
} else {
|
||||
$css['shadow'] = "";
|
||||
}
|
||||
|
||||
// construct variable names
|
||||
$fontactivation = $prefix . 'fontactivation';
|
||||
// $fontbold = $prefix . 'fontbold';
|
||||
$fontitalic = $prefix . 'fontitalic';
|
||||
$fontunderline = $prefix . 'fontunderline';
|
||||
// $fontuppercase = $prefix . 'fontuppercase';
|
||||
$fontfamily = $prefix . 'fontfamily';
|
||||
$googlefont = $prefix . 'googlefont';
|
||||
$fontweight = $prefix . 'fontweight';
|
||||
$fontsize = $prefix . 'fontsize';
|
||||
// $alignementactivation = $prefix . 'alignementactivation';
|
||||
// $alignement = $prefix . 'alignement';
|
||||
// $alignementleft = $prefix . 'alignementleft';
|
||||
// $alignementcenter = $prefix . 'alignementcenter';
|
||||
// $alignementjustify = $prefix . 'alignementjustify';
|
||||
// $alignementright = $prefix . 'alignementright';
|
||||
$wordspacing = $prefix . 'wordspacing';
|
||||
$letterspacing = $prefix . 'letterspacing';
|
||||
$textindent = $prefix . 'textindent';
|
||||
$textalign = $prefix . 'textalign';
|
||||
$fontweight = $prefix . 'fontweight';
|
||||
$texttransform = $prefix . 'texttransform';
|
||||
|
||||
// $css['alignement'] = "";
|
||||
// if (isset($fields->$alignementright) AND $fields->$alignementright == 'checked') {
|
||||
// $css['alignement'] = $direction == "rtl" ? "\ttext-align: left;\r\n" : "\ttext-align: right;\r\n";
|
||||
// } else if (isset($fields->$alignementcenter) AND $fields->$alignementcenter == 'checked') {
|
||||
// $css['alignement'] = "\ttext-align: center;\r\n";
|
||||
// } else if (isset($fields->$alignementjustify) AND $fields->$alignementjustify == 'checked') {
|
||||
// $css['alignement'] = "\ttext-align: justify;\r\n";
|
||||
// } else if (isset($fields->$alignementleft) AND $fields->$alignementleft == 'checked') {
|
||||
// $css['alignement'] = $direction == "rtl" ? "\ttext-align: right;\r\n" : "\ttext-align: left;\r\n";
|
||||
// ;
|
||||
// }
|
||||
|
||||
// $css['fontbold'] = "";
|
||||
$css['fontitalic'] = "";
|
||||
$css['fontunderline'] = "";
|
||||
$css['fontuppercase'] = "";
|
||||
|
||||
$css['alignement'] = (isset($fields->$textalign) AND $fields->$textalign) ? "\ttext-align: " . $fields->$textalign . ";\r\n" : "";
|
||||
$css['fontbold'] = (isset($fields->$fontweight) AND $fields->$fontweight) ? "\tfont-weight: " . $fields->$fontweight . ";\r\n" : "";
|
||||
$css['fontuppercase'] = (isset($fields->$texttransform) AND $fields->$texttransform) ? "\ttext-transform: " . $fields->$texttransform . ";\r\n" : "";
|
||||
|
||||
|
||||
|
||||
// if (isset($fields->$fontbold) AND $fields->$fontbold) {
|
||||
// if ($fields->$fontbold != 'default')
|
||||
// $css['fontbold'] = $fields->$fontbold == 'bold' ? "\tfont-weight: bold;\r\n" : "\tfont-weight: normal;\r\n";
|
||||
// }
|
||||
|
||||
if (isset($fields->$fontitalic) AND $fields->$fontitalic) {
|
||||
if ($fields->$fontitalic != 'default')
|
||||
$css['fontitalic'] = $fields->$fontitalic == 'italic' ? "\tfont-style: italic;\r\n" : "\tfont-style: normal;\r\n";
|
||||
}
|
||||
|
||||
if (isset($fields->$fontunderline) AND $fields->$fontunderline) {
|
||||
if ($fields->$fontunderline != 'default')
|
||||
$css['fontunderline'] = $fields->$fontunderline == 'underline' ? "\ttext-decoration: underline;\r\n" : "\ttext-decoration: none;\r\n";
|
||||
}
|
||||
|
||||
// if (isset($fields->$fontuppercase) AND $fields->$fontuppercase) {
|
||||
// if ($fields->$fontuppercase != 'default')
|
||||
// $css['fontuppercase'] = $fields->$fontuppercase == 'uppercase' ? "\ttext-transform: uppercase;\r\n" : "\ttext-transform: none;\r\n";
|
||||
// }
|
||||
|
||||
$css['textindent'] = (isset($fields->$textindent) AND $fields->$textindent) ? "\ttext-indent: " . $this->testUnit($fields->$textindent) . ";\r\n" : "";
|
||||
$css['letterspacing'] = (isset($fields->$letterspacing) AND $fields->$letterspacing) ? "\tletter-spacing: " . $this->testUnit($fields->$letterspacing) . ";\r\n" : "";
|
||||
$css['wordspacing'] = (isset($fields->$wordspacing) AND $fields->$wordspacing) ? "\tword-spacing: " . $this->testUnit($fields->$wordspacing) . ";\r\n" : "";
|
||||
$css['fontsize'] = (isset($fields->$fontsize) AND $fields->$fontsize) ? "\tfont-size: " . $this->testUnit($fields->$fontsize) . ";\r\n" : "";
|
||||
$css['fontstylessquirrel'] = '';
|
||||
if (isset($fields->$fontfamily) AND $fields->$fontfamily == 'googlefont') {
|
||||
$css['fontfamily'] = (isset($fields->$googlefont) AND $fields->$googlefont != "default") ? "\tfont-family: '" . $fields->$googlefont . "';\r\n" : "";
|
||||
$css['fontbold'] = (isset($fields->$fontweight) AND $fields->$fontweight != "") ? "\tfont-weight: " . $fields->$fontweight . ";\r\n" : "";
|
||||
} else {
|
||||
$css['fontfamily'] = (isset($fields->$fontfamily) AND $fields->$fontfamily != "default") ? "\tfont-family: " . $fields->$fontfamily . ";\r\n" : "";
|
||||
}
|
||||
// compatibility with multiple intefaces
|
||||
$gfontfamily = $prefix . 'textgfont';
|
||||
if (isset($fields->$gfontfamily) AND $fields->$gfontfamily) {
|
||||
$fields->$gfontfamily = str_replace('+', ' ', $fields->$gfontfamily);
|
||||
$css['fontfamily'] .= (isset($fields->$gfontfamily) AND $fields->$gfontfamily) ? "\tfont-family: '" . $fields->$gfontfamily . "';\r\n" : "";
|
||||
}
|
||||
|
||||
|
||||
// construct variable names
|
||||
$normallinkfontbold = $prefix . 'normallinkfontbold';
|
||||
$normallinkfontitalic = $prefix . 'normallinkfontitalic';
|
||||
$normallinkfontunderline = $prefix . 'normallinkfontunderline';
|
||||
$normallinkfontuppercase = $prefix . 'normallinkfontuppercase';
|
||||
$normallinkcolor = $prefix . 'normallinkcolor';
|
||||
|
||||
$css['normallinkfontbold'] = "";
|
||||
$css['normallinkfontitalic'] = "";
|
||||
$css['normallinkfontunderline'] = "";
|
||||
$css['normallinkfontuppercase'] = "";
|
||||
|
||||
if (isset($fields->$normallinkfontbold) AND $fields->$normallinkfontbold) {
|
||||
if ($fields->$normallinkfontbold != 'default')
|
||||
$css['normallinkfontbold'] = $fields->$normallinkfontbold == 'bold' ? "\tfont-weight: bold;\r\n" : "\tfont-weight: normal;\r\n";
|
||||
}
|
||||
|
||||
if (isset($fields->$normallinkfontitalic) AND $fields->$normallinkfontitalic) {
|
||||
if ($fields->$normallinkfontitalic != 'default')
|
||||
$css['normallinkfontitalic'] = $fields->$normallinkfontitalic == 'italic' ? "\tfont-style: italic;\r\n" : "\tfont-style: normal;\r\n";
|
||||
}
|
||||
|
||||
if (isset($fields->$normallinkfontunderline) AND $fields->$normallinkfontunderline) {
|
||||
if ($fields->$normallinkfontunderline != 'default')
|
||||
$css['normallinkfontunderline'] = $fields->$normallinkfontunderline == 'underline' ? "\ttext-decoration: underline;\r\n" : "\ttext-decoration: none;\r\n";
|
||||
}
|
||||
|
||||
if (isset($fields->$normallinkfontuppercase) AND $fields->$normallinkfontuppercase) {
|
||||
if ($fields->$normallinkfontuppercase != 'default')
|
||||
$css['normallinkfontuppercase'] = $fields->$normallinkfontuppercase == 'uppercase' ? "\ttext-transform: uppercase;\r\n" : "\ttext-transform: none;\r\n";
|
||||
}
|
||||
|
||||
$css['normallinkcolor'] = (isset($fields->$normallinkcolor) AND $fields->$normallinkcolor) ? "\tcolor: " . $fields->$normallinkcolor . ";\r\n" : "";
|
||||
|
||||
|
||||
// construct variable names
|
||||
$hoverlinkactivation = $prefix . 'hoverlinkactivation';
|
||||
$hoverlinkfontbold = $prefix . 'hoverlinkfontbold';
|
||||
$hoverlinkfontitalic = $prefix . 'hoverlinkfontitalic';
|
||||
$hoverlinkfontunderline = $prefix . 'hoverlinkfontunderline';
|
||||
$hoverlinkfontuppercase = $prefix . 'hoverlinkfontuppercase';
|
||||
$hoverlinkcolor = $prefix . 'hoverlinkcolor';
|
||||
|
||||
$css['hoverlinkfontbold'] = "";
|
||||
$css['hoverlinkfontitalic'] = "";
|
||||
$css['hoverlinkfontunderline'] = "";
|
||||
$css['hoverlinkfontuppercase'] = "";
|
||||
|
||||
if (isset($fields->$hoverlinkfontbold) AND $fields->$hoverlinkfontbold) {
|
||||
if ($fields->$hoverlinkfontbold != 'default')
|
||||
$css['hoverlinkfontbold'] = $fields->$hoverlinkfontbold == 'bold' ? "\tfont-weight: bold;\r\n" : "\tfont-weight: normal;\r\n";
|
||||
}
|
||||
|
||||
if (isset($fields->$hoverlinkfontitalic) AND $fields->$hoverlinkfontitalic) {
|
||||
if ($fields->$hoverlinkfontitalic != 'default')
|
||||
$css['hoverlinkfontitalic'] = $fields->$hoverlinkfontitalic == 'italic' ? "\tfont-style: italic;\r\n" : "\tfont-style: normal;\r\n";
|
||||
}
|
||||
|
||||
if (isset($fields->$hoverlinkfontunderline) AND $fields->$hoverlinkfontunderline) {
|
||||
if ($fields->$hoverlinkfontunderline != 'default')
|
||||
$css['hoverlinkfontunderline'] = $fields->$hoverlinkfontunderline == 'underline' ? "\ttext-decoration: underline;\r\n" : "\ttext-decoration: none;\r\n";
|
||||
}
|
||||
|
||||
if (isset($fields->$hoverlinkfontuppercase) AND $fields->$hoverlinkfontuppercase) {
|
||||
if ($fields->$hoverlinkfontuppercase != 'default')
|
||||
$css['hoverlinkfontuppercase'] = $fields->$hoverlinkfontuppercase == 'uppercase' ? "\ttext-transform: uppercase;\r\n" : "\ttext-transform: none;\r\n";
|
||||
}
|
||||
|
||||
$css['hoverlinkcolor'] = (isset($fields->$hoverlinkcolor) AND $fields->$hoverlinkcolor) ? "\tcolor: " . $fields->$hoverlinkcolor . ";\r\n" : "";
|
||||
|
||||
|
||||
$custom = $prefix . 'custom';
|
||||
$css['custom'] = (isset($fields->$custom) AND $fields->$custom) ? "\t" . $fields->$custom . "\r\n" : "";
|
||||
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the CSS3 animations for the blocks
|
||||
*/
|
||||
private function genAnimations($fields, $prefix, $id) {
|
||||
if (! isset($fields->{$prefix . 'animfade'})) return; // if no animation field is found, nothing to do here
|
||||
|
||||
// fade, move, rotate, scale, flip?rotateY, replay
|
||||
$css = '';
|
||||
$transition = Array(); // transition: opacity 0.4s;transition: opacity 0.2s, transform 0.35s;
|
||||
$transform0 = Array(); // transform: rotate(45deg);transform: translate3d(0,40px,0);
|
||||
$transform100 = Array(); // transform: rotate(45deg);transform: translate3d(0,40px,0);
|
||||
$style0 = Array();
|
||||
$style100 = Array();
|
||||
$duration = isset($fields->{$prefix . 'animdur'}) && $fields->{$prefix . 'animdur'} ? $fields->{$prefix . 'animdur'} . 's' : '1s';
|
||||
$delay = isset($fields->{$prefix . 'animdelay'}) && $fields->{$prefix . 'animdelay'} ? $fields->{$prefix . 'animdelay'} . 's' : '0s';
|
||||
// fade effect
|
||||
if ($fields->{$prefix . 'animfade'} == '1') {
|
||||
$transition['fade'] = 'opacity ' . $duration;
|
||||
$style0[] = 'opacity: 0';
|
||||
$style100[] = 'opacity: 1';
|
||||
}
|
||||
// move effect
|
||||
if ($fields->{$prefix . 'animmove'} == '1') {
|
||||
$transition['transform'] = 'transform ' . $duration;
|
||||
switch($fields->{$prefix . 'animmovedir'}) {
|
||||
case 'ltrck':
|
||||
default:
|
||||
$transform0[] = 'translate3d(-' . (int)$fields->{$prefix . 'animmovedist'} . 'px,0,0)';
|
||||
break;
|
||||
case 'rtlck':
|
||||
$transform0[] = 'translate3d(' . (int)$fields->{$prefix . 'animmovedist'} . 'px,0,0)';
|
||||
break;
|
||||
case 'ttbck':
|
||||
$transform0[] = 'translate3d(0,-' . (int)$fields->{$prefix . 'animmovedist'} . 'px,0)';
|
||||
break;
|
||||
case 'bttck':
|
||||
$transform0[] = 'translate3d(0,' . (int)$fields->{$prefix . 'animmovedist'} . 'px,0)';
|
||||
break;
|
||||
}
|
||||
|
||||
// $transform100[] = 'translate3d(0,0,0)';
|
||||
}
|
||||
// rotate effect
|
||||
if ($fields->{$prefix . 'animrot'} == '1') {
|
||||
$transition['transform'] = (isset($transition['transform']) && $transition['transform']) ? $transition['transform'] : 'transform ' . $duration;
|
||||
$transform0[] = 'rotate(' . $fields->{$prefix . 'animrotrad'} . 'deg)';
|
||||
$transform100[] = 'rotate(0deg)';
|
||||
}
|
||||
// scale effect
|
||||
if ($fields->{$prefix . 'animscale'} == '1') {
|
||||
$transition['transform'] = (isset($transition['transform']) && $transition['transform']) ? $transition['transform'] : 'transform ' . $duration;
|
||||
$transform0[] = 'scale(0)';
|
||||
$transform100[] = 'scale(1)';
|
||||
}
|
||||
|
||||
if (count($transition)) {
|
||||
// start
|
||||
$css .= $id . ' {
|
||||
-webkit-transition: ' . implode(', ', $transition) . ';
|
||||
transition: ' . implode(', ', $transition) . ';
|
||||
|
||||
' . (count($transform0) ? '-webkit-transform: ' . implode(' ', $transform0) . ';
|
||||
transform: ' . implode(' ', $transform0) . ';' : '') . '
|
||||
' . implode(';', $style0) . ';
|
||||
-webkit-transition-delay: ' . $delay . ';
|
||||
transition-delay: ' . $delay . ';
|
||||
}
|
||||
';
|
||||
// end
|
||||
$id = str_replace('|ID|', '|ID| .cameravisible', $id);
|
||||
$css .= $id . ' {
|
||||
' . (count($transform0) ? '-webkit-transform: ' . implode(' ', $transform100) . ';
|
||||
transform: ' . implode(' ', $transform100) . ';' : '') . '
|
||||
' . implode(';', $style100) . ';
|
||||
}';
|
||||
}
|
||||
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the CSS3 animations for the blocks
|
||||
*/
|
||||
private function genEffects($fields, $prefix, $id) {
|
||||
if (! isset($fields->{$prefix . 'fxopacity'})) return; // if no animation field is found, nothing to do here
|
||||
|
||||
$css = '';
|
||||
$style = Array();
|
||||
$transition = Array();
|
||||
$transform = Array();
|
||||
$filter = Array();
|
||||
$fxdur = isset($fields->{$prefix . 'fxdur'}) ? $fields->{$prefix . 'fxdur'} : 0;
|
||||
$duration = isset($fields->{$prefix . 'fxdur'}) && $fields->{$prefix . 'fxdur'} ? $fields->{$prefix . 'fxdur'} . 's' : '0s';
|
||||
$delay = isset($fields->{$prefix . 'fxdelay'}) && $fields->{$prefix . 'fxdelay'} ? $fields->{$prefix . 'fxdelay'} . 's' : '0s';
|
||||
|
||||
// fade effect
|
||||
if (isset($fields->{$prefix . 'fxopacity'}) && $fields->{$prefix . 'fxopacity'} != '') {
|
||||
if ($fxdur) {
|
||||
$transition['fade'] = 'opacity ' . $duration;
|
||||
}
|
||||
$style[] = 'opacity: ' . $fields->{$prefix . 'fxopacity'};
|
||||
}
|
||||
|
||||
// move effect
|
||||
if (isset($fields->{$prefix . 'fxmovedist'}) && $fields->{$prefix . 'fxmovedist'} != '') {
|
||||
if ($fxdur) {
|
||||
$transition['transform'] = 'transform ' . $duration;
|
||||
}
|
||||
switch($fields->{$prefix . 'fxmovedir'}) {
|
||||
case 'ltrck':
|
||||
default:
|
||||
$transform[] = 'translate3d(-' . (int)$fields->{$prefix . 'fxmovedist'} . 'px,0,0)';
|
||||
break;
|
||||
case 'rtlck':
|
||||
$transform[] = 'translate3d(' . (int)$fields->{$prefix . 'fxmovedist'} . 'px,0,0)';
|
||||
break;
|
||||
case 'ttbck':
|
||||
$transform[] = 'translate3d(0,-' . (int)$fields->{$prefix . 'fxmovedist'} . 'px,0)';
|
||||
break;
|
||||
case 'bttck':
|
||||
$transform[] = 'translate3d(0,' . (int)$fields->{$prefix . 'fxmovedist'} . 'px,0)';
|
||||
break;
|
||||
}
|
||||
}
|
||||
// rotate effect
|
||||
if (isset($fields->{$prefix . 'fxrotrad'}) && $fields->{$prefix . 'fxrotrad'} != '' && $fields->{$prefix . 'fxrot'} == '1') {
|
||||
if ($fxdur) $transition['transform'] = (isset($transition['transform']) && $transition['transform']) ? $transition['transform'] : 'transform ' . $duration;
|
||||
$transform[] = 'rotate(' . $fields->{$prefix . 'fxrotrad'} . 'deg)';
|
||||
}
|
||||
// scale effect
|
||||
if (isset($fields->{$prefix . 'fxscale'}) && $fields->{$prefix . 'fxscale'} != '') {
|
||||
if ($fxdur) $transition['transform'] = (isset($transition['transform']) && $transition['transform']) ? $transition['transform'] : 'transform ' . $duration;
|
||||
$transform[] = 'scale(' . $fields->{$prefix . 'fxscale'} . ')';
|
||||
}
|
||||
// blur effect
|
||||
if (isset($fields->{$prefix . 'fxblur'}) && $fields->{$prefix . 'fxblur'} != '') {
|
||||
if ($fxdur) $transition['filter'] = (isset($transition['filter']) && $transition['filter']) ? $transition['filter'] : 'filter ' . $duration;
|
||||
$filter[] = 'blur(' . $fields->{$prefix . 'fxblur'} . 'px)';
|
||||
}
|
||||
// brightness effect
|
||||
if (isset($fields->{$prefix . 'fxbrightness'}) && $fields->{$prefix . 'fxbrightness'} != '') {
|
||||
if ($fxdur) $transition['filter'] = (isset($transition['filter']) && $transition['filter']) ? $transition['filter'] : 'filter ' . $duration;
|
||||
$filter[] = 'brightness(' . $fields->{$prefix . 'fxbrightness'} . ')';
|
||||
}
|
||||
// grayscale effect
|
||||
if (isset($fields->{$prefix . 'fxgrayscale'}) && $fields->{$prefix . 'fxgrayscale'} != '') {
|
||||
if ($fxdur) $transition['filter'] = (isset($transition['filter']) && $transition['filter']) ? $transition['filter'] : 'filter ' . $duration;
|
||||
$filter[] = 'grayscale(' . $fields->{$prefix . 'fxgrayscale'} . ')';
|
||||
}
|
||||
|
||||
if (count($transition)) {
|
||||
// start
|
||||
$css .= $id . ' {
|
||||
' . ($prefix == 'slidehover' || $prefix == 'slideactive' ? 'z-index: 1;' : '') . '
|
||||
-webkit-transition: ' . implode(', ', $transition) . ';
|
||||
transition: ' . implode(', ', $transition) . ';
|
||||
filter: ' . implode(' ', $filter) . ';
|
||||
|
||||
' . (count($transform) ? '-webkit-transform: ' . implode(' ', $transform) . ';
|
||||
transform: ' . implode(' ', $transform) . ';' : '') . '
|
||||
' . implode(';', $style) . ';
|
||||
-webkit-transition-delay: ' . $delay . ';
|
||||
transition-delay: ' . $delay . ';
|
||||
}
|
||||
';
|
||||
} else {
|
||||
$css .= $id . ' {
|
||||
' . ($prefix == 'slidehover' || $prefix == 'slideactive' ? 'z-index: 1;' : '') . '
|
||||
' . (count($transform) ? '-webkit-transform: ' . implode(' ', $transform) . ';
|
||||
transform: ' . implode(' ', $transform) . ';' : '') . '
|
||||
filter: ' . implode(' ', $filter) . ';
|
||||
' . implode(';', $style) . ';
|
||||
}
|
||||
';
|
||||
}
|
||||
|
||||
return $css;
|
||||
}
|
||||
/**
|
||||
* Test if there is already a unit, else add the px
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
function testUnit($value, $defaultunit = "px") {
|
||||
|
||||
if ((stristr($value, 'px')) OR (stristr($value, 'em')) OR (stristr($value, '%')) OR $value == 'auto')
|
||||
return $value;
|
||||
|
||||
return $value . $defaultunit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a hexa decimal color code to its RGB equivalent
|
||||
*
|
||||
* @param string $hexStr (hexadecimal color value)
|
||||
* @param boolean $returnAsString (if set true, returns the value separated by the separator character. Otherwise returns associative array)
|
||||
* @param string $seperator (to separate RGB values. Applicable only if second parameter is true.)
|
||||
* @return array or string (depending on second parameter. Returns False if invalid hex color value)
|
||||
*/
|
||||
function hex2RGB($hexStr, $opacity) {
|
||||
$opacity = $opacity <= 1 ? $opacity : $opacity / 100;
|
||||
$hexStr = preg_replace("/[^0-9A-Fa-f]/", '', $hexStr); // Gets a proper hex string
|
||||
$rgbArray = array();
|
||||
if (strlen($hexStr) == 6) { //If a proper hex code, convert using bitwise operation. No overhead... faster
|
||||
$colorVal = hexdec($hexStr);
|
||||
$rgbArray['red'] = 0xFF & ($colorVal >> 0x10);
|
||||
$rgbArray['green'] = 0xFF & ($colorVal >> 0x8);
|
||||
$rgbArray['blue'] = 0xFF & $colorVal;
|
||||
} elseif (strlen($hexStr) == 3) { //if shorthand notation, need some string manipulations
|
||||
$rgbArray['red'] = hexdec(str_repeat(substr($hexStr, 0, 1), 2));
|
||||
$rgbArray['green'] = hexdec(str_repeat(substr($hexStr, 1, 1), 2));
|
||||
$rgbArray['blue'] = hexdec(str_repeat(substr($hexStr, 2, 1), 2));
|
||||
} else {
|
||||
return false; //Invalid hex color code
|
||||
}
|
||||
$rgbacolor = "rgba(" . $rgbArray['red'] . "," . $rgbArray['green'] . "," . $rgbArray['blue'] . "," . $opacity . ")";
|
||||
|
||||
return $rgbacolor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Slideshowck;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class CKText extends \Joomla\CMS\Language\Text {
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Slideshowck;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
class CKUri extends \Joomla\CMS\Uri\Uri {
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
Namespace Slideshowck;
|
||||
|
||||
defined('CK_LOADED') or die;
|
||||
|
||||
class CKView {
|
||||
|
||||
protected $name;
|
||||
|
||||
protected $model;
|
||||
|
||||
protected $input;
|
||||
|
||||
protected $items;
|
||||
|
||||
protected $item;
|
||||
|
||||
protected $state;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
public function __construct() {
|
||||
// check if the user has the rights to access this page
|
||||
if (!CKFof::userCan('edit')) {
|
||||
CKFof::_die();
|
||||
}
|
||||
$this->input = CKFof::getInput();
|
||||
}
|
||||
|
||||
public function display($tpl = 'default') {
|
||||
if ($this->model) {
|
||||
$this->state = $this->model->getState();
|
||||
$this->pagination = $this->model->getPagination();
|
||||
}
|
||||
|
||||
require_once SLIDESHOWCK_PATH . '/views/' . strtolower($this->name) . '/tmpl/' . $tpl . '.php';
|
||||
}
|
||||
|
||||
public function setName($name) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function setModel($model) {
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
public function get($func, $params = array()) {
|
||||
$model = $this->getModel();
|
||||
$funcName = 'get' . ucfirst($func);
|
||||
return $model->$funcName($params);
|
||||
}
|
||||
|
||||
public function getModel() {
|
||||
if (empty($this->model)) {
|
||||
require_once(SLIDESHOWCK_PATH . '/models/' . strtolower($this->name) . '.php');
|
||||
$className = '\Slideshowck\CKModel' . ucfirst($this->name);
|
||||
$this->model = new $className;
|
||||
}
|
||||
return $this->model;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<script>
|
||||
var SLIDESHOWCK = {
|
||||
TOKEN : '<?php echo \Joomla\CMS\Factory::getSession()->getFormToken() ?>=1'
|
||||
, URIBASE : '<?php echo \Joomla\CMS\Uri\Uri::base(true) ?>'
|
||||
, URIBASEABS : '<?php echo \Joomla\CMS\Uri\Uri::base() ?>'
|
||||
, URIROOT : '<?php echo \Joomla\CMS\Uri\Uri::root(true) ?>'
|
||||
, URIROOTABS : '<?php echo \Joomla\CMS\Uri\Uri::root() ?>'
|
||||
, HASPAGEBUILDERCK : '<?php echo (int)file_exists(JPATH_ROOT . '/administrator/components/com_pagebuilderck') ?>'
|
||||
, ADMIN_URL : '<?php echo \Joomla\CMS\Uri\Uri::root(true) ?>/administrator/index.php?option=com_slideshowck'
|
||||
, FRONT_URL : '<?php echo \Joomla\CMS\Uri\Uri::root(true) ?>/index.php?option=com_slideshowck'
|
||||
, BASE_URL : '<?php echo \Joomla\CMS\Uri\Uri::base(true) ?>/index.php?option=com_slideshowck'
|
||||
, USERID : '<?php echo \Joomla\CMS\Factory::getUser()->id ?>'
|
||||
, ISJ4 : '<?php echo version_compare(JVERSION, "4") ?>'
|
||||
};
|
||||
</script>
|
||||
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// set variables
|
||||
define('SLIDESHOWCK_PLATFORM', 'joomla');
|
||||
define('SLIDESHOWCK_PATH', JPATH_SITE . '/administrator/components/com_slideshowck');
|
||||
define('SLIDESHOWCK_ADMIN_PATH', SLIDESHOWCK_PATH);
|
||||
define('SLIDESHOWCK_FRONT_PATH', JPATH_SITE . '/components/com_slideshowck');
|
||||
define('SLIDESHOWCK_PROJECTS_PATH', JPATH_SITE . '/administrator/components/com_slideshowck/projects');
|
||||
define('SLIDESHOWCK_ADMIN_URL', \Joomla\CMS\Uri\Uri::root(true) . '/administrator/index.php?option=com_slideshowck');
|
||||
define('SLIDESHOWCK_URL', \Joomla\CMS\Uri\Uri::base(true) . '/index.php?option=com_slideshowck');
|
||||
define('SLIDESHOWCK_ADMIN_GENERAL_URL', \Joomla\CMS\Uri\Uri::root(true) . '/administrator/index.php?option=com_slideshowck&view=templates');
|
||||
define('SLIDESHOWCK_MEDIA_URI', \Joomla\CMS\Uri\Uri::root(true) . '/media/com_slideshowck');
|
||||
define('SLIDESHOWCK_MEDIA_URL', SLIDESHOWCK_MEDIA_URI);
|
||||
define('SLIDESHOWCK_MEDIA_PATH', JPATH_ROOT . '/media/com_slideshowck');
|
||||
define('SLIDESHOWCK_PLUGIN_URL', SLIDESHOWCK_MEDIA_URI);
|
||||
define('SLIDESHOWCK_TEMPLATES_PATH', JPATH_SITE . '/templates');
|
||||
define('SLIDESHOWCK_SITE_ROOT', JPATH_ROOT);
|
||||
define('SLIDESHOWCK_URI', \Joomla\CMS\Uri\Uri::root(true) . '/administrator/components/com_slideshowck');
|
||||
define('SLIDESHOWCK_URI_ROOT', \Joomla\CMS\Uri\Uri::root(true));
|
||||
define('SLIDESHOWCK_URI_BASE', \Joomla\CMS\Uri\Uri::base(true));
|
||||
define('SLIDESHOWCK_PLUGINS_PATH', JPATH_SITE . '/plugins/slideshowck');
|
||||
define('SLIDESHOWCK_VERSION', simplexml_load_file(SLIDESHOWCK_PATH . '/slideshowck.xml')->version);
|
||||
|
||||
// include the classes
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckinput.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/cktext.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckfile.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckfolder.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckfof.php';
|
||||
//require_once SLIDESHOWCK_PATH . '/helpers/helper.php';
|
||||
//require_once SLIDESHOWCK_PATH . '/helpers/ckcontroller.php';
|
||||
//require_once SLIDESHOWCK_PATH . '/helpers/ckmodel.php';
|
||||
//require_once SLIDESHOWCK_PATH . '/helpers/ckview.php';
|
||||
@ -0,0 +1,577 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
require_once JPATH_ADMINISTRATOR . '/components/com_slideshowck/helpers/defines.php';
|
||||
|
||||
use Slideshowck\CKInput;
|
||||
use Slideshowck\CKFof;
|
||||
use Slideshowck\CKText;
|
||||
|
||||
/**
|
||||
* Helper Class.
|
||||
*/
|
||||
class SlideshowckHelper {
|
||||
|
||||
static $cssreplacements;
|
||||
|
||||
/*
|
||||
* Load the JS and CSS files needed to use CKBox
|
||||
*
|
||||
* Return void
|
||||
*/
|
||||
public static function loadCkbox() {
|
||||
$doc = \Joomla\CMS\Factory::getDocument();
|
||||
\Joomla\CMS\HTML\HTMLHelper::_('jquery.framework', true);
|
||||
// $doc->addScript(\Joomla\CMS\Uri\Uri::root(true) . '/media/jui/js/jquery.min.js');
|
||||
$doc->addStyleSheet(SLIDESHOWCK_MEDIA_URI . '/assets/ckbox.css');
|
||||
$doc->addScript(SLIDESHOWCK_MEDIA_URI . '/assets/ckbox.js');
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the JS and CSS files needed to use CKBox
|
||||
*
|
||||
* Return void
|
||||
*/
|
||||
// public static function loadCKFramework() {
|
||||
// $doc = \Joomla\CMS\Factory::getDocument();
|
||||
// $doc->addScript(\Joomla\CMS\Uri\Uri::root(true) . '/media/jui/js/jquery.min.js');
|
||||
// $doc->addStyleSheet(SLIDESHOWCK_MEDIA_URI . '/assets/ckframework.css');
|
||||
// }
|
||||
|
||||
/*
|
||||
* Load the JS and CSS files needed to use CKBox
|
||||
*
|
||||
* Return void
|
||||
*/
|
||||
/*public static function loadInlineCKFramework() {
|
||||
?>
|
||||
<script src="<?php echo \Joomla\CMS\Uri\Uri::root(true) ?>/media/jui/js/jquery.min.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="<?php echo \Joomla\CMS\Uri\Uri::root(true) ?>/components/com_slideshowck/assets/font-awesome.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="<?php echo SLIDESHOWCK_MEDIA_URI ?>/assets/ckframework.css" type="text/css" />
|
||||
<?php
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Convert a hexa decimal color code to its RGB equivalent
|
||||
*
|
||||
* @param string $hexStr (hexadecimal color value)
|
||||
* @param boolean $returnAsString (if set true, returns the value separated by the separator character. Otherwise returns associative array)
|
||||
* @param string $seperator (to separate RGB values. Applicable only if second parameter is true.)
|
||||
* @return array or string (depending on second parameter. Returns False if invalid hex color value)
|
||||
*/
|
||||
static function hex2RGB($hexStr, $opacity) {
|
||||
$hexStr = preg_replace("/[^0-9A-Fa-f]/", '', $hexStr); // Gets a proper hex string
|
||||
$rgbArray = array();
|
||||
if (strlen($hexStr) == 6) { //If a proper hex code, convert using bitwise operation. No overhead... faster
|
||||
$colorVal = hexdec($hexStr);
|
||||
$rgbArray['red'] = 0xFF & ($colorVal >> 0x10);
|
||||
$rgbArray['green'] = 0xFF & ($colorVal >> 0x8);
|
||||
$rgbArray['blue'] = 0xFF & $colorVal;
|
||||
} elseif (strlen($hexStr) == 3) { //if shorthand notation, need some string manipulations
|
||||
$rgbArray['red'] = hexdec(str_repeat(substr($hexStr, 0, 1), 2));
|
||||
$rgbArray['green'] = hexdec(str_repeat(substr($hexStr, 1, 1), 2));
|
||||
$rgbArray['blue'] = hexdec(str_repeat(substr($hexStr, 2, 1), 2));
|
||||
} else {
|
||||
return false; //Invalid hex color code
|
||||
}
|
||||
$rgbacolor = "rgba(" . $rgbArray['red'] . "," . $rgbArray['green'] . "," . $rgbArray['blue'] . "," . ($opacity / 100) . ")";
|
||||
|
||||
return $rgbacolor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if there is already a unit, else add the px
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
public static function testUnit($value) {
|
||||
if ((stristr($value, 'px')) OR (stristr($value, 'em')) OR (stristr($value, '%'))) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if ($value == '') {
|
||||
$value = 0;
|
||||
}
|
||||
|
||||
return $value . 'px';
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove special character
|
||||
*/
|
||||
public static function cleanName($path) {
|
||||
return preg_replace('/[^a-z0-9]/i', '_', $path);
|
||||
}
|
||||
|
||||
public static function formatPath($p) {
|
||||
return trim(str_replace("\\", "/", $p), "/");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a subtring with the max length setting.
|
||||
*
|
||||
* @param string $text;
|
||||
* @param int $length limit characters showing;
|
||||
* @param string $replacer;
|
||||
* @return tring;
|
||||
*/
|
||||
public static function substring($text, $length = 100, $replacer = '...', $isStrips = true, $stringtags = '') {
|
||||
|
||||
if($isStrips){
|
||||
$text = preg_replace('/\<p.*\>/Us','',$text);
|
||||
$text = str_replace('</p>','<br/>',$text);
|
||||
$text = strip_tags($text, $stringtags);
|
||||
}
|
||||
|
||||
if(function_exists('mb_strlen')){
|
||||
if (mb_strlen($text) < $length) return $text;
|
||||
$text = mb_substr($text, 0, $length);
|
||||
}else{
|
||||
if (strlen($text) < $length) return $text;
|
||||
$text = substr($text, 0, $length);
|
||||
}
|
||||
|
||||
return $text . $replacer;
|
||||
}
|
||||
|
||||
/*
|
||||
* update the table
|
||||
*/
|
||||
/*public static function createTableOptions() {
|
||||
$sqlsrc = SLIDESHOWCK_PATH . '/sql/updates/2.4.0.sql';
|
||||
$query = file_get_contents($sqlsrc);
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$db->setQuery($query);
|
||||
if (!$db->execute()) {
|
||||
echo '<p class="alert alert-danger">Error during table options creation</p>';
|
||||
} else {
|
||||
echo '<p class="alert alert-success">Table options successfully created</p>';
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Get the name of the style
|
||||
*/
|
||||
public static function getStyleNameById($id) {
|
||||
if (! $id) return '';
|
||||
// Create a new query object.
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the required fields from the table.
|
||||
$query->select('a.name');
|
||||
$query->from($db->quoteName('#__slideshowck_styles') . ' AS a');
|
||||
$query->where('(a.state IN (0, 1))');
|
||||
$query->where('a.id = ' . (int)$id);
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
|
||||
$results = $db->loadResult();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the list of all modules published as Object
|
||||
*
|
||||
* $file string the image path
|
||||
* $x integer the new image width
|
||||
* $y integer the new image height
|
||||
*
|
||||
* @return Boolean True on Success
|
||||
*/
|
||||
static function resizeImage($file, $x, $y = '', $thumbpath = 'th', $thumbsuffix = '_th') {
|
||||
|
||||
if (!$file)
|
||||
return;
|
||||
|
||||
$thumbext = explode(".", $file);
|
||||
$thumbext = end($thumbext);
|
||||
$thumbfile = str_replace(basename($file), $thumbpath . "/" . basename($file), $file);
|
||||
$thumbfile = str_replace("." . $thumbext, $thumbsuffix . "." . $thumbext, $thumbfile);
|
||||
|
||||
$filetmp = JPATH_ROOT . '/' . $file;
|
||||
$filetmp = str_replace("%20", " ", $filetmp);
|
||||
if (! file_exists($filetmp))
|
||||
return $file;
|
||||
$size = getimagesize($filetmp);
|
||||
|
||||
if ($size[0] > $size[1] || !$y) // paysage
|
||||
{
|
||||
$y = $x * $size[1] / $size[0];
|
||||
} else
|
||||
{
|
||||
$x = $y * $size[0] / $size[1];
|
||||
}
|
||||
|
||||
|
||||
if ($size) {
|
||||
if (\Joomla\CMS\Filesystem\File::exists($thumbfile)) {
|
||||
return $thumbfile;
|
||||
}
|
||||
|
||||
$thumbfolder = str_replace(basename($file), $thumbpath . "/", $filetmp);
|
||||
if (!\Joomla\CMS\Filesystem\Folder::exists($thumbfolder)) {
|
||||
\Joomla\CMS\Filesystem\Folder::create($thumbfolder);
|
||||
\Joomla\CMS\Filesystem\File::copy(JPATH_ROOT . '/modules/mod_slideshowck/index.html', $thumbfolder . 'index.html' );
|
||||
}
|
||||
|
||||
if ($size['mime'] == 'image/jpeg') {
|
||||
$img_big = imagecreatefromjpeg($filetmp); # On ouvre l'image d'origine
|
||||
$img_new = imagecreate($x, $y);
|
||||
# création de la miniature
|
||||
$img_mini = imagecreatetruecolor($x, $y) or $img_mini = imagecreate($x, $y);
|
||||
// copie de l'image, avec le redimensionnement.
|
||||
imagecopyresized($img_mini, $img_big, 0, 0, 0, 0, $x, $y, $size[0], $size[1]);
|
||||
|
||||
imagejpeg($img_mini, JPATH_ROOT . '/' . $thumbfile);
|
||||
} elseif ($size['mime'] == 'image/png') {
|
||||
$img_big = imagecreatefrompng($filetmp); # On ouvre l'image d'origine
|
||||
$img_new = imagecreate($x, $y);
|
||||
# création de la miniature
|
||||
$img_mini = imagecreatetruecolor($x, $y) or $img_mini = imagecreate($x, $y);
|
||||
// copie de l'image, avec le redimensionnement.
|
||||
imagecopyresized($img_mini, $img_big, 0, 0, 0, 0, $x, $y, $size[0], $size[1]);
|
||||
|
||||
imagepng($img_mini, JPATH_ROOT . '/' . $thumbfile);
|
||||
} elseif ($size['mime'] == 'image/gif') {
|
||||
$img_big = imagecreatefromgif($filetmp); # On ouvre l'image d'origine
|
||||
$img_new = imagecreate($x, $y);
|
||||
# création de la miniature
|
||||
$img_mini = imagecreatetruecolor($x, $y) or $img_mini = imagecreate($x, $y);
|
||||
// copie de l'image, avec le redimensionnement.
|
||||
imagecopyresized($img_mini, $img_big, 0, 0, 0, 0, $x, $y, $size[0], $size[1]);
|
||||
|
||||
imagegif($img_mini, JPATH_ROOT . '/' . $thumbfile);
|
||||
}
|
||||
//echo 'Image redimensionnée !';
|
||||
}
|
||||
|
||||
return $thumbfile;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make empty slide object
|
||||
*/
|
||||
public static function initItem() {
|
||||
$item = new stdClass();
|
||||
$item->image = null;
|
||||
$item->link = null;
|
||||
$item->title = null;
|
||||
$item->text = null;
|
||||
$item->more = array();
|
||||
$item->alignment = null;
|
||||
$item->time = null;
|
||||
$item->target = 'default';
|
||||
$item->video = null;
|
||||
$item->texttype = null;
|
||||
$item->articleid = null;
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert an old item to the new convention
|
||||
*/
|
||||
public static function legacyUpdateItem(&$item) {
|
||||
$newItem = self::initItem();
|
||||
foreach ($newItem as $key => $value) {
|
||||
if (!isset($item->$key)) $item->$key = $value;
|
||||
}
|
||||
$item->image = $item->imgname;
|
||||
$item->link = $item->imglink;
|
||||
$item->time = $item->imgtime;
|
||||
$item->thumb = $item->imgthumb;
|
||||
$item->title = $item->imgtitle;
|
||||
$item->text = strip_tags($item->imgcaption);
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert an item to the old convention to render in a V1 layout
|
||||
* To call manually in the layout file
|
||||
*/
|
||||
public static function legacyItemForV1Layout(&$item) {
|
||||
$newItem = self::initItem();
|
||||
foreach ($newItem as $key => $value) {
|
||||
if (!isset($item->$key)) $item->$key = $value;
|
||||
}
|
||||
$item->imgname = $item->image;
|
||||
$item->imglink = $item->link;
|
||||
$item->imgtime = $item->time;
|
||||
$item->imgthumb = $item->imgname;
|
||||
// $item->imgthumb = $item->thumb;
|
||||
$item->imgtitle = $item->title;
|
||||
$item->imgcaption = $item->text;
|
||||
|
||||
$item->imgalignment = $item->alignment;
|
||||
$item->imgtime = $item->time;
|
||||
$item->imgtarget = $item->target;
|
||||
$item->imgvideo = $item->video;
|
||||
$item->article = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the correct video link
|
||||
*
|
||||
* $videolink string the video path
|
||||
*
|
||||
* @return string the new video path
|
||||
*/
|
||||
static function setVideolink($videolink) {
|
||||
// youtube
|
||||
if (stristr($videolink, 'youtu.be')) {
|
||||
$videolink = str_replace('youtu.be', 'www.youtube.com/embed', $videolink);
|
||||
} else if (stristr($videolink, 'www.youtube.com') AND !stristr($videolink, 'embed')) {
|
||||
$videolink = str_replace('youtube.com', 'youtube.com/embed', $videolink);
|
||||
}
|
||||
|
||||
if (strpos($videolink, 'http') !== false) $videolink .= ( stristr($videolink, '?')) ? '&wmode=transparent' : '?wmode=transparent';
|
||||
|
||||
return $videolink;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the correct video link
|
||||
*
|
||||
* $videolink string the video path
|
||||
*
|
||||
* @return string the new video path
|
||||
*/
|
||||
static function setImageUrl($url) {
|
||||
if (strpos($url, 'http') !== 0) {
|
||||
$url = \Joomla\CMS\Uri\Uri::root(true) . '/' . trim($url, '/');
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Truncates text blocks over the specified character limit and closes
|
||||
* all open HTML tags. The method will optionally not truncate an individual
|
||||
* word, it will find the first space that is within the limit and
|
||||
* truncate at that point. This method is UTF-8 safe.
|
||||
*
|
||||
* @param string $text The text to truncate.
|
||||
* @param integer $length The maximum length of the text.
|
||||
* @param boolean $noSplit Don't split a word if that is where the cutoff occurs (default: true).
|
||||
* @param boolean $allowHtml Allow HTML tags in the output, and close any open tags (default: true).
|
||||
*
|
||||
* @return string The truncated text.
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
public static function truncate($text, $length = 0, $noSplit = true, $allowHtml = true) {
|
||||
if ($length == 0) return '';
|
||||
// Check if HTML tags are allowed.
|
||||
if (!$allowHtml) {
|
||||
// Deal with spacing issues in the input.
|
||||
$text = str_replace('>', '> ', $text);
|
||||
$text = str_replace(array(' ', ' '), ' ', $text);
|
||||
$text = JString::trim(preg_replace('#\s+#mui', ' ', $text));
|
||||
|
||||
// Strip the tags from the input and decode entities.
|
||||
$text = strip_tags($text);
|
||||
$text = html_entity_decode($text, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// Remove remaining extra spaces.
|
||||
$text = str_replace(' ', ' ', $text);
|
||||
$text = JString::trim(preg_replace('#\s+#mui', ' ', $text));
|
||||
}
|
||||
|
||||
// Truncate the item text if it is too long.
|
||||
if ($length > 0 && JString::strlen($text) > $length) {
|
||||
// Find the first space within the allowed length.
|
||||
$tmp = JString::substr($text, 0, $length);
|
||||
|
||||
if ($noSplit) {
|
||||
$offset = JString::strrpos($tmp, ' ');
|
||||
if (JString::strrpos($tmp, '<') > JString::strrpos($tmp, '>')) {
|
||||
$offset = JString::strrpos($tmp, '<');
|
||||
}
|
||||
$tmp = JString::substr($tmp, 0, $offset);
|
||||
|
||||
// If we don't have 3 characters of room, go to the second space within the limit.
|
||||
if (JString::strlen($tmp) > $length - 3) {
|
||||
$tmp = JString::substr($tmp, 0, JString::strrpos($tmp, ' '));
|
||||
}
|
||||
}
|
||||
|
||||
if ($allowHtml) {
|
||||
// Put all opened tags into an array
|
||||
preg_match_all("#<([a-z][a-z0-9]*)\b.*?(?!/)>#i", $tmp, $result);
|
||||
$openedTags = $result[1];
|
||||
$openedTags = array_diff($openedTags, array("img", "hr", "br"));
|
||||
$openedTags = array_values($openedTags);
|
||||
|
||||
// Put all closed tags into an array
|
||||
preg_match_all("#</([a-z]+)>#iU", $tmp, $result);
|
||||
$closedTags = $result[1];
|
||||
|
||||
$numOpened = count($openedTags);
|
||||
|
||||
// All tags are closed
|
||||
if (count($closedTags) == $numOpened) {
|
||||
return $tmp . '...';
|
||||
}
|
||||
$tmp .= '...';
|
||||
$openedTags = array_reverse($openedTags);
|
||||
|
||||
// Close tags
|
||||
for ($i = 0; $i < $numOpened; $i++) {
|
||||
if (!in_array($openedTags[$i], $closedTags)) {
|
||||
$tmp .= "</" . $openedTags[$i] . ">";
|
||||
} else {
|
||||
unset($closedTags[array_search($openedTags[$i], $closedTags)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$text = $tmp;
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
static function getArticle($item) {
|
||||
$app = \Joomla\CMS\Factory::getApplication();
|
||||
if (version_compare(JVERSION, '4') >= 0) {
|
||||
$factory = $app->bootComponent('com_content')->getMVCFactory();
|
||||
|
||||
// Get an instance of the generic articles model
|
||||
$articles = $factory->createModel('Articles', 'Site', ['ignore_request' => true]);
|
||||
} else {
|
||||
// load the content articles file
|
||||
$com_path = JPATH_SITE . '/components/com_content/';
|
||||
include_once $com_path . 'router.php';
|
||||
include_once $com_path . 'helpers/route.php';
|
||||
\Joomla\CMS\MVC\Model\BaseDatabaseModel::addIncludePath($com_path . '/models', 'ContentModel');
|
||||
|
||||
// Get an instance of the generic articles model
|
||||
$articles = \Joomla\CMS\MVC\Model\BaseDatabaseModel::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
|
||||
}
|
||||
// Access filter
|
||||
$access = !\Joomla\CMS\Component\ComponentHelper::getParams('com_content')->get('show_noauth');
|
||||
$authorised = \Joomla\CMS\Access\Access::getAuthorisedViewLevels(\Joomla\CMS\Factory::getUser()->get('id'));
|
||||
// Get an instance of the generic articles model
|
||||
$articles = \Joomla\CMS\MVC\Model\BaseDatabaseModel::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
|
||||
// Set application parameters in model
|
||||
$app = \Joomla\CMS\Factory::getApplication();
|
||||
// $appParams = $app->getParams();
|
||||
$articles->setState('params', \Joomla\CMS\Component\ComponentHelper::getParams('com_content'));
|
||||
// $articles->setState('params', $appParams);
|
||||
$articles->setState('filter.published', 1);
|
||||
// $item->slidearticleid = isset($item->slidearticleid) ? $item->slidearticleid : $item->articleid;
|
||||
$articles->setState('filter.article_id', $item->slidearticleid);
|
||||
$items2 = $articles->getItems();
|
||||
$item->article = $items2[0];
|
||||
$item->text = $item->article->introtext;
|
||||
// $item->text = \Joomla\CMS\HTML\HTMLHelper::_('content.prepare', $item->text);
|
||||
$item->title = $item->article->title;
|
||||
// set the item link to the article depending on the user rights
|
||||
if ($access || in_array($item->article->access, $authorised)) {
|
||||
// We know that user has the privilege to view the article
|
||||
$item->slug = $item->article->id . ':' . $item->article->alias;
|
||||
$item->catslug = $item->article->catid ? $item->article->catid . ':' . $item->article->category_alias : $item->article->catid;
|
||||
if (version_compare(JVERSION, '4') >= 0) {
|
||||
$item->link = \Joomla\CMS\Router\Route::_(\Joomla\Component\Content\Site\Helper\RouteHelper::getArticleRoute($item->slug, $item->catslug));
|
||||
} else {
|
||||
$item->link = \Joomla\CMS\Router\Route::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug));
|
||||
}
|
||||
} else {
|
||||
$app = \Joomla\CMS\Factory::getApplication();
|
||||
$menu = $app->getMenu();
|
||||
$menuitems = $menu->getItems('link', 'index.php?option=com_users&view=login');
|
||||
if (isset($menuitems[0])) {
|
||||
$Itemid = $menuitems[0]->id;
|
||||
} elseif ($app->input->get('Itemid', 0, 'int') > 0) {
|
||||
$Itemid = $app->input->get('Itemid', 0, 'int');
|
||||
}
|
||||
$item->link = \Joomla\CMS\Router\Route::_('index.php?option=com_users&view=login&Itemid=' . $Itemid);
|
||||
}
|
||||
return $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* List the replacement between the tags and the real final CSS rules
|
||||
*/
|
||||
public static function getCssReplacement() {
|
||||
if (! empty(self::$cssreplacements)) return self::$cssreplacements;
|
||||
|
||||
self::$cssreplacements = Array(
|
||||
'[container]' => ''
|
||||
,'[slide]' => '.cameraSlide img'
|
||||
,'[caption]' => '.camera_caption > div'
|
||||
,'[title]' => '.camera_caption_title'
|
||||
,'[text]' => '.camera_caption_desc'
|
||||
,'[button]' => 'a.camera-button'
|
||||
,'[buttonhover]' => 'a.camera-button:hover'
|
||||
// ,'[thumbs]' => '.camera_pag_ul li img'
|
||||
,'[paginationdotthumbs]' => '.camera_pag_ul li img'
|
||||
);
|
||||
|
||||
return self::$cssreplacements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the CSS of the style
|
||||
* @id - the style ID
|
||||
*/
|
||||
public static function getStyleLayoutcss($id) {
|
||||
if (! $id) return '';
|
||||
|
||||
// Create a new query object.
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the required fields from the table.
|
||||
$query->select('a.layoutcss');
|
||||
$query->from($db->quoteName('#__slideshowck_styles') . ' AS a');
|
||||
$query->where('(a.state IN (0, 1))');
|
||||
$query->where('a.id = ' . (int)$id);
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
|
||||
$result = $db->loadResult();
|
||||
|
||||
self::makeCssReplacement($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function makeCssReplacement(&$css) {
|
||||
$cssreplacements = self::getCssReplacement();
|
||||
foreach ($cssreplacements as $tag => $rep) {
|
||||
$css = str_replace($tag, $rep, $css);
|
||||
}
|
||||
// return $css;
|
||||
}
|
||||
|
||||
public static function getProMessage() {
|
||||
$html = '<div class="ckinfo"><i class="fas fa-info"></i><a href="https://www.joomlack.fr/en/joomla-extensions/slideshow-ck" target="_blank">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_ONLY_PRO') . '</a></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public static function getProPreview($imgName) {
|
||||
$html = '<div class="ckpropreview">'
|
||||
. '<img src="' . SLIDESHOWCK_MEDIA_URL . '/images/proonly/' . $imgName . '" />'
|
||||
. '<a href="https://www.joomlack.fr/en/joomla-extensions/slideshow-ck" target="_blank">' . \Joomla\CMS\Language\Text::_('SLIDESHOWCK_ONLY_PRO') . '</a>'
|
||||
. '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,459 @@
|
||||
<?php
|
||||
// -------------------------------------------------
|
||||
// HTML FIXER v.2.05 15/07/2010
|
||||
// clean dirty html and make it better, fix open tags
|
||||
// bad nesting, bad quotes, bad autoclosing tags.
|
||||
//
|
||||
// by Giulio Pons, http://www.barattalo.it
|
||||
// -------------------------------------------------
|
||||
// usage:
|
||||
// -------------------------------------------------
|
||||
// $a = new HtmlFixer();
|
||||
// $clean_html = $a->getFixedHtml($dirty_html);
|
||||
// -------------------------------------------------
|
||||
|
||||
Class SlideshowCKHtmlFixer {
|
||||
public $dirtyhtml;
|
||||
public $fixedhtml;
|
||||
public $allowed_styles; // inline styles array of allowed css (if empty means ALL allowed)
|
||||
private $matrix; // array used to store nodes
|
||||
public $debug;
|
||||
private $fixedhtmlDisplayCode;
|
||||
|
||||
public function __construct() {
|
||||
$this->dirtyhtml = "";
|
||||
$this->fixedhtml = "";
|
||||
$this->debug = false;
|
||||
$this->fixedhtmlDisplayCode = "";
|
||||
$this->allowed_styles = array();
|
||||
}
|
||||
|
||||
public function getFixedHtml($dirtyhtml) {
|
||||
$c = 0;
|
||||
$this->dirtyhtml = $dirtyhtml;
|
||||
$this->fixedhtml = "";
|
||||
$this->fixedhtmlDisplayCode = "";
|
||||
if (is_array($this->matrix)) unset($this->matrix);
|
||||
$errorsFound=0;
|
||||
while ($c<10) {
|
||||
/*
|
||||
iterations, every time it's getting better...
|
||||
*/
|
||||
if ($c>0) $this->dirtyhtml = $this->fixedxhtml;
|
||||
$errorsFound = $this->charByCharJob();
|
||||
if (!$errorsFound) $c=10; // if no corrections made, stops iteration
|
||||
$this->fixedxhtml=str_replace('<root>','',$this->fixedxhtml);
|
||||
$this->fixedxhtml=str_replace('</root>','',$this->fixedxhtml);
|
||||
$this->fixedxhtml = $this->removeSpacesAndBadTags($this->fixedxhtml);
|
||||
$c++;
|
||||
}
|
||||
return $this->fixedxhtml;
|
||||
}
|
||||
|
||||
private function fixStrToLower($m){
|
||||
/*
|
||||
$m is a part of the tag: make the first part of attr=value lowercase
|
||||
*/
|
||||
$right = strstr($m, '=');
|
||||
$left = str_replace($right,'',$m);
|
||||
return strtolower($left).$right;
|
||||
}
|
||||
|
||||
private function fixQuotes($s){
|
||||
$q = "\"";// thanks to emmanuel@evobilis.com
|
||||
if (!stristr($s,"=")) return $s;
|
||||
$out = $s;
|
||||
preg_match_all("|=(.*)|",$s,$o,PREG_PATTERN_ORDER);
|
||||
for ($i = 0; $i< count ($o[1]); $i++) {
|
||||
$t = trim ( $o[1][$i] ) ;
|
||||
$lc="";
|
||||
if ($t!="") {
|
||||
if ($t[strlen($t)-1]==">") {
|
||||
$lc= ($t[strlen($t)-2].$t[strlen($t)-1])=="/>" ? "/>" : ">" ;
|
||||
$t=substr($t,0,-1);
|
||||
}
|
||||
//missing " or ' at the beginning
|
||||
if (($t[0]!="\"")&&($t[0]!="'")) $out = str_replace( $t, "\"".$t,$out); else $q=$t[0];
|
||||
//missing " or ' at the end
|
||||
if (($t[strlen($t)-1]!="\"")&&($t[strlen($t)-1]!="'")) $out = str_replace( $t.$lc, $t.$q.$lc,$out);
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
private function fixTag($t){
|
||||
/* remove non standard attributes and call the fix for quoted attributes */
|
||||
$t = preg_replace (
|
||||
array(
|
||||
'/borderColor=([^ >])*/i',
|
||||
'/border=([^ >])*/i'
|
||||
),
|
||||
array(
|
||||
'',
|
||||
''
|
||||
)
|
||||
, $t);
|
||||
$ar = explode(" ",$t);
|
||||
$nt = "";
|
||||
for ($i=0;$i<count($ar);$i++) {
|
||||
$ar[$i]=$this->fixStrToLower($ar[$i]);
|
||||
if (stristr($ar[$i],"=")) $ar[$i] = $this->fixQuotes($ar[$i]); // thanks to emmanuel@evobilis.com
|
||||
//if (stristr($ar[$i],"=") && !stristr($ar[$i],"=\"")) $ar[$i] = $this->fixQuotes($ar[$i]);
|
||||
$nt.=$ar[$i]." ";
|
||||
}
|
||||
$nt=preg_replace("/<( )*/i","<",$nt);
|
||||
$nt=preg_replace("/( )*>/i",">",$nt);
|
||||
return trim($nt);
|
||||
}
|
||||
|
||||
private function extractChars($tag1,$tag2,$tutto) { /*extract a block between $tag1 and $tag2*/
|
||||
if (!stristr($tutto, $tag1)) return '';
|
||||
$s=stristr($tutto,$tag1);
|
||||
$s=substr( $s,strlen($tag1));
|
||||
if (!stristr($s,$tag2)) return '';
|
||||
$s1=stristr($s,$tag2);
|
||||
return substr($s,0,strlen($s)-strlen($s1));
|
||||
}
|
||||
|
||||
private function mergeStyleAttributes($s) {
|
||||
//
|
||||
// merge many style definitions in the same tag in just one attribute style
|
||||
//
|
||||
|
||||
$x = "";
|
||||
$temp = "";
|
||||
$c = 0;
|
||||
while(stristr($s,"style=\"")) {
|
||||
$temp = $this->extractChars("style=\"","\"",$s);
|
||||
if ($temp=="") {
|
||||
// missing closing quote! add missing quote.
|
||||
return preg_replace("/(\/)?>/i","\"\\1>",$s);
|
||||
}
|
||||
if ($c==0) $s = str_replace("style=\"".$temp."\"","##PUTITHERE##",$s);
|
||||
$s = str_replace("style=\"".$temp."\"","",$s);
|
||||
if (!preg_match("/;$/i",$temp)) $temp.=";";
|
||||
$x.=$temp;
|
||||
$c++;
|
||||
}
|
||||
|
||||
if (count($this->allowed_styles)>0) {
|
||||
// keep only allowed styles by Martin Vool 2010-04-19
|
||||
$check=explode(';', $x);
|
||||
$x="";
|
||||
foreach($check as $chk){
|
||||
foreach($this->allowed_styles as $as)
|
||||
if(stripos($chk, $as) !== False) { $x.=$chk.';'; break; }
|
||||
}
|
||||
}
|
||||
|
||||
if ($c>0) $s = str_replace("##PUTITHERE##","style=\"".$x."\"",$s);
|
||||
return $s;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function fixAutoclosingTags($tag,$tipo=""){
|
||||
/*
|
||||
metodo richiamato da fix() per aggiustare i tag auto chiudenti (<br/> <img ... />)
|
||||
*/
|
||||
if (in_array( $tipo, array ("img","input","br","hr")) ) {
|
||||
if (!stristr($tag,'/>')) $tag = str_replace('>','/>',$tag );
|
||||
}
|
||||
return $tag;
|
||||
}
|
||||
|
||||
private function getTypeOfTag($tag) {
|
||||
$tag = trim(preg_replace("/[\>\<\/]/i","",$tag));
|
||||
$a = explode(" ",$tag);
|
||||
return $a[0];
|
||||
}
|
||||
|
||||
|
||||
private function checkTree() {
|
||||
// return the number of errors found
|
||||
$errorsCounter = 0;
|
||||
for ($i=1;$i<count($this->matrix);$i++) {
|
||||
$flag=false;
|
||||
if ($this->matrix[$i]["tagType"]=="div") { //div cannot stay inside a p, b, etc.
|
||||
$parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"];
|
||||
if (in_array($parentType, array("p","b","i","font","u","small","strong","em"))) $flag=true;
|
||||
}
|
||||
|
||||
if (in_array( $this->matrix[$i]["tagType"], array( "b", "strong" )) ) { //b cannot stay inside b o strong.
|
||||
$parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"];
|
||||
if (in_array($parentType, array("b","strong"))) $flag=true;
|
||||
}
|
||||
|
||||
if (in_array( $this->matrix[$i]["tagType"], array ( "i", "em") )) { //i cannot stay inside i or em
|
||||
$parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"];
|
||||
if (in_array($parentType, array("i","em"))) $flag=true;
|
||||
}
|
||||
|
||||
if ($this->matrix[$i]["tagType"]=="p") {
|
||||
$parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"];
|
||||
if (in_array($parentType, array("p","b","i","font","u","small","strong","em"))) $flag=true;
|
||||
}
|
||||
|
||||
if ($this->matrix[$i]["tagType"]=="table") {
|
||||
$parentType = $this->matrix[$this->matrix[$i]["parentTag"]]["tagType"];
|
||||
if (in_array($parentType, array("p","b","i","font","u","small","strong","em","tr","table"))) $flag=true;
|
||||
}
|
||||
if ($flag) {
|
||||
$errorsCounter++;
|
||||
if ($this->debug) echo "<div style='color:#ff0000'>Found a <b>".$this->matrix[$i]["tagType"]."</b> tag inside a <b>".htmlspecialchars($parentType)."</b> tag at node $i: MOVED</div>";
|
||||
|
||||
$swap = $this->matrix[$this->matrix[$i]["parentTag"]]["parentTag"];
|
||||
if ($this->debug) echo "<div style='color:#ff0000'>Every node that has parent ".$this->matrix[$i]["parentTag"]." will have parent ".$swap."</div>";
|
||||
$this->matrix[$this->matrix[$i]["parentTag"]]["tag"]="<!-- T A G \"".$this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]."\" R E M O V E D -->";
|
||||
$this->matrix[$this->matrix[$i]["parentTag"]]["tagType"]="";
|
||||
$hoSpostato=0;
|
||||
for ($j=count($this->matrix)-1;$j>=$i;$j--) {
|
||||
if ($this->matrix[$j]["parentTag"]==$this->matrix[$i]["parentTag"]) {
|
||||
$this->matrix[$j]["parentTag"] = $swap;
|
||||
$hoSpostato=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return $errorsCounter;
|
||||
|
||||
}
|
||||
|
||||
private function findSonsOf($parentTag) {
|
||||
// build correct html recursively
|
||||
$out= "";
|
||||
for ($i=1;$i<count($this->matrix);$i++) {
|
||||
if ($this->matrix[$i]["parentTag"]==$parentTag) {
|
||||
if ($this->matrix[$i]["tag"]!="") {
|
||||
$out.=$this->matrix[$i]["pre"];
|
||||
$out.=$this->matrix[$i]["tag"];
|
||||
$out.=$this->matrix[$i]["post"];
|
||||
} else {
|
||||
$out.=$this->matrix[$i]["pre"];
|
||||
$out.=$this->matrix[$i]["post"];
|
||||
}
|
||||
if ($this->matrix[$i]["tag"]!="") {
|
||||
$out.=$this->findSonsOf($i);
|
||||
if ($this->matrix[$i]["tagType"]!="") {
|
||||
//write the closing tag
|
||||
if (!in_array($this->matrix[$i]["tagType"], array ( "br","img","hr","input")))
|
||||
$out.="</". $this->matrix[$i]["tagType"].">";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
private function findSonsOfDisplayCode($parentTag) {
|
||||
//used for debug
|
||||
$out= "";
|
||||
for ($i=1;$i<count($this->matrix);$i++) {
|
||||
if ($this->matrix[$i]["parentTag"]==$parentTag) {
|
||||
$out.= "<div style=\"padding-left:15\"><span style='float:left;background-color:#FFFF99;color:#000;'>{$i}:</span>";
|
||||
if ($this->matrix[$i]["tag"]!="") {
|
||||
if ($this->matrix[$i]["pre"]!="") $out.=htmlspecialchars($this->matrix[$i]["pre"])."<br>";
|
||||
$out.="".htmlspecialchars($this->matrix[$i]["tag"])."<span style='background-color:red; color:white'>{$i} <em>".$this->matrix[$i]["tagType"]."</em></span>";
|
||||
$out.=htmlspecialchars($this->matrix[$i]["post"]);
|
||||
} else {
|
||||
if ($this->matrix[$i]["pre"]!="") $out.=htmlspecialchars($this->matrix[$i]["pre"])."<br>";
|
||||
$out.=htmlspecialchars($this->matrix[$i]["post"]);
|
||||
}
|
||||
if ($this->matrix[$i]["tag"]!="") {
|
||||
$out.="<div>".$this->findSonsOfDisplayCode($i)."</div>\n";
|
||||
if ($this->matrix[$i]["tagType"]!="") {
|
||||
if (($this->matrix[$i]["tagType"]!="br") && ($this->matrix[$i]["tagType"]!="img") && ($this->matrix[$i]["tagType"]!="hr")&& ($this->matrix[$i]["tagType"]!="input"))
|
||||
$out.="<div style='color:red'>".htmlspecialchars("</". $this->matrix[$i]["tagType"].">")."{$i} <em>".$this->matrix[$i]["tagType"]."</em></div>";
|
||||
}
|
||||
}
|
||||
$out.="</div>\n";
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
private function removeSpacesAndBadTags($s) {
|
||||
$i=0;
|
||||
while ($i<10) {
|
||||
$i++;
|
||||
$s = preg_replace (
|
||||
array(
|
||||
'/[\r\n]/i',
|
||||
'/ /i',
|
||||
'/<p([^>])*>( )*\s*<\/p>/i',
|
||||
'/<span([^>])*>( )*\s*<\/span>/i',
|
||||
'/<strong([^>])*>( )*\s*<\/strong>/i',
|
||||
'/<em([^>])*>( )*\s*<\/em>/i',
|
||||
'/<font([^>])*>( )*\s*<\/font>/i',
|
||||
'/<small([^>])*>( )*\s*<\/small>/i',
|
||||
'/<\?xml:namespace([^>])*><\/\?xml:namespace>/i',
|
||||
'/<\?xml:namespace([^>])*\/>/i',
|
||||
'/class=\"MsoNormal\"/i',
|
||||
'/<o:p><\/o:p>/i',
|
||||
'/<!DOCTYPE([^>])*>/i',
|
||||
'/<!--(.|\s)*?-->/',
|
||||
'/<\?(.|\s)*?\?>/'
|
||||
),
|
||||
array(
|
||||
' ',
|
||||
' ',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
' ',
|
||||
'',
|
||||
''
|
||||
)
|
||||
, trim($s));
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
private function charByCharJob() {
|
||||
$s = $this->removeSpacesAndBadTags($this->dirtyhtml);
|
||||
if ($s=="") {
|
||||
$this->fixedxhtml="";
|
||||
return;
|
||||
}
|
||||
$s = "<root>".$s."</root>";
|
||||
$contenuto = "";
|
||||
$ns = "";
|
||||
$i=0;
|
||||
$j=0;
|
||||
$indexparentTag=0;
|
||||
$padri=array();
|
||||
array_push($padri,"0");
|
||||
$this->matrix[$j]["tagType"]="";
|
||||
$this->matrix[$j]["tag"]="";
|
||||
$this->matrix[$j]["parentTag"]="0";
|
||||
$this->matrix[$j]["pre"]="";
|
||||
$this->matrix[$j]["post"]="";
|
||||
$tags=array();
|
||||
|
||||
while($i<strlen($s)) {
|
||||
if ( $s[$i] =="<") {
|
||||
/*
|
||||
found a tag
|
||||
*/
|
||||
$contenuto = $ns;
|
||||
$ns = "";
|
||||
|
||||
$tag="";
|
||||
while( $i<strlen($s) && $s[$i]!=">" ){
|
||||
// get chars till the end of a tag
|
||||
$tag.=$s[$i];
|
||||
$i++;
|
||||
}
|
||||
$tag.=$s[$i];
|
||||
|
||||
if($s[$i]==">") {
|
||||
/*
|
||||
$tag contains a tag <...chars...>
|
||||
let's clean it!
|
||||
*/
|
||||
$tag = $this->fixTag($tag);
|
||||
$tagType = $this->getTypeOfTag($tag);
|
||||
$tag = $this->fixAutoclosingTags($tag,$tagType);
|
||||
$tag = $this->mergeStyleAttributes($tag);
|
||||
|
||||
if (!isset($tags[$tagType])) $tags[$tagType]=0;
|
||||
$tagok=true;
|
||||
if (($tags[$tagType]==0)&&(stristr($tag,'/'.$tagType.'>'))) {
|
||||
$tagok=false;
|
||||
/* there is a close tag without any open tag, I delete it */
|
||||
if ($this->debug) echo "<div style='color:#ff0000'>Found a closing tag <b>".htmlspecialchars($tag)."</b> at char $i without open tag: REMOVED</div>";
|
||||
}
|
||||
}
|
||||
if ($tagok) {
|
||||
$j++;
|
||||
$this->matrix[$j]["pre"]="";
|
||||
$this->matrix[$j]["post"]="";
|
||||
$this->matrix[$j]["parentTag"]="";
|
||||
$this->matrix[$j]["tag"]="";
|
||||
$this->matrix[$j]["tagType"]="";
|
||||
if (stristr($tag,'/'.$tagType.'>')) {
|
||||
/*
|
||||
it's the closing tag
|
||||
*/
|
||||
$ind = array_pop($padri);
|
||||
$this->matrix[$j]["post"]=$contenuto;
|
||||
$this->matrix[$j]["parentTag"]=$ind;
|
||||
$tags[$tagType]--;
|
||||
} else {
|
||||
if (@preg_match("/".$tagType."\/>$/i",$tag)||preg_match("/\/>/i",$tag)) {
|
||||
/*
|
||||
it's a autoclosing tag
|
||||
*/
|
||||
$this->matrix[$j]["tagType"]=$tagType;
|
||||
$this->matrix[$j]["tag"]=$tag;
|
||||
$indexparentTag = array_pop($padri);
|
||||
array_push($padri,$indexparentTag);
|
||||
$this->matrix[$j]["parentTag"]=$indexparentTag;
|
||||
$this->matrix[$j]["pre"]=$contenuto;
|
||||
$this->matrix[$j]["post"]="";
|
||||
} else {
|
||||
/*
|
||||
it's a open tag
|
||||
*/
|
||||
$tags[$tagType]++;
|
||||
$this->matrix[$j]["tagType"]=$tagType;
|
||||
$this->matrix[$j]["tag"]=$tag;
|
||||
$indexparentTag = array_pop($padri);
|
||||
array_push($padri,$indexparentTag);
|
||||
array_push($padri,$j);
|
||||
$this->matrix[$j]["parentTag"]=$indexparentTag;
|
||||
$this->matrix[$j]["pre"]=$contenuto;
|
||||
$this->matrix[$j]["post"]="";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
content of the tag
|
||||
*/
|
||||
$ns.=$s[$i];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
/*
|
||||
remove not valid tags
|
||||
*/
|
||||
for ($eli=$j+1;$eli<count($this->matrix);$eli++) {
|
||||
$this->matrix[$eli]["pre"]="";
|
||||
$this->matrix[$eli]["post"]="";
|
||||
$this->matrix[$eli]["parentTag"]="";
|
||||
$this->matrix[$eli]["tag"]="";
|
||||
$this->matrix[$eli]["tagType"]="";
|
||||
}
|
||||
$errorsCounter = $this->checkTree(); // errorsCounter contains the number of removed tags
|
||||
$this->fixedxhtml=$this->findSonsOf(0); // build html fixed
|
||||
if ($this->debug) {
|
||||
$this->fixedxhtmlDisplayCode=$this->findSonsOfDisplayCode(0);
|
||||
echo "<table border=1 cellspacing=0 cellpadding=0>";
|
||||
echo "<tr><th>node id</th>";
|
||||
echo "<th>pre</th>";
|
||||
echo "<th>tag</th>";
|
||||
echo "<th>post</th>";
|
||||
echo "<th>parentTag</th>";
|
||||
echo "<th>tipo</th></tr>";
|
||||
for ($k=0;$k<=$j;$k++) {
|
||||
echo "<tr><td>$k</td>";
|
||||
echo "<td> ".htmlspecialchars($this->matrix[$k]["pre"])."</td>";
|
||||
echo "<td> ".htmlspecialchars($this->matrix[$k]["tag"])."</td>";
|
||||
echo "<td> ".htmlspecialchars($this->matrix[$k]["post"])."</td>";
|
||||
echo "<td> ".$this->matrix[$k]["parentTag"]."</td>";
|
||||
echo "<td> <i>".$this->matrix[$k]["tagType"]."</i></td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
echo "<hr/>{$j}<hr/>\n\n\n\n".$this->fixedxhtmlDisplayCode;
|
||||
}
|
||||
return $errorsCounter;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Date\Date;
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
require_once JPATH_ADMINISTRATOR . '/components/com_slideshowck/helpers/helper.php';
|
||||
|
||||
/**
|
||||
* Helper Class.
|
||||
*/
|
||||
class SlideshowckHelpersourceSlidesmanager {
|
||||
|
||||
private static $params;
|
||||
|
||||
/*
|
||||
* Get the items from the source
|
||||
*/
|
||||
public static function getItems($params, $folder = null) {
|
||||
if (empty(self::$params)) {
|
||||
self:$params = $params;
|
||||
}
|
||||
|
||||
// load the items from the module settings
|
||||
$items = json_decode(str_replace("|qq|", "\"", $params->get('slides')));
|
||||
foreach ($items as $i => $item) {
|
||||
if (!$item->imgname) {
|
||||
unset($items[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if the slide is published
|
||||
if (isset($item->state) && $item->state == '0') {
|
||||
unset($items[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// get current date with Timezone
|
||||
$config = \Joomla\CMS\Factory::getConfig();
|
||||
$offset = $config->get('offset'); // timezone
|
||||
$now = new \Joomla\CMS\Date\Date('now', $offset);
|
||||
|
||||
// check the slide start date
|
||||
if (isset($item->startdate) && $item->startdate) {
|
||||
// if (date("d M Y") < $item->startdate) {
|
||||
if (strtotime($now) < strtotime($item->startdate)) {
|
||||
unset($items[$i]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// check the slide end date
|
||||
if (isset($item->enddate) && $item->enddate) {
|
||||
// if (date("d M Y") > $item->enddate) {
|
||||
if (strtotime($now) > strtotime($item->enddate)) {
|
||||
unset($items[$i]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (stristr($item->imgname, "http")) {
|
||||
$item->imgthumb = $item->imgname;
|
||||
} else {
|
||||
// renomme le fichier
|
||||
$thumbext = explode(".", $item->imgname);
|
||||
$thumbext = end($thumbext);
|
||||
// crée la miniature
|
||||
if ($params->get('thumbnails', '1') == '1' && $params->get('autocreatethumbs','1')) {
|
||||
if ($params->get('autocreatethumbs','1'))
|
||||
$item->imgthumb = \Joomla\CMS\Uri\Uri::base(true) . '/' . SlideshowckHelper::resizeImage($item->imgname, $params->get('thumbnailwidth', '182'), $params->get('thumbnailheight', '187'));
|
||||
} else {
|
||||
$thumbfile = str_replace(basename($item->imgname), "th/" . basename($item->imgname), $item->imgname);
|
||||
$thumbfile = str_replace("." . $thumbext, "_th." . $thumbext, $thumbfile);
|
||||
$item->imgthumb = \Joomla\CMS\Uri\Uri::base(true) . '/' . $thumbfile;
|
||||
}
|
||||
$item->imgname = \Joomla\CMS\Uri\Uri::base(true) . '/' . $item->imgname;
|
||||
}
|
||||
|
||||
// set the videolink
|
||||
if ($item->imgvideo)
|
||||
$item->imgvideo = SlideshowckHelper::setVideolink($item->imgvideo);
|
||||
|
||||
// for B/C
|
||||
if (! isset($item->texttype)) {
|
||||
$item->texttype = (isset($item->slidearticleid) && $item->slidearticleid) ? 'article' : 'custom';
|
||||
}
|
||||
if ($item->texttype == 'article') {
|
||||
if (isset($item->slidearticleid) && $item->slidearticleid) {
|
||||
$item = SlideshowckHelper::getArticle($item);
|
||||
} else {
|
||||
$item->link = '';
|
||||
$item->title = '';
|
||||
$item->text = '';
|
||||
}
|
||||
} else {
|
||||
// manage the title and description - LEGACY
|
||||
if (stristr($item->imgcaption, "||")) {
|
||||
$splitcaption = explode("||", $item->imgcaption);
|
||||
$item->imgtitle = $splitcaption[0];
|
||||
$item->imgcaption = $splitcaption[1];
|
||||
}
|
||||
|
||||
// route the url
|
||||
if (strcasecmp(substr($item->imglink, 0, 4), 'http') && (strpos($item->imglink, 'index.php?') !== false)) {
|
||||
$item->imglink = \Joomla\CMS\Router\Route::_($item->imglink, true, false);
|
||||
} else {
|
||||
$item->imglink = \Joomla\CMS\Router\Route::_($item->imglink);
|
||||
}
|
||||
|
||||
if (! isset($item->imgtitle)) $item->imgtitle = '';
|
||||
|
||||
// convert legacy to new standard
|
||||
$item->link = $item->imglink;
|
||||
$item->title = $item->imgtitle;
|
||||
$item->text = $item->imgcaption;
|
||||
}
|
||||
// convert legacy to new standard
|
||||
$item->image = $item->imgname;
|
||||
$item->time = $item->imgtime;
|
||||
$item->target = $item->imgtarget;
|
||||
$item->alignment = $item->imgalignment;
|
||||
$item->video = $item->imgvideo;
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
/*
|
||||
preflight which is executed before install and update
|
||||
install
|
||||
update
|
||||
uninstall
|
||||
postflight which is executed after install and update
|
||||
*/
|
||||
|
||||
class com_slideshowckInstallerScript {
|
||||
|
||||
function install($parent) {
|
||||
|
||||
}
|
||||
|
||||
function update($parent) {
|
||||
|
||||
}
|
||||
|
||||
function uninstall($parent) {
|
||||
// disable all plugins and modules
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$db->setQuery("UPDATE `#__modules` SET `published` = 0 WHERE `module` LIKE '%slideshowck%'");
|
||||
$db->execute();
|
||||
|
||||
// $db->setQuery("UPDATE `#__extensions` SET `enabled` = 0 WHERE `type` = 'plugin' AND `element` LIKE '%slideshowck%' AND `folder` NOT LIKE '%slideshowck%'");
|
||||
// $db->execute();
|
||||
return true;
|
||||
}
|
||||
|
||||
function preflight($type, $parent) {
|
||||
// check if a pro version already installed
|
||||
$xmlPath = JPATH_ROOT . '/administrator/components/com_slideshowck/slideshowck.xml';
|
||||
|
||||
// if no file already exists
|
||||
if (! file_exists($xmlPath)) return true;
|
||||
|
||||
$xmlData = $this->getXmlData($xmlPath);
|
||||
$isProInstalled = ((int)$xmlData->ckpro);
|
||||
|
||||
if ($isProInstalled) {
|
||||
throw new RuntimeException('Slideshow CK Light cannot be installed over Slideshow CK Pro. Please install Slideshow CK Pro. To downgrade, please first uninstall Slideshow CK Pro. <a href="https://www.joomlack.fr/en/documentation/48-slideshow-ck/246-migration-from-slideshow-ck-version-1-to-version-2" target="_blank">Read more</a>');
|
||||
// return false;
|
||||
}
|
||||
|
||||
// check if a V1 version is installed with the params (needs the pro)
|
||||
$xmlPath = JPATH_ROOT . '/modules/mod_slideshowck/mod_slideshowck.xml';
|
||||
|
||||
// if no file already exists
|
||||
if (! file_exists($xmlPath)) return true;
|
||||
|
||||
$xmlData = $this->getXmlData($xmlPath);
|
||||
$installedVersion = ((int)$xmlData->version );
|
||||
// if the installed version is the V1
|
||||
if(version_compare($installedVersion, '2.0.0', '<')) {
|
||||
// if the params is also installed
|
||||
if (file_exists(JPATH_ROOT . '/plugins/system/slideshowckparams/slideshowckparams.xml')) {
|
||||
throw new RuntimeException('Slideshow CK Light cannot be installed over Slideshow CK V1 + Params. Please install Slideshow CK Pro to get the same features as previously, else you may loose your existing settings. To downgrade, please first uninstall Slideshow CK Params. <a href="https://www.joomlack.fr/en/documentation/48-slideshow-ck/246-migration-from-slideshow-ck-version-1-to-version-2" target="_blank">Read more</a>');
|
||||
// return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getXmlData($file) {
|
||||
if ( ! is_file($file))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$xml = simplexml_load_file($file);
|
||||
|
||||
if ( ! $xml || ! isset($xml['version']))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return $xml;
|
||||
}
|
||||
|
||||
// run on install and update
|
||||
function postflight($type, $parent) {
|
||||
// install modules and plugins
|
||||
jimport('joomla.installer.installer');
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$status = array();
|
||||
$src_ext = dirname(__FILE__).'/administrator/extensions';
|
||||
$installer = new \Joomla\CMS\Installer\Installer;
|
||||
|
||||
// module
|
||||
$result = $installer->install($src_ext.'/mod_slideshowck');
|
||||
$status[] = array('name'=>'Slideshow CK - Module','type'=>'module', 'result'=>$result);
|
||||
|
||||
// system plugin
|
||||
/*$result = $installer->install($src_ext.'/slideshowck');
|
||||
$status[] = array('name'=>'System - Slideshow CK','type'=>'plugin', 'result'=>$result);
|
||||
// system plugin must be enabled for user group limits and private areas
|
||||
$db->setQuery("UPDATE #__extensions SET enabled = '1' WHERE `element` = 'slideshowck' AND `type` = 'plugin'");
|
||||
$db->execute();*/
|
||||
|
||||
foreach ($status as $statu) {
|
||||
if ($statu['result'] == true) {
|
||||
$alert = 'success';
|
||||
$icon = 'icon-ok';
|
||||
$text = 'Successful';
|
||||
} else {
|
||||
$alert = 'warning';
|
||||
$icon = 'icon-cancel';
|
||||
$text = 'Failed';
|
||||
}
|
||||
echo '<div class="alert alert-' . $alert . '"><i class="icon ' . $icon . '"></i>Installation and activation of the <b>' . $statu['type'] . ' ' . $statu['name'] . '</b> : ' . $text . '</div>';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
; license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
; Note : All ini files need to be saved as UTF-8
|
||||
|
||||
|
||||
COM_SLIDESHOWCK="Slideshow CK"
|
||||
COM_SLIDESHOWCK_DESC="Slideshow CK shows your images and content into a slider. Touch - mobile - responsive - rtl"
|
||||
SLIDESHOWCK_DESC="Slideshow CK shows your images and content into a slider. Touch - mobile - responsive - rtl"
|
||||
COM_SLIDESHOWCK_CONFIGURATION="Slideshow CK Configuration"
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,8 @@
|
||||
; license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
; Note : All ini files need to be saved as UTF-8
|
||||
|
||||
|
||||
COM_SLIDESHOWCK="Slideshow CK"
|
||||
COM_SLIDESHOWCK_DESC="Slideshow CK affiche vos images et contenus dans un slider. Tactile - mobile - responsive - rtl"
|
||||
SLIDESHOWCK_DESC="Slideshow CK affiche vos images et contenus dans un slider. Tactile - mobile - responsive - rtl"
|
||||
COM_SLIDESHOWCK_CONFIGURATION="Slideshow CK Configuration"
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Slideshowck\CKModel;
|
||||
|
||||
class SlideshowckModelBrowse extends CKModel {
|
||||
|
||||
/*
|
||||
* Get a list of folders and files
|
||||
*/
|
||||
public function getItemsList($type = 'image') {
|
||||
$input = \Joomla\CMS\Factory::getApplication()->input;
|
||||
|
||||
$type = $input->get('type', $type, 'string');
|
||||
|
||||
switch ($type) {
|
||||
case 'video' :
|
||||
$filetypes = array('.mp4', '.ogv', '.webm');
|
||||
break;
|
||||
case 'audio' :
|
||||
$filetypes = array('.mp3', '.ogg');
|
||||
break;
|
||||
case 'image' :
|
||||
default :
|
||||
$filetypes = array('.jpg', '.jpeg', '.png', '.gif', '.tiff', '.webp');
|
||||
break;
|
||||
}
|
||||
|
||||
$folder = $input->get('folder', 'images', 'string');
|
||||
$tree = new stdClass();
|
||||
|
||||
// look for all folder and files
|
||||
$this->getSubfolder(JPATH_SITE . '/' . $folder, $tree, implode('|', $filetypes), 1);
|
||||
|
||||
$tree = $this->prepareList($tree);
|
||||
|
||||
return $tree;
|
||||
}
|
||||
|
||||
/*
|
||||
* List the subfolders and files according to the filter
|
||||
*/
|
||||
private function getSubfolder($folder, &$tree, $filter, $level) {
|
||||
$folders = \Joomla\CMS\Filesystem\Folder::folders($folder, '.', $recurse = false, $fullpath = true);
|
||||
|
||||
if (! count($folders)) return;
|
||||
|
||||
foreach ($folders as $f) {
|
||||
// list all authorized files from the folder
|
||||
$files = \Joomla\CMS\Filesystem\Folder::files($f, $filter, $recurse = false, $fullpath = false);
|
||||
$fName = \Joomla\CMS\Filesystem\File::makeSafe($f);
|
||||
$tree->$fName = new stdClass();
|
||||
$name = explode('/', $f);
|
||||
$name = end($name);
|
||||
$tree->$fName->name = $name;
|
||||
$tree->$fName->path = $f;
|
||||
$tree->$fName->files = $files;
|
||||
$tree->$fName->level = $level;
|
||||
|
||||
// recursive loop
|
||||
$this->getSubfolder($f, $tree, $filter, $level+1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set level diff and check for depth
|
||||
*/
|
||||
private function prepareList($items) {
|
||||
if (! $items) return $items;
|
||||
|
||||
$lastitem = 0;
|
||||
foreach ($items as $i => $item)
|
||||
{
|
||||
$item->deeper = false;
|
||||
$item->shallower = false;
|
||||
$item->level_diff = 0;
|
||||
|
||||
if (isset($items->$lastitem))
|
||||
{
|
||||
$items->$lastitem->deeper = ($item->level > $items->$lastitem->level);
|
||||
$items->$lastitem->shallower = ($item->level < $items->$lastitem->level);
|
||||
$items->$lastitem->level_diff = ($items->$lastitem->level - $item->level);
|
||||
}
|
||||
$lastitem = $i;
|
||||
|
||||
$item->basepath = str_replace(JPATH_SITE, '', $item->path);
|
||||
$item->basepath = str_replace('\\', '/', $item->basepath);
|
||||
$item->basepath = trim($item->basepath, '/');
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
public function getPagination($total = null, $start = null, $limit = null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use \Slideshowck\CKModel;
|
||||
use \Slideshowck\CKFof;
|
||||
|
||||
class SlideshowckModelMenus extends CKModel {
|
||||
|
||||
public function getChildrenItems($menutype, $parentId) {
|
||||
\Joomla\CMS\MVC\Model\BaseDatabaseModel::addIncludePath(JPATH_SITE . '/administrator/components/com_menus/models', 'MenusModel');
|
||||
// Get an instance of the generic menus model
|
||||
$items = \Joomla\CMS\MVC\Model\BaseDatabaseModel::getInstance('Items', 'MenusModel', array('ignore_request' => true));
|
||||
if (! $parentId) $items->setState('filter.level', '1');
|
||||
$items->setState('filter.menutype', $menutype);
|
||||
$items->setState('filter.parent_id', $parentId);
|
||||
|
||||
return $items->getItems();
|
||||
}
|
||||
|
||||
public function getMenus() {
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->qn(array('menutype', 'title')))
|
||||
->from($db->qn('#__menu_types'));
|
||||
// ->where($db->qn('menutype') . ' = ' . $db->q($menuType));
|
||||
|
||||
$menus = $db->setQuery($query)->loadObjectList();
|
||||
return $menus;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slider CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2016. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
|
||||
*/
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\Registry\Registry;
|
||||
use Slideshowck\CKModel;
|
||||
use Slideshowck\CKFof;
|
||||
|
||||
|
||||
class SlideshowckModelStyle extends CKModel {
|
||||
|
||||
protected $table = '#__slideshowck_styles';
|
||||
|
||||
var $item = null;
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function save($row) {
|
||||
$id = CKFof::dbStore($this->table, $row);
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
public function getItem() {
|
||||
if (empty($this->item)) {
|
||||
$id = $this->input->get('id', 0, 'int');
|
||||
$this->item = CKFof::dbLoad($this->table, $id);
|
||||
}
|
||||
|
||||
return $this->item;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Slideshowck\CKModel;
|
||||
use Slideshowck\CKFof;
|
||||
|
||||
class SlideshowckModelStyles extends CKModel {
|
||||
|
||||
protected $context = 'slideshowck.styles';
|
||||
|
||||
public function __construct($config = array()) {
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function getItems() {
|
||||
// Create a new query object.
|
||||
$db = CKFof::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the required fields from the table.
|
||||
$query->select('a.*');
|
||||
$query->from('`#__slideshowck_styles` AS a');
|
||||
|
||||
// Filter by search in title
|
||||
$search = $this->getState('filter_search');
|
||||
if (!empty($search)) {
|
||||
if (stripos($search, 'id:') === 0) {
|
||||
$query->where('a.id = ' . (int) substr($search, 3));
|
||||
} else {
|
||||
$search = $db->Quote('%' .$search . '%');
|
||||
$query->where('(' . 'a.name LIKE ' . $search . ' )');
|
||||
}
|
||||
}
|
||||
|
||||
// Do not list the trashed items
|
||||
$query->where('a.state > -1');
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering');
|
||||
$orderDirn = $this->state->get('list.direction');
|
||||
if ($orderCol && $orderDirn) {
|
||||
$query->order($orderCol . ' ' . $orderDirn);
|
||||
}
|
||||
|
||||
$limitstart = $this->state->get('limitstart');
|
||||
$limit = $this->state->get('limit');
|
||||
$db->setQuery($query, $limitstart, $limit);
|
||||
|
||||
$items = $db->loadObjectList();
|
||||
|
||||
// automatically get the total number of items from the query
|
||||
$total = $this->getTotal($query);
|
||||
$this->state->set('limit_total', (empty($total) ? 0 : (int)$total));
|
||||
|
||||
return $items;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Slideshow CK
|
||||
* @package com_slideshowck
|
||||
* @copyright Copyright (C) 2019. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
if (! defined('CK_LOADED')) define('CK_LOADED', 1);
|
||||
|
||||
// use Slideshowck\CKFof;
|
||||
|
||||
include_once JPATH_ADMINISTRATOR . '/components/com_slideshowck/helpers/defines.php';
|
||||
|
||||
// Access check.
|
||||
if (!\Joomla\CMS\Factory::getUser()->authorise('core.edit', 'com_slideshowck')) {
|
||||
return JError::raiseWarning(404, \Joomla\CMS\Language\Text::_('JERROR_ALERTNOAUTHOR'));
|
||||
}
|
||||
|
||||
// loads the language files from the frontend
|
||||
$lang = \Joomla\CMS\Factory::getLanguage();
|
||||
$lang->load('com_slideshowck', JPATH_SITE . '/components/com_slideshowck', $lang->getTag(), false);
|
||||
$lang->load('com_slideshowck', JPATH_SITE, $lang->getTag(), false);
|
||||
|
||||
// loads the helper in any case
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/cktext.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckpath.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckfile.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckfolder.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckuri.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckfof.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/helper.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckframework.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckcontroller.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckmodel.php';
|
||||
require_once SLIDESHOWCK_PATH . '/helpers/ckview.php';
|
||||
|
||||
\Slideshowck\CKFramework::load();
|
||||
|
||||
// Include dependancies
|
||||
require_once SLIDESHOWCK_PATH . '/controller.php';
|
||||
|
||||
$controller = \Slideshowck\CKController::getInstance('Slideshowck');
|
||||
$controller->execute(\Joomla\CMS\Factory::getApplication()->input->get('task'));
|
||||
//$controller->redirect();
|
||||
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.0" method="upgrade">
|
||||
<name>com_slideshowck</name>
|
||||
<ckpro>0</ckpro>
|
||||
<variant>free</variant>
|
||||
<creationDate>April 2019</creationDate>
|
||||
<copyright>Copyright (C) 2019. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>2.5.2</version>
|
||||
<description>SLIDESHOWCK_DESC</description>
|
||||
<install>
|
||||
<sql>
|
||||
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
|
||||
</sql>
|
||||
</install>
|
||||
<uninstall>
|
||||
<sql>
|
||||
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
|
||||
</sql>
|
||||
</uninstall>
|
||||
<update>
|
||||
<schemas>
|
||||
<schemapath type="mysql">sql/updates</schemapath>
|
||||
</schemas>
|
||||
</update>
|
||||
<scriptfile>install.php</scriptfile>
|
||||
<files folder="site">
|
||||
<folder>controllers</folder>
|
||||
<folder>language</folder>
|
||||
<folder>models</folder>
|
||||
<folder>views</folder>
|
||||
<filename>controller.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>slideshowck.php</filename>
|
||||
</files>
|
||||
<languages folder="site">
|
||||
<language tag="en-GB">language/en-GB/en-GB.com_slideshowck.ini</language>
|
||||
<language tag="en-GB">language/en-GB/en-GB.com_slideshowck.sys.ini</language>
|
||||
<language tag="fr-FR">language/fr-FR/fr-FR.com_slideshowck.ini</language>
|
||||
<language tag="fr-FR">language/fr-FR/fr-FR.com_slideshowck.sys.ini</language>
|
||||
</languages>
|
||||
<media folder="media" destination="com_slideshowck">
|
||||
<folder>assets</folder>
|
||||
<folder>images</folder>
|
||||
<folder>presets</folder>
|
||||
</media>
|
||||
<administration>
|
||||
<files folder="administrator">
|
||||
<folder>backup</folder>
|
||||
<folder>controllers</folder>
|
||||
<folder>elements</folder>
|
||||
<folder>extensions</folder>
|
||||
<folder>export</folder>
|
||||
<folder>helpers</folder>
|
||||
<folder>language</folder>
|
||||
<folder>models</folder>
|
||||
<folder>sql</folder>
|
||||
<folder>tables</folder>
|
||||
<folder>views</folder>
|
||||
<filename>access.xml</filename>
|
||||
<filename>config.xml</filename>
|
||||
<filename>controller.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>slideshowck.php</filename>
|
||||
</files>
|
||||
<languages folder="administrator">
|
||||
<language tag="en-GB">language/en-GB/en-GB.com_slideshowck.sys.ini</language>
|
||||
<language tag="fr-FR">language/fr-FR/fr-FR.com_slideshowck.sys.ini</language>
|
||||
</languages>
|
||||
</administration>
|
||||
<updateservers>
|
||||
<server type="extension" priority="1" name="Slideshow CK Light Update">https://update.joomlack.fr/slideshowck_light_update.xml</server>
|
||||
</updateservers>
|
||||
</extension>
|
||||
@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@ -0,0 +1,10 @@
|
||||
CREATE TABLE IF NOT EXISTS `#__slideshowck_styles` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`name` text NOT NULL,
|
||||
`state` int(10) NOT NULL DEFAULT '1',
|
||||
`params` longtext NOT NULL,
|
||||
`layoutcss` text NOT NULL,
|
||||
`checked_out` varchar(10) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
CREATE TABLE IF NOT EXISTS `#__slideshowck_styles` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`name` text NOT NULL,
|
||||
`state` int(10) NOT NULL DEFAULT '1',
|
||||
`params` longtext NOT NULL,
|
||||
`layoutcss` text NOT NULL,
|
||||
`checked_out` varchar(10) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user