Merge branch '11200'

This commit is contained in:
Fred Tempez 2022-01-05 16:26:38 +01:00
commit 8241a51078
223 changed files with 10430 additions and 9049 deletions

View File

@ -24,8 +24,8 @@
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
# Cache le PHPSESSID de l'url
SetEnv SESSION_USE_TRANS_SID 0
# Cache le PHPSESSID de l'url // Désormais géré par index.php
# SetEnv SESSION_USE_TRANS_SID 0
# Bloque l'accès à la liste des fichiers
Options -Indexes

View File

@ -1,5 +1,31 @@
# Changelog
## Version 11.2.00
Mises à jour :
- jQuery v3.6.0
- Lity v2.4.1
- Lightbox v2.10.1
- Faltpickr v4.6.9
- FavIcon Switcher v1.2.2
- Corrections :
- Configuration, restauration d'une archive du site :
- la validation du formulaire sans avoir sélectionné de fichier de sauvegarde provoquait le crash du site.
- la conversion des URL des ressources ne fonctionnait plus depuis l'externalisation du contenu des pages dans des fichiers séparés.
- Multi-langues :
- Bug auto détection du navigateur.
- Page site map, correction d'erreurs et rénovation de la présentation.
- Modifications :
- Gestion des cookies :
- Options de personnalisation du message d'acceptation des cookies, acceptation ou refus du cookie Google Analytics, affichage de la page des mentions légales.
- Etiquette dans le footer permettant d'afficher la popup des cookies.
- Thème :
- Disposition des options de configuration du site.
- Bannière : le contenu peut être personnalisé à l'aide d'un éditeur. La bannière au-dessus du site peut s'étendre sur la largeur de la page.
- Pages : il est désormais possible de donner un nom de page court utilisé dans le menu du site, dans les barres latérales et dans les sélecteurs de page (éditeur / lien). En revanche le nom de la page affiché en haut de celle-ci est inchangé. Dans la plupart des cas le titre court sera identique au titre.
- Les écrans d'aide renvoient vers le site doc.zwiicms.fr
- Mise en évidence du statut des pages dans la liste de la barre d'administration. Rouge italique = page orpheline ; Orange gras = page inactive.
- Référencement, l'URL de la page d'accueil (www.site.fr/accueil) est remplacée par la base Url du site (www.site.fr/) afin d'éviter la duplication de contenu.
## Version 11.1.01
- Corrections :
- Langues : bug de l'utilitaire de copie de site.

View File

@ -1,6 +1,6 @@
# ZwiiCMS 11.1.01
# ZwiiCMS 11.2.00
Zwii 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.

View File

