forked from ZwiiCMS-Team/ZwiiCMS
Merge branch '10400' into 11000
This commit is contained in:
commit
45c9788228
@ -18,6 +18,12 @@
|
||||
- Traduction automatique dans la langue du navigateur.
|
||||
- Amélioration de la structure du flux RSS.
|
||||
|
||||
## Version 10.3.11
|
||||
Modification :
|
||||
- Message sur l'utilisation des cookies
|
||||
Coorection :
|
||||
- Recherche inopérante dans les articles des blogs.
|
||||
|
||||
## Version 10.3.10
|
||||
Corrections :
|
||||
- Conflit page inactive et droit d'un membre.
|
||||
|
@ -221,14 +221,18 @@ core.start = function() {
|
||||
/**
|
||||
* Message sur l'utilisation des cookies
|
||||
*/
|
||||
var analytics = "";
|
||||
if (<?php echo json_encode($this->getData(['config', '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>").text("En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies et de vos données de visite."),
|
||||
$("<span>").html("<p>Ce site utilise des cookies pour assurer l'authentification, améliorer l'expérience utilisateur"+analytics+". <br/>En cliquant sur ”J’accepte”, vous acceptez l’utilisation de ces cookies.</p>"),
|
||||
$("<span>")
|
||||
.attr("id", "cookieConsentConfirm")
|
||||
.text("OK")
|
||||
.text("Accepter")
|
||||
.on("click", function() {
|
||||
// Créé le cookie d'acceptation
|
||||
var expires = new Date();
|
||||
@ -237,7 +241,19 @@ core.start = function() {
|
||||
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();
|
||||
}),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -1934,9 +1934,9 @@ class core extends common {
|
||||
}
|
||||
// Empêcher l'accès aux page désactivée par URL directe
|
||||
if ( ( $this->getData(['page', $this->getUrl(0),'disable']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) OR (
|
||||
$this->getData(['page', $this->getUrl(0),'disable']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) OR (
|
||||
$this->getData(['page', $this->getUrl(0),'disable']) === true
|
||||
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
AND $this->getUser('group') < self::GROUP_MODERATOR
|
||||
)
|
||||
@ -2311,14 +2311,15 @@ class layout extends common {
|
||||
* Affiche le script Google Analytics
|
||||
*/
|
||||
public function showAnalytics() {
|
||||
if($code = $this->getData(['config', 'analyticsId'])) {
|
||||
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 .'");
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag("js", new Date());
|
||||
gtag("config","'. $code .'");
|
||||
</script>';
|
||||
}
|
||||
}
|
||||
@ -2576,9 +2577,9 @@ class layout extends common {
|
||||
$itemsLeft .= '<li>';
|
||||
|
||||
if ( ( $this->getData(['page',$parentPageId,'disable']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) OR (
|
||||
$this->getData(['page',$parentPageId,'disable']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) OR (
|
||||
$this->getData(['page',$parentPageId,'disable']) === true
|
||||
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
AND $this->getUser('group') < self::GROUP_MODERATOR
|
||||
)
|
||||
@ -2636,9 +2637,9 @@ class layout extends common {
|
||||
// Mise en page du sous-item
|
||||
$itemsLeft .= '<li>';
|
||||
if ( ( $this->getData(['page',$childKey,'disable']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) OR (
|
||||
$this->getData(['page',$childKey,'disable']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) OR (
|
||||
$this->getData(['page',$childKey,'disable']) === true
|
||||
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
AND $this->getUser('group') < self::GROUP_MODERATOR
|
||||
)
|
||||
|
@ -975,20 +975,22 @@ footer #footerSocials .zwiico-github:hover {
|
||||
|
||||
/* Message sur les cookies */
|
||||
#cookieConsent {
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
opacity: .9;
|
||||
background: #212223;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
bottom: 5%;
|
||||
left: 0;
|
||||
color: #FFF;
|
||||
padding: 10px;
|
||||
z-index: 60;
|
||||
text-align: center;
|
||||
font-size: .9em;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
#cookieConsentConfirm {
|
||||
#cookieConsentConfirm, #cookieConsentRefuse {
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
background: #666;
|
||||
@ -997,10 +999,12 @@ footer #footerSocials .zwiico-github:hover {
|
||||
transition: background .3s ease-out;
|
||||
}
|
||||
|
||||
#cookieConsentConfirm:hover {
|
||||
#cookieConsentConfirm:hover, #cookieConsentRefuse:hover {
|
||||
background: #777;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Bloc */
|
||||
.block {
|
||||
/* border: 1px solid #D8DFE3;*/
|
||||
|
@ -163,8 +163,8 @@ class search extends common {
|
||||
foreach($childIds as $childId) {
|
||||
// Sous page
|
||||
if ($this->getData(['page', $childId, 'disable']) === false &&
|
||||
$this->getUser('group') >= $this->getData(['page', $childId, 'group']) &&
|
||||
$this->getData(['page', $childId, 'block']) !== 'bar') {
|
||||
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
|
||||
$this->getData(['page', $parentId, 'block']) !== 'bar') {
|
||||
$url = $childId;
|
||||
$titre = $this->getData(['page', $childId, 'title']);
|
||||
$contenu = ' ' . $titre . ' ' . $this->getData(['page', $childId, 'content']);
|
||||
|
Loading…
Reference in New Issue
Block a user