init editeur
|
@ -430,6 +430,9 @@ class common {
|
||||||
case 7:
|
case 7:
|
||||||
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6]);
|
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6]);
|
||||||
break;
|
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;
|
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->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5],$keys[6]);
|
||||||
$db->save();
|
$db->save();
|
||||||
break;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1446,7 +1453,7 @@ class common {
|
||||||
}
|
}
|
||||||
// Mettre à jour les données des blogs les articles sont dans posts
|
// Mettre à jour les données des blogs les articles sont dans posts
|
||||||
foreach ($pageList as $parentKey => $parent) {
|
foreach ($pageList as $parentKey => $parent) {
|
||||||
//La page a une blog
|
//La page a une galerie
|
||||||
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
||||||
foreach ( $this->getData(['module', $parent]) as $blogKey => $blogItem) {
|
foreach ( $this->getData(['module', $parent]) as $blogKey => $blogItem) {
|
||||||
$data = $this->getdata(['module',$parent,$blogKey]);
|
$data = $this->getdata(['module',$parent,$blogKey]);
|
||||||
|
@ -1456,7 +1463,7 @@ class common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($pageList as $parentKey => $parent) {
|
foreach ($pageList as $parentKey => $parent) {
|
||||||
//La page a une news
|
//La page a une galerie
|
||||||
if ($this->getData(['page',$parent,'moduleId']) === 'news' ) {
|
if ($this->getData(['page',$parent,'moduleId']) === 'news' ) {
|
||||||
foreach ( $this->getData(['module', $parent]) as $newsKey => $newsItem) {
|
foreach ( $this->getData(['module', $parent]) as $newsKey => $newsItem) {
|
||||||
$data = $this->getdata(['module',$parent,$newsKey]);
|
$data = $this->getdata(['module',$parent,$newsKey]);
|
||||||
|
@ -1485,11 +1492,16 @@ class common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Parcourir pageList et rechercher les modules de blog
|
// Parcourir pageList et rechercher les modules de blog
|
||||||
|
|
||||||
foreach ($pageList as $parentKey => $parent) {
|
foreach ($pageList as $parentKey => $parent) {
|
||||||
//La page a une galerie
|
//La page est un blog
|
||||||
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
||||||
|
//echo "<pre>".$parent;
|
||||||
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $parent, 'posts']), 'publishedOn', 'SORT_DESC'));
|
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $parent, 'posts']), 'publishedOn', 'SORT_DESC'));
|
||||||
|
//var_dump($articleIds);
|
||||||
foreach ($articleIds as $key => $article) {
|
foreach ($articleIds as $key => $article) {
|
||||||
|
//echo $article;
|
||||||
|
//echo "<p>";
|
||||||
// Droits les deux groupes
|
// Droits les deux groupes
|
||||||
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
|
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
|
||||||
// Limite de taille 500
|
// Limite de taille 500
|
||||||
|
@ -1501,6 +1513,7 @@ class common {
|
||||||
// groupe de notification
|
// groupe de notification
|
||||||
$this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]);
|
$this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Traitement des commentaires
|
// Traitement des commentaires
|
||||||
if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) {
|
if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) {
|
||||||
foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) {
|
foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) {
|
||||||
|
@ -1931,7 +1944,7 @@ class core extends common {
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
// Meta description = 160 premiers caractères de l'article
|
// Meta description = 160 premiers caractères de l'article
|
||||||
'metaDescription' => $this->getData(['page',$this->getUrl(0),'moduleId']) === 'blog' && !empty($this->getUrl(1))
|
'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']),
|
: $this->getData(['page', $this->getUrl(0), 'metaDescription']),
|
||||||
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
|
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
|
||||||
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
|
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
foreach($this->getData(['module',$childId]) as $articleId => $article): ?>
|
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>
|
<li>
|
||||||
<a href="<?php echo helper::baseUrl() . $childId . '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
<a href="<?php echo helper::baseUrl() . $childId . '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -40,9 +40,9 @@
|
||||||
<!-- ou articles d'un blog-->
|
<!-- ou articles d'un blog-->
|
||||||
|
|
||||||
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' &&
|
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' &&
|
||||||
!empty($this->getData(['module',$parentId])) ) { ?>
|
!empty($this->getData(['module',$parentId, 'posts' ])) ) { ?>
|
||||||
<?php foreach($this->getData(['module',$parentId]) as $articleId => $article): ?>
|
<?php foreach($this->getData(['module',$parentId, 'posts' ]) as $articleId => $article): ?>
|
||||||
<?php if($this->getData(['module',$parentId,$articleId,'state']) === true ): ?>
|
<?php if($this->getData(['module',$parentId,'posts',$articleId,'state']) === true ): ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo helper::baseUrl() . $parentId. '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
<a href="<?php echo helper::baseUrl() . $parentId. '/' . $articleId;?>"><?php echo $article['title']; ?></a>
|
||||||
</li>
|
</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 |