@ -47,7 +47,8 @@ class template {
'id' => $nameId,
'name' => $nameId,
'value' => '',
'limit' => false // captcha simple
'limit' => false, // captcha simple
'type'=> 'alpha' // num(érique) ou alpha(bétique)
], $attributes);
// Captcha quatre opérations
@ -114,14 +115,15 @@ class template {
$secondLetter = uniqid();
// Masquage image source pour éviter un décodage
copy ('core/vendor/zwiico/png/'.$letters[$firstNumber] . '.png', 'site/tmp/' . $firstLetter . '.png');
copy ('core/vendor/zwiico/png/'.$letters[$secondNumber] . '.png', 'site/tmp/' . $secondLetter . '.png');
copy ('core/vendor/zwiico/png/' . $attributes['type'] . '/' . $letters[$firstNumber] . '.png', 'site/tmp/' . $firstLetter . '.png');
copy ('core/vendor/zwiico/png/' . $attributes['type'] . '/' . $letters[$secondNumber] . '.png', 'site/tmp/' . $secondLetter . '.png');
// Début du wrapper
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="captcha inputWrapper ' . $attributes['classWrapper'] . '">';
// Label
$html .= self::label($attributes['id'],
'<img src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" />&nbsp;<strong>' . $operator . '</strong>&nbsp;<img class="captchaNumber" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" /> en chiffres ?', [
'<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" />&nbsp;<strong>' . $operator . '</strong>&nbsp;<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" /> en chiffres ?', [
'help' => $attributes['help']
]);

View File

@ -6,7 +6,7 @@
* @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
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -194,11 +194,11 @@ core.start = function() {
// Disparition de la notification
notificationTimer = setTimeout(function() {
$("#notification").fadeOut();
}, 2000);
}, 3000);
// Barre de progression
$("#notificationProgress").animate({
"width": "0%"
}, 2000, "linear");
}, 3000, "linear");
})
.trigger("mouseleave");
$("#notificationClose").on("click", function() {
@ -206,59 +206,69 @@ core.start = function() {
$("#notification").fadeOut();
$("#notificationProgress").stop();
});
/**
* Affiche / Cache le menu en mode responsive
* Traitement du formulaire cookies
*/
var menuDOM = $("#menu");
$("#toggle").on("click", function() {
menuDOM.slideToggle();
});
$(window).on("resize", function() {
if($(window).width() > 768) {
menuDOM.css("display", "");
$("#cookieForm").submit(function(event){
// Varables des cookies
var samesite = "samesite=lax";
var getUrl = window.location;
var domain = "domain=" + getUrl.host;
var path = "path=" + getUrl.pathname.split('/')[1];
var samesite = "samesite=lax";
var e = new Date();
e.setFullYear(e.getFullYear() + 1);
var expires = "expires=" + e.toUTCString();
// Crée le cookie d'acceptation Google Analytics si l'ID a été saisie
var analytics = "<?php echo $this->getData(['config', 'seo', 'analyticsId']);?>";
// l'Id GA est défini dans la configuration, afficher la checkbox d'acceptation
if( analytics.length > 0){
// Traitement du retour de la checkbox
if ($("#googleAnalytics").is(":checked")) {
// L'URL du serveur faut TRUE
document.cookie = "ZWII_COOKIE_GA_CONSENT=true;" + domain + ";" + path + ";" + samesite + ";" + expires;
} else {
document.cookie = "ZWII_COOKIE_GA_CONSENT=false;" + domain + ";" + path + ";" + samesite + ";" + expires;
}
}
// Stocke le cookie d'acceptation
document.cookie = "ZWII_COOKIE_CONSENT=true;" + domain + ";" + path + ";" + samesite + ";" + expires;
});
/**
* Fermeture de la popup des cookies
*/
$("#cookieConsent .cookieClose").on("click", function() {
$('#cookieConsent').addClass("displayNone");
});
/**
* Message sur l'utilisation des cookies
* Commande de gestion des cookies dans le footer
*/
var analytics = "";
if (<?php echo json_encode($this->getData(['config', 'seo', 'analyticsId'])); ?>) {
analytics = ' grâce au cookie Google Analytics'
}
if(<?php echo json_encode($this->getData(['config', 'cookieConsent'])); ?>) {
if(document.cookie.indexOf("ZWII_COOKIE_CONSENT") === -1) {
$("body").append(
$("<div>").attr("id", "cookieConsent").append(
$("<span>").html("<p>Ce site utilise des cookies pour assurer l'authentification, améliorer l'expérience utilisateur"+analytics+". <br/>En cliquant sur ”Jaccepte”, vous acceptez lutilisation de ces cookies.</p>"),
$("<span>")
.attr("id", "cookieConsentConfirm")
.text("Accepter")
.on("click", function() {
// Créé le cookie d'acceptation
var expires = new Date();
expires.setFullYear(expires.getFullYear() + 1);
expires = "expires=" + expires.toUTCString();
document.cookie = "ZWII_COOKIE_CONSENT=true;" + expires;
// Ferme le message
$(this).parents("#cookieConsent").fadeOut();
}),
$("<span>")
.attr("id", "cookieConsentRefuse")
.text("Refuser")
.on("click", function() {
// Créé le cookie d'acceptation
var expires = new Date();
expires.setFullYear(expires.getFullYear() + 1);
expires = "expires=" + expires.toUTCString();
document.cookie = "ZWII_COOKIE_CONSENT=false;" + expires;
// Ferme le message
$(this).parents("#cookieConsent").fadeOut();
}),
)
);
}
}
$("#footerLinkCookie").on("click", function() {
$("#cookieConsent").removeClass("displayNone");
});
/**
* Affiche / Cache le menu en mode responsive
*/
var menuDOM = $("#menu");
$("#toggle").on("click", function() {
menuDOM.slideToggle();
});
$(window).on("resize", function() {
if($(window).width() > 768) {
menuDOM.css("display", "");
}
});
/**
* Choix de page dans la barre de membre
*/
@ -366,8 +376,11 @@ core.start = function() {
var height = heightpx.substr(0,heightpx.length-2);
var ratio = width / height;
if ( ($(window).width() / ratio) <= height) {
//var feature = "<?php echo $this->getdata(['theme','header','feature']);?>";
$("header").height( $(window).width() / ratio );
$("header").css("line-height", $(window).width() / ratio + "px");
//if( feature !== "feature"){
// $("header").css("line-height", $(window).width() / ratio + "px");
//};
}
}
}).trigger("resize");
@ -478,21 +491,25 @@ $(document).ready(function(){
};
});
/**
* Active le système d'aide interne
*
*/
/**
* Active le système d'aide interne
*
*/
$(".buttonHelp").on({
click: function () {
$(".buttonHelp").click(function() {
$(".helpDisplayContent").slideToggle();
/**
if( $(".buttonHelp").css('opacity') > '0.75'){
$(".buttonHelp").css('opacity','0.5');
}
else{
$(".buttonHelp").css('opacity','1');
}
}
*/
});
$(".helpDisplayContent").click(function() {
$(".helpDisplayContent").slideToggle();
});
/**
@ -501,4 +518,11 @@ $(document).ready(function(){
if(/^\?fbclid=/.test(location.search))
location.replace(location.href.replace(/\?fbclid.+/, ""));
/**
* No translate Lity close
*/
$(document).on('lity:ready', function(event, instance) {
$('.lity-close').addClass('notranslate');
});
});

View File

@ -8,7 +8,7 @@
* @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
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -45,7 +45,7 @@ class common {
// Numéro de version
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '11.1.01';
const ZWII_VERSION = '11.2.01';
const ZWII_UPDATE_CHANNEL = "v11";
public static $actions = [];
@ -264,7 +264,13 @@ class common {
* la traduction est celle de la langue du drapeau
* */
if ( $this->getInput('ZWII_I18N_SCRIPT') !== substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2 ) ) {
setrawcookie('googtrans', '/fr/'.substr( $_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2 ), time() + 3600, helper::baseUrl());
setrawcookie('googtrans', '/fr/'.substr( $_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2 ), time() + 3600, helper::baseUrl(false, false));
} else {
// Langue du drapeau si elle est définie
if ( $this->getInput('ZWII_I18N_SCRIPT') !== '' ) {
// Paramètre du script
setrawcookie("googtrans", '/fr/'. $this->getInput('ZWII_I18N_SCRIPT') , time() + 3600, helper::baseUrl(false,false));
}
}
}
@ -473,7 +479,7 @@ class common {
*/
public function getPage($page, $lang) {
// Le nom de la ressource et le fichier de contenu sont définis :
// Le nom de la ressource et le fichier de contenu sont définis :
if (
$this->getData(['page', $page, 'content']) !== ''
&& file_exists(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']))
@ -482,14 +488,14 @@ class common {
return file_get_contents(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']));
} else {
return 'Aucun contenu trouvé.';
}
}
}
/**
* Ecrire les données de la page
* @param string pageId
* @param string contenu de la page
* @param string contenu de la page
* @param return nombre d'octets écrits ou erreur
*/
public function setPage($page, $value, $lang) {
@ -800,23 +806,23 @@ class common {
if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) {
// Boucler sur les enfants et récupérer le tableau children avec la liste des enfants
foreach($childIds as $childId) {
$children [] = [ 'title' => ' » '. html_entity_decode($this->getData(['page', $childId, 'title']), ENT_QUOTES) ,
$children [] = [ 'title' => ' » '. html_entity_decode($this->getData(['page', $childId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$childId
];
}
// Traitement
if (empty($childIds)) {
// Pas d'enfant, uniquement l'entrée du parent
$parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES) ,
$parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$parentId
];
} else {
// Des enfants, on ajoute la page parent en premier
array_unshift ($children , ['title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES) ,
array_unshift ($children , ['title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$parentId
]);
// puis on ajoute les enfants au parent
$parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES) ,
$parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$parentId ,
'menu' => $children
];
@ -906,7 +912,9 @@ class common {
}
// Page désactivée, traiter les sous-pages sans prendre en compte la page parente.
if ($this->getData(['page', $parentPageId, 'disable']) !== true ) {
$sitemap->addUrl ('/' . $parentPageId,$datetime);
// Cas de la page d'accueil ne pas dupliquer l'URL
$pageId = ($parentPageId !== $this->getData(['locale', 'homePageId'])) ? $parentPageId : '';
$sitemap->addUrl ('/' . $pageId, $datetime);
}
// Articles du blog
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog' &&
@ -923,6 +931,8 @@ class common {
if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
continue;
}
// Cas de la page d'accueil ne pas dupliquer l'URL
$pageId = ($childKey !== $this->getData(['locale', 'homePageId'])) ? $childKey : '';
$sitemap->addUrl('/' . $childKey,$datetime);
// La sous-page est un blog
@ -953,7 +963,7 @@ class common {
} else {
file_put_contents('robots.txt','User-agent: *' . PHP_EOL . 'Disallow: /');
}
// Submit your sitemaps to Google, Yahoo, Bing and Ask.com
if (empty ($this->getData(['config','proxyType']) . $this->getData(['config','proxyUrl']) . ':' . $this->getData(['config','proxyPort'])) ) {
$sitemap->submitSitemap();
@ -976,6 +986,7 @@ class common {
if (!is_dir($fileInfo['dirname'])) {
mkdir($fileInfo['dirname'], 0755, true);
}
$source_image = '';
// Type d'image
switch( $fileInfo['extension']) {
case 'jpeg':
@ -1171,18 +1182,60 @@ class common {
/**
* Affiche le script Google Analytics
*/
public function showAnalytics() {
if($code = $this->getData(['config', 'analyticsId'])
AND $this->getInput('ZWII_COOKIE_CONSENT') === 'true') {
echo '<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id='. $code .'"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag("js", new Date());
gtag("config","'. $code .'",{ "anonymize_ip": true });
</script>';
public function showAnalytics() {
if( !empty($code = $this->getData(['config', 'seo', 'analyticsId'])) &&
$this->getInput('ZWII_COOKIE_GA_CONSENT') === 'true' ) {
echo '<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id='. $code .'"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag("js", new Date());
gtag("config","'. $code .'",{ "anonymize_ip": true });
</script>';
}
}
/**
* Affiche le consentement aux cookies
*/
public function showCookies() {
// Gestion des cookies intégrée
if ($this->getData(['config', 'cookieConsent']) === true )
{
// Détermine si le bloc doit être affiché selon la validité du cookie
// L'URL du serveur faut TRUE
$item = '<div id="cookieConsent"';
$item .= $this->getInput('ZWII_COOKIE_CONSENT') !== 'true' ? '>' : ' class="displayNone">';
// Bouton de fermeture
$item .= '<div class="cookieClose">';
$item .= template::ico('cancel');
$item .= '</div>';
// Texte de la popup
$item .= '<h3>'. $this->getData(['locale', 'cookies', 'cookiesTitleText']) . '</h3>';
$item .= '<p>' . $this->getData(['locale', 'cookies', 'cookiesZwiiText']) . '</p>';
// Formulaire de réponse
$item .= '<form method="POST" action="" id="cookieForm">';
$analytics = $this->getData(['config', 'seo', 'analyticsId']);
$stateCookieGA = $this->getInput('ZWII_COOKIE_GA_CONSENT') === 'true' ? 'checked="checked"' : '';
if( $analytics !== null AND $analytics !== '' ) {
$item .= '<p>' . $this->getData(['locale', 'cookies', 'cookiesGaText']) . '</p>';
$item .= '<input type="checkbox" id="googleAnalytics" name="googleAnalytics" value="GA" ' . $stateCookieGA . '>';
$item .= '<label for="googleAnalytics">' . $this->getData(['locale', 'cookies', 'cookiesCheckboxGaText']) . '</label>';
}
$item .= '<br><br>';
$item .= '<input type="submit" id="cookieConsentConfirm" value="' . $this->getData(['locale', 'cookies', 'cookiesButtonText']) . '">';
$item .= '</form>';
// mentions légales si la page est définie
$legalPage = $this->getData(['locale', 'legalPageId']);
if ($legalPage !== 'none') {
$item .= '<p><a href="' . helper::baseUrl() . $legalPage . '">' . $this->getData(['locale', 'cookies', 'cookiesLinkMlText']) . '</a></p>';
}
$item .= '</div>';
echo $item;
}
}
/**
@ -1259,7 +1312,7 @@ class common {
* Barre droite
*/
if ($blockright !== "") {
echo '<div class="' . $blockright . '" id="contentRight"><aside>';
echo '<div class="' . $blockright . '" id="contentRight"><aside>';
// Détermine si le menu est présent
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) === 'none') {
// Pas de menu
@ -1332,7 +1385,7 @@ class common {
$this->getData(['theme', 'footer', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
) {
) {
$position = 'site';
} else {
$position = 'body';
@ -1342,7 +1395,7 @@ class common {
// Sortir de la division précédente
echo '</div>';
}
echo $this->getData(['theme', 'footer', 'position']) === 'hide' ? '<footer class="displayNone">' : '<footer>';
echo ($position === 'site') ? '<div class="container"><div class="row" id="footersite">' : '<div class="container-large'. $positionFixed . '"><div class="row" id="footerbody">';
/**
@ -1416,7 +1469,7 @@ class common {
$items .= '>Motorisé&nbsp;par&nbsp;</span>';
// Toujours afficher le nom du CMS
$items .= '<span id="footerZwiiCMS">';
$items .= '<a href="https://zwiicms.fr/" onclick="window.open(this.href);return false" data-tippy-content="Zwii CMS sans base de données, très léger et performant">ZwiiCMS</a>';
$items .= '<a href="https://zwiicms.fr/" onclick="window.open(this.href);return false" >ZwiiCMS</a>';
$items .= '</span>';
// Affichage du numéro de version
$items .= '<span id="footerDisplayVersion"';
@ -1427,14 +1480,14 @@ class common {
$items .= '<span id="footerDisplaySiteMap"';
$items .= $this->getData(['theme','footer','displaySiteMap']) === false ? ' class="displayNone"' : '';
$label = empty($this->getData(['locale','sitemapPageLabel'])) ? 'Plan du site' : $this->getData(['locale','sitemapPageLabel']);
$items .= '><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'sitemap" data-tippy-content="Plan du site" >' . $label . '</a>';
$items .= '><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'sitemap" >' . $label . '</a>';
$items .= '</span>';
// Affichage du module de recherche
$items .= '<span id="footerDisplaySearch"';
$items .= $this->getData(['theme','footer','displaySearch']) === false ? ' class="displayNone" >' : '>';
$label = empty($this->getData(['locale','searchPageLabel'])) ? 'Rechercher' : $this->getData(['locale','searchPageLabel']);
if ($this->getData(['locale','searchPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','searchPageId']) . '" data-tippy-content="' . $label . '" >' . $label .'</a>';
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','searchPageId']) . '" >' . $label .'</a>';
}
$items .= '</span>';
// Affichage des mentions légales
@ -1442,9 +1495,15 @@ class common {
$items .= $this->getData(['theme','footer','displayLegal']) === false ? ' class="displayNone" >' : '>';
$label = empty($this->getData(['locale','legalPageLabel'])) ? 'Mentions Légales' : $this->getData(['locale','legalPageLabel']);
if ($this->getData(['locale','legalPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','legalPageId']) . '" data-tippy-content="' . $label . '">' . $label .'</a>';
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','legalPageId']) . '" >' . $label .'</a>';
}
$items .= '</span>';
// Affichage de la gestion des cookies
$items .= '<span id="footerDisplayCookie"';
$items .= ($this->getData(['config', 'cookieConsent']) === true && $this->getData(['theme', 'footer', 'displayCookie']) === true) ? '>' : ' class="displayNone" >';
$label = empty($this->getData(['locale', 'cookies', 'cookiesFooterText'])) ? 'Cookies' : $this->getData(['locale', 'cookies', 'cookiesFooterText']) ;
$items .= '<wbr>&nbsp;|&nbsp;<a href="javascript:void(0)" class="skiptranslate" id="footerLinkCookie">'. $label .'</a>';
$items .= '</span>';
// Affichage du lien de connexion
if(
(
@ -1457,7 +1516,7 @@ class common {
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'" data-tippy-content="Connexion à l\'administration" rel="nofollow">' . template::ico('login') .'</a></span>';
'" rel="nofollow">' . template::ico('login') .'</a></span>';
}
// Affichage de la barre de membre simple
if ( $this->getUser('group') === self::GROUP_MEMBER
@ -1465,9 +1524,9 @@ class common {
) {
$items .= '<span id="footerDisplayMemberAccount"';
$items .= $this->getData(['theme','footer','displaymemberAccount']) === false ? ' class="displayNone"' : '';
$items .= '><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte" >' . template::ico('user', 'all') . '</a>';
if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $items .= '<wbr><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a>';
$items .= '<wbr><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout','left') . '</a>';
$items .= '><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" >' . template::ico('user', 'all') . '</a>';
if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $items .= '<wbr><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-lity>' . template::ico('folder') . '</a>';
$items .= '<wbr><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" >' . template::ico('logout','left') . '</a>';
$items .= '</span>';
}
// Fermeture du bloc copyright
@ -1568,7 +1627,7 @@ class common {
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item
$itemsLeft .= '<li>';
if ( ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
@ -1577,31 +1636,33 @@ class common {
AND $this->getUser('group') < self::GROUP_MODERATOR
)
){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'. helper::baseUrl() . $this->getUrl(0).'">';
$pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
$itemsLeft .= '<a class="A ' . $parentPageId . '" href="' . $pageUrl . '">';
} else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
$pageUrl = ($this->getData(['locale', 'homePageId']) === $parentPageId) ? helper::baseUrl(false) : helper::baseUrl() . $parentPageId;
$itemsLeft .= '<a class="B ' . $active . $parentPageId . '" href="' . $pageUrl . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
case '' :
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
break;
case 'text' :
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
break;
case 'icon' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
} else {
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'titlshortTitlee']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']).'"/>';
} else {
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
}
break;
}
@ -1637,39 +1698,41 @@ class common {
AND $this->getUser('group') < self::GROUP_MODERATOR
)
){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.helper::baseUrl() . $this->getUrl(0).'">';
$pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
$itemsLeft .= '<a class="' . $parentPageId . '" href="'. $pageUrl .'">';
} else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
$pageUrl = ($this->getData(['locale', 'homePageId']) === $childKey) ? helper::baseUrl(false) : helper::baseUrl() . $childKey;
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . $pageUrl . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
case '' :
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
break;
case 'text' :
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
break;
case 'icon' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
} else {
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $childKey, 'title']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']).'"/>';
} else {
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
}
break;
case 'icontext' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
} else {
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
}
break;
}
@ -1757,7 +1820,7 @@ class common {
} else {
$items .= '<a href="'. helper::baseUrl() . $parentPageId . '"' . $targetBlank . $active .'>';
}
$items .= $this->getData(['page', $parentPageId, 'title']);
$items .= $this->getData(['page', $parentPageId, 'shortTitle']);
$items .= '</a>';
}
$itemsChildren = '';
@ -1780,7 +1843,7 @@ class common {
$itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $active . '>';
}
$itemsChildren .= $this->getData(['page', $childKey, 'title']);
$itemsChildren .= $this->getData(['page', $childKey, 'shortTitle']);
$itemsChildren .= '</a></li>';
}
// Concatène les items enfants
@ -1897,18 +1960,22 @@ class common {
helper::baseUrl() .
$parentPageId . '"' .
($parentPageId === $currentPageId ? ' selected' : false) .
($this->getData(['page', $parentPageId, 'disable']) === true ? ' class="inactive"' : '') .
'>' .
$this->getData(['page', $parentPageId, 'title']) .
' class="' .
($this->getData(['page', $parentPageId, 'disable']) === true ? 'pageInactive' : '') .
($this->getData(['page', $parentPageId, 'position']) === 0 ? ' pageHidden' : '') .
'">' .
$this->getData(['page', $parentPageId, 'shortTitle']) .
'</option>';
foreach($childrenPageIds as $childKey) {
$leftItems .= '<option value="' .
helper::baseUrl() .
$childKey . '"' .
($childKey === $currentPageId ? ' selected' : false) .
($this->getData(['page', $childKey, 'disable']) === true ? ' class="inactive"' : '') .
'>&nbsp;&nbsp;&nbsp;&nbsp;' .
$this->getData(['page', $childKey, 'title']) .
' class="' .
($this->getData(['page', $childKey, 'disable']) === true ? 'pageInactive' : '') .
($this->getData(['page', $childKey, 'position']) === 0 ? ' pageHidden' : '') .
'">&nbsp;&nbsp;&nbsp;&nbsp;' .
$this->getData(['page', $childKey, 'shortTitle']) .
'</option>';
}
}
@ -1917,9 +1984,9 @@ class common {
// Afficher les barres
$leftItems .= '<optgroup label="Barres latérales">';
foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) {
$leftItems .= '<option value="' . helper::baseUrl() . $parentPageId . '"' . ($parentPageId === $currentPageId ? ' selected' : false) . '>' . $this->getData(['page', $parentPageId, 'title']) . '</option>';
$leftItems .= '<option value="' . helper::baseUrl() . $parentPageId . '"' . ($parentPageId === $currentPageId ? ' selected' : false) . '>' . $this->getData(['page', $parentPageId, 'shortTitle']) . '</option>';
foreach($childrenPageIds as $childKey) {
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '>&nbsp;&nbsp;&nbsp;&nbsp;' . $this->getData(['page', $childKey, 'title']) . '</option>';
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '>&nbsp;&nbsp;&nbsp;&nbsp;' . $this->getData(['page', $childKey, 'shortTitle']) . '</option>';
}
}
$leftItems .= '</optgroup>';
@ -1947,13 +2014,14 @@ class common {
$rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
}
if($this->getUser('group') >= self::GROUP_ADMIN) {
$rightItems .= '<li><a href="' . helper::baseUrl() . 'theme" data-tippy-content="Personnaliser les thèmes">' . template::ico('brush') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'addon" data-tippy-content="Gérer les modules">' . template::ico('puzzle') . '</a></li>';
if ($this->getData(['config', 'i18n', 'enable']) === true) {
$rightItems .= '<li><a href="' . helper::baseUrl() . 'translate" data-tippy-content="Gestion des langues">' . template::ico('flag') . '</a></li>';
}
$rightItems .= '<li><a href="' . helper::baseUrl() . 'theme" data-tippy-content="Personnaliser les thèmes">' . template::ico('brush') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user" data-tippy-content="Configurer les utilisateurs">' . template::ico('users') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'addon" data-tippy-content="Gérer les modules">' . template::ico('puzzle') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'config" data-tippy-content="Configurer le site">' . template::ico('cog-alt') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user" data-tippy-content="Configurer les utilisateurs">' . template::ico('users') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Configurer mon compte">' . template::ico('user', 'right') . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>';
// Mise à jour automatique
$today = mktime(0, 0, 0);
// Une mise à jour est disponible + recherche auto activée + 1 jour de délais
@ -1970,7 +2038,6 @@ class common {
$rightItems .= '<li><a id="barUpdate" href="' . helper::baseUrl() . 'install/update" data-tippy-content="Mettre à jour Zwii '. common::ZWII_VERSION .' vers '. helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) .'">' . template::ico('update colorRed') . '</a></li>';
}
}
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Configurer mon compte">' . template::ico('user', 'right') . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>';
$rightItems .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
// Barre de membre
echo '<div id="bar"><div class="container"><ul id="barLeft">' . $leftItems . '</ul><ul id="barRight">' . $rightItems . '</ul></div></div>';
@ -2056,10 +2123,16 @@ class common {
*/
public function showi18n() {
foreach (self::$i18nList as $key => $value) {
if ($this->getData(['config', 'i18n', $key]) === 'site'
OR (
// Le script de traduction est actif et la langue est traduite par script
$this->getData(['config', 'i18n','scriptGoogle']) === true
AND $this->getData(['config', 'i18n',$key]) === 'script'
AND $this->getData(['config', 'i18n', $key]) === 'script'
// Le drapeau n'est pas actif pour les non admin en mode connecté.
AND
( $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
OR $this->getUser('group') === self::GROUP_ADMIN )
)
) {
if (
@ -2075,9 +2148,9 @@ class common {
$select = ' class="i18nFlag" ';
}
echo '<li>';
echo '<a href="' . helper::baseUrl() . 'translate/language/' . $key . '/' . $this->getData(['config', 'i18n',$key]) . '/' . $this->getUrl(0) . '"><img ' . $select . ' class="flag" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $key . '.png" alt=' . $key . '/></a>';
echo '</li>';
echo '<li>';
echo '<a href="' . helper::baseUrl() . 'translate/i18n/' . $key . '/' . $this->getData(['config', 'i18n',$key]) . '/' . $this->getUrl(0) . '"><img ' . $select . ' class="flag" alt="' . $value . '" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $key . '.png"/></a>';
echo '</li>';
}
}
}
@ -2166,14 +2239,14 @@ class core extends common {
$css .= 'body{font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
if($themeBodyImage = $this->getData(['theme', 'body', 'image'])) {
// Image dans html pour éviter les déformations.
$css .= 'html, .mce-menu.mce-in.mce-animate {background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
$css .= 'html {background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
// Couleur du body transparente
$css .= 'body, .mce-menu.mce-in.mce-animate{background-color: rgba(0,0,0,0)}';
$css .= 'body {background-color: rgba(0,0,0,0)}';
} else {
// Pas d'image couleur du body
$css .= 'html, .mce-menu.mce-in.mce-animate{background-color:' . $colors['normal'] . ';}';
$css .= 'html {background-color:' . $colors['normal'] . ';}';
// Même couleur dans le fond de l'éditeur
$css .= 'div.mce-edit-area {background-color:' . $colors['normal'] . ' !important}';
//$css .= '{background-color:' . $colors['normal'] . ' !important}';
}
// Icône BacktoTop
$css .= '#backToTop {background-color:' .$this->getData(['theme', 'body', 'toTopbackgroundColor']). ';color:'.$this->getData(['theme', 'body', 'toTopColor']).';}';
@ -2184,6 +2257,7 @@ class core extends common {
$css .= 'div.mce-edit-area {font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
// Site dans TinyMCE
$css .= '.editorWysiwyg {background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';}';
$css .= 'span.mce-text{background-color: unset !important;}';
//$css .= 'a:hover:not(.inputFile, button){color:' . $colors['darken'] . '}';
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
$css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
@ -2226,9 +2300,11 @@ class core extends common {
// Les blocs
$colors = helper::colorVariants($this->getData(['theme', 'block', 'backgroundColor']));
$css .= '.block {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) . ';}.block h4 {background-color:'. $colors['normal'] . ';color:' . $colors['text'] .';}';
$css .= '.mce-tinymce {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) .' !important;}';
//$css .= '.mce-tinymce {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) .' !important;}';
// Bannière
$colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor']));
// Eléments communs
if($this->getData(['theme', 'header', 'margin'])) {
if($this->getData(['theme', 'menu', 'position']) === 'site-first') {
$css .= 'header{margin:0 20px}';
@ -2237,18 +2313,33 @@ class core extends common {
$css .= 'header{margin:20px 20px 0 20px}';
}
}
$css .= 'header{background-size:' . $this->getData(['theme','header','imageContainer']).'}';
$css .= 'header{background-color:' . $colors['normal'];
$colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor']));
$css .= 'header{background-color:' . $colors['normal'] . ';}';
// Valeur de hauteur traditionnelle
$css .= ';height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']) ;
// Bannière de type papier peint
if ($this->getData(['theme','header','feature']) === 'wallpaper' ) {
$css .= 'header{background-size:' . $this->getData(['theme','header','imageContainer']).'}';
$css .= 'header{background-color:' . $colors['normal'];
$css .= ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) {
$css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}';
// Valeur de hauteur traditionnelle
$css .= ';height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']) ;
$css .= ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) {
$css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}';
}
$colors = helper::colorVariants($this->getData(['theme', 'header', 'textColor']));
$css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}';
}
$colors = helper::colorVariants($this->getData(['theme', 'header', 'textColor']));
$css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}';
// Bannière au contenu personnalisé
if ($this->getData(['theme','header','feature']) === 'feature' ) {
// Hauteur de la taille du contenu perso
$css .= 'header {height:'. $this->getData(['theme', 'header', 'height']) . '; min-height:' . $this->getData(['theme', 'header', 'height']) . ';overflow: hidden;}';
//$css .= '.bannerDisplay img { width: auto;max-height:' . $this->getData(['theme', 'header', 'height']) . ';}';
}
// Menu
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor']));
$css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}';
@ -2307,6 +2398,7 @@ class core extends common {
$css .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}';
$css .= '#footerText > p {text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
// Enregistre la personnalisation
file_put_contents(self::DATA_DIR.'theme.css', $css);
@ -2326,6 +2418,8 @@ class core extends common {
$css .= '#site{background-color:' . $colors['normal']. ';}';
$css .= '.row > div {font:' . $this->getData(['admin','fontSize']) . ' "' . $this->getData(['admin','fontText']) . '", sans-serif;}';
$css .= 'body h1, h2, h3, h4 a, h5, h6 {font-family:' . $this->getData(['admin','fontTitle' ]) . ', sans-serif;color:' . $this->getData(['admin','colorTitle' ]) . ';}';
// TinyMCE
$css .= 'body:not(.editorWysiwyg),span .zwiico-help {color:' . $this->getData(['admin','colorText']) . ';}';
$css .= 'table thead tr, table thead tr .zwiico-help{ background-color:'.$this->getData(['admin','colorText']).'; color:'.$colors['normal'].';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButton']));
@ -2400,7 +2494,7 @@ class core extends common {
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND ( $this->getUser('group') === self::GROUP_BANNED
OR ( $_SESSION['csrf'] !== $this->getData(['user',$this->getUser('id'),'accessCsrf'])
AND $this->getData(['config','autoDisconnect']) === true)
AND $this->getData(['config','connect', 'autoDisconnect']) === true)
)
) {
$user = new user;
@ -2740,8 +2834,7 @@ class core extends common {
)
) {
// Paramètre du script
setrawcookie("googtrans", '/fr/'. $this->getInput('ZWII_I18N_SCRIPT') , time() + 3600, helper::baseUrl());
// Chargement de la librairie
$this->addOutput([
'vendor' => array_merge($this->output['vendor'], ['i18n'])
@ -2749,6 +2842,7 @@ class core extends common {
}
}
// Erreurs
if($access === 'login') {
http_response_code(302);

View File

@ -670,4 +670,51 @@ if ($this->getData(['core', 'dataVersion']) < 11100) {
$this->setData(['theme', 'menu', 'burgerLogo', '']);
$this->setData(['core', 'dataVersion', 11100]);
}
}
// Version 11.2.00
if ($this->getData(['core', 'dataVersion']) < 11200) {
// Mise àjour des données de config
$this->setData(['config', 'connect', 'captchaStrong', $this->getData(['config', 'captchaStrong'])]);
$this->deleteData(['config', 'captchaStrong']);
$this->setData(['config', 'connect', 'autoDisconnect', $this->getData(['config', 'autoDisconnect'])]);
$this->deleteData(['config', 'autoDisconnect']);
$this->setData(['config', 'connect', 'captchaType', 'alpha']);
// Ajout de la variable shortTitle basée sur Title
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
$pageList [] = $parentKey;
foreach ($parentValue as $childKey) {
$pageList [] = $childKey;
}
}
foreach ($pageList as $parentKey => $parent) {
$this->setData(['page', $parent, 'shortTitle', $this->getData(['page', $parent, 'title']) ]);
}
// Incorporer les nouveaux champs du header et du menu
$this->setData(['theme', 'header', 'feature', 'wallpaper']);
$this->setData(['theme', 'header', 'featureContent', '<p>Bannière vide</p>']);
$this->setData(['theme', 'header', 'container', 'container']);
$this->setData(['theme', 'menu', 'container', 'container']);
// Option des cookies dans le footer
$this->setData(['theme', 'footer', 'displayCookie', false]);
// Acceptation et paramétres des cookies RGPD
$this->setData(['locale', 'cookies', 'cookieZwiiText', 'Ce site utilise des cookies nécessaires à son fonctionnement, ils permettent de fluidifier son fonctionnement par exemple en mémorisant les données de connexion, la langue que vous avez choisie ou la validation de ce message.']);
$this->setData(['locale', 'cookies', 'cookieGaText', 'Il utilise également des cookies permettant de réaliser des statistiques de visites pour améliorer votre expérience utilisateur, ces cookies déposés par Google Analytics ont besoin de votre consentement.']);
$this->setData(['locale', 'cookies', 'cookieTitleText', 'Gérer les cookies']);
$this->setData(['locale', 'cookies', 'cookieLinkMlText', 'Consulter les mentions légales']);
$this->setData(['locale', 'cookies', 'cookieCheckboxGaText', 'Autorisation des cookies Google Analytics']);
$this->setData(['locale', 'cookies', 'cookiesButtonText', 'J\'ai compris']);
// Supppression de l'option de traduction en mode connecté
$this->setData(['config','i18n', 'admin', false]);
// Option de dévoilement du mdp
$this->setData(['config', 'connect', 'showPassword', true]);
// Mise à jour
$this->setData(['core', 'dataVersion', 11200]);
}

View File

@ -6,7 +6,7 @@
* @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
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -6,7 +6,7 @@
* @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
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -135,8 +135,13 @@ li ul {
margin: 0;
}
option.inactive {
color: darkorange;
option.pageInactive {
color: orange;
font-weight: bold;
}
option.pageHidden {
color: red;
font-style: italic;
}
/* Séparateur */
@ -332,9 +337,13 @@ td>.col12 {
/* Notice */
.notice {
display: inline-block;
display: inline-block;
color: #E74C3C;
}
/* Mauvaise position dans les champs File*/
.inputFile.notice {
display: block;
}
/* Container */
.container {
@ -493,6 +502,18 @@ header .container {
height: 100%;
}
/* Marges au cotenu de la bannière personnalisée
header:not(.container) #featureContent {
margin: 0 10px;
}*/
header #featureContent {
overflow: hidden;
margin: 0 10px;
}
/* Element du header
#themeHeaderImage {
@ -821,6 +842,7 @@ footer #footerbody>div {
#footerDisplayVersion,
#footerDisplaySiteMap,
#footerDisplayLegal,
#footerDisplayCookie,
#footerDisplaySearch,
#footerZwiiCMS {
font-size: inherit;
@ -968,9 +990,9 @@ footer #footerSocials .zwiico-github:hover {
/* Message sur les cookies */
#cookieConsent {
width: 80%;
width: 60%;
margin: auto;
opacity: .9;
opacity: .95;
background: #212223;
position: fixed;
right: 0;
@ -983,20 +1005,29 @@ footer #footerSocials .zwiico-github:hover {
font-size: 1em;
}
#cookieConsentConfirm, #cookieConsentRefuse {
#cookieConsentConfirm {
background-color: green;
}
#cookieConsentConfirm {
cursor: pointer;
margin-left: 10px;
background: #666;
padding: 4px 8px;
display: inline-block;
transition: background .3s ease-out;
}
#cookieConsentConfirm:hover, #cookieConsentRefuse:hover {
background: #777;
#cookieConsentConfirm:hover {
filter: grayscale(50%);
}
#cookieConsent .cookieClose {
position: absolute;
right: 10px;
top: 10px;
font-size: 1.5em;
cursor: pointer;
}
/* Bloc */
.block {
@ -1644,13 +1675,21 @@ th.col12 {
/* Captcha
*/
.captcha img {
height: 30px;
.captchaNum, .captchaAlpha {
vertical-align: middle;
padding-left: 10px;
padding-right: 10px;
}
.captchaNum {
height: 5em;
}
.captchaAlpha {
height: 2em;
}
.captcha input[type='text'] {
width: 4em;
text-align: center;
@ -1711,13 +1750,13 @@ th.col12 {
display: none;
width: 100%;
padding: 10px 10px;
-webkit-box-shadow: 5px 5px 11px 0px #222222;
box-shadow: 5px 5px 11px 0px #222222;
border-radius: 5px;
z-index: 30;
-webkit-box-shadow: 5px 5px 11px 0px #222222;
box-shadow: 5px 5px 11px 0px #222222;
border-radius: 5px;
z-index: 30;
}
.helpDisplayButton {
.helpDisplayContent, .helpDisplayButton {
cursor: pointer;
}