Album et nouveau site FR
This commit is contained in:
parent
7f86112639
commit
be9e5958e3
|
@ -30,7 +30,7 @@ $text['core']['router'][2] = ' is opened by the user ';
|
|||
$text['core']['router'][3] = 'Access denied';
|
||||
$text['core']['router'][4] = 'You are not authorised to view this page (error 403)';
|
||||
$text['core']['router'][5] = 'Page unavailable';
|
||||
$text['core']['router'][6] = 'Oops! The requested page does not exist or cannot be found (error 404)';
|
||||
$text['core']['router'][6] = 'The requested page does not exist or cannot be found (error 404)';
|
||||
// core.js.php
|
||||
$text['core_js'][0] = "Updating ?";
|
||||
// Select File
|
||||
|
|
|
@ -30,7 +30,7 @@ $text['core']['router'][2] = 'es abierto por el usuario';
|
|||
$text['core']['router'][3] = 'Acceso denegado';
|
||||
$text['core']['router'][4] = 'No está autorizado para ver esta página (error 403)';
|
||||
$text['core']['router'][5] = 'Página no disponible';
|
||||
$text['core']['router'][6] = '¡Vaya! La página solicitada no existe o no se encuentra (error 404)';
|
||||
$text['core']['router'][6] = 'La página solicitada no existe o no se encuentra (error 404)';
|
||||
// core.js.php
|
||||
$text['core_js'][0] = "¿Realizar actualización?";
|
||||
// Seleccione Archivo
|
||||
|
|
|
@ -30,7 +30,7 @@ $text['core']['router'][2] = ' est ouverte par l\'utilisateur ';
|
|||
$text['core']['router'][3] = 'Accès interdit';
|
||||
$text['core']['router'][4] = 'Vous n\'êtes pas autorisé à consulter cette page (erreur 403)';
|
||||
$text['core']['router'][5] = 'Page indisponible';
|
||||
$text['core']['router'][6] = 'Oups ! La page demandée n\'existe pas ou est introuvable (erreur 404)';
|
||||
$text['core']['router'][6] = 'La page demandée n\'existe pas ou est introuvable (erreur 404)';
|
||||
// core.js.php
|
||||
$text['core_js'][0] = "Effectuer la mise à jour ?";
|
||||
// Select File
|
||||
|
|
|
@ -1 +1 @@
|
|||
<h2 style="text-align: center;">Oops! The requested page cannot be found...</h2><p style="text-align: center;">Customise this page to your liking without it appearing in the menus.<p>
|
||||
<h2 style="text-align: center;">The requested page cannot be found...</h2><p style="text-align: center;">Customise this page to your liking without it appearing in the menus.<p>
|
|
@ -1,3 +1,3 @@
|
|||
<h2 style="text-align: center;">¡Ups! No se encuentra la página deseada...</h2>
|
||||
<h2 style="text-align: center;">No se encuentra la página deseada...</h2>
|
||||
<p style="text-align: center;">Personaliza esta página a tu gusto sin que aparezca en los menús.</p>
|
||||
<p> </p>
|
|
@ -0,0 +1 @@
|
|||
<p>Cette page contient un module d'album photo. Cliquez sur l'un des albums ci-dessous afin de voir les photos qu'il contient.</p>
|
|
@ -1 +1 @@
|
|||
<h2 style="text-align: center;">Oups ! La page demandée est introuvable...</h2><p style="text-align: center;">Personnalisez cette page à votre convenance sans qu'elle apparaisse dans les menus.<p>
|
||||
<h2 style="text-align: center;">La page demandée est introuvable...</h2><p style="text-align: center;">Personnalisez cette page à votre convenance sans qu'elle apparaisse dans les menus.<p>
|
|
@ -51,7 +51,7 @@
|
|||
"closeComment": false,
|
||||
"comment": [],
|
||||
"content": "<p>Et prima post Osdroenam quam, ut dictum est, ab hac descriptione discrevimus, Commagena, nunc Euphratensis, clementer adsurgit, Hierapoli, vetere Nino et Samosata civitatibus amplis inlustris.<\/p><p>Ob haec et huius modi multa, quae cernebantur in paucis, omnibus timeri sunt coepta. et ne tot malis dissimulatis paulatimque serpentibus acervi crescerent aerumnarum, nobilitatis decreto legati mittuntur: Praetextatus ex urbi praefecto et ex vicario Venustus et ex consulari Minervius oraturi, ne delictis supplicia sint grandiora, neve senator quisquam inusitato et inlicito more tormentis exponeretur.<\/p><p>Sed ut tum ad senem senex de senectute, sic hoc libro ad amicum amicissimus scripsi de amicitia. Tum est Cato locutus, quo erat nemo fere senior temporibus illis, nemo prudentior; nunc Laelius et sapiens (sic enim est habitus) et amicitiae gloria excellens de amicitia loquetur. Tu velim a me animum parumper avertas, Laelium loqui ipsum putes. C. Fannius et Q. Mucius ad socerum veniunt post mortem Africani; ab his sermo oritur, respondet Laelius, cuius tota disputatio est de amicitia, quam legens te ipse cognosces.<\/p>",
|
||||
"picture": "galerie\/grece\/port.jpg",
|
||||
"picture": "galerie\/geotag\/aspe_2.jpg",
|
||||
"hidePicture": false,
|
||||
"picturePosition": "right",
|
||||
"pictureSize": 40,
|
||||
|
@ -143,7 +143,7 @@
|
|||
"style": "site\/data\/search\/erreur404\/theme.css"
|
||||
}
|
||||
},
|
||||
"galeries": {
|
||||
"album-photo": {
|
||||
"toc-toc": {
|
||||
"config": {
|
||||
"name": "Toc toc",
|
||||
|
@ -155,13 +155,13 @@
|
|||
"legend": [],
|
||||
"order": []
|
||||
},
|
||||
"grece": {
|
||||
"geolocalisation": {
|
||||
"config": {
|
||||
"name": "Grèce",
|
||||
"directory": "site\/file\/source\/galerie\/grece",
|
||||
"name": "Géolocalisation",
|
||||
"directory": "site\/file\/source\/galerie\/geotag",
|
||||
"homePicture": null,
|
||||
"sort": "SORT_ASC",
|
||||
"position": 2
|
||||
"position": 3
|
||||
},
|
||||
"legend": [],
|
||||
"order": []
|
||||
|
|
|
@ -102,32 +102,6 @@
|
|||
"hideMenuSide": false,
|
||||
"hideMenuChildren": false
|
||||
},
|
||||
"galeries": {
|
||||
"typeMenu": "text",
|
||||
"iconUrl": "",
|
||||
"disable": false,
|
||||
"content": "galeries.html",
|
||||
"hideTitle": false,
|
||||
"breadCrumb": false,
|
||||
"metaDescription": "",
|
||||
"metaTitle": "",
|
||||
"moduleId": "album",
|
||||
"modulePosition": "bottom",
|
||||
"parentPageId": "",
|
||||
"position": 6,
|
||||
"group": 0,
|
||||
"groupEdit": 2,
|
||||
"targetBlank": false,
|
||||
"title": "Galeries d'images",
|
||||
"shortTitle": "Galeries",
|
||||
"block": "12",
|
||||
"barLeft": "",
|
||||
"barRight": "",
|
||||
"displayMenu": "none",
|
||||
"hideMenuSide": false,
|
||||
"hideMenuHead": false,
|
||||
"hideMenuChildren": false
|
||||
},
|
||||
"deltacms": {
|
||||
"typeMenu": "text",
|
||||
"iconUrl": "",
|
||||
|
@ -407,6 +381,32 @@
|
|||
"hideMenuSide": false,
|
||||
"hideMenuHead": false,
|
||||
"hideMenuChildren": false
|
||||
},
|
||||
"album-photo": {
|
||||
"typeMenu": "text",
|
||||
"iconUrl": "",
|
||||
"disable": false,
|
||||
"content": "album-photo.html",
|
||||
"hideTitle": false,
|
||||
"breadCrumb": false,
|
||||
"metaDescription": "",
|
||||
"metaTitle": "",
|
||||
"moduleId": "album",
|
||||
"modulePosition": "bottom",
|
||||
"parentPageId": "",
|
||||
"position": 6,
|
||||
"group": 0,
|
||||
"groupEdit": 2,
|
||||
"targetBlank": false,
|
||||
"title": "Album photo",
|
||||
"shortTitle": "Album",
|
||||
"block": "12",
|
||||
"barLeft": "",
|
||||
"barRight": "",
|
||||
"displayMenu": "none",
|
||||
"hideMenuSide": false,
|
||||
"hideMenuHead": false,
|
||||
"hideMenuChildren": false
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -201,7 +201,7 @@ $text['core_theme_view']['manage'][11] = 'Download theme';
|
|||
$text['core_theme_view']['manage'][12] = 'Site theme';
|
||||
$text['core_theme_view']['manage'][13] = 'Administration theme';
|
||||
$text['core_theme_view']['manage'][14] = "Are you sure you want to reset the site theme to its original state ?";
|
||||
$text['core_theme_view']['manage'][15] = "Your custom.css file will be overwritten, you will be able to find it in the automatic backup that will be created, continue? If Yes, a cacheless refresh of your browser will probably be necessary.";
|
||||
$text['core_theme_view']['manage'][15] = "Your custom.css file will be overwritten, you will be able to find it in the automatic backup that will be created, continue? If so, refreshing your browser cache will probably be necessary.";
|
||||
$text['core_theme_view']['manage'][16] = "Enter a name without extension (optional)";
|
||||
$text['core_theme_view']['menu'][0] = 'Back';
|
||||
$text['core_theme_view']['menu'][1] = 'Help';
|
||||
|
|
|
@ -201,7 +201,7 @@ $text['core_theme_view']['manage'][11] = 'Descargar tema';
|
|||
$text['core_theme_view']['manage'][12] = 'Tema del sitio';
|
||||
$text['core_theme_view']['manage'][13] = 'Tema administrativo';
|
||||
$text['core_theme_view']['manage'][14] = "¿Está seguro de que desea restablecer el tema del sitio a su estado original?";
|
||||
$text['core_theme_view']['manage'][15] = "Su archivo custom.css se sobrescribirá, puede encontrarlo en la copia de seguridad automática que se creará, ¿continuar? Si es así, probablemente será necesaria una actualización sin caché de su navegador.";
|
||||
$text['core_theme_view']['manage'][15] = "Su archivo custom.css se sobrescribirá, puede encontrarlo en la copia de seguridad automática que se creará, ¿continuar? Si es así, probablemente será necesario actualizar la memoria caché de su navegador.";
|
||||
$text['core_theme_view']['manage'][16] = "Ingrese un nombre sin extensión (opcional)";
|
||||
$text['core_theme_view']['menu'][0] = 'Atrás';
|
||||
$text['core_theme_view']['menu'][1] = 'Ayuda';
|
||||
|
|
|
@ -201,7 +201,7 @@ $text['core_theme_view']['manage'][11] = 'Télécharger le thème';
|
|||
$text['core_theme_view']['manage'][12] = 'Thème du site';
|
||||
$text['core_theme_view']['manage'][13] = 'Thème de l\'administration';
|
||||
$text['core_theme_view']['manage'][14] = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine le thème du site ?";
|
||||
$text['core_theme_view']['manage'][15] = "Votre fichier custom.css va être écrasé, vous pourrez le retrouver dans la sauvegarde automatique qui va être créée, continuez ? Si oui un rafraîchissement sans cache de votre navigateur sera probablement nécessaire.";
|
||||
$text['core_theme_view']['manage'][15] = "Votre fichier custom.css va être écrasé, vous pourrez le retrouver dans la sauvegarde automatique qui va être créée, continuez ? Si oui un rafraîchissement du cache de votre navigateur sera probablement nécessaire.";
|
||||
$text['core_theme_view']['manage'][16] = "Saisissez un nom sans extension (facultatif)";
|
||||
$text['core_theme_view']['menu'][0] = 'Retour';
|
||||
$text['core_theme_view']['menu'][1] = 'Aide';
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
//Supprime les erreurs de dépréciations
|
||||
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
|
||||
|
||||
$config = include 'config/config.php';
|
||||
|
||||
include 'include/utils.php';
|
||||
|
|
|
@ -134,11 +134,13 @@ function checkRelativePath($path){
|
|||
* @return boolean is it an upload dir?
|
||||
*/
|
||||
function isUploadDir($path, $config){
|
||||
$upload_dir = $config['current_path'];
|
||||
$thumbs_dir = $config['thumbs_base_path'];
|
||||
if (realpath($path) === realpath($upload_dir) || realpath($path) === realpath($thumbs_dir))
|
||||
{
|
||||
return true;
|
||||
if( isset($config['current_path']) && isset($config['current_path'])){
|
||||
$upload_dir = $config['current_path'];
|
||||
$thumbs_dir = $config['thumbs_base_path'];
|
||||
if (realpath($path) === realpath($upload_dir) || realpath($path) === realpath($thumbs_dir))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
//Supprime les erreurs de dépréciations
|
||||
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
|
||||
|
||||
try {
|
||||
if (!isset($config)) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
setlocale(LC_NUMERIC,'English','en_US','en_US.UTF-8');
|
||||
class album extends common {
|
||||
const VERSION = '2.1';
|
||||
const VERSION = '2.3';
|
||||
const REALNAME = 'Album Photo';
|
||||
const DELETE = true;
|
||||
const UPDATE = '0.0';
|
||||
|
@ -362,7 +362,7 @@ class album extends common {
|
|||
template::text('legend[' . $fileInfos->getFilename() . ']', [
|
||||
'value' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'legend', str_replace('.','',$fileInfos->getFilename())])
|
||||
]),
|
||||
'<a href="'.$fileInfos->getPathname().'" rel="data-lity"><img class="config" src="'.helper::baseUrl(false).'module/album/plugins/thumbnailer.php?img='.$fileInfos->getPathname().'" alt="miniature"></a>'
|
||||
'<a href="'.$fileInfos->getPathname().'" rel="data-lity"><img class="config" src="module/album/plugins/thumbnailer.php?img='.$fileInfos->getPathname().'" alt="miniature"></a>'
|
||||
];
|
||||
self::$picturesId [] = str_replace('.','',$fileInfos->getFilename());
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ class albumHelper extends helper {
|
|||
}
|
||||
if (function_exists('exif_read_data')) {
|
||||
$exif = @exif_read_data($foto, 0, true);
|
||||
if ($exif && @$exif['GPS']['GPSLongitude'][0]) {
|
||||
if ($exif && isset($exif['GPS']['GPSLongitudeRef']) && !empty($exif['GPS']['GPSLongitude'][0])) {
|
||||
$latitude = self::gps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);
|
||||
$longitude = self::gps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);
|
||||
$altitude = 0;
|
||||
|
|
|
@ -20,8 +20,6 @@ $zoom = $_GET['zoom'];
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<link rel="stylesheet" href="leaflet/leaflet.css">
|
||||
<link rel="stylesheet" href="leaflet/Control.FullScreen.css">
|
||||
<script src="leaflet/leaflet.js"></script>
|
||||
<script src="leaflet/Control.FullScreen.js"></script>
|
||||
<style>
|
||||
html, body{
|
||||
width: 100vw;
|
||||
|
@ -33,14 +31,11 @@ margin: 0;
|
|||
}
|
||||
#mapid {
|
||||
width: 100%;
|
||||
height: 95vh;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
#mapid {
|
||||
height: 100vh;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="leaflet/leaflet.js"></script>
|
||||
<script src="leaflet/Control.FullScreen.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -77,7 +72,6 @@ var marker = L.marker([<?=$lat?>, <?=$lon?>]).addTo(mymap)
|
|||
|
||||
var layerControl = L.control.layers(baselayers).addTo(mymap);
|
||||
baselayers.Satellite.addTo(mymap);
|
||||
L.control.layers(baselayers, overlayMaps).addTo(mymap);
|
||||
|
||||
// detect fullscreen toggling
|
||||
mymap.on('enterFullscreen', function(){
|
||||
|
|
|
@ -35,10 +35,10 @@ $get_location = albumHelper::gps_exif($picture);
|
|||
<div class="row">
|
||||
<?php endif; ?>
|
||||
<div class="col2 gallery">
|
||||
<a href="<?php echo helper::baseUrl(false) . $picture; ?>" class="galleryGalleryPicture" data-caption="<?php echo $legend; ?>">
|
||||
<img src="<?php echo helper::baseUrl(false) ?>module/album/plugins/thumbnailer.php?img=<?php echo $picture; ?>" alt="<?php echo $legend; ?>">
|
||||
<a href="<?php echo $picture; ?>" class="galleryGalleryPicture" data-caption="<?php echo $legend; ?>">
|
||||
<img src="module/album/plugins/thumbnailer.php?img=<?php echo $picture; ?>" alt="<?php echo $legend; ?>">
|
||||
<?php if ($photo_960 !== false): ?>
|
||||
<div class="galleryGalleryName picResized" onclick="window.open('<?=helper::baseUrl(false).$urlback?>');" data-tippy-content="image originale">
|
||||
<div class="galleryGalleryName picResized" onclick="window.open('<?=$urlback?>');" data-tippy-content="image originale">
|
||||
<?php else: ?>
|
||||
<div class="galleryGalleryName">
|
||||
<?php endif;
|
||||
|
@ -56,8 +56,8 @@ $get_location = albumHelper::gps_exif($picture);
|
|||
</a>
|
||||
<?php
|
||||
// ajout du marqueur aux images contenant des données exif gps
|
||||
$data = (isset($get_location)) ? $get_location : NULL;
|
||||
$lis = explode('¤',$data);
|
||||
$data = isset($get_location) ? $get_location : NULL;
|
||||
$lis = explode('¤',$data ?? '');
|
||||
if ( ! isset($lis[1])) { $lis[1] = null; }
|
||||
else {
|
||||
$altitude = '';
|
||||
|
@ -66,7 +66,7 @@ $get_location = albumHelper::gps_exif($picture);
|
|||
}
|
||||
$exif_data = "lat=".$lis[0]."&lon=".$lis[1]."&alt=".$lis[2]."&zoom=15";
|
||||
?>
|
||||
<div class="osm"><a href="<?=helper::baseUrl(false)?>module/album/plugins/map.php?<?=$exif_data?>" rel="data-lity" title="<?=$text['album_view']['gallery'][1]?>"><img src="<?=helper::baseUrl(false)?>module/album/plugins/leaflet/images/marker-icon.png" style="width: 20px; height: auto;" alt="GPS"></a></div>
|
||||
<div class="osm"><a href="module/album/plugins/map.php?<?=$exif_data?>" rel="data-lity" title="<?=$text['album_view']['gallery'][1]?>"><img src="module/album/plugins/leaflet/images/marker-icon.png" style="width: 20px; height: auto;" alt="GPS"></a></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if($i % 6 === 0 OR $i === $picturesNb): ?>
|
||||
|
|
|
@ -15,9 +15,9 @@ if($i % 4 === 1):
|
|||
<div class="col3">
|
||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>/<?php echo $galleryId; ?>" class="galleryPicture">
|
||||
<img src="<?php if ($this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'homePicture']) === null ) {
|
||||
echo helper::baseUrl(false) . 'module/album/plugins/thumbnailer.php?img=' . $module::$firstPictures[$galleryId]; }
|
||||
echo 'module/album/plugins/thumbnailer.php?img=' . $module::$firstPictures[$galleryId]; }
|
||||
else {
|
||||
echo helper::baseUrl(false) . 'module/album/plugins/thumbnailer.php?img=' . $this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'directory']) . '/' . $this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'homePicture']);
|
||||
echo 'module/album/plugins/thumbnailer.php?img=' . $this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'directory']) . '/' . $this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'homePicture']);
|
||||
} ?>" alt="<?php echo $gallery['config']['name']; ?>">
|
||||
<div class="galleryName"><?php echo $gallery['config']['name']; ?></div>
|
||||
</a>
|
||||
|
|
|
@ -1,801 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
* @author Sylvain Lelièvre <lelievresylvain@free.fr>
|
||||
* @copyright Copyright (C) 2021, Sylvain Lelièvre
|
||||
* @license GNU General Public License, version 3
|
||||
* @link https://deltacms.fr/
|
||||
*
|
||||
* Delta was created from version 11.2.00.24 of ZwiiCMS
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
|
||||
*/
|
||||
|
||||
class gallery extends common {
|
||||
|
||||
|
||||
const VERSION = '4.4';
|
||||
const REALNAME = 'Galerie';
|
||||
const DELETE = true;
|
||||
const UPDATE = '0.0';
|
||||
const DATADIRECTORY = self::DATA_DIR . 'gallery/';
|
||||
|
||||
const SORT_ASC = 'SORT_ASC';
|
||||
const SORT_DSC = 'SORT_DSC';
|
||||
const SORT_HAND = 'SORT_HAND';
|
||||
|
||||
|
||||
public static $directories = [];
|
||||
|
||||
public static $firstPictures = [];
|
||||
|
||||
public static $galleries = [];
|
||||
|
||||
public static $galleriesId = [];
|
||||
|
||||
public static $pictures = [];
|
||||
|
||||
public static $picturesId = [];
|
||||
|
||||
public static $thumbs = [];
|
||||
|
||||
public static $actions = [
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_MODERATOR,
|
||||
'dirs' => self::GROUP_EDITOR,
|
||||
'sortGalleries' => self::GROUP_EDITOR,
|
||||
'sortPictures' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'theme' => self::GROUP_MODERATOR,
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
/**
|
||||
* Mise à jour du module
|
||||
* Appelée par les fonctions index et config
|
||||
*/
|
||||
private function update() {
|
||||
// Initialisation du module, créer les données si elles sont manquantes.
|
||||
$this->init();
|
||||
|
||||
$versionData = $this->getData(['module',$this->getUrl(0),'config', 'versionData' ]);
|
||||
// Mise à jour 3.1 vers 4.0
|
||||
if (version_compare($versionData, '3.1', '<') ) {
|
||||
if (is_dir(self::DATADIRECTORY . 'pages/')) {
|
||||
// Déplacer les données du dossier Pages
|
||||
$this->copyDir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0), self::DATADIRECTORY . $this->getUrl(0));
|
||||
$this->removeDir(self::DATADIRECTORY . 'pages/');
|
||||
$style = $this->getData(['module', $this->getUrl(0), 'theme', 'style']);
|
||||
$this->setData(['module', $this->getUrl(0), 'theme', 'style', str_replace('pages/', '', $style)]);
|
||||
}
|
||||
// Mettre à jour la version
|
||||
$this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.0' ]);
|
||||
}
|
||||
if (version_compare($versionData, '4.4', '<') ) {
|
||||
$this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.4' ]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialisation séparée des éléments absents
|
||||
* Thème
|
||||
* Config
|
||||
* Content
|
||||
*/
|
||||
private function init() {
|
||||
|
||||
// Variable commune
|
||||
$fileCSS = self::DATADIRECTORY . $this->getUrl(0) . '/theme.css' ;
|
||||
|
||||
// Mise à jour d'une version inférieure, la gallery existe mais pas la variable content
|
||||
if ($this->getData(['module', $this->getUrl(0)]) &&
|
||||
$this->getData(['module', $this->getUrl(0), 'content']) === NULL ) {
|
||||
|
||||
// Changement de l'arborescence dans module.json
|
||||
$data = $this->getData(['module', $this->getUrl(0)]);
|
||||
$this->deleteData(['module', $this->getUrl(0)]);
|
||||
$this->setData(['module', $this->getUrl(0), 'content', $data]);
|
||||
|
||||
// Effacer les fichiers CSS de l'ancienne version
|
||||
if (file_exists('module/gallery/view/index/index.css')) {
|
||||
unlink('module/gallery/view/index/index.css');
|
||||
}
|
||||
if (file_exists('module/gallery/view/gallery/gallery.css')) {
|
||||
unlink('module/gallery/view/gallery/gallery.css');
|
||||
}
|
||||
// Stockage des données du thème de la gallery existant
|
||||
if (is_array($this->getData(['theme','gallery']))) {
|
||||
$data = $this->getData(['theme','gallery']);
|
||||
$this->deleteData(['theme','gallery']);
|
||||
$this->setData(['module', $this->getUrl(0), 'theme', $data]);
|
||||
// Nom de la feuille de style
|
||||
$this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]);
|
||||
}
|
||||
}
|
||||
|
||||
// Check la présence des données de thème
|
||||
if ( $this->getData(['module', $this->getUrl(0), 'theme']) === null ) {
|
||||
require_once('module/gallery/ressource/defaultdata.php');
|
||||
$this->setData(['module', $this->getUrl(0), 'theme', theme::$defaultTheme]);
|
||||
// Nom de la feuille de style
|
||||
$this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]);
|
||||
}
|
||||
|
||||
// Check la présence de la feuille de style
|
||||
if ( !file_exists($fileCSS)) {
|
||||
// Dossier de l'instance
|
||||
if (!is_dir(self::DATADIRECTORY . $this->getUrl(0) )) {
|
||||
mkdir (self::DATADIRECTORY . $this->getUrl(0), 0755, true);
|
||||
}
|
||||
// Générer la feuille de CSS
|
||||
$content = file_get_contents('module/gallery/ressource/vartheme.css');
|
||||
$themeCss = file_get_contents('module/gallery/ressource/theme.css');
|
||||
|
||||
// Injection des variables
|
||||
$content = str_replace('#thumbAlign#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbAlign']),$content );
|
||||
$content = str_replace('#thumbWidth#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbWidth']),$content );
|
||||
$content = str_replace('#thumbHeight#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbHeight']),$content );
|
||||
$content = str_replace('#thumbMargin#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbMargin']),$content );
|
||||
$content = str_replace('#thumbBorder#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbBorder']),$content );
|
||||
$content = str_replace('#thumbBorderColor#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbBorderColor']),$content );
|
||||
$content = str_replace('#thumbOpacity#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbOpacity']),$content );
|
||||
$content = str_replace('#thumbShadows#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbShadows']),$content );
|
||||
$content = str_replace('#thumbShadowsColor#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbShadowsColor']),$content );
|
||||
$content = str_replace('#thumbRadius#',$this->getData(['module', $this->getUrl(0), 'theme', 'thumbRadius']),$content );
|
||||
$content = str_replace('#legendAlign#',$this->getData(['module', $this->getUrl(0), 'theme', 'legendAlign']),$content );
|
||||
$content = str_replace('#legendHeight#',$this->getData(['module', $this->getUrl(0), 'theme', 'legendHeight']),$content );
|
||||
$content = str_replace('#legendTextColor#',$this->getData(['module', $this->getUrl(0), 'theme', 'legendTextColor']),$content );
|
||||
$content = str_replace('#legendBgColor#',$this->getData(['module', $this->getUrl(0), 'theme', 'legendBgColor']),$content );
|
||||
// Ecriture de la feuille de style
|
||||
file_put_contents($fileCSS , $content . $themeCss);
|
||||
// Nom de la feuille de style
|
||||
$this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]);
|
||||
}
|
||||
|
||||
// Check la présence de la config
|
||||
if ( $this->getData(['module', $this->getUrl(0), 'config']) === null ) {
|
||||
$this->setData(['module', $this->getUrl(0), 'config', self::VERSION]);
|
||||
}
|
||||
|
||||
// Contenu vide de la galerie
|
||||
if (!is_array($this->getData(['module', $this->getUrl(0), 'content'])) ) {
|
||||
$this->setData(['module', $this->getUrl(0), 'content', array() ]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tri de la liste des galeries
|
||||
*
|
||||
*/
|
||||
public function sortGalleries() {
|
||||
// Autorisation
|
||||
$group = $this->getUser('group');
|
||||
if ($group === false ) $group = 0;
|
||||
if( $group < gallery::$actions['sortGalleries'] ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
if($_POST['response']) {
|
||||
$data = explode('&',$_POST['response']);
|
||||
$data = str_replace('galleryTable%5B%5D=','',$data);
|
||||
for($i=0;$i<count($data);$i++) {
|
||||
$this->setData(['module', $this->getUrl(0), 'content', $data[$i], [
|
||||
'config' => [
|
||||
'name' => $this->getData(['module',$this->getUrl(0), 'content', $data[$i],'config','name']),
|
||||
'directory' => $this->getData(['module',$this->getUrl(0), 'content', $data[$i],'config','directory']),
|
||||
'homePicture' => $this->getData(['module',$this->getUrl(0), 'content', $data[$i],'config','homePicture']),
|
||||
'sort' => $this->getData(['module',$this->getUrl(0), 'content', $data[$i],'config','sort']),
|
||||
'position'=> $i,
|
||||
'fullScreen' => $this->getData(['module',$this->getUrl(0), 'content',$data[$i],'config','fullScreen'])
|
||||
|
||||
],
|
||||
'legend' => $this->getData(['module',$this->getUrl(0), 'content', $data[$i],'legend']),
|
||||
'positions' => $this->getData(['module',$this->getUrl(0), 'content', $data[$i],'positions'])
|
||||
]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tri de la liste des images
|
||||
*
|
||||
*/
|
||||
public function sortPictures() {
|
||||
// Autorisation
|
||||
$group = $this->getUser('group');
|
||||
if ($group === false ) $group = 0;
|
||||
if( $group < gallery::$actions['sortPictures'] ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
if($_POST['response']) {
|
||||
$galleryName = $_POST['gallery'];
|
||||
$data = explode('&',$_POST['response']);
|
||||
$data = str_replace('galleryTable%5B%5D=','',$data);
|
||||
// Sauvegarder
|
||||
$this->setData(['module', $this->getUrl(0), 'content', $galleryName, [
|
||||
'config' => [
|
||||
'name' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','name']),
|
||||
'directory' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','directory']),
|
||||
'homePicture' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','homePicture']),
|
||||
'sort' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','sort']),
|
||||
'position' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','position']),
|
||||
'fullScreen' => $this->getData(['module',$this->getUrl(0),$galleryName,'config','fullScreen'])
|
||||
|
||||
],
|
||||
'legend' => $this->getData(['module',$this->getUrl(0),$galleryName,'legend']),
|
||||
'positions' => array_flip($data)
|
||||
]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Configuration
|
||||
*/
|
||||
public function config() {
|
||||
// Autorisation
|
||||
$group = $this->getUser('group');
|
||||
if ($group === false ) $group = 0;
|
||||
if( $group < gallery::$actions['config'] ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
// Lexique
|
||||
$param = '';
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
// Mise à jour des données de module
|
||||
$this->update();
|
||||
|
||||
//Affichage de la galerie triée
|
||||
$g = $this->getData(['module', $this->getUrl(0), 'content']);
|
||||
$p = helper::arrayCollumn(helper::arrayCollumn($g,'config'),'position');
|
||||
asort($p,SORT_NUMERIC);
|
||||
$galleries = [];
|
||||
foreach ($p as $positionId => $item) {
|
||||
$galleries [$positionId] = $g[$positionId];
|
||||
}
|
||||
// Traitement de l'affichage
|
||||
if($galleries) {
|
||||
foreach($galleries as $galleryId => $gallery) {
|
||||
// Erreur dossier vide
|
||||
if(is_dir($gallery['config']['directory'])) {
|
||||
if(count(scandir($gallery['config']['directory'])) === 2) {
|
||||
$gallery['config']['directory'] = '<span class="galleryConfigError">' . $gallery['config']['directory'] . $text['gallery']['config'][0].'</span>';
|
||||
}
|
||||
}
|
||||
// Erreur dossier supprimé
|
||||
else {
|
||||
$gallery['config']['directory'] = '<span class="galleryConfigError">' . $gallery['config']['directory'] . $text['gallery']['config'][1].'</span>';
|
||||
}
|
||||
// Met en forme le tableau
|
||||
self::$galleries[] = [
|
||||
template::ico('sort'),
|
||||
$gallery['config']['name'],
|
||||
str_replace('site/file/source/','',$gallery['config']['directory']),
|
||||
template::button('galleryConfigEdit' . $galleryId , [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $galleryId . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('pencil')
|
||||
]),
|
||||
template::button('galleryConfigDelete' . $galleryId, [
|
||||
'class' => 'galleryConfigDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $galleryId . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel'),
|
||||
'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
])
|
||||
];
|
||||
// Tableau des id des galleries pour le drag and drop
|
||||
self::$galleriesId[] = $galleryId;
|
||||
}
|
||||
}
|
||||
// Soumission du formulaire d'ajout d'une galerie
|
||||
if($this->isPost()) {
|
||||
if (!$this->getInput('galleryConfigFilterResponse')) {
|
||||
$galleryId = helper::increment($this->getInput('galleryConfigName', helper::FILTER_ID, true), (array) $this->getData(['module', $this->getUrl(0), 'content']));
|
||||
// définir une vignette par défaut
|
||||
$directory = $this->getInput('galleryConfigDirectory', helper::FILTER_STRING_SHORT, true);
|
||||
$iterator = new DirectoryIterator($directory);
|
||||
foreach($iterator as $fileInfos) {
|
||||
if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) {
|
||||
// Créer la miniature si manquante
|
||||
if (!file_exists( str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) {
|
||||
$this->makeThumb($fileInfos->getPathname(),
|
||||
str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()),
|
||||
self::THUMBS_WIDTH);
|
||||
}
|
||||
// Miniatures
|
||||
$homePicture = strtolower($fileInfos->getFilename());
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->setData(['module', $this->getUrl(0), 'content', $galleryId, [
|
||||
'config' => [
|
||||
'name' => $this->getInput('galleryConfigName'),
|
||||
'directory' => $this->getInput('galleryConfigDirectory', helper::FILTER_STRING_SHORT, true),
|
||||
'homePicture' => $homePicture,
|
||||
'sort' => self::SORT_ASC,
|
||||
'position' => $this->getData(['module', $this->getUrl(0), 'content', $galleryId,'config','position']),
|
||||
'fullScreen' => false
|
||||
],
|
||||
'legend' => [],
|
||||
'positions' => []
|
||||
]]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl() /*. '#galleryConfigForm'*/,
|
||||
'notification' => $text['gallery']['config'][2],
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => $text['gallery']['config'][3],
|
||||
'view' => 'config',
|
||||
'vendor' => [
|
||||
'tablednd'
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Suppression
|
||||
*/
|
||||
public function delete() {
|
||||
// Autorisation
|
||||
$group = $this->getUser('group');
|
||||
if ($group === false ) $group = 0;
|
||||
if( $group < gallery::$actions['delete'] ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
// Lexique
|
||||
$param = '';
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
// $url prend l'adresse sans le token
|
||||
// La galerie n'existe pas
|
||||
if($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]) === null) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'notification' => $text['gallery']['delete'][0]
|
||||
]);
|
||||
}
|
||||
// Suppression
|
||||
else {
|
||||
$this->deleteData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'notification' => $text['gallery']['delete'][1],
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste des dossiers
|
||||
*/
|
||||
public function dirs() {
|
||||
// Autorisation
|
||||
$group = $this->getUser('group');
|
||||
if ($group === false ) $group = 0;
|
||||
if( $group < gallery::$actions['dirs'] ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$filter = ['jpg', 'jpeg', 'png', 'gif', 'tiff', 'ico', 'webp'];
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_JSON,
|
||||
'content' => helper::scanDir(self::FILE_DIR.'source', $filter)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Édition
|
||||
*/
|
||||
public function edit() {
|
||||
// Autorisation
|
||||
$group = $this->getUser('group');
|
||||
if ($group === false ) $group = 0;
|
||||
if( $group < gallery::$actions['edit'] ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
// Lexique
|
||||
$param = '';
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'notification' => $text['gallery']['edit'][0]
|
||||
]);
|
||||
}
|
||||
// La galerie n'existe pas
|
||||
if($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]) === null) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// La galerie existe
|
||||
else {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Si l'id a changée
|
||||
$galleryId = !empty($this->getInput('galleryEditName')) ? $this->getInput('galleryEditName', helper::FILTER_ID, true) : $this->getUrl(2);
|
||||
if($galleryId !== $this->getUrl(2)) {
|
||||
// Incrémente le nouvel id de la galerie
|
||||
$galleryId = helper::increment($galleryId, $this->getData(['module', $this->getUrl(0), 'content']));
|
||||
// Transférer la position des images
|
||||
$oldPositions = $this->getData(['module',$this->getUrl(0), $this->getUrl(2),'positions']);
|
||||
// Supprime l'ancienne galerie
|
||||
$this->deleteData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]);
|
||||
}
|
||||
// légendes
|
||||
$legends = [];
|
||||
foreach((array) $this->getInput('legend', null) as $file => $legend) {
|
||||
// Image de couverture par défaut si non définie
|
||||
$homePicture = $file;
|
||||
$file = str_replace('.','',$file);
|
||||
$legends[$file] = helper::filter($legend, helper::FILTER_STRING_SHORT);
|
||||
|
||||
}
|
||||
// Photo de la page de garde de l'album définie dans form
|
||||
if (is_array($this->getInput('homePicture', null)) ) {
|
||||
$d = array_keys($this->getInput('homePicture', null));
|
||||
$homePicture = $d[0];
|
||||
}
|
||||
// Sauvegarder
|
||||
if ($this->getInput('galleryEditName')) {
|
||||
$this->setData(['module', $this->getUrl(0), 'content', $galleryId, [
|
||||
'config' => [
|
||||
'name' => $this->getInput('galleryEditName', helper::FILTER_STRING_SHORT, true),
|
||||
'directory' => $this->getInput('galleryEditDirectory', helper::FILTER_STRING_SHORT, true),
|
||||
'homePicture' => $homePicture,
|
||||
// pas de positions, on active le tri alpha
|
||||
'sort' => $this->getInput('galleryEditSort'),
|
||||
'position' => $this->getData(['module', $this->getUrl(0), 'content', $galleryId,'config','position']),
|
||||
'fullScreen' => $this->getInput('galleryEditFullscreen', helper::FILTER_BOOLEAN)
|
||||
|
||||
],
|
||||
'legend' => $legends,
|
||||
'positions' => empty($oldPositions) ? $this->getdata(['module', $this->getUrl(0), 'content', $galleryId, 'positions']) : $oldPositions
|
||||
]]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $galleryId . '/' . $_SESSION['csrf'] ,
|
||||
'notification' => $text['gallery']['edit'][1],
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
// Met en forme le tableau
|
||||
$directory = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']);
|
||||
if(is_dir($directory)) {
|
||||
$iterator = new DirectoryIterator($directory);
|
||||
|
||||
foreach($iterator as $fileInfos) {
|
||||
if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) {
|
||||
// Créer la miniature RFM si manquante
|
||||
if (!file_exists( str_replace('source','thumb',$fileInfos->getPath()) . '/' . strtolower($fileInfos->getFilename()))) {
|
||||
$this->makeThumb($fileInfos->getPathname(),
|
||||
str_replace('source','thumb',$fileInfos->getPath()) . '/' . strtolower($fileInfos->getFilename()),
|
||||
122);
|
||||
}
|
||||
self::$pictures[str_replace('.','',$fileInfos->getFilename())] = [
|
||||
template::ico('sort'),
|
||||
$fileInfos->getFilename(),
|
||||
template::checkbox( 'homePicture[' . $fileInfos->getFilename() . ']', true, '', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2),'config', 'homePicture']) === $fileInfos->getFilename() ? true : false,
|
||||
'class' => 'homePicture'
|
||||
]),
|
||||
template::text('legend[' . $fileInfos->getFilename() . ']', [
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'legend', str_replace('.','',$fileInfos->getFilename())])
|
||||
]),
|
||||
'<a href="' . str_replace('source','thumb',$directory) . '/' . self::THUMBS_SEPARATOR . $fileInfos->getFilename() .'" rel="data-lity" data-lity=""><img src="'. str_replace('source','thumb',$directory) . '/' . $fileInfos->getFilename() . '"></a>'
|
||||
];
|
||||
self::$picturesId [] = str_replace('.','',$fileInfos->getFilename());
|
||||
}
|
||||
}
|
||||
// Tri des images
|
||||
switch ($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort'])) {
|
||||
case self::SORT_HAND:
|
||||
$positions = $this->getdata(['module',$this->getUrl(0),'content', $this->getUrl(2),'positions']);
|
||||
if ($positions) {
|
||||
foreach ($positions as $key => $value) {
|
||||
if (array_key_exists($key,self::$pictures)) {
|
||||
$tempPictures[$key] = self::$pictures[$key];
|
||||
$tempPicturesId [] = $key;
|
||||
}
|
||||
}
|
||||
// Images ayant été ajoutées dans le dossier mais non triées
|
||||
foreach (self::$pictures as $key => $value) {
|
||||
if (!array_key_exists($key,$tempPictures)) {
|
||||
$tempPictures[$key] = self::$pictures[$key];
|
||||
$tempPicturesId [] = $key;
|
||||
}
|
||||
}
|
||||
self::$pictures = $tempPictures;
|
||||
self::$picturesId = $tempPicturesId;
|
||||
}
|
||||
break;
|
||||
case self::SORT_ASC:
|
||||
ksort(self::$pictures,SORT_NATURAL);
|
||||
sort(self::$picturesId,SORT_NATURAL);
|
||||
break;
|
||||
case self::SORT_DSC:
|
||||
krsort(self::$pictures,SORT_NATURAL);
|
||||
rsort(self::$picturesId,SORT_NATURAL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']),
|
||||
'view' => 'edit',
|
||||
'vendor' => [
|
||||
'tablednd'
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Accueil (deux affichages en un pour éviter une url à rallonge)
|
||||
*/
|
||||
public function index() {
|
||||
|
||||
// Mise à jour des données de module
|
||||
$this->update();
|
||||
|
||||
// Images d'une galerie
|
||||
if($this->getUrl(1)) {
|
||||
// La galerie n'existe pas
|
||||
if($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1)]) === null) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// La galerie existe
|
||||
else {
|
||||
// Images de la galerie
|
||||
$directory = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'config', 'directory']);
|
||||
if(is_dir($directory)) {
|
||||
$iterator = new DirectoryIterator($directory);
|
||||
foreach($iterator as $fileInfos) {
|
||||
if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) {
|
||||
self::$pictures[$directory . '/' . $fileInfos->getFilename()] = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'legend', str_replace('.','',$fileInfos->getFilename())]);
|
||||
$picturesSort[$directory . '/' . $fileInfos->getFilename()] = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'positions', str_replace('.','',$fileInfos->getFilename())]);
|
||||
// Créer la miniature si manquante
|
||||
if (!file_exists( str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) {
|
||||
$this->makeThumb($fileInfos->getPathname(),
|
||||
str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()),
|
||||
self::THUMBS_WIDTH);
|
||||
}
|
||||
// Définir la Miniature
|
||||
self::$thumbs[$directory . '/' . $fileInfos->getFilename()] = file_exists( str_replace('source','thumb',$directory) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))
|
||||
? str_replace('source','thumb',$directory) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename())
|
||||
: str_replace('source','thumb',$directory) . '/' . strtolower($fileInfos->getFilename());
|
||||
}
|
||||
}
|
||||
// Tri des images par ordre alphabétique
|
||||
switch ($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'config', 'sort'])) {
|
||||
case self::SORT_HAND:
|
||||
asort($picturesSort);
|
||||
if ($picturesSort) {
|
||||
foreach ($picturesSort as $name => $position) {
|
||||
$temp[$name] = self::$pictures[$name];
|
||||
}
|
||||
self::$pictures = $temp;
|
||||
break;
|
||||
}
|
||||
case self::SORT_DSC:
|
||||
krsort(self::$pictures,SORT_NATURAL);
|
||||
break;
|
||||
case self::SORT_ASC:
|
||||
default:
|
||||
ksort(self::$pictures,SORT_NATURAL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Affichage du template
|
||||
if(self::$pictures) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'showBarEditButton' => true,
|
||||
'title' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(1), 'config', 'name']),
|
||||
'view' => 'gallery',
|
||||
'style' => $this->getData(['module', $this->getUrl(0), 'theme', 'style'])
|
||||
]);
|
||||
}
|
||||
// Pas d'image dans la galerie
|
||||
else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// Liste des galeries
|
||||
else {
|
||||
// Tri des galeries suivant l'ordre défini
|
||||
$g = $this->getData(['module', $this->getUrl(0), 'content']);
|
||||
$p = helper::arrayCollumn(helper::arrayCollumn($g,'config'),'position');
|
||||
asort($p,SORT_NUMERIC);
|
||||
$galleries = [];
|
||||
foreach ($p as $positionId => $item) {
|
||||
$galleries [$positionId] = $g[$positionId];
|
||||
}
|
||||
// Construire le tableau
|
||||
foreach((array) $galleries as $galleryId => $gallery) {
|
||||
if(is_dir($gallery['config']['directory'])) {
|
||||
$iterator = new DirectoryIterator($gallery['config']['directory']);
|
||||
foreach($iterator as $fileInfos) {
|
||||
if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) {
|
||||
|
||||
self::$galleries[$galleryId] = $gallery;
|
||||
// L'image de couverture est-elle supprimée ?
|
||||
if (file_exists( $gallery['config']['directory'] . '/' . $gallery['config']['homePicture'])) {
|
||||
// Créer la miniature si manquante
|
||||
if (!file_exists( str_replace('source','thumb',$gallery['config']['directory']) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture']))) {
|
||||
$this->makeThumb($gallery['config']['directory'] . '/' . str_replace(self::THUMBS_SEPARATOR ,'',$gallery['config']['homePicture']),
|
||||
str_replace('source','thumb',$gallery['config']['directory']) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture']),
|
||||
self::THUMBS_WIDTH);
|
||||
}
|
||||
// Définir l'image de couverture
|
||||
self::$firstPictures[$galleryId] = file_exists( str_replace('source','thumb',$gallery['config']['directory']) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture']))
|
||||
? str_replace('source','thumb',$gallery['config']['directory']) . '/' . self::THUMBS_SEPARATOR . strtolower($gallery['config']['homePicture'])
|
||||
: str_replace('source','thumb',$gallery['config']['directory']) . '/' . strtolower($gallery['config']['homePicture']);
|
||||
} else {
|
||||
// homePicture contient une image invalide, supprimée ou déplacée
|
||||
// Définir l'image de couverture, première image disponible
|
||||
$this->makeThumb($fileInfos->getPath() . '/' . $fileInfos->getFilename(),
|
||||
str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()),
|
||||
self::THUMBS_WIDTH);
|
||||
self::$firstPictures[$galleryId] = file_exists( str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))
|
||||
? str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename())
|
||||
: str_replace('source','thumb',$fileInfos->getPath()) . '/' . strtolower($fileInfos->getFilename());
|
||||
}
|
||||
}
|
||||
continue(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'showBarEditButton' => true,
|
||||
'showPageContent' => true,
|
||||
'view' => 'index',
|
||||
'style' => $this->getData(['module', $this->getUrl(0), 'theme', 'style'])
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Thème de la galerie
|
||||
*/
|
||||
public function theme() {
|
||||
// Autorisation
|
||||
$group = $this->getUser('group');
|
||||
if ($group === false ) $group = 0;
|
||||
if( $group < gallery::$actions['theme'] ) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
// Lexique
|
||||
$param = '';
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(2) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'notification' => $text['gallery']['theme'][0]
|
||||
]);
|
||||
}
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Dossier de l'instance
|
||||
if (!is_dir(self::DATADIRECTORY . $this->getUrl(0) )) {
|
||||
mkdir (self::DATADIRECTORY . $this->getUrl(0), 0755, true);
|
||||
}
|
||||
$this->setData(['module', $this->getUrl(0), 'theme', [
|
||||
'thumbAlign' => $this->getinput('galleryThemeThumbAlign', helper::FILTER_STRING_SHORT),
|
||||
'thumbWidth' => $this->getinput('galleryThemeThumbWidth', helper::FILTER_STRING_SHORT),
|
||||
'thumbHeight' => $this->getinput('galleryThemeThumbHeight', helper::FILTER_STRING_SHORT),
|
||||
'thumbMargin' => $this->getinput('galleryThemeThumbMargin', helper::FILTER_STRING_SHORT),
|
||||
'thumbBorder' => $this->getinput('galleryThemeThumbBorder', helper::FILTER_STRING_SHORT),
|
||||
'thumbBorderColor' => $this->getinput('galleryThemeThumbBorderColor', helper::FILTER_STRING_SHORT),
|
||||
'thumbOpacity' => $this->getinput('galleryThemeThumbOpacity', helper::FILTER_STRING_SHORT),
|
||||
'thumbShadows' => $this->getinput('galleryThemeThumbShadows', helper::FILTER_STRING_SHORT),
|
||||
'thumbShadowsColor' => $this->getinput('galleryThemeThumbShadowsColor', helper::FILTER_STRING_SHORT),
|
||||
'thumbRadius' => $this->getinput('galleryThemeThumbRadius', helper::FILTER_STRING_SHORT),
|
||||
'legendHeight' => $this->getinput('galleryThemeLegendHeight', helper::FILTER_STRING_SHORT),
|
||||
'legendAlign' => $this->getinput('galleryThemeLegendAlign', helper::FILTER_STRING_SHORT),
|
||||
'legendTextColor' => $this->getinput('galleryThemeLegendTextColor', helper::FILTER_STRING_SHORT),
|
||||
'legendBgColor' => $this->getinput('galleryThemeLegendBgColor', helper::FILTER_STRING_SHORT),
|
||||
'style' => self::DATADIRECTORY . $this->getUrl(0) . '/theme.css'
|
||||
]]);
|
||||
// Création des fichiers CSS
|
||||
$content = file_get_contents('module/gallery/ressource/vartheme.css');
|
||||
$themeCss = file_get_contents('module/gallery/ressource/theme.css');
|
||||
// Injection des variables
|
||||
$content = str_replace('#thumbAlign#',$this->getinput('galleryThemeThumbAlign'),$content );
|
||||
$content = str_replace('#thumbWidth#',$this->getinput('galleryThemeThumbWidth'),$content );
|
||||
$content = str_replace('#thumbHeight#',$this->getinput('galleryThemeThumbHeight'),$content );
|
||||
$content = str_replace('#thumbMargin#',$this->getinput('galleryThemeThumbMargin'),$content );
|
||||
$content = str_replace('#thumbBorder#',$this->getinput('galleryThemeThumbBorder'),$content );
|
||||
$content = str_replace('#thumbBorderColor#',$this->getinput('galleryThemeThumbBorderColor'),$content );
|
||||
$content = str_replace('#thumbOpacity#',$this->getinput('galleryThemeThumbOpacity'),$content );
|
||||
$content = str_replace('#thumbShadows#',$this->getinput('galleryThemeThumbShadows'),$content );
|
||||
$content = str_replace('#thumbShadowsColor#',$this->getinput('galleryThemeThumbShadowsColor'),$content );
|
||||
$content = str_replace('#thumbRadius#',$this->getinput('galleryThemeThumbRadius'),$content );
|
||||
$content = str_replace('#legendAlign#',$this->getinput('galleryThemeLegendAlign'),$content );
|
||||
$content = str_replace('#legendHeight#',$this->getinput('galleryThemeLegendHeight'),$content );
|
||||
$content = str_replace('#legendTextColor#',$this->getinput('galleryThemeLegendTextColor'),$content );
|
||||
$content = str_replace('#legendBgColor#',$this->getinput('galleryThemeLegendBgColor'),$content );
|
||||
$success = file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $content . $themeCss);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl() . '/theme',
|
||||
'notification' => $success !== FALSE ? $text['gallery']['theme'][1] : $text['gallery']['theme'][2],
|
||||
'state' => $success !== FALSE
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => $text['gallery']['theme'][3],
|
||||
'view' => 'theme',
|
||||
'vendor' => [
|
||||
'tinycolorpicker'
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
<?php
|
||||
// Lexique du module Gallery en anglais
|
||||
$text['gallery_view']['config'][0] = 'Back';
|
||||
$text['gallery_view']['config'][1] = 'Theme';
|
||||
$text['gallery_view']['config'][2] = 'Add a gallery';
|
||||
$text['gallery_view']['config'][3] = 'Name';
|
||||
$text['gallery_view']['config'][4] = 'Target folder';
|
||||
$text['gallery_view']['config'][5] = 'Installed galleries';
|
||||
$text['gallery_view']['config'][6] = 'Target folder';
|
||||
$text['gallery_view']['config'][7] = 'No galleries';
|
||||
$text['gallery_view']['config'][8] = 'Version no.';
|
||||
$text['gallery_view']['config'][9] = "Are you sure you want to delete this gallery ?";
|
||||
$text['gallery_view']['config'][10] = 'Help';
|
||||
$text['gallery_view']['config'][11] = 'module/gallery/view/config/config.help_en.html';
|
||||
$text['gallery_view']['edit'][0] = 'Back';
|
||||
$text['gallery_view']['edit'][1] = 'Save';
|
||||
$text['gallery_view']['edit'][2] = 'Image setting';
|
||||
$text['gallery_view']['edit'][3] = 'Name';
|
||||
$text['gallery_view']['edit'][4] = 'Target folder';
|
||||
$text['gallery_view']['edit'][5] = 'Sort images';
|
||||
$text['gallery_view']['edit'][6] = 'Manual sort: move the images into the table below. The order is saved automatically';
|
||||
$text['gallery_view']['edit'][7] = 'Automatic full screen mode';
|
||||
$text['gallery_view']['edit'][8] = 'When the gallery is opened, the first image is displayed full screen';
|
||||
$text['gallery_view']['edit'][9] = 'Image';
|
||||
$text['gallery_view']['edit'][10] = 'Cover';
|
||||
$text['gallery_view']['edit'][11] = 'Caption';
|
||||
$text['gallery_view']['edit'][12] = 'No image';
|
||||
$text['gallery_view']['edit'][13] = 'Version No.';
|
||||
$text['gallery_view']['gallery'][0] = 'Back';
|
||||
$text['gallery_view']['index'][0] = 'No gallery.';
|
||||
$text['gallery_view']['theme'][0] = 'Back';
|
||||
$text['gallery_view']['theme'][1] = 'Save';
|
||||
$text['gallery_view']['theme'][2] = 'Thumbnails';
|
||||
$text['gallery_view']['theme'][3] = 'Theme settings are common to modules of the same type';
|
||||
$text['gallery_view']['theme'][4] = 'Width';
|
||||
$text['gallery_view']['theme'][5] = 'Height';
|
||||
$text['gallery_view']['theme'][6] = 'Alignment';
|
||||
$text['gallery_view']['theme'][7] = 'Margin';
|
||||
$text['gallery_view']['theme'][8] = 'Border';
|
||||
$text['gallery_view']['theme'][9] = 'Horizontal cursor sets transparency level';
|
||||
$text['gallery_view']['theme'][10] = 'Border color';
|
||||
$text['gallery_view']['theme'][11] = 'Rounding of corners';
|
||||
$text['gallery_view']['theme'][12] = 'Shadow';
|
||||
$text['gallery_view']['theme'][14] = 'Shadow colour';
|
||||
$text['gallery_view']['theme'][15] = 'Hover opacity';
|
||||
$text['gallery_view']['theme'][17] = 'Legends';
|
||||
$text['gallery_view']['theme'][19] = 'Text';
|
||||
$text['gallery_view']['theme'][21] = 'Background';
|
||||
$text['gallery_view']['theme'][22] = 'Height';
|
||||
$text['gallery_view']['theme'][23] = 'Alignment';
|
||||
$text['gallery_view']['theme'][24] = 'Version No.';
|
||||
$text['gallery']['config'][0] = ' (empty folder)';
|
||||
$text['gallery']['config'][1] = ' (folder not found)';
|
||||
$text['gallery']['config'][2] = 'Saved changes';
|
||||
$text['gallery']['config'][3] = 'Module configuration';
|
||||
$text['gallery']['delete'][0] = 'Unauthorized deletion';
|
||||
$text['gallery']['delete'][1] = 'Gallery deleted';
|
||||
$text['gallery']['edit'][0] = 'Unauthorised action';
|
||||
$text['gallery']['edit'][1] = 'Changes saved';
|
||||
$text['gallery']['theme'][0] = 'Unauthorised action';
|
||||
$text['gallery']['theme'][1] = 'Changes saved';
|
||||
$text['gallery']['theme'][2] = 'Changes not saved !';
|
||||
$text['gallery']['theme'][3] = 'Theme settings';
|
||||
|
||||
//Selects
|
||||
if($param === "gallery_view"){
|
||||
$sort = [
|
||||
$module::SORT_ASC => 'Alphabetical',
|
||||
$module::SORT_DSC => 'Reverse Alphabetic',
|
||||
$module::SORT_HAND => 'Manual'
|
||||
];
|
||||
$galleryThemeFlexAlign = [
|
||||
'flex-start' => 'Left',
|
||||
'center' => 'Center',
|
||||
'flex-end' => 'Right',
|
||||
'space-around' => 'Distributed with margins',
|
||||
'space-between' => 'Distributed without margins',
|
||||
];
|
||||
$galleryThemeAlign = [
|
||||
'left' => 'Left',
|
||||
'center' => 'Center',
|
||||
'right' => 'Right'
|
||||
];
|
||||
$galleryThemeSizeWidth = [
|
||||
'9em' => 'Very small',
|
||||
'12em' => 'Small',
|
||||
'15em' => 'Medium',
|
||||
'18em' => 'Large',
|
||||
'21em' => 'Very large',
|
||||
'100%' => 'Proportional'
|
||||
];
|
||||
$galleryThemeSizeHeight = [
|
||||
'9em' => 'Very small',
|
||||
'12em' => 'Small',
|
||||
'15em' => 'Medium',
|
||||
'18em' => 'Large',
|
||||
'21em' => 'Very large'
|
||||
];
|
||||
$galleryThemeLegendHeight = [
|
||||
'.125em' => 'Very small',
|
||||
'.25em' => 'Small',
|
||||
'.375em' => 'Medium',
|
||||
'.5em' => 'Large',
|
||||
'.625em' => 'Very large'
|
||||
];
|
||||
$galleryThemeBorder = [
|
||||
'0em' => 'None',
|
||||
'.1em' => 'Very thin',
|
||||
'.3em' => 'Thin',
|
||||
'.5em' => 'Medium',
|
||||
'.7em' => 'Thick',
|
||||
'.9em' => 'Very thick'
|
||||
];
|
||||
$galleryThemeOpacity = [
|
||||
'1' => 'None ',
|
||||
'.9' => 'Very Discreet',
|
||||
'.8' => 'Discreet',
|
||||
'.7' => 'Medium',
|
||||
'.6' => 'High',
|
||||
'.5' => 'Very high'
|
||||
];
|
||||
$galleryThemeMargin = [
|
||||
'0em' => 'None',
|
||||
'.1em' => 'Very small',
|
||||
'.3em' => 'Small',
|
||||
'.5em' => 'Medium',
|
||||
'.7em' => 'Large',
|
||||
'.9em' => 'Très grande'
|
||||
];
|
||||
$galleryThemeRadius = [
|
||||
'0em' => 'None',
|
||||
'.3em' => 'Very light',
|
||||
'.6em' => 'Light',
|
||||
'.9em' => 'Medium',
|
||||
'1.2em' => 'Important',
|
||||
'1.5em' => 'Very important'
|
||||
];
|
||||
$galleryThemeShadows = [
|
||||
'0px' => 'None',
|
||||
'1px 1px 5px' => 'Very light',
|
||||
'1px 1px 10px' => 'Light',
|
||||
'1px 1px 15px' => 'Medium',
|
||||
'1px 1px 25px' => 'Important',
|
||||
'1px 1px 50px' => 'Very important'
|
||||
];
|
||||
}
|
||||
?>
|
|
@ -1,146 +0,0 @@
|
|||
<?php
|
||||
// Lexique du module Gallery en espagnol
|
||||
$text['gallery_view']['config'][0] = 'Atrás';
|
||||
$text['gallery_view']['config'][1] = 'Tema';
|
||||
$text['gallery_view']['config'][2] = 'Agregar galería';
|
||||
$text['gallery_view']['config'][3] = 'Nombre';
|
||||
$text['gallery_view']['config'][4] = 'Carpeta de destino';
|
||||
$text['gallery_view']['config'][5] = 'Galerías instaladas';
|
||||
$text['gallery_view']['config'][6] = 'Carpeta de destino';
|
||||
$text['gallery_view']['config'][7] = 'Sin galería';
|
||||
$text['gallery_view']['config'][8] = 'Número de versión';
|
||||
$text['gallery_view']['config'][9] = "¿Está seguro de que desea eliminar esta galería?";
|
||||
$text['gallery_view']['config'][10] = 'Ayuda';
|
||||
$text['gallery_view']['config'][11] = 'module/gallery/view/config/config.help_en.html';
|
||||
$text['gallery_view']['edit'][0] = 'Volver';
|
||||
$text['gallery_view']['edit'][1] = 'Guardar';
|
||||
$text['gallery_view']['edit'][2] = 'Configuración de imagen';
|
||||
$text['gallery_view']['edit'][3] = 'Nombre';
|
||||
$text['gallery_view']['edit'][4] = 'Carpeta de destino';
|
||||
$text['gallery_view']['edit'][5] = 'Ordenación de imágenes';
|
||||
$text['gallery_view']['edit'][6] = 'Ordenación manual: mueva las imágenes en la tabla de abajo. El pedido se guarda automáticamente.';
|
||||
$text['gallery_view']['edit'][7] = 'Modo automático de pantalla completa';
|
||||
$text['gallery_view']['edit'][8] = 'Al abrir la galería, la primera imagen se muestra en pantalla completa.';
|
||||
$text['gallery_view']['edit'][9] = 'Imagen';
|
||||
$text['gallery_view']['edit'][10] = 'Portada';
|
||||
$text['gallery_view']['edit'][11] = 'Título';
|
||||
$text['gallery_view']['edit'][12] = 'Sin imagen.';
|
||||
$text['gallery_view']['edit'][13] = 'Número de versión';
|
||||
$text['gallery_view']['gallery'][0] = 'Atrás';
|
||||
$text['gallery_view']['index'][0] = 'Sin galería.';
|
||||
$text['gallery_view']['theme'][0] = 'Atrás';
|
||||
$text['gallery_view']['theme'][1] = 'Guardar';
|
||||
$text['gallery_view']['theme'][2] = 'Miniaturas';
|
||||
$text['gallery_view']['theme'][3] = 'La configuración del tema es común a los módulos del mismo tipo.';
|
||||
$text['gallery_view']['theme'][4] = 'Ancho';
|
||||
$text['gallery_view']['theme'][5] = 'Altura';
|
||||
$text['gallery_view']['theme'][6] = 'Alineación';
|
||||
$text['gallery_view']['theme'][7] = 'Margen';
|
||||
$text['gallery_view']['theme'][8] = 'Borde';
|
||||
$text['gallery_view']['theme'][9] = 'El control deslizante horizontal ajusta el nivel de transparencia.';
|
||||
$text['gallery_view']['theme'][10] = 'Color del borde';
|
||||
$text['gallery_view']['theme'][11] = 'Esquinas redondeadas';
|
||||
$text['gallery_view']['theme'][12] = 'Sombra';
|
||||
$text['gallery_view']['theme'][14] = 'Color de sombra';
|
||||
$text['gallery_view']['theme'][15] = 'Opacidad de desplazamiento';
|
||||
$text['gallery_view']['theme'][17] = 'Subtítulos';
|
||||
$text['gallery_view']['theme'][19] = 'Texto';
|
||||
$text['gallery_view']['theme'][21] = 'Fondo';
|
||||
$text['gallery_view']['theme'][22] = 'Altura';
|
||||
$text['gallery_view']['theme'][23] = 'Alineación';
|
||||
$text['gallery_view']['theme'][24] = 'Número de versión';
|
||||
$text['gallery']['config'][0] = '(carpeta vacía)';
|
||||
$text['gallery']['config'][1] = '(carpeta no encontrada)';
|
||||
$text['gallery']['config'][2] = 'Cambios guardados';
|
||||
$text['gallery']['config'][3] = 'Configuración del módulo';
|
||||
$text['gallery']['delete'][0] = 'Borrar no permitido';
|
||||
$text['gallery']['delete'][1] = 'Galería eliminada';
|
||||
$text['gallery']['edit'][0] = 'Acción no permitida';
|
||||
$text['gallery']['edit'][1] = 'Ediciones guardadas';
|
||||
$text['gallery']['theme'][0] = 'Acción no permitida';
|
||||
$text['gallery']['theme'][1] = 'Cambios guardados';
|
||||
$text['gallery']['theme'][2] = '¡Cambios no guardados!';
|
||||
$text['gallery']['theme'][3] = 'Tema';
|
||||
//Selects
|
||||
if($param === "gallery_view"){
|
||||
$sort = [
|
||||
$module::SORT_ASC => 'Alfabético',
|
||||
$module::SORT_DSC => 'Alfabético inverso',
|
||||
$module::SORT_HAND => 'Manual'
|
||||
];
|
||||
$galleryThemeFlexAlign = [
|
||||
'flex-start' => 'Izquierda',
|
||||
'center' => 'Centro',
|
||||
'flex-end' => 'Derecha',
|
||||
'space-around' => 'Distribuido con márgenes',
|
||||
'space-between' => 'Distribuido sin margen',
|
||||
];
|
||||
$galleryThemeAlign = [
|
||||
'left' => 'Izquierda',
|
||||
'center' => 'Centro',
|
||||
'right' => 'Derecha'
|
||||
];
|
||||
$galleryThemeSizeWidth = [
|
||||
'9em' => 'Muy pequeño',
|
||||
'12' => 'Pequeño',
|
||||
'15em' => 'Promedio',
|
||||
'18em' => 'Grande',
|
||||
'21' => 'Muy grande',
|
||||
'100%' => 'Proporcional'
|
||||
];
|
||||
$galleryThemeSizeHeight = [
|
||||
'9em' => 'Muy pequeño',
|
||||
'12' => 'Pequeño',
|
||||
'15em' => 'Promedio',
|
||||
'18em' => 'Grande',
|
||||
'21' => 'Muy grande'
|
||||
];
|
||||
$galleryThemeLegendHeight = [
|
||||
'.125em' => 'Muy pequeño',
|
||||
'.25em' => 'Pequeño',
|
||||
'.375em' => 'Promedio',
|
||||
'.5em' => 'Grande',
|
||||
'.625em' => 'Muy grande'
|
||||
];
|
||||
$galleryThemeBorder = [
|
||||
'0em' => 'Ninguno',
|
||||
'.1em' => 'Muy bien',
|
||||
'.3em' => 'Bien',
|
||||
'.5em' => 'Promedio',
|
||||
'.7em' => 'Grueso',
|
||||
'.9em' => 'Muy grueso'
|
||||
];
|
||||
$galleryThemeOpacity = [
|
||||
'1' => 'Ninguno',
|
||||
'.9' => 'Muy discreto',
|
||||
'.8' => 'Discreto',
|
||||
'.7' => 'Promedio',
|
||||
'.6' => 'Fuerte',
|
||||
'.5' => 'Muy fuerte'
|
||||
];
|
||||
$galleryThemeMargin = [
|
||||
'0em' => 'Ninguno',
|
||||
'.1em' => 'Muy pequeño',
|
||||
'.3em' => 'Pequeño',
|
||||
'.5em' => 'Promedio',
|
||||
'.7em' => 'Grande',
|
||||
'.9em' => 'Muy grande'
|
||||
];
|
||||
$galleryThemeRadius = [
|
||||
'0em' => 'Ninguno',
|
||||
'.3em' => 'Muy ligero',
|
||||
'.6em' => 'Luz',
|
||||
'.9em' => 'Medio',
|
||||
'1.2em' => 'Importante',
|
||||
'1.5em' => 'Muy importante'
|
||||
];
|
||||
$galleryThemeShadows = [
|
||||
'0px' => 'Ninguno',
|
||||
'1px 1px 5px' => 'Muy ligero',
|
||||
'1px 1px 10px' => 'Luz',
|
||||
'1px 1px 15px' => 'Promedio',
|
||||
'1px 1px 25px' => 'Importante',
|
||||
'1px 1px 50px' => 'Muy importante'
|
||||
];
|
||||
}
|
||||
?>
|
|
@ -1,146 +0,0 @@
|
|||
<?php
|
||||
// Lexique du module Gallery en français
|
||||
$text['gallery_view']['config'][0] = 'Retour';
|
||||
$text['gallery_view']['config'][1] = 'Thème';
|
||||
$text['gallery_view']['config'][2] = 'Ajouter une galerie';
|
||||
$text['gallery_view']['config'][3] = 'Nom';
|
||||
$text['gallery_view']['config'][4] = 'Dossier cible';
|
||||
$text['gallery_view']['config'][5] = 'Galeries installées';
|
||||
$text['gallery_view']['config'][6] = 'Dossier cible';
|
||||
$text['gallery_view']['config'][7] = 'Aucune galerie.';
|
||||
$text['gallery_view']['config'][8] = 'Version n°';
|
||||
$text['gallery_view']['config'][9] = "Êtes-vous sûr de vouloir supprimer cette galerie ?";
|
||||
$text['gallery_view']['config'][10] = 'Aide';
|
||||
$text['gallery_view']['config'][11] = 'module/gallery/view/config/config.help.html';
|
||||
$text['gallery_view']['edit'][0] = 'Retour';
|
||||
$text['gallery_view']['edit'][1] = 'Enregistrer';
|
||||
$text['gallery_view']['edit'][2] = 'Paramètre des images';
|
||||
$text['gallery_view']['edit'][3] = 'Nom';
|
||||
$text['gallery_view']['edit'][4] = 'Dossier cible';
|
||||
$text['gallery_view']['edit'][5] = 'Tri des images';
|
||||
$text['gallery_view']['edit'][6] = 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.';
|
||||
$text['gallery_view']['edit'][7] = 'Mode plein écran automatique';
|
||||
$text['gallery_view']['edit'][8] = 'A l\'ouverture de la galerie, la première image est affichée en plein écran.';
|
||||
$text['gallery_view']['edit'][9] = 'Image';
|
||||
$text['gallery_view']['edit'][10] = 'Couverture';
|
||||
$text['gallery_view']['edit'][11] = 'Légende';
|
||||
$text['gallery_view']['edit'][12] = 'Aucune image.';
|
||||
$text['gallery_view']['edit'][13] = 'Version n°';
|
||||
$text['gallery_view']['gallery'][0] = 'Retour';
|
||||
$text['gallery_view']['index'][0] = 'Aucune galerie.';
|
||||
$text['gallery_view']['theme'][0] = 'Retour';
|
||||
$text['gallery_view']['theme'][1] = 'Enregistrer';
|
||||
$text['gallery_view']['theme'][2] = 'Vignettes';
|
||||
$text['gallery_view']['theme'][3] = 'Les paramètres du thème sont communs aux modules du même type.';
|
||||
$text['gallery_view']['theme'][4] = 'Largeur';
|
||||
$text['gallery_view']['theme'][5] = 'Hauteur';
|
||||
$text['gallery_view']['theme'][6] = 'Alignement';
|
||||
$text['gallery_view']['theme'][7] = 'Marge';
|
||||
$text['gallery_view']['theme'][8] = 'Bordure';
|
||||
$text['gallery_view']['theme'][9] = 'Le curseur horizontal règle le niveau de transparence.';
|
||||
$text['gallery_view']['theme'][10] = 'Couleur de la bordure';
|
||||
$text['gallery_view']['theme'][11] = 'Arrondi des angles';
|
||||
$text['gallery_view']['theme'][12] = 'Ombre';
|
||||
$text['gallery_view']['theme'][14] = 'Couleur de l\'ombre';
|
||||
$text['gallery_view']['theme'][15] = 'Opacité au survol';
|
||||
$text['gallery_view']['theme'][17] = 'Légendes';
|
||||
$text['gallery_view']['theme'][19] = 'Texte';
|
||||
$text['gallery_view']['theme'][21] = 'Arrière-plan';
|
||||
$text['gallery_view']['theme'][22] = 'Hauteur';
|
||||
$text['gallery_view']['theme'][23] = 'Alignement';
|
||||
$text['gallery_view']['theme'][24] = 'Version n°';
|
||||
$text['gallery']['config'][0] = ' (dossier vide)';
|
||||
$text['gallery']['config'][1] = ' (dossier introuvable)';
|
||||
$text['gallery']['config'][2] = 'Modifications enregistrées';
|
||||
$text['gallery']['config'][3] = 'Configuration du module';
|
||||
$text['gallery']['delete'][0] = 'Suppression non autorisée';
|
||||
$text['gallery']['delete'][1] = 'Galerie supprimée';
|
||||
$text['gallery']['edit'][0] = 'Action non autorisée';
|
||||
$text['gallery']['edit'][1] = 'Modifications enregistrées';
|
||||
$text['gallery']['theme'][0] = 'Action non autorisée';
|
||||
$text['gallery']['theme'][1] = 'Modifications enregistrées';
|
||||
$text['gallery']['theme'][2] = 'Modifications non enregistrées !';
|
||||
$text['gallery']['theme'][3] = 'Thème';
|
||||
//Selects
|
||||
if($param === "gallery_view"){
|
||||
$sort = [
|
||||
$module::SORT_ASC => 'Alphabétique ',
|
||||
$module::SORT_DSC => 'Alphabétique inverse',
|
||||
$module::SORT_HAND => 'Manuel'
|
||||
];
|
||||
$galleryThemeFlexAlign = [
|
||||
'flex-start' => 'À gauche',
|
||||
'center' => 'Au centre',
|
||||
'flex-end' => 'À droite',
|
||||
'space-around' => 'Distribué avec marges',
|
||||
'space-between' => 'Distribué sans marge',
|
||||
];
|
||||
$galleryThemeAlign = [
|
||||
'left' => 'À gauche',
|
||||
'center' => 'Au centre',
|
||||
'right' => 'À droite'
|
||||
];
|
||||
$galleryThemeSizeWidth = [
|
||||
'9em' => 'Très petite',
|
||||
'12em' => 'Petite',
|
||||
'15em' => 'Moyenne',
|
||||
'18em' => 'Grande',
|
||||
'21em' => 'Très grande',
|
||||
'100%' => 'Proportionnelle'
|
||||
];
|
||||
$galleryThemeSizeHeight = [
|
||||
'9em' => 'Très petite',
|
||||
'12em' => 'Petite',
|
||||
'15em' => 'Moyenne',
|
||||
'18em' => 'Grande',
|
||||
'21em' => 'Très grande'
|
||||
];
|
||||
$galleryThemeLegendHeight = [
|
||||
'.125em' => 'Très petite',
|
||||
'.25em' => 'Petite',
|
||||
'.375em' => 'Moyenne',
|
||||
'.5em' => 'Grande',
|
||||
'.625em' => 'Très grande'
|
||||
];
|
||||
$galleryThemeBorder = [
|
||||
'0em' => 'Aucune',
|
||||
'.1em' => 'Très fine',
|
||||
'.3em' => 'Fine',
|
||||
'.5em' => 'Moyenne',
|
||||
'.7em' => 'Epaisse',
|
||||
'.9em' => 'Très épaisse'
|
||||
];
|
||||
$galleryThemeOpacity = [
|
||||
'1' => 'Aucun ',
|
||||
'.9' => 'Très Discrète',
|
||||
'.8' => 'Discrète',
|
||||
'.7' => 'Moyenne',
|
||||
'.6' => 'Forte',
|
||||
'.5' => 'Très forte'
|
||||
];
|
||||
$galleryThemeMargin = [
|
||||
'0em' => 'Aucune',
|
||||
'.1em' => 'Très petite',
|
||||
'.3em' => 'Petite',
|
||||
'.5em' => 'Moyenne',
|
||||
'.7em' => 'Grande',
|
||||
'.9em' => 'Très grande'
|
||||
];
|
||||
$galleryThemeRadius = [
|
||||
'0em' => 'Aucun',
|
||||
'.3em' => 'Très léger',
|
||||
'.6em' => 'Léger',
|
||||
'.9em' => 'Moyen',
|
||||
'1.2em' => 'Important',
|
||||
'1.5em' => 'Très important'
|
||||
];
|
||||
$galleryThemeShadows = [
|
||||
'0px' => 'Aucune',
|
||||
'1px 1px 5px' => 'Très légère',
|
||||
'1px 1px 10px' => 'Légère',
|
||||
'1px 1px 15px' => 'Moyenne',
|
||||
'1px 1px 25px' => 'Importante',
|
||||
'1px 1px 50px' => 'Très importante'
|
||||
];
|
||||
}
|
||||
?>
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
class theme extends gallery {
|
||||
public static $defaultTheme = [
|
||||
'thumbAlign' => 'center',
|
||||
'thumbWidth' => '18em',
|
||||
'thumbHeight' => '15em',
|
||||
'thumbMargin' => '.5em',
|
||||
'thumbBorder' => '.1em',
|
||||
'thumbOpacity' => '.7',
|
||||
'thumbBorderColor' => 'rgba(221, 221, 221, 1)',
|
||||
'thumbRadius' => '.3em',
|
||||
'thumbShadows' => '1px 1px 10px',
|
||||
'thumbShadowsColor'=> 'rgba(125, 125, 125, 1)',
|
||||
'legendHeight' => '.375em',
|
||||
'legendAlign' => 'center',
|
||||
'legendTextColor' => 'rgba(255, 255, 255, 1)',
|
||||
'legendBgColor' => 'rgba(0, 0, 0, .6)'
|
||||
];
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
.galleryPicture,
|
||||
.galleryGalleryPicture {
|
||||
display: block;
|
||||
border: var(--thumbBorder) solid var(--thumbBorderColor);
|
||||
height: var(--thumbHeight);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
position: relative;
|
||||
-webkit-transition: opacity .3s ease-out;
|
||||
transition: opacity .3s ease-out;
|
||||
border-radius: var(--thumbRadius);
|
||||
box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
|
||||
-webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
|
||||
-moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
|
||||
}
|
||||
.galleryPicture:hover,
|
||||
.galleryGalleryPicture:hover {
|
||||
opacity: var(--thumbOpacity);
|
||||
}
|
||||
.galleryName,
|
||||
.galleryGalleryName {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2);
|
||||
padding: var(--legendHeight);
|
||||
background: var(--legendBgColor);
|
||||
color: var(--legendTextColor);
|
||||
text-align: var(--legendAlign);
|
||||
}
|
||||
|
||||
.galleryRow {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: var(--thumbAlign);
|
||||
}
|
||||
|
||||
.colPicture {
|
||||
width : var(--thumbWidth);
|
||||
max-width: 50%;
|
||||
padding: var(--thumbMargin);
|
||||
}
|
||||
|
||||
@media (max-width: 432px) {
|
||||
.colPicture {
|
||||
width: 90%;
|
||||
max-width: 90%;
|
||||
margin: 0.5em;
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
.galleryRow {
|
||||
--thumbAlign: #thumbAlign#;
|
||||
}
|
||||
.colPicture {
|
||||
--thumbWidth: #thumbWidth#;
|
||||
--thumbMargin: #thumbMargin#;
|
||||
}
|
||||
.galleryPicture,
|
||||
.galleryGalleryPicture {
|
||||
--thumbHeight: #thumbHeight#;
|
||||
--thumbBorder: #thumbBorder#;
|
||||
--thumbBorderColor: #thumbBorderColor#;
|
||||
--thumbRadius: #thumbRadius#;
|
||||
--thumbShadows: #thumbShadows#;
|
||||
--thumbShadowsColor: #thumbShadowsColor#;
|
||||
}
|
||||
.galleryName,
|
||||
.galleryGalleryName {
|
||||
--legendHeight: #legendHeight#;
|
||||
--legendAlign: #legendAlign#;
|
||||
--legendTextColor: #legendTextColor#;
|
||||
--legendBgColor: #legendBgColor#;
|
||||
}
|
||||
.galleryPicture:hover,
|
||||
.galleryGalleryPicture:hover {
|
||||
--thumbOpacity: #thumbOpacity#;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
[
|
||||
"tablednd.min.js"
|
||||
]
|
|
@ -1 +0,0 @@
|
|||
https://github.com/isocra/TableDnD
|
File diff suppressed because one or more lines are too long
|
@ -1,14 +0,0 @@
|
|||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
.galleryConfigError {
|
||||
color: #F3674A;
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
<h2>GALERIE</h2>
|
||||
<video width="600" height="440" style="display: block; margin-left: auto; margin-right: auto;" controls="controls"><source src="https://deltacms.fr/site/file/source/video/galerie_FR.mp4" type="video/mp4" /></video>
|
|
@ -1,2 +0,0 @@
|
|||
<h2>GALERIE / GALLERY</h2>
|
||||
<video width="600" height="440" style="display: block; margin-left: auto; margin-right: auto;" controls="controls"><source src="https://deltacms.fr/site/file/source/video/galerie_EN.mp4" type="video/mp4" /></video>
|
|
@ -1,96 +0,0 @@
|
|||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
*/
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
/**
|
||||
* Tri de la galerie avec drag and drop
|
||||
*/
|
||||
$("#galleryTable").tableDnD({
|
||||
onDrop: function(table, row) {
|
||||
$("#galleryConfigFilterResponse").val($.tableDnD.serialize());
|
||||
},
|
||||
onDragStop : function(table, row) {
|
||||
// Affiche le bouton de tri après un déplacement
|
||||
//$(":input[type='submit']").prop('disabled', false);
|
||||
// Sauvegarde le tri
|
||||
sortGalleries();
|
||||
},
|
||||
// Supprime le tiret des séparateurs
|
||||
serializeRegexp: ""
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Confirmation de suppression
|
||||
*/
|
||||
$(".galleryConfigDelete").on("click", function() {
|
||||
var _this = $(this);
|
||||
return core.confirm(textConfirm, function() {
|
||||
$(location).attr("href", _this.attr("href"));
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Liste des dossiers
|
||||
*/
|
||||
var oldResult = [];
|
||||
var directoryDOM = $("#galleryConfigDirectory");
|
||||
var directoryOldDOM = $("#galleryConfigDirectoryOld");
|
||||
function dirs() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/dirs",
|
||||
success: function(result) {
|
||||
if($(result).not(oldResult).length !== 0 || $(oldResult).not(result).length !== 0) {
|
||||
directoryDOM.empty();
|
||||
for(var i = 0; i < result.length; i++) {
|
||||
directoryDOM.append(function(i) {
|
||||
var textshort = result[i];
|
||||
textshort = textshort.replace("site/file/source/","");
|
||||
var option = $("<option>").val(result[i]).text(textshort);
|
||||
if(directoryOldDOM.val() === result[i]) {
|
||||
option.prop("selected", true);
|
||||
}
|
||||
return option;
|
||||
}(i))
|
||||
}
|
||||
oldResult = result;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
dirs();
|
||||
// Actualise la liste des dossiers toutes les trois secondes
|
||||
setInterval(function() {
|
||||
dirs();
|
||||
}, 3000);
|
||||
|
||||
/**
|
||||
* Stock le dossier choisi pour le re-sélectionner en cas d'actualisation ajax de la liste des dossiers
|
||||
*/
|
||||
directoryDOM.on("change", function() {
|
||||
directoryOldDOM.val($(this).val());
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Tri dynamique des galeries
|
||||
*/
|
||||
|
||||
function sortGalleries() {
|
||||
var url = "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/sortGalleries";
|
||||
var data = $("#galleryConfigFilterResponse").val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {
|
||||
response : data
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
<?php
|
||||
// Lexique
|
||||
$param = '';
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
echo template::formOpen('galleryConfigForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryConfigBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
|
||||
'ico' => 'left',
|
||||
'value' => $text['gallery_view']['config'][0]
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryIndexHelp', [
|
||||
'class' => 'buttonHelp',
|
||||
'ico' => 'help',
|
||||
'value' => $text['gallery_view']['config'][10]
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset6 <?php if($this->getUser('group') < self::GROUP_MODERATOR) echo 'displayNone'; ?> ">
|
||||
<?php echo template::button('galleryConfigBack', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/theme/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('brush','right') . $text['gallery_view']['config'][1],
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Aide à propos de la configuration de gallery, view config -->
|
||||
<div class="helpDisplayContent">
|
||||
<?php echo file_get_contents( $text['gallery_view']['config'][11]) ;?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<div class="blockTitle"><?php echo $text['gallery_view']['config'][2]; ?></div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('galleryConfigName', [
|
||||
'label' => $text['gallery_view']['config'][3]
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::hidden('galleryConfigDirectoryOld', [
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
<?php echo template::select('galleryConfigDirectory', [], [
|
||||
'label' => $text['gallery_view']['config'][4],
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 verticalAlignBottom">
|
||||
<?php echo template::submit('galleryConfigSubmit', [
|
||||
'ico' => '',
|
||||
'value' => template::ico('plus'),
|
||||
'class' => 'gallerySubmit'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<div class="blockTitle"><?php echo $text['gallery_view']['config'][5]; ?></div>
|
||||
<?php if($module::$galleries): ?>
|
||||
<?php echo template::table([1, 4, 5, 1, 1], $module::$galleries, ['',$text['gallery_view']['config'][3], $text['gallery_view']['config'][6], '', ''], ['id' => 'galleryTable'],$module::$galleriesId); ?>
|
||||
<?php echo template::hidden('galleryConfigFilterResponse'); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech($text['gallery_view']['config'][7]); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="moduleVersion">
|
||||
<?php echo $text['gallery_view']['config'][8]; echo $module::VERSION; ?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var textConfirm = <?php echo '"'.$text['gallery_view']['config'][9].'"'; ?>;
|
||||
</script>
|
|
@ -1,8 +0,0 @@
|
|||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
*/
|
||||
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
|
@ -1,107 +0,0 @@
|
|||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Liste des dossiers
|
||||
*/
|
||||
var oldResult = [];
|
||||
var directoryDOM = $("#galleryEditDirectory");
|
||||
var directoryOldDOM = $("#galleryEditDirectoryOld");
|
||||
function dirs() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/dirs",
|
||||
success: function(result) {
|
||||
if($(result).not(oldResult).length !== 0 || $(oldResult).not(result).length !== 0) {
|
||||
directoryDOM.empty();
|
||||
for(var i = 0; i < result.length; i++) {
|
||||
directoryDOM.append(function(i) {
|
||||
var textshort = result[i];
|
||||
textshort = textshort.replace("site/file/source/","");
|
||||
var option = $("<option>").val(result[i]).text(textshort);
|
||||
if(directoryOldDOM.val() === result[i]) {
|
||||
option.prop("selected", true);
|
||||
}
|
||||
return option;
|
||||
}(i))
|
||||
}
|
||||
oldResult = result;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
dirs();
|
||||
// Actualise la liste des dossiers toutes les trois secondes
|
||||
setInterval(function() {
|
||||
dirs();
|
||||
}, 3000);
|
||||
|
||||
/**
|
||||
* Stock le dossier choisi pour le re-sélectionner en cas d'actualisation ajax de la liste des dossiers
|
||||
*/
|
||||
directoryDOM.on("change", function() {
|
||||
directoryOldDOM.val($(this).val());
|
||||
});
|
||||
|
||||
$('.homePicture').click(function(){
|
||||
$('.homePicture').prop('checked', false);
|
||||
$(this).prop('checked', true);
|
||||
});
|
||||
|
||||
/**
|
||||
* Tri dynamique de la galerie
|
||||
*/
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
$("#galleryTable").tableDnD({
|
||||
onDrop: function(table, row) {
|
||||
$("#galleryEditFormResponse").val($.tableDnD.serialize());
|
||||
sortPictures();
|
||||
},
|
||||
serializeRegexp: ""
|
||||
});
|
||||
|
||||
if ($("#galleryEditSort").val() !== "SORT_HAND") {
|
||||
$("#galleryTable tr").addClass("nodrag nodrop");
|
||||
$(".zwiico-sort").hide();
|
||||
$("#galleryTable").tableDnDUpdate();
|
||||
} else {
|
||||
$("#galleryTable tr").removeClass("nodrag nodrop");
|
||||
$(".zwiico-sort").show();
|
||||
$("#galleryTable").tableDnDUpdate();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#galleryEditSort").change(function() {
|
||||
if ($("#galleryEditSort").val() !== "SORT_HAND") {
|
||||
$("#galleryTable tr").addClass("nodrag nodrop");
|
||||
$(".zwiico-sort").hide();
|
||||
$("#galleryTable").tableDnDUpdate();
|
||||
} else {
|
||||
$("#galleryTable tr").removeClass("nodrag nodrop");
|
||||
$(".zwiico-sort").show();
|
||||
$("#galleryTable").tableDnDUpdate();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Tri dynamique des images
|
||||
*/
|
||||
|
||||
function sortPictures() {
|
||||
var url = "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/sortPictures";
|
||||
var d1 = $("#galleryEditFormResponse").val();
|
||||
var d2 = $("#galleryEditFormGalleryName").val();
|
||||
//var data = $('#galleryEditForm').serialize();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {
|
||||
response : d1,
|
||||
gallery: d2
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
<?php
|
||||
// Lexique
|
||||
$param = "gallery_view";
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
echo template::formOpen('galleryEditForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryEditBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'ico' => 'left',
|
||||
'value' => $text['gallery_view']['edit'][0]
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('galleryEditSubmit',[
|
||||
'value' => $text['gallery_view']['edit'][1]
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<div class="blockTitle"><?php echo $text['gallery_view']['edit'][2]; ?></div>
|
||||
<div class="row">
|
||||
<div class="col5">
|
||||
<?php echo template::text('galleryEditName', [
|
||||
'label' => $text['gallery_view']['edit'][3],
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']),
|
||||
'readonly' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4 <?php if($this->getUser('group') < self::GROUP_MODERATOR) echo 'displayNone'; ?> ">
|
||||
<?php echo template::hidden('galleryEditDirectoryOld', [
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']),
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
<?php echo template::select('galleryEditDirectory', [], [
|
||||
'label' => $text['gallery_view']['edit'][4],
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('galleryEditSort', $sort, [
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']),
|
||||
'label' => $text['gallery_view']['edit'][5],
|
||||
'help' => $text['gallery_view']['edit'][6]
|
||||
]); ?>
|
||||
</div>
|
||||
<div clas="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('galleryEditFullscreen', true, $text['gallery_view']['edit'][7], [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'fullScreen']),
|
||||
'help' => $text['gallery_view']['edit'][8]
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php if($module::$pictures): ?>
|
||||
<?php echo template::table([1, 4, 1, 5, 1], $module::$pictures, ['',$text['gallery_view']['edit'][9], $text['gallery_view']['edit'][10],$text['gallery_view']['edit'][11],''],['id' => 'galleryTable'], $module::$picturesId ); ?>
|
||||
<?php echo template::hidden('galleryEditFormResponse'); ?>
|
||||
<?php echo template::hidden('galleryEditFormGalleryName',['value' => $this->getUrl(2)]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech($text['gallery_view']['edit'][12]); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="moduleVersion">
|
||||
<?php echo $text['gallery_view']['edit'][13]; echo $module::VERSION; ?>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
|
@ -1,22 +0,0 @@
|
|||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Galerie d'image
|
||||
* SLB est activé pour tout le site
|
||||
*/
|
||||
var b = new SimpleLightbox('.galleryGalleryPicture', {
|
||||
captionSelector: "self",
|
||||
captionType: "data",
|
||||
captionsData: "caption",
|
||||
closeText: "×"
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
// Démarre en mode plein écran
|
||||
var fullscreen = <?php echo json_encode($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'config', 'fullScreen'])); ?>;
|
||||
if ( fullscreen === true) {
|
||||
$('a#homePicture')[0].click();
|
||||
}
|
||||
});
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
// Lexique
|
||||
$param = '';
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
?>
|
||||
<div class="row galleryRow">
|
||||
<?php foreach($module::$pictures as $picture => $legend): ?>
|
||||
<div class="colPicture">
|
||||
<a
|
||||
href="<?php echo helper::baseUrl(false) . $picture; ?>"
|
||||
<?php if ( $picture === $this->getdata(['module',$this->getUrl(0),'content',$this->getUrl(1),'config','homePicture']) ) {
|
||||
echo 'id="homePicture"'; } ?>
|
||||
class="galleryGalleryPicture"
|
||||
style="background-image:url('<?php echo helper::baseUrl(false) . $module::$thumbs[$picture]; ?>')"
|
||||
data-caption="<?php echo $legend; ?>"
|
||||
>
|
||||
<?php if($legend): ?>
|
||||
<div class="galleryGalleryName"><?php echo $legend; ?></div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryGalleryBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0),
|
||||
'ico' => 'left',
|
||||
'value' => $text['gallery_view']['gallery'][0]
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
|
@ -1,79 +0,0 @@
|
|||
.galleryRow {
|
||||
--thumbAlign: center;
|
||||
}
|
||||
.colPicture {
|
||||
--thumbWidth: 18em;
|
||||
--thumbMargin: .5em;
|
||||
}
|
||||
.galleryPicture,
|
||||
.galleryGalleryPicture {
|
||||
--thumbHeight: 15em;
|
||||
--thumbBorder: .1em;
|
||||
--thumbBorderColor: rgba(221, 221, 221, 1);
|
||||
--thumbRadius: .3em;
|
||||
--thumbShadows: 1px 1px 10px;
|
||||
--thumbShadowsColor: rgba(125, 125, 125, 1);
|
||||
}
|
||||
.galleryName,
|
||||
.galleryGalleryName {
|
||||
--legendHeight: .375em;
|
||||
--legendAlign: center;
|
||||
--legendTextColor: rgba(255, 255, 255, 1);
|
||||
--legendBgColor: rgba(0, 0, 0, .6);
|
||||
}
|
||||
.galleryPicture:hover,
|
||||
.galleryGalleryPicture:hover {
|
||||
--thumbOpacity: .7;
|
||||
}
|
||||
.galleryPicture,
|
||||
.galleryGalleryPicture {
|
||||
display: block;
|
||||
border: var(--thumbBorder) solid var(--thumbBorderColor);
|
||||
height: var(--thumbHeight);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
position: relative;
|
||||
-webkit-transition: opacity .3s ease-out;
|
||||
transition: opacity .3s ease-out;
|
||||
border-radius: var(--thumbRadius);
|
||||
box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
|
||||
-webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
|
||||
-moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
|
||||
}
|
||||
.galleryPicture:hover,
|
||||
.galleryGalleryPicture:hover {
|
||||
opacity: var(--thumbOpacity);
|
||||
}
|
||||
.galleryName,
|
||||
.galleryGalleryName {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2);
|
||||
padding: var(--legendHeight);
|
||||
background: var(--legendBgColor);
|
||||
color: var(--legendTextColor);
|
||||
text-align: var(--legendAlign);
|
||||
}
|
||||
|
||||
.galleryRow {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: var(--thumbAlign);
|
||||
}
|
||||
|
||||
.colPicture {
|
||||
width : var(--thumbWidth);
|
||||
max-width: 50%;
|
||||
padding: var(--thumbMargin);
|
||||
}
|
||||
|
||||
@media (max-width: 432px) {
|
||||
.colPicture {
|
||||
width: 90%;
|
||||
max-width: 90%;
|
||||
margin: 0.5em;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
// Lexique
|
||||
$param = '';
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
if($module::$galleries): ?>
|
||||
<div class="row galleryRow">
|
||||
<?php foreach($module::$galleries as $galleryId => $gallery): ?>
|
||||
|
||||
<div class="colPicture" div="pos<?php echo $gallery['config']['position']; ?>" >
|
||||
<a
|
||||
href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>/<?php echo $galleryId; ?>"
|
||||
class="galleryPicture"
|
||||
style="background-image:url('<?php echo $module::$firstPictures[$galleryId];?>')"
|
||||
>
|
||||
<div class="galleryName"><?php echo $gallery['config']['name']; ?></div>
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech($text['gallery_view']['index'][0]); ?>
|
||||
<?php endif; ?>
|
|
@ -1,8 +0,0 @@
|
|||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
*/
|
||||
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
|
@ -1,152 +0,0 @@
|
|||
<?php
|
||||
// Lexique
|
||||
$param = "gallery_view";
|
||||
include('./module/gallery/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_gallery.php');
|
||||
|
||||
echo template::formOpen('galleryThemeForm'); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryThemeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'ico' => 'left',
|
||||
'value' => $text['gallery_view']['theme'][0]
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('galleryThemeBack',[
|
||||
'value' => $text['gallery_view']['theme'][1]
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<div class="blockTitle">
|
||||
<?php
|
||||
echo $text['gallery_view']['theme'][2]; echo template::help($text['gallery_view']['theme'][3]);
|
||||
?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('galleryThemeThumbWidth', $galleryThemeSizeWidth, [
|
||||
'label' => $text['gallery_view']['theme'][4],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbWidth'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('galleryThemeThumbHeight', $galleryThemeSizeHeight, [
|
||||
'label' => $text['gallery_view']['theme'][5],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbHeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('galleryThemeThumbAlign', $galleryThemeFlexAlign, [
|
||||
'label' => $text['gallery_view']['theme'][6],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::select('galleryThemeThumbMargin', $galleryThemeMargin, [
|
||||
'label' => $text['gallery_view']['theme'][7],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbMargin'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('galleryThemeThumbBorder', $galleryThemeBorder, [
|
||||
'label' => $text['gallery_view']['theme'][8],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbBorder'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('galleryThemeThumbBorderColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => $text['gallery_view']['theme'][9],
|
||||
'label' => $text['gallery_view']['theme'][10],
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'theme','thumbBorderColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('galleryThemeThumbRadius', $galleryThemeRadius, [
|
||||
'label' => $text['gallery_view']['theme'][11],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbRadius'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('galleryThemeThumbShadows', $galleryThemeShadows, [
|
||||
'label' => $text['gallery_view']['theme'][12],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbShadows'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('galleryThemeThumbShadowsColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => $text['gallery_view']['theme'][9],
|
||||
'label' => $text['gallery_view']['theme'][14],
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'theme','thumbShadowsColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('galleryThemeThumbOpacity', $galleryThemeOpacity, [
|
||||
'label' => $text['gallery_view']['theme'][15],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbOpacity'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<div class="blockTitle">
|
||||
<?php
|
||||
echo $text['gallery_view']['theme'][17];
|
||||
echo template::help($text['gallery_view']['theme'][3]);
|
||||
?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::text('galleryThemeLegendTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => $text['gallery_view']['theme'][9],
|
||||
'label' => $text['gallery_view']['theme'][19],
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'theme','legendTextColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::text('galleryThemeLegendBgColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => $text['gallery_view']['theme'][9],
|
||||
'label' => $text['gallery_view']['theme'][21],
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'theme','legendBgColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('galleryThemeLegendHeight', $galleryThemeLegendHeight, [
|
||||
'label' => $text['gallery_view']['theme'][22],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendHeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('galleryThemeLegendAlign', $galleryThemeAlign, [
|
||||
'label' => $text['gallery_view']['theme'][23],
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo template::formClose(); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="moduleVersion"><?php echo $text['gallery_view']['theme'][24]; echo $module::VERSION; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue