Compare commits

...

63 Commits

Author SHA1 Message Date
Deltacms 5bb1c14c6e corrections album v4.4 2023-11-01 15:05:22 +01:00
Deltacms ab9f2ecdf4 maj des database_xx 2023-11-01 14:17:43 +01:00
Deltacms 0ac2431c45 album photo V4 2023-11-01 11:17:08 +01:00
Deltacms 70a38dc753 changes.md suppression de agenda 4.3.2 2023-11-01 10:08:50 +01:00
LC bfd15794d2 Actualiser CHANGES.md 2023-10-31 18:06:27 +01:00
Deltacms 129da5bc0e maj de changes.md 2023-10-31 17:19:47 +01:00
Deltacms cce9d50532 maj themes.json 85vw 2023-10-31 17:11:54 +01:00
LC f0a49b77c3 nouveau thème vert et noir 2023-10-31 14:40:03 +01:00
LC 8c84930498 nouveau thème vert et noir 2023-10-31 14:12:15 +01:00
LC 74f3c3777b nouveau thème vert et noir 2023-10-31 14:10:41 +01:00
LC 8914c708d7 correction du custom.css 2023-10-31 14:09:54 +01:00
LC d0d8a7b2ed correction du custom.css 2023-10-31 14:09:32 +01:00
LC 7c5a006ace correction du custom.css 2023-10-31 14:09:05 +01:00
LC 79ffca98a8 correction du custom.css 2023-10-31 14:08:42 +01:00
LC dce7c1d71b correction du custom.css 2023-10-31 14:08:08 +01:00
LC 7f70e0372c correction du custom.css 2023-10-31 14:07:54 +01:00
LC df2ac71c91 correction du custom.css 2023-10-31 14:07:42 +01:00
LC b182fd1787 correction du custom.css 2023-10-31 14:07:29 +01:00
Deltacms 5f7fcb8e07 complément custom.css thhème sombre volcan 2023-10-31 09:05:05 +01:00
LC 3e375f9673 vertical-align: middle; 2023-10-30 12:57:35 +01:00
LC 7cc6ab886b vertical-align: middle; 2023-10-30 12:56:53 +01:00
LC 154f64bdd3 fichiers help 2023-10-30 11:28:19 +01:00
LC 0a77228a39 fichiers help 2023-10-30 11:27:32 +01:00
LC 55856c1d87 fichiers help 2023-10-30 11:26:41 +01:00
LC c11b01db4d Aide ajoutée 2023-10-30 11:24:38 +01:00
LC d0a210517b fichiers help 2023-10-30 11:23:31 +01:00
LC a8dea9472f Version 4.3.2 2023-10-30 11:21:36 +01:00
LC 6de81123b4 styles dans index.js.php 2023-10-30 11:17:08 +01:00
LC d605cb2694 Version 4.3.2 2023-10-30 11:16:11 +01:00
LC ed74256a6f Version 4.3.2 2023-10-30 11:14:59 +01:00
LC 0399cb07fb Amélioration de l'interface 2023-10-30 11:12:18 +01:00
LC 273aaaacac Amélioration de l'interface 2023-10-30 11:11:02 +01:00
Deltacms cbb3330f11 modif bandeau menu 2023-10-30 10:58:53 +01:00
Deltacms 7ec5707586 test sup pour navfixed... 2023-10-30 08:10:23 +01:00
LC aab6efff18 Téléverser les fichiers vers "core/module/install/ressource/themes" 2023-10-28 14:07:24 +02:00
LC 08c807e21f modification custom thème sombre volcan 2023-10-28 14:06:52 +02:00
LC 5c7fb52313 Téléverser les fichiers vers "core/module/install/ressource" 2023-10-28 14:05:45 +02:00
LC 5e9686fcef remplacement allègement données fichiers estaens 2023-10-28 14:03:46 +02:00
Deltacms 0dfa15077a menu fixe mediaqueries 2023-10-26 08:37:36 +02:00
LC b8e7881da9 Suppression du décalage du menu sticky de 45px vers le bas 2023-10-26 00:52:30 +02:00
Deltacms aebef2bc6c copyrights 2023-10-25 07:55:23 +02:00
Deltacms c263d3bed4 pointer events none en grand écran seulement 2023-10-23 08:57:32 +02:00
LC 0af2e0b99d Désormais inutile 2023-10-22 00:48:59 +02:00
LC c948f09074 class ThumbNailer 2023-10-22 00:39:36 +02:00
LC 6d4c580935 class ThumbNailer 2023-10-22 00:38:44 +02:00
LC 75079b6527 Version 4.0 2023-10-22 00:37:08 +02:00
LC c1cbadd1d5 Version 4.0 2023-10-22 00:34:11 +02:00
LC e657322b8b Style 1920px 2023-10-21 18:19:22 +02:00
LC 7c7c6ffbec Style 1920px 2023-10-21 18:18:09 +02:00
LC 2131eea9d7 Version 3.1 2023-10-21 18:16:36 +02:00
Deltacms 6ffbefd09a padding sur + - 2023-10-20 12:05:08 +02:00
Deltacms baf199c8e2 curseur sur + - menu burger 2023-10-20 11:55:08 +02:00
Deltacms 4b01417591 Version 3.0 2023-10-20 11:24:09 +02:00
Deltacms 58e1f713e1 petit écran vers grand écran menu 2023-10-20 08:36:15 +02:00
LC c2b6565ce4 Version 2.6 2023-10-18 20:07:23 +02:00
LC 3d0233a48c amélioration de l'interface en très petits écrans < 600px 2023-10-18 20:06:31 +02:00
LC 495628d68e limitation du nb de caractères de la légende affichée sous les vignettes 2023-10-18 20:04:57 +02:00
LC eda3d9d2bf mediaqueries affichage en écrans < 600px 2023-10-18 19:51:19 +02:00
Deltacms f343980a11 couleurs par défaut si theme < 4501 2023-10-17 09:25:47 +02:00
Deltacms ff7568fb51 maj theme islande et suppression des arrondis en petit écran 2023-10-14 18:03:12 +02:00
Deltacms a941c5ec57 suite... 2023-10-13 08:47:00 +02:00
Deltacms 54d03c2d16 correction liens icones bandeau burger 2023-10-13 08:22:34 +02:00
LC 310e3fd272 Suppression de code obsolète 2023-10-12 00:31:59 +02:00
50 changed files with 511 additions and 389 deletions

View File

@ -1,5 +1,14 @@
# Changelog
## Version 4.5.02 de Deltacms
- Modifications :
- Theme / site : suppression des arrondis autour du site en petit écran.
- Thémes livrés : un nouveau thème vert sombre (theme_vert_sombre_fluide.zip),
- Album Photo en version 4.3.2 : amélioration générale de l'interface, les vignettes sont plus grandes, les couleurs de bordure et de texte adoptent celles du thème en place. Les originaux des images réorientées sont désormais sauvegardés, un message informatif s'affiche lors du traitement des images, ajout des fichiers d'aide.
- Corrections :
- Theme / Menu / Burger : les liens associés aux icônes gauche et centrale du bandeau burger sont valides pour toutes les langues du site,
- Thèmes livrés : mise à jour du thème sombre islande (theme_sombre_islande_fluide.zip),
## Version 4.5.01 de Deltacms
- Modifications :
- Une troisième langue d'administration est disponible : espagnol / castillan,

View File

@ -1,5 +1,5 @@
# DeltaCMS 4.5.01
# DeltaCMS 4.5.02
DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
L'administration du site est trilingue espagnol (castillan), anglais ou français, le site peut être rédigé dans une langue quelconque.

View File

@ -54,10 +54,6 @@ class helper {
*/
public static function urlGetContents ($url) {
// Ejecter free.fr
if (strpos(self::baseUrl(),'free.fr') > 0 ){
return false;
}
if(function_exists('file_get_contents') && ini_get('allow_url_fopen') ){
//Ne pas utiliser de cache serveur pour lire le fichier de version
$opts = array(

View File

@ -2,8 +2,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*
@ -472,8 +474,8 @@ core.start = function() {
var parentId = $(this).parents().parents().attr("id");
displaySubPages( parentId);
});
}
}).trigger("resize");
}
});
/*
* Largeur minimale des onglets principaux du menu et largeur du sous-menu égale à la largeur de l'onglet parent
@ -538,17 +540,31 @@ core.relativeLuminanceW3C = function(rgba) {
$(document).ready(function(){
/* Passage de petit écran à grand écran : annulation de position static et du padding */
$(window).on("resize", function() {
if($(window).width() > 799 ) {
// Valeurs pour application immédiate avant reload
$("nav li ul").css("position","absolute");
$("nav li ul").css("padding-left","0");
$("nav ul li ul").css("display","none");
location.reload();
}
});
/**
* Affiche le sous-menu quand il est sticky
*/
$("nav:not(.navsub)").mouseenter(function(){
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' });
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' });
});
$("nav, .navSub").mouseleave(function(){
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' });
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' });
});
$("nav:not(.navsub)").mouseenter(function(){
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' });
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' });
});
$("nav, .navSub").mouseleave(function(){
if($(window).width() > 799 ) {
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' });
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' });
}
});
/**
* Chargement paresseux des images et des iframes

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*
@ -49,7 +51,7 @@ class common {
// Numéro de version
const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/';
const DELTA_VERSION = '4.5.01';
const DELTA_VERSION = '4.5.02';
const DELTA_UPDATE_CHANNEL = "v4";
public static $actions = [];
@ -1635,7 +1637,7 @@ class common {
$groupUser = $this->getUser('group') === false ? 0 : $this->getUser('group');
// Ajout de la class navfixedburgerconnected ou navfixedburgerlogout si le bandeau (texte ou logo + icône burger) du menu burger est fixe
if( $this->getData(['theme', 'menu', 'burgerFixed']) === true ){
if( $groupUser >= 2 ) {
if( $groupUser >= 2 && $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')) {
$burgerclass = 'class="navfixedburgerconnected"';
$burgerclassshort = 'navfixedburgerconnected';
} else {
@ -1643,7 +1645,7 @@ class common {
$burgerclassshort = 'navfixedburgerlogout';
}
} else {
if( $groupUser >= 2 ) {
if( $groupUser >= 2 && $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')) {
$burgerclass = 'class="navburgerconnected"';
$burgerclassshort = 'navburgerconnected';
}
@ -1652,7 +1654,7 @@ class common {
case 'top':
// Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté
if ( $this->getData(['theme', 'menu', 'position']) === 'top' AND $this->getData(['theme', 'menu', 'fixed']) === true ){
if( $groupUser >= 2 ) {
if( $groupUser >= 2 && $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')) {
echo '<nav id="navfixedconnected" '.$burgerclass.'>';
} else {
echo '<nav id="navfixedlogout" '.$burgerclass.'>';
@ -1702,8 +1704,8 @@ class common {
//Menu burger
$fileIcon1 = './site/file/source/'. $this->getData(['theme', 'menu', 'burgerIcon1']);
$fileIcon2 = './site/file/source/'. $this->getData(['theme', 'menu', 'burgerIcon2']);
$iconLink1 = helper::baseUrl().$this->getData(['theme', 'menu','burgerIconLink1']);
$iconLink2 = helper::baseUrl().$this->getData(['theme', 'menu','burgerIconLink2']);
$iconLink1 = helper::baseUrl().$this->getData(['locale', 'menuBurger','burgerLeftIconLink']);
$iconLink2 = helper::baseUrl().$this->getData(['locale', 'menuBurger','burgerCenterIconLink']);
echo '<div id="toggle">';
switch( $this->getData(['theme','menu','burgerContent']) ){
case 'none' :
@ -2688,6 +2690,9 @@ class core extends common {
$css .= '}';
// Menu burger couleurs
// Valeurs par défaut si chargement d'un thème < 4501
if(is_null($this->getData(['theme', 'menu', 'burgerBackgroundColor'])) || $this->getData(['theme', 'menu', 'burgerBackgroundColor']) === '') $this->setData(['theme', 'menu', 'burgerBackgroundColor', $this->getData(['theme', 'menu', 'backgroundColor']) ]);
if(is_null($this->getData(['theme', 'menu', 'burgerBackgroundColorSub'])) || $this->getData(['theme', 'menu', 'burgerBackgroundColorSub']) === '') $this->setData(['theme', 'menu', 'burgerBackgroundColorSub', $this->getData(['theme', 'menu', 'backgroundColorSub']) ]);
$css .= '@media (max-width: 799px) {';
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'burgerBackgroundColor']));
$css .= 'nav #toggle { background-color:'.$this->getData(['theme', 'menu', 'burgerBannerColor']).';}';

View File

@ -169,4 +169,14 @@ if ($this->getData(['core', 'dataVersion']) < 4501) {
if( is_file('./site/data/head.inc.html')) rename('./site/data/head.inc.html', './site/data/head.inc.php' );
$this->setData(['core', 'dataVersion', 4501]);
}
if ($this->getData(['core', 'dataVersion']) < 4502) {
// Déplacement et renommage des variables Burger Icon Link
$this->setData(['locale', 'menuBurger', [
'burgerLeftIconLink' => $this->getData(['theme', 'menu','burgerIconLink1']) ,
'burgerCenterIconLink' => $this->getData(['theme', 'menu','burgerIconLink2'])
]]);
$this->deleteData(['theme', 'menu', 'burgerIconLink1']);
$this->deleteData(['theme', 'menu', 'burgerIconLink2']);
$this->setData(['core', 'dataVersion', 4502]);
}
?>

View File

@ -43,6 +43,10 @@
z-index: 10;
position: sticky;
}
#navfixedconnected .navSub,
#navfixedlogout .navSub {
pointer-events: none;
}
nav .iconSubExistLargeScreen{
display:inline;
margin-left :5px;
@ -158,6 +162,10 @@
.siteContainer > #contentSite {
order: 2;
}
/* Suppression des arrondis du site */
#site {
border-radius: 0;
}
/* Tableaux */
.table thead {
font-size: 0.8em;
@ -198,6 +206,10 @@
display:inline;
margin: auto 30vw auto auto;
}
nav .zwiico-plus, nav .zwiico-minus{
cursor: pointer;
padding: 8px;
}
a.disabled-link{
font-style:italic;
}
@ -208,7 +220,7 @@
float: none;
}
nav #toggle #burgerIcon{
flex-basis:20%;
flex-basis:20vw;
text-align: right;
}
nav #toggle #burgerText{
@ -217,9 +229,9 @@
margin-left: 10px;
}
nav #toggle #burgerIcon1, nav #toggle #burgerIcon2 {
flex-basis:40%;
flex-basis:40vw;
text-align: left;
margin-left: 10px;
padding-left: 10px;
}
nav #menuLeft {
display: block;

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -26,6 +26,10 @@
"cookiesCheckboxExtText": "",
"cookiesFooterText": "Cookies",
"cookiesButtonText": "I understand"
},
"menuBurger": {
"burgerLeftIconLink": "home",
"burgerCenterIconLink": "recherche"
}
}
}

