@@ -39,7 +39,7 @@
'left']); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -48,7 +48,7 @@
getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
'right']); ?> 0) { + if (blog::$comments[$articleId] > 0) { echo ''; - echo $module::$comments[$articleId] . ' commentaire' . ($module::$comments[$articleId] > 1 ? 's' : ''); + echo blog::$comments[$articleId] . ' commentaire' . (blog::$comments[$articleId] > 1 ? 's' : ''); echo ''; } else { echo 'Pas encore de commentaire'; @@ -153,8 +153,8 @@
-
-
+
+
'left']); ?>
@@ -174,7 +174,7 @@
'left']); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -183,7 +183,7 @@
getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'articlesLenght']); ?>
@@ -207,7 +207,7 @@
-
+
\ No newline at end of file
diff --git a/module/blog/view/option/option.php b/module/blog/view/option/option.php
index fd5d0bb..19fb1e3 100755
--- a/module/blog/view/option/option.php
+++ b/module/blog/view/option/option.php
@@ -36,7 +36,7 @@
]); ?>
- 'Format des dates',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat'])
]); ?>
@@ -47,7 +47,7 @@
]); ?>
- 'Format des heures',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat'])
]); ?>
@@ -55,19 +55,19 @@
- 'Disposition',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout'])
]); ?>
- 'Aperçus',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght'])
]); ?>
- 'Articles par page',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage'])
]); ?>
@@ -91,5 +91,5 @@
Version n°
-
+
\ No newline at end of file
diff --git a/module/form/form.php b/module/form/form.php
index 5dd2a66..3b0bdff 100644
--- a/module/form/form.php
+++ b/module/form/form.php
@@ -503,6 +503,8 @@ class form extends common
'notification' => ($sent === true ? helper::translate('Formulaire soumis') : $sent),
'redirect' => $redirect ? helper::baseUrl() . $redirect : '',
'state' => ($sent === true ? true : false),
+ 'vendor' => [
+ ],
]);
}
// Valeurs en sortie
diff --git a/module/form/view/config/config.php b/module/form/view/config/config.php
index b594e5f..c7d901c 100644
--- a/module/form/view/config/config.php
+++ b/module/form/view/config/config.php
@@ -16,7 +16,7 @@
]); ?>
- 'formConfigType'
]); ?>
@@ -93,5 +93,5 @@
Version n°
-
+
diff --git a/module/form/view/data/data.php b/module/form/view/data/data.php
index e8f600d..2064b71 100644
--- a/module/form/view/data/data.php
+++ b/module/form/view/data/data.php
@@ -22,12 +22,12 @@
]); ?>
-
-
-
+
+
+
Version n°
-
+
\ No newline at end of file
diff --git a/module/form/view/index/index.php b/module/form/view/index/index.php
index b0dad14..1337963 100644
--- a/module/form/view/index/index.php
+++ b/module/form/view/index/index.php
@@ -6,12 +6,12 @@
?>">
getData(['module', $this->getUrl(0), 'input']) as $index => $input): ?>
-
+
'formInput_' . $index,
'label' => $input['name']
]); ?>
-
+
$key) {
@@ -22,28 +22,28 @@
'id' => 'formInput_' . $index,
'label' => $input['name']
]); ?>
-
+
'formInput_' . $index,
'label' => $input['name']
]); ?>
-
+
'formInput_' . $index,
'label' => $input['name']
]); ?>
-
+
'formInput_' . $index,
'label' => $input['name'],
'type' => 'date',
]); ?>
-
+
-
+
diff --git a/module/form/view/option/option.php b/module/form/view/option/option.php
index 4539298..7f5c4d3 100644
--- a/module/form/view/option/option.php
+++ b/module/form/view/option/option.php
@@ -36,7 +36,7 @@
]); ?>
- 'displayNone',
'label' => 'Page du site',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageId'])
@@ -52,7 +52,7 @@
- 'Alignement du formulaire',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'align'])
]); ?>
@@ -60,13 +60,13 @@
- 'Décalage à gauche',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'offset'])
]); ?>
- 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'width'])
]); ?>
@@ -97,7 +97,7 @@
@@ -107,9 +107,9 @@
]); ?>
- 'A un membre',
- 'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), $module::$listUsers)
+ 'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), form::$listUsers)
]); ?>
@@ -121,7 +121,7 @@
- 'Type de signature',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'signature'])
]); ?>
@@ -135,7 +135,7 @@
]); ?>
- 'Largeur du logo',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'logoWidth'])
]); ?>
diff --git a/module/gallery/changes.md b/module/gallery/changes.md
index ee0354f..e143165 100644
--- a/module/gallery/changes.md
+++ b/module/gallery/changes.md
@@ -1,3 +1,5 @@
+# Version 4.3
+- Remplacement du nom générique de classe dans les vues.
# Version 4.2
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 4.1
diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php
index 5ebf94f..322e0bc 100644
--- a/module/gallery/gallery.php
+++ b/module/gallery/gallery.php
@@ -18,7 +18,7 @@ class gallery extends common
{
- const VERSION = '4.2';
+ const VERSION = '4.3';
const REALNAME = 'Galerie';
const DATADIRECTORY = self::DATA_DIR . 'gallery/';
diff --git a/module/gallery/view/add/add.php b/module/gallery/view/add/add.php
index d0d1830..8b5a73a 100644
--- a/module/gallery/view/add/add.php
+++ b/module/gallery/view/add/add.php
@@ -35,7 +35,7 @@
- $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']),
'label' => 'Tri des images',
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
diff --git a/module/gallery/view/config/config.php b/module/gallery/view/config/config.php
index 483cc51..d438669 100644
--- a/module/gallery/view/config/config.php
+++ b/module/gallery/view/config/config.php
@@ -31,14 +31,14 @@
-
- 'galleryTable'],$module::$galleriesId); ?>
+
+ 'galleryTable'],gallery::$galleriesId); ?>
Version n°
-
+
diff --git a/module/gallery/view/edit/edit.php b/module/gallery/view/edit/edit.php
index f80d301..96a0ea0 100644
--- a/module/gallery/view/edit/edit.php
+++ b/module/gallery/view/edit/edit.php
@@ -19,8 +19,8 @@
-
- 'galleryTable'], $module::$picturesId ); ?>
+
+ 'galleryTable'], gallery::$picturesId ); ?>
$this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort' ])]);?>
$this->getUrl(2)]); ?>
@@ -30,6 +30,6 @@
Version n°
-
+
diff --git a/module/gallery/view/gallery/gallery.php b/module/gallery/view/gallery/gallery.php
index 7d68a83..4d76f72 100644
--- a/module/gallery/view/gallery/gallery.php
+++ b/module/gallery/view/gallery/gallery.php
@@ -1,4 +1,4 @@
-
+
helper::baseUrl() . $this->getUrl(0),
@@ -6,14 +6,14 @@
]); ?>
-
- $legend): ?>
+
-
+
helper::baseUrl() . $this->getUrl(0),
diff --git a/module/gallery/view/index/index.php b/module/gallery/view/index/index.php
index d08b0b3..1dbcd38 100644
--- a/module/gallery/view/index/index.php
+++ b/module/gallery/view/index/index.php
@@ -1,11 +1,11 @@
-
+
- $gallery): ?>
+ $gallery): ?>
-
+
@@ -29,7 +29,7 @@
- 'Position du bouton de retour à l\'index des galeries',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'showUniqueGallery']) === true
? 'none'
@@ -40,7 +40,7 @@
]); ?>
- 'Alignement du bouton de retour',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'showUniqueGallery']) === true
? 'none'
@@ -54,7 +54,7 @@
-
+
@@ -81,7 +81,7 @@
- $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(3), 'config', 'sort']),
'label' => 'Tri des images',
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
@@ -114,7 +114,7 @@
Version n°
-
+
\ No newline at end of file
diff --git a/module/gallery/view/theme/theme.php b/module/gallery/view/theme/theme.php
index f4fddf3..c09fc6a 100644
--- a/module/gallery/view/theme/theme.php
+++ b/module/gallery/view/theme/theme.php
@@ -17,25 +17,25 @@
- 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbWidth'])
]); ?>
- 'Hauteur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbHeight'])
]); ?>
- 'Alignement',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbAlign'])
]); ?>
- 'Marge',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbMargin'])
]); ?>
@@ -43,7 +43,7 @@
- 'Bordure',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbBorder'])
]); ?>
@@ -57,7 +57,7 @@
]); ?>
- 'Arrondi des angles',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbRadius'])
]); ?>
@@ -65,7 +65,7 @@
- 'Ombre',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbShadows'])
]); ?>
@@ -79,7 +79,7 @@
]); ?>
- 'Opacité au survol',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbOpacity'])
]); ?>
@@ -110,13 +110,13 @@
]); ?>
- 'Hauteur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendHeight'])
]); ?>
- 'Alignement',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendAlign'])
]); ?>
@@ -128,7 +128,7 @@
Version n°
-
+
\ No newline at end of file
diff --git a/module/news/changes.md b/module/news/changes.md
index c662869..ecdc645 100644
--- a/module/news/changes.md
+++ b/module/news/changes.md
@@ -1,5 +1,7 @@
-# Versions 6.0
-- Ajoute deux nouvelles options pour afficher ou masquer la date et l'heure de l'article.
+# Version 6.1
+- Remplacement du nom générique de classe dans les vues.
+# Version 6.0
+- Ajoute trois nouvelles options pour afficher ou masquer la signature, la date et l'heure de l'article.
- Corrige un mauvais format de la propriété buttonBack non stockée au type booléen.
# Versions 5.9
- Largeur d'un bouton de retour.
diff --git a/module/news/news.php b/module/news/news.php
index 7b52f8e..7291d0e 100644
--- a/module/news/news.php
+++ b/module/news/news.php
@@ -16,7 +16,7 @@
class news extends common
{
- const VERSION = '6.0';
+ const VERSION = '6.1';
const REALNAME = 'News';
const DATADIRECTORY = self::DATA_DIR . 'news/';
@@ -316,6 +316,7 @@ class news extends common
'buttonBack' => $this->getInput('newsOptionButtonBack', helper::FILTER_BOOLEAN),
'showDate' => $this->getInput('newsOptionShowDate', helper::FILTER_BOOLEAN),
'showTime' => $this->getInput('newsOptionShowTime', helper::FILTER_BOOLEAN),
+ 'showPseudo' => $this->getInput('newsOptionShowPseudo', helper::FILTER_BOOLEAN),
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
]
]);
@@ -621,6 +622,7 @@ class news extends common
$this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showTime', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showDate', true]);
+ $this->setData(['module', $this->getUrl(0), 'config', 'showPseudo', true]);
// Mettre à jour la version
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.0']);
}
diff --git a/module/news/view/add/add.php b/module/news/view/add/add.php
index 525e159..e41947e 100644
--- a/module/news/view/add/add.php
+++ b/module/news/view/add/add.php
@@ -42,7 +42,7 @@
- 'Auteur',
'selected' => $this->getUser('id')
]); ?>
diff --git a/module/news/view/article/article.php b/module/news/view/article/article.php
index a0c037b..09dae2c 100644
--- a/module/news/view/article/article.php
+++ b/module/news/view/article/article.php
@@ -13,8 +13,12 @@
-
-
+ getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
+ ): ?>
+
+ signature($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId'])); ?>
+
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -23,7 +27,7 @@
'left']); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -32,8 +36,8 @@
getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
-
+ getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+
isConnected() === true
and
@@ -51,7 +55,7 @@
-
-
-
+
+
+
Version n°
-
+
\ No newline at end of file
diff --git a/module/news/view/edit/edit.php b/module/news/view/edit/edit.php
index bb1a8d6..5e1abac 100644
--- a/module/news/view/edit/edit.php
+++ b/module/news/view/edit/edit.php
@@ -44,7 +44,7 @@
- 'Auteur',
'selected' => $this->getUser('id')
]); ?>
diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php
index 8a97abe..270a2b5 100644
--- a/module/news/view/index/index.php
+++ b/module/news/view/index/index.php
@@ -1,4 +1,4 @@
-
+
getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
@@ -14,16 +14,20 @@
- $news): ?>
-
+ $news): ?>
+
getUrl(0) . '/' . $newsId . '">' . $news['title'] . ''; ?>
-
-
+ getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
+ ): ?>
+
+ signature($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'userId'])); ?>
+
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -32,7 +36,7 @@
'left']); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $newsId, 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -41,7 +45,7 @@
getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $newsId, 'publishedOn']), self::$i18nUI); ?>
-
+
\ No newline at end of file
diff --git a/module/news/view/option/option.php b/module/news/view/option/option.php
index 9d16be8..05104aa 100644
--- a/module/news/view/option/option.php
+++ b/module/news/view/option/option.php
@@ -15,6 +15,18 @@
+
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
+ ]); ?>
+
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'showPseudo'])
+ ]); ?>
+
+
- 'Format des dates',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat'])
]); ?>
@@ -33,7 +45,7 @@
]); ?>
- 'Format des heures',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat'])
]); ?>
@@ -41,31 +53,26 @@
- 'Nombre de colonnes',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperCol'])
]); ?>
- 'Articles par page',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage'])
]); ?>
- 'Abrégé de l\'article',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'height'])
]); ?>
-
- $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
- ]); ?>
-
-
+
$this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
'help' => 'Flux limité aux articles de la première page.'
@@ -87,13 +94,13 @@
- 'Bordure',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'borderStyle'])
]); ?>
- 'Épaisseur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'borderWidth'])
]); ?>
@@ -120,5 +127,5 @@
Version n°
-
+
\ No newline at end of file
diff --git a/module/search/changes.md b/module/search/changes.md
index 2d9ce96..190bc68 100644
--- a/module/search/changes.md
+++ b/module/search/changes.md
@@ -1,5 +1,5 @@
# Version 3.3
-- Une seule lecture du fichier module.json
+- Remplacement du nom générique de classe dans les vues.
# Version 3.2
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 3.1
diff --git a/module/search/search.php b/module/search/search.php
index 97845f5..25818a5 100644
--- a/module/search/search.php
+++ b/module/search/search.php
@@ -172,43 +172,40 @@ class search extends common
public function index()
{
+
// Initialise un module non configuré
$this->init();
-
- if ($this->isPost()) {
+
+ if (
+ $this->isPost()
+ ) {
//Initialisations variables
$success = true;
$result = [];
$notification = '';
$total = '';
-
+
// Récupération du mot clef passé par le formulaire de ...view/index.php, avec caractères accentués
self::$motclef = $this->getInput('searchMotphraseclef');
// Variable de travail, on conserve la variable globale pour l'affichage du résultat
$motclef = self::$motclef;
-
- // Suppression des mots < 3 caractères et des articles > 2 caractères de la chaîne $motclef
+
+ // Suppression des mots < 3 caractères et des articles > 2 caractères de la chaîne $motclef
$arraymotclef = explode(' ', $motclef);
$motclef = '';
foreach ($arraymotclef as $key => $value) {
- if (strlen($value) > 2 && $value !== 'les' && $value !== 'des' && $value !== 'une' && $value !== 'aux') {
+ if (strlen($value) > 2 && $value !== 'les' && $value !== 'des' && $value !== 'une' && $value !== 'aux')
$motclef .= $value . ' ';
- }
}
// Suppression du dernier ' '
- if ($motclef !== '') {
+ if ($motclef !== '')
$motclef = substr($motclef, 0, strlen($motclef) - 1);
- }
-
+
// Récupération de l'état de l'option mot entier passé par le même formulaire
self::$motentier = $this->getInput('searchMotentier', helper::FILTER_BOOLEAN);
-
- // Lecture unique des données du module
- $moduleData = $this->getData(['module']);
-
+
if ($motclef !== '') {
foreach ($this->getHierarchy(null, false, null) as $parentId => $childIds) {
- // Vérification des conditions pour la page parente
if (
$this->getData(['page', $parentId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
@@ -216,6 +213,7 @@ class search extends common
) {
$url = $parentId;
$titre = $this->getData(['page', $parentId, 'title']);
+ //$content = file_get_contents(self::DATA_DIR . self::$siteContent . '/content/' . $this->getData(['page', $parentId, 'content']));
$content = $this->getPage($parentId, self::$siteContent);
$content = $titre . ' ' . $content;
// Pages sauf pages filles et articles de blog
@@ -224,9 +222,9 @@ class search extends common
$result[] = $tempData;
}
}
-
- // Vérification des sous-pages et articles de sous-pages
+
foreach ($childIds as $childId) {
+ // Sous page
if (
$this->getData(['page', $childId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
@@ -234,21 +232,24 @@ class search extends common
) {
$url = $childId;
$titre = $this->getData(['page', $childId, 'title']);
+ //$content = file_get_contents(self::DATA_DIR . self::$siteContent . '/content/' . $this->getData(['page', $childId, 'content']));
$content = $this->getPage($childId, self::$siteContent);
$content = $titre . ' ' . $content;
+ //Pages filles
$tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);
if (is_array($tempData)) {
$result[] = $tempData;
}
}
-
+
// Articles d'une sous-page blog ou de news
- if (isset($moduleData[$childId]['posts'])) {
- foreach ($moduleData[$childId]['posts'] as $articleId => $article) {
- if ($article['state'] === true) {
+ if ($this->getData(['module', $childId, 'posts'])) {
+ foreach ($this->getData(['module', $childId, 'posts']) as $articleId => $article) {
+ if ($this->getData(['module', $childId, 'posts', $articleId, 'state']) === true) {
$url = $childId . '/' . $articleId;
$titre = $article['title'];
$contenu = ' ' . $titre . ' ' . $article['content'];
+ // Articles de sous-page de type blog
$tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier);
if (is_array($tempData)) {
$result[] = $tempData;
@@ -257,11 +258,12 @@ class search extends common
}
}
}
-
+
// Articles d'un blog ou de news
- if (isset($moduleData[$parentId]['posts'])) {
- foreach ($moduleData[$parentId]['posts'] as $articleId => $article) {
- if ($article['state'] === true) {
+ if ($this->getData(['module', $parentId, 'posts'])) {
+
+ foreach ($this->getData(['module', $parentId, 'posts']) as $articleId => $article) {
+ if ($this->getData(['module', $parentId, 'posts', $articleId, 'state']) === true) {
$url = $parentId . '/' . $articleId;
$titre = $article['title'];
$contenu = ' ' . $titre . ' ' . $article['content'];
@@ -273,21 +275,22 @@ class search extends common
}
}
}
-
// Message de synthèse de la recherche
if (count($result) === 0) {
self::$resultTitle = helper::translate('Aucun résultat');
self::$resultError = helper::translate('Avez-vous pensé aux accents ?');
} else {
self::$resultError = '';
+ //self::$resultTitle = sprintf(' %s',helper::translate('Résultat de votre recherche'));
rsort($result);
foreach ($result as $key => $value) {
$r[] = $value['preview'];
}
+ // Générer une chaine de caractères
self::$resultList = implode("", $r);
}
}
-
+
// Valeurs en sortie, affichage du résultat
$this->addOutput([
'view' => 'index',
@@ -306,8 +309,6 @@ class search extends common
]);
}
}
-
-
// Fonction de recherche des occurrences dans $contenu
diff --git a/module/search/view/config/config.php b/module/search/view/config/config.php
index 09c698f..013e059 100644
--- a/module/search/view/config/config.php
+++ b/module/search/view/config/config.php
@@ -23,7 +23,7 @@
]); ?>
- 'Dimension de l\'aperçu',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'previewLength'])
]); ?>
@@ -66,5 +66,5 @@
Version n°
-
+
\ No newline at end of file
diff --git a/module/search/view/index/index.php b/module/search/view/index/index.php
index 4f685ed..35f7782 100644
--- a/module/search/view/index/index.php
+++ b/module/search/view/index/index.php
@@ -5,7 +5,7 @@
$this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']) ? $this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']) : 'Un ou plusieurs mots clef séparés par un espace',
- 'value' => $module::$motclef
+ 'value' => search::$motclef
]); ?>
getData(['module', $this->getUrl(0), 'config', 'submitText'])) ? 'col1' : 'col3'; ?>
@@ -19,7 +19,7 @@
$module::$motentier,
+ 'checked' => search::$motentier,
]); ?>
@@ -27,14 +27,14 @@
-
- ' . $module::$resultList . '';
+ ' . search::$resultList . '';
?>
- ' . $module::$resultError . '';
+ ' . search::$resultError . '';
?>
diff --git a/module/slider/changes.md b/module/slider/changes.md
index 051ea44..fbfe7d3 100644
--- a/module/slider/changes.md
+++ b/module/slider/changes.md
@@ -1,5 +1,9 @@
+# Version 7.3
+- Remplacement du nom générique de classe dans les vues.
+# Version 7.2
+- Le dossier sélectionné est affiché par défaut dans la page update.
# Version 7.1
-
+- Améliore le desgin du module
# Version 7.0
- Ajoute un affichage de la légende sous l'image
- Corrige un tri inversé
diff --git a/module/slider/slider.php b/module/slider/slider.php
index 125d7f7..7ed2353 100644
--- a/module/slider/slider.php
+++ b/module/slider/slider.php
@@ -27,7 +27,7 @@ class slider extends common
'index' => self::GROUP_VISITOR
];
- const VERSION = '7.1';
+ const VERSION = '7.3';
const REALNAME = 'Carrousel';
const DELETE = true;
const UPDATE = '0.0';
diff --git a/module/slider/view/config/config.php b/module/slider/view/config/config.php
index 6a445f2..d440df5 100644
--- a/module/slider/view/config/config.php
+++ b/module/slider/view/config/config.php
@@ -38,8 +38,8 @@
-
-
+
+
@@ -50,5 +50,5 @@
Module Slider version n°
-
+
\ No newline at end of file
diff --git a/module/slider/view/index/index.php b/module/slider/view/index/index.php
index 06dc297..8ab1b7e 100644
--- a/module/slider/view/index/index.php
+++ b/module/slider/view/index/index.php
@@ -1,8 +1,8 @@
-
+
- 'Alignement du formulaire',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'align'])
]); ?>
@@ -60,13 +60,13 @@
- 'Décalage à gauche',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'offset'])
]); ?>
- 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'width'])
]); ?>
@@ -97,7 +97,7 @@
@@ -107,9 +107,9 @@
]); ?>
- 'A un membre',
- 'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), $module::$listUsers)
+ 'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), form::$listUsers)
]); ?>
@@ -121,7 +121,7 @@
- 'Type de signature',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'signature'])
]); ?>
@@ -135,7 +135,7 @@
]); ?>
- 'Largeur du logo',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'logoWidth'])
]); ?>
diff --git a/module/gallery/changes.md b/module/gallery/changes.md
index ee0354f..e143165 100644
--- a/module/gallery/changes.md
+++ b/module/gallery/changes.md
@@ -1,3 +1,5 @@
+# Version 4.3
+- Remplacement du nom générique de classe dans les vues.
# Version 4.2
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 4.1
diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php
index 5ebf94f..322e0bc 100644
--- a/module/gallery/gallery.php
+++ b/module/gallery/gallery.php
@@ -18,7 +18,7 @@ class gallery extends common
{
- const VERSION = '4.2';
+ const VERSION = '4.3';
const REALNAME = 'Galerie';
const DATADIRECTORY = self::DATA_DIR . 'gallery/';
diff --git a/module/gallery/view/add/add.php b/module/gallery/view/add/add.php
index d0d1830..8b5a73a 100644
--- a/module/gallery/view/add/add.php
+++ b/module/gallery/view/add/add.php
@@ -35,7 +35,7 @@
- $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']),
'label' => 'Tri des images',
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
diff --git a/module/gallery/view/config/config.php b/module/gallery/view/config/config.php
index 483cc51..d438669 100644
--- a/module/gallery/view/config/config.php
+++ b/module/gallery/view/config/config.php
@@ -31,14 +31,14 @@
diff --git a/module/gallery/view/edit/edit.php b/module/gallery/view/edit/edit.php
index f80d301..96a0ea0 100644
--- a/module/gallery/view/edit/edit.php
+++ b/module/gallery/view/edit/edit.php
@@ -19,8 +19,8 @@
-
- 'galleryTable'],$module::$galleriesId); ?>
+
+ 'galleryTable'],gallery::$galleriesId); ?>
Version n°
-
+
-
- 'galleryTable'], $module::$picturesId ); ?>
+
+ 'galleryTable'], gallery::$picturesId ); ?>
$this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort' ])]);?>
$this->getUrl(2)]); ?>
@@ -30,6 +30,6 @@
Version n°
-
+
diff --git a/module/gallery/view/gallery/gallery.php b/module/gallery/view/gallery/gallery.php
index 7d68a83..4d76f72 100644
--- a/module/gallery/view/gallery/gallery.php
+++ b/module/gallery/view/gallery/gallery.php
@@ -1,4 +1,4 @@
-
+
-
helper::baseUrl() . $this->getUrl(0),
@@ -6,14 +6,14 @@
]); ?>
- $legend): ?>
+
-
+
helper::baseUrl() . $this->getUrl(0),
diff --git a/module/gallery/view/index/index.php b/module/gallery/view/index/index.php
index d08b0b3..1dbcd38 100644
--- a/module/gallery/view/index/index.php
+++ b/module/gallery/view/index/index.php
@@ -1,11 +1,11 @@
-
+
-
+
- $gallery): ?>
+ $gallery): ?>
-
+
@@ -29,7 +29,7 @@
- 'Position du bouton de retour à l\'index des galeries',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'showUniqueGallery']) === true
? 'none'
@@ -40,7 +40,7 @@
]); ?>
- 'Alignement du bouton de retour',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'showUniqueGallery']) === true
? 'none'
@@ -54,7 +54,7 @@
@@ -81,7 +81,7 @@
- $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(3), 'config', 'sort']),
'label' => 'Tri des images',
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
@@ -114,7 +114,7 @@
\ No newline at end of file
diff --git a/module/gallery/view/theme/theme.php b/module/gallery/view/theme/theme.php
index f4fddf3..c09fc6a 100644
--- a/module/gallery/view/theme/theme.php
+++ b/module/gallery/view/theme/theme.php
@@ -17,25 +17,25 @@
Version n°
-
+
- 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbWidth'])
]); ?>
- 'Hauteur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbHeight'])
]); ?>
- 'Alignement',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbAlign'])
]); ?>
- 'Marge',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbMargin'])
]); ?>
@@ -43,7 +43,7 @@
- 'Bordure',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbBorder'])
]); ?>
@@ -57,7 +57,7 @@
]); ?>
- 'Arrondi des angles',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbRadius'])
]); ?>
@@ -65,7 +65,7 @@
- 'Ombre',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbShadows'])
]); ?>
@@ -79,7 +79,7 @@
]); ?>
- 'Opacité au survol',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbOpacity'])
]); ?>
@@ -110,13 +110,13 @@
]); ?>
- 'Hauteur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendHeight'])
]); ?>
- 'Alignement',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendAlign'])
]); ?>
@@ -128,7 +128,7 @@
\ No newline at end of file
diff --git a/module/news/changes.md b/module/news/changes.md
index c662869..ecdc645 100644
--- a/module/news/changes.md
+++ b/module/news/changes.md
@@ -1,5 +1,7 @@
-# Versions 6.0
-- Ajoute deux nouvelles options pour afficher ou masquer la date et l'heure de l'article.
+# Version 6.1
+- Remplacement du nom générique de classe dans les vues.
+# Version 6.0
+- Ajoute trois nouvelles options pour afficher ou masquer la signature, la date et l'heure de l'article.
- Corrige un mauvais format de la propriété buttonBack non stockée au type booléen.
# Versions 5.9
- Largeur d'un bouton de retour.
diff --git a/module/news/news.php b/module/news/news.php
index 7b52f8e..7291d0e 100644
--- a/module/news/news.php
+++ b/module/news/news.php
@@ -16,7 +16,7 @@
class news extends common
{
- const VERSION = '6.0';
+ const VERSION = '6.1';
const REALNAME = 'News';
const DATADIRECTORY = self::DATA_DIR . 'news/';
@@ -316,6 +316,7 @@ class news extends common
'buttonBack' => $this->getInput('newsOptionButtonBack', helper::FILTER_BOOLEAN),
'showDate' => $this->getInput('newsOptionShowDate', helper::FILTER_BOOLEAN),
'showTime' => $this->getInput('newsOptionShowTime', helper::FILTER_BOOLEAN),
+ 'showPseudo' => $this->getInput('newsOptionShowPseudo', helper::FILTER_BOOLEAN),
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
]
]);
@@ -621,6 +622,7 @@ class news extends common
$this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showTime', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showDate', true]);
+ $this->setData(['module', $this->getUrl(0), 'config', 'showPseudo', true]);
// Mettre à jour la version
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.0']);
}
diff --git a/module/news/view/add/add.php b/module/news/view/add/add.php
index 525e159..e41947e 100644
--- a/module/news/view/add/add.php
+++ b/module/news/view/add/add.php
@@ -42,7 +42,7 @@
Version n°
-
+
- 'Auteur',
'selected' => $this->getUser('id')
]); ?>
diff --git a/module/news/view/article/article.php b/module/news/view/article/article.php
index a0c037b..09dae2c 100644
--- a/module/news/view/article/article.php
+++ b/module/news/view/article/article.php
@@ -13,8 +13,12 @@
-
-
+ getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
+ ): ?>
+
+ signature($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId'])); ?>
+
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -23,7 +27,7 @@
'left']); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -32,8 +36,8 @@
getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
-
+ getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+
isConnected() === true
and
@@ -51,7 +55,7 @@
-
-
-
+
+
+
Version n°
-
+
\ No newline at end of file
diff --git a/module/news/view/edit/edit.php b/module/news/view/edit/edit.php
index bb1a8d6..5e1abac 100644
--- a/module/news/view/edit/edit.php
+++ b/module/news/view/edit/edit.php
@@ -44,7 +44,7 @@
- 'Auteur',
'selected' => $this->getUser('id')
]); ?>
diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php
index 8a97abe..270a2b5 100644
--- a/module/news/view/index/index.php
+++ b/module/news/view/index/index.php
@@ -1,4 +1,4 @@
-
+
getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
@@ -14,16 +14,20 @@
- $news): ?>
-
+ $news): ?>
+
getUrl(0) . '/' . $newsId . '">' . $news['title'] . ''; ?>
-
-
+ getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
+ ): ?>
+
+ signature($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'userId'])); ?>
+
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -32,7 +36,7 @@
'left']); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $newsId, 'publishedOn']), self::$i18nUI); ?>
getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@@ -41,7 +45,7 @@
getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
- getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
+ getData(['module', $this->getUrl(0), 'posts', $newsId, 'publishedOn']), self::$i18nUI); ?>
-
+
\ No newline at end of file
diff --git a/module/news/view/option/option.php b/module/news/view/option/option.php
index 9d16be8..05104aa 100644
--- a/module/news/view/option/option.php
+++ b/module/news/view/option/option.php
@@ -15,6 +15,18 @@
+
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
+ ]); ?>
+
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'showPseudo'])
+ ]); ?>
+
+
- 'Format des dates',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat'])
]); ?>
@@ -33,7 +45,7 @@
]); ?>
- 'Format des heures',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat'])
]); ?>
@@ -41,31 +53,26 @@
- 'Nombre de colonnes',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperCol'])
]); ?>
- 'Articles par page',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage'])
]); ?>
- 'Abrégé de l\'article',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'height'])
]); ?>
-
- $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
- ]); ?>
-
-
+
diff --git a/module/slider/changes.md b/module/slider/changes.md
index 051ea44..fbfe7d3 100644
--- a/module/slider/changes.md
+++ b/module/slider/changes.md
@@ -1,5 +1,9 @@
+# Version 7.3
+- Remplacement du nom générique de classe dans les vues.
+# Version 7.2
+- Le dossier sélectionné est affiché par défaut dans la page update.
# Version 7.1
-
+- Améliore le desgin du module
# Version 7.0
- Ajoute un affichage de la légende sous l'image
- Corrige un tri inversé
diff --git a/module/slider/slider.php b/module/slider/slider.php
index 125d7f7..7ed2353 100644
--- a/module/slider/slider.php
+++ b/module/slider/slider.php
@@ -27,7 +27,7 @@ class slider extends common
'index' => self::GROUP_VISITOR
];
- const VERSION = '7.1';
+ const VERSION = '7.3';
const REALNAME = 'Carrousel';
const DELETE = true;
const UPDATE = '0.0';
diff --git a/module/slider/view/config/config.php b/module/slider/view/config/config.php
index 6a445f2..d440df5 100644
--- a/module/slider/view/config/config.php
+++ b/module/slider/view/config/config.php
@@ -38,8 +38,8 @@
$this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
'help' => 'Flux limité aux articles de la première page.'
@@ -87,13 +94,13 @@
@@ -27,14 +27,14 @@
- 'Bordure',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'borderStyle'])
]); ?>
- 'Épaisseur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'borderWidth'])
]); ?>
@@ -120,5 +127,5 @@
Version n°
-
+
\ No newline at end of file
diff --git a/module/search/changes.md b/module/search/changes.md
index 2d9ce96..190bc68 100644
--- a/module/search/changes.md
+++ b/module/search/changes.md
@@ -1,5 +1,5 @@
# Version 3.3
-- Une seule lecture du fichier module.json
+- Remplacement du nom générique de classe dans les vues.
# Version 3.2
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 3.1
diff --git a/module/search/search.php b/module/search/search.php
index 97845f5..25818a5 100644
--- a/module/search/search.php
+++ b/module/search/search.php
@@ -172,43 +172,40 @@ class search extends common
public function index()
{
+
// Initialise un module non configuré
$this->init();
-
- if ($this->isPost()) {
+
+ if (
+ $this->isPost()
+ ) {
//Initialisations variables
$success = true;
$result = [];
$notification = '';
$total = '';
-
+
// Récupération du mot clef passé par le formulaire de ...view/index.php, avec caractères accentués
self::$motclef = $this->getInput('searchMotphraseclef');
// Variable de travail, on conserve la variable globale pour l'affichage du résultat
$motclef = self::$motclef;
-
- // Suppression des mots < 3 caractères et des articles > 2 caractères de la chaîne $motclef
+
+ // Suppression des mots < 3 caractères et des articles > 2 caractères de la chaîne $motclef
$arraymotclef = explode(' ', $motclef);
$motclef = '';
foreach ($arraymotclef as $key => $value) {
- if (strlen($value) > 2 && $value !== 'les' && $value !== 'des' && $value !== 'une' && $value !== 'aux') {
+ if (strlen($value) > 2 && $value !== 'les' && $value !== 'des' && $value !== 'une' && $value !== 'aux')
$motclef .= $value . ' ';
- }
}
// Suppression du dernier ' '
- if ($motclef !== '') {
+ if ($motclef !== '')
$motclef = substr($motclef, 0, strlen($motclef) - 1);
- }
-
+
// Récupération de l'état de l'option mot entier passé par le même formulaire
self::$motentier = $this->getInput('searchMotentier', helper::FILTER_BOOLEAN);
-
- // Lecture unique des données du module
- $moduleData = $this->getData(['module']);
-
+
if ($motclef !== '') {
foreach ($this->getHierarchy(null, false, null) as $parentId => $childIds) {
- // Vérification des conditions pour la page parente
if (
$this->getData(['page', $parentId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
@@ -216,6 +213,7 @@ class search extends common
) {
$url = $parentId;
$titre = $this->getData(['page', $parentId, 'title']);
+ //$content = file_get_contents(self::DATA_DIR . self::$siteContent . '/content/' . $this->getData(['page', $parentId, 'content']));
$content = $this->getPage($parentId, self::$siteContent);
$content = $titre . ' ' . $content;
// Pages sauf pages filles et articles de blog
@@ -224,9 +222,9 @@ class search extends common
$result[] = $tempData;
}
}
-
- // Vérification des sous-pages et articles de sous-pages
+
foreach ($childIds as $childId) {
+ // Sous page
if (
$this->getData(['page', $childId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
@@ -234,21 +232,24 @@ class search extends common
) {
$url = $childId;
$titre = $this->getData(['page', $childId, 'title']);
+ //$content = file_get_contents(self::DATA_DIR . self::$siteContent . '/content/' . $this->getData(['page', $childId, 'content']));
$content = $this->getPage($childId, self::$siteContent);
$content = $titre . ' ' . $content;
+ //Pages filles
$tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);
if (is_array($tempData)) {
$result[] = $tempData;
}
}
-
+
// Articles d'une sous-page blog ou de news
- if (isset($moduleData[$childId]['posts'])) {
- foreach ($moduleData[$childId]['posts'] as $articleId => $article) {
- if ($article['state'] === true) {
+ if ($this->getData(['module', $childId, 'posts'])) {
+ foreach ($this->getData(['module', $childId, 'posts']) as $articleId => $article) {
+ if ($this->getData(['module', $childId, 'posts', $articleId, 'state']) === true) {
$url = $childId . '/' . $articleId;
$titre = $article['title'];
$contenu = ' ' . $titre . ' ' . $article['content'];
+ // Articles de sous-page de type blog
$tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier);
if (is_array($tempData)) {
$result[] = $tempData;
@@ -257,11 +258,12 @@ class search extends common
}
}
}
-
+
// Articles d'un blog ou de news
- if (isset($moduleData[$parentId]['posts'])) {
- foreach ($moduleData[$parentId]['posts'] as $articleId => $article) {
- if ($article['state'] === true) {
+ if ($this->getData(['module', $parentId, 'posts'])) {
+
+ foreach ($this->getData(['module', $parentId, 'posts']) as $articleId => $article) {
+ if ($this->getData(['module', $parentId, 'posts', $articleId, 'state']) === true) {
$url = $parentId . '/' . $articleId;
$titre = $article['title'];
$contenu = ' ' . $titre . ' ' . $article['content'];
@@ -273,21 +275,22 @@ class search extends common
}
}
}
-
// Message de synthèse de la recherche
if (count($result) === 0) {
self::$resultTitle = helper::translate('Aucun résultat');
self::$resultError = helper::translate('Avez-vous pensé aux accents ?');
} else {
self::$resultError = '';
+ //self::$resultTitle = sprintf(' %s',helper::translate('Résultat de votre recherche'));
rsort($result);
foreach ($result as $key => $value) {
$r[] = $value['preview'];
}
+ // Générer une chaine de caractères
self::$resultList = implode("", $r);
}
}
-
+
// Valeurs en sortie, affichage du résultat
$this->addOutput([
'view' => 'index',
@@ -306,8 +309,6 @@ class search extends common
]);
}
}
-
-
// Fonction de recherche des occurrences dans $contenu
diff --git a/module/search/view/config/config.php b/module/search/view/config/config.php
index 09c698f..013e059 100644
--- a/module/search/view/config/config.php
+++ b/module/search/view/config/config.php
@@ -23,7 +23,7 @@
]); ?>
- 'Dimension de l\'aperçu',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'previewLength'])
]); ?>
@@ -66,5 +66,5 @@
Version n°
-
+
\ No newline at end of file
diff --git a/module/search/view/index/index.php b/module/search/view/index/index.php
index 4f685ed..35f7782 100644
--- a/module/search/view/index/index.php
+++ b/module/search/view/index/index.php
@@ -5,7 +5,7 @@
$this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']) ? $this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']) : 'Un ou plusieurs mots clef séparés par un espace',
- 'value' => $module::$motclef
+ 'value' => search::$motclef
]); ?>
getData(['module', $this->getUrl(0), 'config', 'submitText'])) ? 'col1' : 'col3'; ?>
@@ -19,7 +19,7 @@
$module::$motentier,
+ 'checked' => search::$motentier,
]); ?>
-
- ' . $module::$resultList . '';
+ ' . search::$resultList . '';
?>
- ' . $module::$resultError . '';
+ ' . search::$resultError . '';
?>
-
-
+
+
@@ -50,5 +50,5 @@
Module Slider version n°
-
+
\ No newline at end of file
diff --git a/module/slider/view/index/index.php b/module/slider/view/index/index.php
index 06dc297..8ab1b7e 100644
--- a/module/slider/view/index/index.php
+++ b/module/slider/view/index/index.php
@@ -1,8 +1,8 @@
-
+