init editeur
|
@ -430,6 +430,9 @@ class common {
|
|||
case 7:
|
||||
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6]);
|
||||
break;
|
||||
case 8:
|
||||
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6].'.'.$keys[7]);
|
||||
break;
|
||||
}
|
||||
return $tempData;
|
||||
}
|
||||
|
@ -979,6 +982,10 @@ class common {
|
|||
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5],$keys[6]);
|
||||
$db->save();
|
||||
break;
|
||||
case 8:
|
||||
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6],$keys[7] );
|
||||
$db->save();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1446,7 +1453,7 @@ class common {
|
|||
}
|
||||
// Mettre à jour les données des blogs les articles sont dans posts
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une blog
|
||||
//La page a une galerie
|
||||
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
||||
foreach ( $this->getData(['module', $parent]) as $blogKey => $blogItem) {
|
||||
$data = $this->getdata(['module',$parent,$blogKey]);
|
||||
|
@ -1456,7 +1463,7 @@ class common {
|
|||
}
|
||||
}
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une news
|
||||
//La page a une galerie
|
||||
if ($this->getData(['page',$parent,'moduleId']) === 'news' ) {
|
||||
foreach ( $this->getData(['module', $parent]) as $newsKey => $newsItem) {
|
||||
$data = $this->getdata(['module',$parent,$newsKey]);
|
||||
|
@ -1485,11 +1492,16 @@ class common {
|
|||
}
|
||||
}
|
||||
// Parcourir pageList et rechercher les modules de blog
|
||||
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une galerie
|
||||
//La page est un blog
|
||||
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
||||
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent,'posts']), 'publishedOn', 'SORT_DESC'));
|
||||
//echo "<pre>".$parent;
|
||||
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $parent, 'posts']), 'publishedOn', 'SORT_DESC'));
|
||||
//var_dump($articleIds);
|
||||
foreach ($articleIds as $key => $article) {
|
||||
//echo $article;
|
||||
//echo "<p>";
|
||||
// Droits les deux groupes
|
||||
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
|
||||
// Limite de taille 500
|
||||
|
@ -1501,6 +1513,7 @@ class common {
|
|||
// groupe de notification
|
||||
$this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]);
|
||||
}
|
||||
|
||||
// Traitement des commentaires
|
||||
if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) {
|
||||
foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) {
|
||||
|
@ -1931,7 +1944,7 @@ class core extends common {
|
|||
'title' => $title,
|
||||
// Meta description = 160 premiers caractères de l'article
|
||||
'metaDescription' => $this->getData(['page',$this->getUrl(0),'moduleId']) === 'blog' && !empty($this->getUrl(1))
|
||||
? strip_tags(substr($this->getData(['module',$this->getUrl(0),$this->getUrl(1),'content']) ,0,159))
|
||||
? strip_tags(substr($this->getData(['module',$this->getUrl(0),'posts',$this->getUrl(1),'content']) ,0,159))
|
||||
: $this->getData(['page', $this->getUrl(0), 'metaDescription']),
|
||||
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
|
||||
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
|
||||
|
@ -2103,7 +2116,7 @@ class core extends common {
|
|||
|
||||
// Librairie googtrans ajouté dynamiquement
|
||||
if ( substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr'
|
||||
AND $this->getData(['translate','active']) === true
|
||||
AND $this->getData(['translate','active']) === true
|
||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) {
|
||||
$this->addOutput([
|
||||
'vendor' => array_merge($this->output['vendor'], ['i18n'])
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
<ul>
|
||||
<?php foreach($this->getHierarchy(null,true,null) as $parentId => $childIds): ?>
|
||||
<li>
|
||||
<?php
|
||||
<?php
|
||||
if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
||||
{ ?>
|
||||
{ ?>
|
||||
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
|
||||
<?php
|
||||
} else {
|
||||
<?php
|
||||
} else {
|
||||
// page désactivée
|
||||
echo $this->getData(['page', $parentId, 'title']);
|
||||
echo $this->getData(['page', $parentId, 'title']);
|
||||
} ?>
|
||||
<ul>
|
||||
<?php foreach($childIds as $childId): ?>
|
||||
<li>
|
||||
<!-- Sous-page -->
|
||||
<?php if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
||||
{ ?>
|
||||
<?php if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
||||
{ ?>
|
||||
<a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a>
|
||||
<?php } else { ?>
|
||||
<!-- page désactivée -->
|
||||
<?php echo $this->getData(['page', $childId, 'title']); }?>
|
||||
|
||||
<?php echo $this->getData(['page', $childId, 'title']); }?>
|
||||
|
||||
<!-- articles d'une sous-page blog-->
|
||||
<ul>
|
||||
<?php if ($this->getData(['page', $childId, 'moduleId']) === 'blog') { ?>
|
||||
|
||||
|
||||
<?php
|
||||
foreach($this->getData(['module',$childId]) as $articleId => $article): ?>
|
||||
<?php if($this->getData(['module',$childId,$articleId,'state']) === true) {?>
|
||||
<?php if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) {?>
|
||||
<li>
|
||||
<a href="<?php echo helper::baseUrl() . $childId . '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php endforeach;
|
||||
} ?>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<!-- ou articles d'un blog-->
|
||||
|
||||
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' &&
|
||||
!empty($this->getData(['module',$parentId])) ) { ?>
|
||||
<?php foreach($this->getData(['module',$parentId]) as $articleId => $article): ?>
|
||||
<?php if($this->getData(['module',$parentId,$articleId,'state']) === true ): ?>
|
||||
!empty($this->getData(['module',$parentId, 'posts' ])) ) { ?>
|
||||
<?php foreach($this->getData(['module',$parentId, 'posts' ]) as $articleId => $article): ?>
|
||||
<?php if($this->getData(['module',$parentId,'posts',$articleId,'state']) === true ): ?>
|
||||
<li>
|
||||
<a href="<?php echo helper::baseUrl() . $parentId. '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
||||
</li>
|
||||
|
|
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 395 B |