View File

@ -190,7 +190,10 @@
"estaens_3jpg": ""
},
"order": []
}
},
"config": {
"versionData": "4.4"
}
}
}
}

View File

@ -26,6 +26,10 @@
"cookiesCheckboxExtText": "",
"cookiesFooterText": "Cookies",
"cookiesButtonText": "He entendido"
},
"menuBurger": {
"burgerLeftIconLink": "inicio",
"burgerCenterIconLink": "investigacion"
}
}
}

View File

@ -188,7 +188,10 @@
"estaens_3jpg": ""
},
"order": []
}
},
"config": {
"versionData": "4.4"
}
}
}
}

View File

@ -26,6 +26,10 @@
"cookiesCheckboxExtText": "",
"cookiesFooterText": "Cookies",
"cookiesButtonText": "J'ai compris"
},
"menuBurger": {
"burgerLeftIconLink": "accueil",
"burgerCenterIconLink": "recherche"
}
}
}

View File

@ -173,7 +173,10 @@
"estaens_3jpg": ""
},
"order": []
}
},
"config": {
"versionData": "4.4"
}
}
}
}

View File

@ -69,7 +69,7 @@ class init extends common {
]
],
'core' => [
'dataVersion' => 4501,
'dataVersion' => 4502,
'lastBackup' => 0,
'lastClearTmp' => 0,
'lastAutoUpdate' => 0,
@ -103,6 +103,10 @@ class init extends common {
'cookiesCheckboxExtText' => '',
'cookiesFooterText' => 'Cookies',
'cookiesButtonText' => 'J\'ai compris'
],
'menuBurger' => [
'burgerLeftIconLink' => 'accueil',
'burgerCenterIconLink' => 'recherche'
]
],
'page' => [

View File

@ -12,7 +12,11 @@
"filename": "theme_sombre_islande_fluide.zip"
},
"pablo_banniere_animee": {
"name": "Bannière animèe 85%",
"name": "Bannière animèe 85vw",
"filename": "theme_banniere_animee_85vw.zip"
},
"vert": {
"name": "Vert sombre 100%",
"filename": "theme_sombre_vert_fluide.zip"
}
}

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -256,7 +256,7 @@ $text['core_theme_view']['menu'][49] = 'Burger icon color';
$text['core_theme_view']['menu'][50] = 'Left icon';
$text['core_theme_view']['menu'][51] = 'This icon will be visible on the left side of the burger menu banner';
$text['core_theme_view']['menu'][52] = 'Link to page';
$text['core_theme_view']['menu'][53] = 'This choice allows a shortcut to an important page like the home page.';
$text['core_theme_view']['menu'][53] = 'This choice allows a shortcut to an important page like the home page. This must be done for each language of your site.';
$text['core_theme_view']['menu'][54] = 'Core icon';
$text['core_theme_view']['menu'][55] = 'This icon will be visible in the central part of the burger menu banner';
$text['core_theme_view']['menu'][56] = 'When fixed the banner of the burger menu is at the top of the screen or under the administration bar.';

View File

@ -256,7 +256,7 @@ $text['core_theme_view']['menu'][49] = 'Color del icono de la hamburguesa';
$text['core_theme_view']['menu'][50] = 'Icono izquierdo';
$text['core_theme_view']['menu'][51] = 'Este ícono será visible en el lado izquierdo del banner del menú de hamburguesas';
$text['core_theme_view']['menu'][52] = 'Enlace a la página';
$text['core_theme_view']['menu'][53] = 'Esta opción permite un acceso directo a una página importante como la página de inicio.';
$text['core_theme_view']['menu'][53] = 'Esta opción permite un acceso directo a una página importante como la página de inicio. Esto debe hacerse para cada idioma de su sitio.';
$text['core_theme_view']['menu'][54] = 'Icono principal';
$text['core_theme_view']['menu'][55] = 'Este ícono será visible en la parte central del banner del menú de hamburguesas';
$text['core_theme_view']['menu'][56] = 'Cuando se arregla, el banner del menú de hamburguesas está en la parte superior de la pantalla o debajo de la barra de administración.';

View File

@ -256,7 +256,7 @@ $text['core_theme_view']['menu'][49] = 'Couleur de l\'icône burger';
$text['core_theme_view']['menu'][50] = 'Icône gauche';
$text['core_theme_view']['menu'][51] = 'Cette icône sera visible dans la partie gauche du bandeau du menu burger';
$text['core_theme_view']['menu'][52] = 'Lien vers la page';
$text['core_theme_view']['menu'][53] = 'Ce choix permet un raccourci vers une page importante comme la page d\'accueil.';
$text['core_theme_view']['menu'][53] = 'Ce choix permet un raccourci vers une page importante comme la page d\'accueil. Il est à faire pour chaque langue de votre site.';
$text['core_theme_view']['menu'][54] = 'Icône centrale';
$text['core_theme_view']['menu'][55] = 'Cette icône sera visible dans la partie centrale du bandeau du menu burger';
$text['core_theme_view']['menu'][56] = 'Quand il est fixe le bandeau du menu burger est en haut d\'écran ou sous la barre d\'administration.';

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*
@ -702,10 +704,12 @@ class theme extends common {
'burgerActiveColorAuto' => $this->getInput('themeMenuBurgerActiveColorAuto', helper::FILTER_BOOLEAN),
'burgerActiveColor' => $this->getInput('themeMenuBurgerActiveColor'),
'burgerBackgroundColorSub' => $this->getInput('themeMenuBurgerBackgroundColorSub'),
'burgerIconLink1' => $this->getInput('themeMenuBurgerIconLink1'),
'burgerIconLink2' => $this->getInput('themeMenuBurgerIconLink2'),
'burgerOverlay' => $this->getInput('themeMenuBurgerOverlay', helper::FILTER_BOOLEAN)
]]);
$this->setData(['locale', 'menuBurger', [
'burgerLeftIconLink' => $this->getInput('themeMenuBurgerLeftIconLink'),
'burgerCenterIconLink' => $this->getInput('themeMenuBurgerCenterIconLink')
]]);
// Valeurs en sortie
if (isset($_POST['themeMenuSubmit'])){
@ -721,7 +725,7 @@ class theme extends common {
}
}
// Liste des pages pour les liens sur icônes
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
foreach ($this->getHierarchy(null,true,null) as $parentKey=>$parentValue) {
// Exclusions les barres, les pages masquées ou non publiques
if ($this->getData(['page',$parentKey,'group']) !== 0 ||
$this->getData(['page', $parentKey, 'block']) === 'bar' ) {

View File

@ -2,6 +2,14 @@
// Lexique
include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
// drapeau pour la langue d'origine ou la langue en traduction rédigée
if( $this->getInput('DELTA_I18N_SITE') === '' || $this->getInput('DELTA_I18N_SITE')=== null || $this->getInput('DELTA_I18N_SITE') === 'base'){
$flag = $this->getData(['config', 'i18n', 'langBase']);
}
else{
$flag = $this->getInput('DELTA_I18N_SITE');
}
echo template::formOpen('themeMenuForm'); ?>
<div class="row">
<div class="col2">
@ -263,9 +271,9 @@ echo template::formOpen('themeMenuForm'); ?>
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeMenuBurgerIconLink1', $module::$pageList,[
'selected' => $this->getData(['theme', 'menu','burgerIconLink1']),
'label' => $text['core_theme_view']['menu'][52],
<?php echo template::select('themeMenuBurgerLeftIconLink', $module::$pageList,[
'selected' => $this->getData(['locale', 'menuBurger','burgerLeftIconLink']),
'label' => $text['core_theme_view']['menu'][52] .' '. template::flag($flag, '20px'),
'help' => $text['core_theme_view']['menu'][53]
]); ?>
</div>
@ -283,9 +291,9 @@ echo template::formOpen('themeMenuForm'); ?>
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeMenuBurgerIconLink2', $module::$pageList,[
'selected' => $this->getData(['theme', 'menu','burgerIconLink2']),
'label' => $text['core_theme_view']['menu'][52],
<?php echo template::select('themeMenuBurgerCenterIconLink', $module::$pageList,[
'selected' => $this->getData(['locale', 'menuBurger','burgerCenterIconLink']),
'label' => $text['core_theme_view']['menu'][52] .' '. template::flag($flag, '20px'),
'help' => $text['core_theme_view']['menu'][53]
]); ?>
</div>

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -1,10 +1,14 @@
/*! Lity - v2.4.1 - 2020-04-26
* http://sorgalla.com/lity/
* Copyright (c) 2015-2020 Jan Sorgalla; Licensed MIT
* Fichier modifié le 23/05/19, largeur du cadre 80vw
* Fichier modifié le 23/05/19, largeur du cadre 80vw,
* le 23/10/2023 mediaqueries affichage en écrans < 600px
* @link https://deltacms.fr/
*/
.lity{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;white-space:nowrap;background:#0b0b0b;background:rgba(0,0,0,.9);outline:none !important;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}.lity.lity-opened{opacity:1}.lity.lity-closed{opacity:0}.lity *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lity-wrap{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;outline:none !important}.lity-wrap:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-right:-.25em}.lity-loader{z-index:9991;color:#fff;position:absolute;top:50%;margin-top:-.8em;width:100%;text-align:center;font-size:14px;font-family:Arial,Helvetica,sans-serif;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}.lity-loading .lity-loader{opacity:1}.lity-container{z-index:9992;position:relative;text-align:left;vertical-align:middle;display:inline-block;white-space:normal;max-width:100%;max-height:100%;outline:none !important}
.lity-content{z-index:9993;width:100%;-webkit-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1);-webkit-transition:-webkit-transform .3s ease;transition:-webkit-transform .3s ease;-o-transition:-o-transform .3s ease;transition:transform .3s ease;transition:transform .3s ease,-webkit-transform .3s ease,-o-transform .3s ease}.lity-loading .lity-content,.lity-closed .lity-content{-webkit-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}.lity-content:after{content:"";position:absolute;left:0;top:0;bottom:0;display:block;right:0;width:auto;height:auto;z-index:-1;-webkit-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}.lity-close{z-index:9994;width:35px;height:35px;position:fixed;right:0;top:0;-webkit-appearance:none;cursor:pointer;text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,.6);border:0;background:0 0;outline:none;-webkit-box-shadow:none;box-shadow:none}
.lity-close::-moz-focus-inner{border:0;padding:0}.lity-close:hover,.lity-close:focus,.lity-close:active,.lity-close:visited{text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,.6);border:0;background:0 0;outline:none;-webkit-box-shadow:none;box-shadow:none}.lity-close:active{top:1px}.lity-image img{max-width:100%;display:block;line-height:0;border:0}.lity-iframe .lity-container,.lity-youtube .lity-container,.lity-vimeo .lity-container,.lity-facebookvideo .lity-container,.lity-googlemaps .lity-container{width:100%;max-width:80vw}.lity-iframe-container{width:100%;height:0;padding-top:56.25%;overflow:auto;pointer-events:auto;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-overflow-scrolling:touch}.lity-iframe-container iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-webkit-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6);background:#000}
.lity-hide{display:none}
@media (max-width: 599px) {
.lity-iframe .lity-container,.lity-youtube .lity-container,.lity-vimeo .lity-container,.lity-facebookvideo .lity-container,.lity-googlemaps .lity-container{max-width:100vw}
}

View File

@ -4,8 +4,10 @@
* 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
* @author Sylvain Lelièvre <https://deltacms.fr/contact>
* @copyright 2021 © Sylvain Lelièvre
* @author Lionel Croquefer <https://deltacms.fr/contact>
* @copyright 2022 © Lionel Croquefer
* @license GNU General Public License, version 3
* @link https://deltacms.fr/
*

View File

@ -5,7 +5,7 @@
*/
setlocale(LC_NUMERIC,'English','en_US','en_US.UTF-8');
class album extends common {
const VERSION = '2.5';
const VERSION = '4.4';
const REALNAME = 'Album Photo';
const DELETE = true;
const UPDATE = '0.0';
@ -15,15 +15,10 @@ class album extends common {
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 $actions = [
@ -35,6 +30,20 @@ class album extends common {
'edit' => self::GROUP_EDITOR,
'index' => self::GROUP_VISITOR
];
/**
* Mise à jour du module
* Appelée par la fonction index
*/
private function update() {
// Versions < 4.4 : versionData absent
if( null === $this->getData(['module', $this->getUrl(0), 'config', 'versionData']) ) $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '4.3']);
// Version 4.4
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '4.4', '<') ) {
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','4.4']);
}
}
/**
* Tri de la liste des galeries sans bouton
@ -122,8 +131,9 @@ class album extends common {
$param = '';
include('./module/album/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_album.php');
//Affichage de l'album triée
//Affichage de l'album triée sauf le faux tableau 'config'
$g = $this->getData(['module', $this->getUrl(0)]);
unset($g['config']);
$p = helper::arrayCollumn(helper::arrayCollumn($g,'config'),'position');
asort($p,SORT_NUMERIC);
$galleries = [];
@ -133,58 +143,61 @@ class album extends common {
// 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>';
// pour ne pas prendre en compte la fausse galerie 'config'
if(isset($gallery['config']['directory'])){
// 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;
}
// 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'un album
if($this->isPost()) {
if (!$this->getInput('galleryConfigFilterResponse')) {
$galleryId = helper::increment($this->getInput('galleryConfigName', helper::FILTER_ID, true), (array) $this->getData(['module', $this->getUrl(0)]));
$this->setData(['module', $this->getUrl(0), $galleryId, [
'config' => [
'name' => $this->getInput('galleryConfigName'),
'directory' => $this->getInput('galleryConfigDirectory', helper::FILTER_STRING_SHORT, true),
'homePicture' => NULL, // homePicture non préalablement définie
'sort' => self::SORT_ASC,
'position' => $this->getData(['module',$this->getUrl(0)]) !== null ? count($this->getData(['module',$this->getUrl(0)])) + 1 : 0
],
'legend' => [],
'order' => []
]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => $text['gallery']['config'][2],
'state' => true
]);
}
$galleryId = helper::increment($this->getInput('galleryConfigName', helper::FILTER_ID, true), (array) $this->getData(['module', $this->getUrl(0)]));
$this->setData(['module', $this->getUrl(0), $galleryId, [
'config' => [
'name' => $this->getInput('galleryConfigName'),
'directory' => $this->getInput('galleryConfigDirectory', helper::FILTER_STRING_SHORT, true),
'homePicture' => NULL, // homePicture non préalablement définie
'sort' => self::SORT_ASC,
'position' => $this->getData(['module',$this->getUrl(0)]) !== null ? count($this->getData(['module',$this->getUrl(0)])) + 1 : 0
],
'legend' => [],
'order' => []
]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => $text['gallery']['config'][2],
'state' => true
]);
}
}
// Valeurs en sortie
$this->addOutput([
@ -362,7 +375,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="module/album/plugins/thumbnailer.php?img='.$fileInfos->getPathname().'" alt="miniature"></a>'
'<a href="'.$fileInfos->getPathname().'" rel="data-lity"><img class="config" src="'.albumHelper::makeThumbnail($fileInfos->getPathname()).'" alt="miniature"></a>'
];
self::$picturesId [] = str_replace('.','',$fileInfos->getFilename());
}
@ -415,6 +428,8 @@ class album extends common {
* 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
@ -481,8 +496,9 @@ class album extends common {
}
// Liste des galeries
else {
// Tri des galeries suivant l'ordre défini
// Tri des galeries suivant l'ordre défini sauf pour la fausse galerie 'config'
$g = $this->getData(['module', $this->getUrl(0)]);
unset($g['config']);
$p = helper::arrayCollumn(helper::arrayCollumn($g,'config'),'position');
asort($p,SORT_NUMERIC);
$galleries = [];
@ -491,16 +507,19 @@ class album extends common {
}
// 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 substr(mime_content_type($fileInfos->getPathname()), 0, 5) == 'image') {
// contrôle et traite éventuellement les images affichées dans l'index de la galerie
$imgalerie = str_replace('\\','/',$fileInfos->getPathname());
albumHelper::controle($imgalerie);
self::$galleries[$galleryId] = $gallery;
self::$firstPictures[$galleryId] = $gallery['config']['directory'] . '/' . $fileInfos->getFilename();
continue(2);
// pour ne pas prendre en compte la fausse galerie 'config'
if(isset($gallery['config']['directory'])){
if(is_dir($gallery['config']['directory'])) {
$iterator = new DirectoryIterator($gallery['config']['directory']);
foreach($iterator as $fileInfos) {
if($fileInfos->isDot() === false AND $fileInfos->isFile() AND substr(mime_content_type($fileInfos->getPathname()), 0, 5) == 'image') {
// contrôle et traite éventuellement les images affichées dans l'index de la galerie
$imgalerie = str_replace('\\','/',$fileInfos->getPathname());
albumHelper::controle($imgalerie);
self::$galleries[$galleryId] = $gallery;
self::$firstPictures[$galleryId] = $gallery['config']['directory'] . '/' . $fileInfos->getFilename();
continue(2);
}
}
}
}
@ -516,10 +535,11 @@ class album extends common {
}
}
/* ********************** albumHelper ********************** */
class albumHelper extends helper {
// dossier backup
// création des dossiers
public static function makeDir($rep) {
if (is_dir($rep)) {
return true;
@ -528,6 +548,7 @@ class albumHelper extends helper {
else { return false; }
}
}
// relevés exif gps des photos
public static function gps_exif($foto) {
if (!preg_match('/(\.jpe?g)$/i', $foto)) {
@ -571,26 +592,43 @@ class albumHelper extends helper {
$sign = ($hemisphere == 'W' || $hemisphere == 'S') ? -1 : 1;
return $sign * ($degrees + $minutes/60 + $seconds/3600);
}
// formatage light des noms d'images
public static function formate($foto) {
$foto = trim($foto);
$foto = preg_replace('/[^[:alnum:]_.\-\/]/', '', $foto);
return $foto;
}
// reorientation
}
// renommage des fichiers transformés
public static function renamePic($foto) {
$imor = basename($foto);
$extension = strrchr($imor,'.');
$namimor = str_replace($extension,'',$imor);
$redimg = dirname($foto).'/'.$namimor.'_t960.jpg';
return $redimg;
}
// backup des images réorientées ou redimensionnées
public static function backUp($foto) {
$backup = dirname($foto).'/backup';
self::makeDir($backup);
$backimg = $backup.'/'.strtolower(str_replace('.jpeg','.jpg',basename($foto)));
rename($foto,$backimg);
}
// réorientation
public static function reorientation($foto) {
$size = @getimagesize($foto);
$mime = $size['mime'];
if ((function_exists('exif_read_data')) && ($mime == 'image/jpeg'))
{
// seules les images/jpeg sont réorientées
if ((function_exists('exif_read_data')) && ($mime == 'image/jpeg')) {
$exif = @exif_read_data($foto);
$image = imagecreatefromstring(file_get_contents($foto));
if ($image !== false) {
$orientation = isset($exif['Orientation']) === true ? $exif['Orientation'] : '';
if ( (!empty($orientation)) && ($orientation != 1) )
{
switch($orientation)
{
if ( (!empty($orientation)) && ($orientation != 1) ) {
switch($orientation) {
case 3:
$image = imagerotate($image,180,0);
break;
@ -601,28 +639,24 @@ class albumHelper extends helper {
$image = imagerotate($image,90,0);
break;
}
imagejpeg($image, $foto, 90);
}
imagejpeg($image, self::renamePic($foto), 80);
self::backUp($foto);
echo '<script>document.location.reload(false);</script>';
exit('Réorientation des photos...');
}
}
}
}
// redimension
public static function redimension($foto) {
$max_size = 960;// ex1280 dimension du plus petit côté
$max_size = 960;// dimension du plus petit côté
$infoto = @getimagesize($foto);
$large = $infoto[0];
$haut = $infoto[1];
$type = $infoto[2];
// seules les images/jpeg sont redimensionnées
if (($type == 2) && ($large > $max_size) && ($haut > $max_size)) {
$imar = substr(strrchr($foto, '/'), 1);
$urlimar = str_replace($imar,'',$foto);
$backup = $urlimar.'backup';
self::makeDir($backup);
$extension = strrchr($imar,'.');
$namimar = str_replace($extension,'',$imar);
$redimg = $urlimar.$namimar.'_t960.jpg';
$backimg = $backup.'/'.strtolower(str_replace('.jpeg','.jpg',$imar));
$src = imagecreatefromjpeg($foto);
imageinterlace($src, true);
if ($large > $haut) {
@ -632,18 +666,23 @@ class albumHelper extends helper {
$im = imagecreatetruecolor($max_size, round(($max_size/$large)*$haut));
imagecopyresampled($im, $src, 0, 0, 0, 0, $max_size, round($haut*($max_size/$large)), $large, $haut);
}
imagejpeg($im, $redimg, 80);
imagedestroy($im);
rename($foto,$backimg);
if (strpos($foto, 't960.') == false) {
imagejpeg($im, self::renamePic($foto), 80);
imagedestroy($im);
self::backUp($foto);
} else {
imagejpeg($im, $foto, 80);
imagedestroy($im);
}
echo '<script>document.location.reload(false);</script>';
exit(0);
exit('Redimension des photos...');
}
}
// contrôle des photos
public static function controle($foto) {
$tn_tmp = substr(strrchr($foto, '/'), 1);
$url_picture = str_replace('/'.$tn_tmp,'',$foto);
$minidos = substr(strrchr($url_picture, '/'), 1);
$tn_tmp = basename($foto);
$minidos = substr(strrchr(dirname($foto), '/'), 1);
$mini = 'site/file/cache/'.$minidos.'/'.$tn_tmp;
if (!file_exists($mini)) {
$valid = array('-', '_','.');
@ -651,7 +690,7 @@ class albumHelper extends helper {
$nommage = self::formate($foto);
$foto = rename($foto,$nommage);
echo '<script>document.location.reload(false);</script>';
exit(0);
exit('Renommage des photos...');
} else {
self::reorientation($foto);
self::redimension($foto);
@ -660,5 +699,65 @@ class albumHelper extends helper {
return $foto;
clearstatcache();
}
}
// Thumbnailer
public static function makeThumbnail($foto) {
if ( is_file($foto) && substr(mime_content_type($foto), 0, 5) == 'image' ) {
// taille des miniatures
$tnlarge = 320;
$tnhaut = ($tnlarge/1.6);
$size_img = filesize($foto);
$dossiercache = 'site/file/cache';
self::makeDir($dossiercache);
$par = basename($foto);
$cache = substr(strrchr(dirname($foto), '/'), 1);
self::makeDir($dossiercache.'/'.$cache);
$extension = strrchr($par,'.');
$vignette = str_replace($extension,'',$par);
$miniature = $dossiercache.'/'.$cache.'/tn-'.$vignette.'-'.$size_img.'.webp';
if (!file_exists($miniature)) {
list($width, $height, $type, $attr) = getimagesize($foto);
if ($height > $tnhaut) {
$convert = $tnhaut/$height;
$height = $tnhaut;
$width = ceil($width*$convert);
}
if ($width > $tnlarge) {
$convert = $tnlarge/$width;
$width = $tnlarge;
$height = ceil($height*$convert);
}
$largeur = $width;
$hauteur = $height;
if($type == 1) {
$img_in = imagecreatefromgif($foto);
}
elseif($type == 2) {
$img_in = imagecreatefromjpeg($foto);
}
elseif($type == 3) {
$img_in = imagecreatefrompng($foto);
}
elseif($type == 18) {
$img_in = imagecreatefromwebp($foto);
}
imageinterlace($img_in, true);
$img_out = imagecreatetruecolor($largeur, $hauteur) or die ('Unable to create a GD image stream');
imagecopyresampled($img_out, $img_in, 0, 0, 0, 0, imagesx($img_out), imagesy($img_out), imagesx($img_in), imagesy($img_in));
imagewebp($img_out, $miniature, 80);
imagedestroy($img_out);
}
return $miniature;
clearstatcache();
}
else { die ('This is not an image'); }
} // makeThumbnail
} // albumHelper

View File

@ -9,6 +9,8 @@ $text['album_view']['config'][5] = 'Installed albums';
$text['album_view']['config'][6] = "Are you sure you want to delete this album ?";
$text['album_view']['config'][7] = 'No galleries';
$text['album_view']['config'][8] = 'Version no.';
$text['album_view']['config'][9] = 'module/album/view/config/config.help_en.html';
$text['album_view']['config'][10] = 'Help';
$text['album_view']['edit'][0] = 'Back';
$text['album_view']['edit'][1] = 'Save';

View File

@ -9,6 +9,8 @@ $text['album_view']['config'][5] = 'Albums instalados';
$text['album_view']['config'][6] = "¿Está seguro de que desea eliminar este álbum?";
$text['album_view']['config'][7] = 'Sin galería';
$text['album_view']['config'][8] = 'Número de versión';
$text['album_view']['config'][9] = 'module/album/view/config/config.help_en.html';
$text['album_view']['config'][10] = 'Ayuda';
$text['album_view']['edit'][0] = 'Volver';
$text['album_view']['edit'][1] = 'Guardar';

View File

@ -9,6 +9,8 @@ $text['album_view']['config'][5] = 'Albums installés';
$text['album_view']['config'][6] = "Êtes-vous sûr de vouloir supprimer cet album ?";
$text['album_view']['config'][7] = 'Aucune galerie.';
$text['album_view']['config'][8] = 'Version n°';
$text['album_view']['config'][9] = 'module/album/view/config/config.help.html';
$text['album_view']['config'][10] = 'Aide';
$text['album_view']['edit'][0] = 'Retour';
$text['album_view']['edit'][1] = 'Enregistrer';

View File

@ -1,70 +0,0 @@
<?php
/* création des miniatures par @Lionel 2019
* modification le 08 octobre 2023
*/
if (!isset($_GET['img']))
{
exit(0);
}
$img = '../../../'.$_GET['img'];
if ( is_file($img) && substr(mime_content_type($img), 0, 5) == 'image' ) {
function makeDir($dir) {
if ( (!is_dir($dir)) || (!file_exists($dir)) )
mkdir($dir,0755,true);
}
$ratio = 200;
$size_img = filesize($img);
$dossiercache = '../../../site/file/cache';
makeDir($dossiercache);
$par = substr(strrchr($img, '/'), 1);
$url_par = str_replace('/'.$par,'',$img);
$cache = substr(strrchr($url_par, '/'), 1);
makeDir($dossiercache.'/'.$cache);
$extension = strrchr($par,'.');
$vignette = str_replace($extension,'',$par);
$miniature = $dossiercache.'/'.$cache.'/'.$vignette.'-'.$size_img.'.webp';
if(!file_exists($miniature)) {
$imginfo = getimagesize($img);
$largeur = $imginfo[0];
$hauteur = $imginfo[1];
$type = $imginfo[2];
if($type == 1)
{
$src = imagecreatefromgif($img);
}
elseif($type == 2)
{
$src = imagecreatefromjpeg($img);
}
elseif($type == 3)
{
$src = imagecreatefrompng($img);
}
elseif($type == 18)
{
$src = imagecreatefromwebp($img);
}
imageinterlace($src, true);
if ($largeur > $hauteur)
{
$im = imagecreatetruecolor(round(($ratio/$hauteur)*$largeur), $ratio);
imagecopyresampled($im, $src, 0, 0, 0, 0, round(($ratio/$hauteur)*$largeur), $ratio, $largeur, $hauteur);
}
else
{
$im = imagecreatetruecolor($ratio, round(($ratio/$largeur)*$hauteur));
imagecopyresampled($im, $src, 0, 0, 0, 0, $ratio, round($hauteur*($ratio/$largeur)), $largeur, $hauteur);
}
imagewebp($im, $miniature, 80);
imagedestroy($im);
}
header('Content-Type: image/webp');
$data = file_get_contents($miniature);
echo $data;
clearstatcache();
}
else {echo 'This is not an image';}
?>

View File

@ -0,0 +1,5 @@
<h2>ALBUM PHOTO</h2>
<h3>A venir...</h3>
<h3>Plus</h3>
<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/statislite_FR.mp4" type="video/mp4" /></video>

View File

@ -0,0 +1,5 @@
<h2>PHOTO ALBUM</h2>
<h3>...</h3>
<h3>More</h3>
<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/statislite_EN.mp4" type="video/mp4" /></video>

View File

@ -13,6 +13,17 @@ echo template::formOpen('galleryConfigForm'); ?>
'value' => $text['album_view']['config'][0]
]); ?>
</div>
<div class="col2 inset8">
<?php echo template::button('albumIndexHelp', [
'class' => 'buttonHelp',
'ico' => 'help',
'value' => $text['album_view']['config'][10]
]); ?>
</div>
</div>
<!-- Aide à propos de la configuration de album, view config -->
<div class="helpDisplayContent">
<?php echo file_get_contents( $text['album_view']['config'][9]) ;?>
</div>
<div class="row">
<div class="col12">

View File

@ -1,74 +1,81 @@
.gallery {
section > * {
box-sizing: border-box;
padding: 0;
}
section > .row:not(.back) > .col2 {
padding: 5px;
vertical-align: middle;
}
.gallery {
position: relative;
}
.galleryGalleryPicture {
box-sizing: content-box;
padding: 6px 0 2px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
height: 185px;/*fluide*/
max-height: 36vmin;
text-align: center;
background-color: rgba(230, 230, 230, 0.7);
border: 1px solid #ddd;
border-radius: 6px;
background-color: rgba(0, 0, 0, 0);
transition: background-color 1.3s ease;
}
.galleryGalleryPicture:hover {
background-color: rgb(192, 192, 192);
background-color: rgba(255, 255, 255, 0.3);
}
.galleryGalleryName {
position: absolute;
left: 0;
right: 0;
bottom: 0;
line-height: 1.2;
color: #000;
overflow: hidden;
font-size: 0.85em;
}
.galleryGalleryPicture img {
max-height: 80%;
max-width: 95%;
}
.picResized {
color: crimson;
.galleryGalleryPicture > figure > img {
max-height: 20vmin;
max-width: 96%;
object-fit: contain;
}
.osm {
position: absolute;
left:10px;
bottom:10px;
right:10px;
top:10px;
}
/* adaptation */
@media (max-width: 1281px) {
.galleryGalleryPicture {
height: 160px;
}
figure, figcaption {
border: none;
margin: 0;
padding: 0;
}
/* styles adaptatifs */
@media (min-width: 1920px) {
.galleryGalleryPicture > figure > img {
max-height: 200px;
}
}
@media (max-width: 1025px) {
.galleryGalleryPicture {
height: 135px;
}
.galleryGalleryName {
font-size: 0.75em;
font-size: 0.78em;
}
}
@media (max-width: 813px) {
.galleryGalleryPicture {
height: 120px;
}
}
@media (max-width: 799px) {
section > .row:not(.back) {
display: flex;
flex-wrap: wrap;
padding: 0 10px;
justify-content: space-evenly;
}
.gallery {
flex: 0 0 33.3333%;
}
.col2:not(.gallery) {
width: inherit;
.galleryGalleryPicture > figure > img {
max-height: 25vmin;
}
}
@media (max-width: 599px) {
.gallery {
flex: 0 0 50%;
}
.galleryGalleryName {
display: none;
}
.galleryGalleryPicture {
padding: 12px 0 7px;
}
}

View File

@ -10,29 +10,16 @@
closeText: "&times;"
});
$(function () {
/* Affecte la bordure des blocs à la class galleryGalleryPicture */
$(document).ready(function(){
borderColor = "<?=$this->getData(['theme', 'block', 'borderColor'])?>";
borderRadius = "<?=$this->getdata(['theme', 'block', 'blockBorderRadius'])?>";
textColor = "<?=$this->getData(['theme', 'text', 'textColor'])?>";
linkColor = "<?=$this->getData(['theme', 'text', 'linkColor'])?>";
var taille = "<?php echo $this->getData(['theme','site', 'width']); ?>";
switch(taille)
{
case '75vw':
$('a.galleryGalleryPicture').css('height', '125px');
$('div.galleryGalleryName').css('font-size', '0.8em');
$('div.galleryGalleryName').css('line-height', '1em');
break;
case '85vw':
$('a.galleryGalleryPicture').css('height', '135px');
$('div.galleryGalleryName').css('font-size', '0.85em');
$('div.galleryGalleryName').css('line-height', '1em');
break;
case '95vw':
$('a.galleryGalleryPicture').css('height', '160px');
$('div.galleryGalleryName').css('font-size', '0.9em');
break;
default:
$('a.galleryGalleryPicture').css('height', '185px');
$('div.galleryGalleryName').css('font-size', '1em');
break;
}
$(".galleryGalleryPicture").css("border","solid 1px");
$(".galleryGalleryPicture").css("border-color", borderColor);
$(".galleryGalleryPicture").css("border-radius", borderRadius);
$(".galleryGalleryName").css("color", textColor);
$(".picResized").css("color", linkColor);
});

View File

@ -2,18 +2,7 @@
// Lexique
$param = '';
include('./module/album/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_album.php');
?>
<div class="row back">
<div class="col2">
<?php echo template::button('galleryGalleryBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
'value' => $text['album_view']['gallery'][0]
]); ?>
</div>
</div>
<?php
$i = 1;
$picturesNb = count($module::$pictures);
foreach($module::$pictures as $picture => $legend):
@ -36,23 +25,27 @@ $get_location = albumHelper::gps_exif($picture);
<?php endif; ?>
<div class="col2 gallery">
<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('<?=$urlback?>');" data-tippy-content="image originale">
<figure class="album"><img src="<?php echo albumHelper::makeThumbnail($picture); ?>" alt="<?php echo $legend; ?>">
<?php if ( ($photo_960 !== false) && (file_exists($urloriginal)) ): ?>
<figcaption><div class="galleryGalleryName picResized" onclick="window.open('<?=$urlback?>');" data-tippy-content="image originale">
<?php else: ?>
<div class="galleryGalleryName">
<figcaption><div class="galleryGalleryName">
<?php endif;
if (!empty($legend)):
$shortenedLegend = helper::subword($legend, 0, 20);
if ( strlen($shortenedLegend) < strlen($legend) ) $legend = $shortenedLegend.'...';
echo $legend;
// nettoyage et affichage du nom des images
else:
$separe = array('_','-','t960');
$picname = str_replace($separe, ' ', $photo);
$picname = preg_replace('/(\.jpe?g|\.png|\.gif|\.webp)$/i', '', $picname);
echo substr($picname,0,25);
$shortenedPicname = helper::subword($picname, 0, 20);
if ( strlen($shortenedPicname) < strlen($picname) ) $picname = $shortenedPicname.'...';
echo $picname;
endif;
?>
</div>
</div></figcaption></figure>
</a>
<?php
// ajout du marqueur aux images contenant des données exif gps
@ -76,3 +69,13 @@ $get_location = albumHelper::gps_exif($picture);
$i++;
endforeach;
?>
<div class="row back">
<div class="col2">
<?php echo template::button('galleryGalleryBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left',
'value' => $text['album_view']['gallery'][0]
]); ?>
</div>
</div>

View File

@ -1,53 +1,44 @@
.col3 {
section > * {
box-sizing: border-box;
padding: 0;
}
section > .row > .col3 {
padding: 5px;
vertical-align: middle;
}
.galleryPicture {
box-sizing: content-box;
padding: 6px 0 2px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
height: 220px;
max-height: 50vmin;
text-align: center;
background-color: rgba(230, 230, 230, 0.7);
border: 1px solid #ddd;
border-radius: 6px;
background-color: rgba(0, 0, 0, 0);
transition: background-color 1.3s ease;
}
.galleryPicture:hover {
background-color: rgb(192, 192, 192);
background-color: rgba(255, 255, 255, 0.3);
}
.galleryName {
position: absolute;
left: 0;
right: 0;
bottom: 0;
line-height: 1.5;
color: #000;
line-height: 1.20;
font-size: 0.85em;
}
.galleryPicture img {
max-height: 80%;
max-width: 95%;
.galleryPicture > figure > img {
max-height: 100%;
max-width: 96%;
object-fit: contain;
}
/* adaptation */
@media (max-width: 1281px) {
.galleryPicture {
height: 210px;
}
figure, figcaption {
border: none;
margin: 0;
padding: 0;
}
@media (max-width: 1025px) {
.galleryPicture {
height: 180px;
}
.galleryName {
font-size: 0.75em;
}
/* styles adaptatifs */
@media (min-width: 1920px) {
.galleryPicture > figure > img {
max-height: 200px;
}
@media (max-width: 961px) {
.galleryPicture {
height: 165px;
}
}
@media (max-width: 799px) {
section > .row {
@ -56,21 +47,6 @@ section > .row {
justify-content: space-evenly;
}
section > .row > .col3 {
max-width: 50%;
}
}
@media (max-width: 799px) and (orientation: portrait) {
.galleryPicture {
max-height: 45vmin;
}
}
@media (min-width: 768px) and (max-width: 799px) and (orientation: portrait) {
section > .row {
display: flex;
flex-wrap: wrap;
justify-content: start;
}
.col3 {
flex: 0 0 25%;
flex: 0 0 50%;
}
}

View File

@ -1,29 +1,11 @@
/**
* This file is part of DeltaCMS.
* Album Photo /view/index
*/
/* Affecte la bordure des blocs à la class galleryPicture */
$(document).ready(function(){
borderColor = "<?=$this->getData(['theme', 'block', 'borderColor'])?>";
borderRadius = "<?=$this->getdata(['theme', 'block', 'blockBorderRadius'])?>";
textColor = "<?=$this->getData(['theme', 'text', 'textColor'])?>";
$(function () {
var taille = "<?php echo $this->getData(['theme','site', 'width']); ?>";
switch(taille)
{
case '75vw':
$('a.galleryPicture').css('height', '170px');
$('div.galleryName').css('font-size', '0.8em');
break;
case '85vw':
$('a.galleryPicture').css('height', '200px');
$('div.galleryName').css('font-size', '0.85em');
break;
case '95vw':
$('a.galleryPicture').css('height', '235px');
$('div.galleryName').css('font-size', '0.9em');
break;
default:
$('a.galleryPicture').css('height', '250px');
$('div.galleryName').css('font-size', '1em');
break;
}
$(".galleryPicture").css("border","solid 1px");
$(".galleryPicture").css("border-color", borderColor);
$(".galleryPicture").css("border-radius", borderRadius);
$(".galleryName").css("color", textColor);
});

View File

@ -14,12 +14,12 @@ if($i % 4 === 1):
<?php endif; ?>
<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 'module/album/plugins/thumbnailer.php?img=' . $module::$firstPictures[$galleryId]; }
<figure class="album"><img src="<?php if ($this->getData(['module', $this->getUrl(0), $galleryId, 'config', 'homePicture']) === null ) {
echo albumHelper::makeThumbnail($module::$firstPictures[$galleryId]); }
else {
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']);
echo albumHelper::makeThumbnail($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>
<figcaption><div class="galleryName"><?php echo $gallery['config']['name']; ?></div></figcaption></figure>
</a>
</div>
<?php if($i % 4 === 0 OR $i === $galleriesNb): ?>