Uniformisation variable de contenu avec LMS
This commit is contained in:
parent
d2efd48aea
commit
05da19288e
@ -911,7 +911,7 @@ class layout extends common
|
||||
foreach (self::$languages as $key => $value) {
|
||||
if (is_dir(self::DATA_DIR . $key)) {
|
||||
$location = helper::baseUrl() . 'language/content/' . $key;
|
||||
$leftItem .= '<option name="' . $key . '" value="' . $location . '" ' . ($key === self::$i18nContent ? 'selected' : '') . '>' . $value . '</option>';
|
||||
$leftItem .= '<option name="' . $key . '" value="' . $location . '" ' . ($key === self::$siteContent ? 'selected' : '') . '>' . $value . '</option>';
|
||||
}
|
||||
}
|
||||
$leftItems .= '<li><select id="barSelectLanguage" >';
|
||||
|
@ -631,10 +631,10 @@ class core extends common
|
||||
$inlineScript[] = $this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']);
|
||||
|
||||
// Importe le contenu, le CSS et le script des barres
|
||||
$contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) : '';
|
||||
$contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$siteContent) : '';
|
||||
$inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']);
|
||||
$inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']);
|
||||
$contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) : '';
|
||||
$contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$siteContent) : '';
|
||||
$inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']);
|
||||
$inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']);
|
||||
|
||||
@ -652,7 +652,7 @@ class core extends common
|
||||
|
||||
$this->addOutput([
|
||||
'title' => $title,
|
||||
'content' => $this->getPage($this->getUrl(0), self::$i18nContent),
|
||||
'content' => $this->getPage($this->getUrl(0), self::$siteContent),
|
||||
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']),
|
||||
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
|
||||
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
|
||||
@ -678,7 +678,7 @@ class core extends common
|
||||
: $this->getData(['page', $this->getUrl(0), 'metaDescription']);
|
||||
|
||||
// Importe le CSS de la page principale
|
||||
$pageContent = $this->getPage($this->getUrl(0), self::$i18nContent);
|
||||
$pageContent = $this->getPage($this->getUrl(0), self::$siteContent);
|
||||
|
||||
$this->addOutput([
|
||||
'title' => $title,
|
||||
|
@ -170,7 +170,7 @@ class common
|
||||
// Langue de l'interface sélectionnée
|
||||
public static $i18nUI = 'fr_FR';
|
||||
// Langues de contenu
|
||||
public static $i18nContent = 'fr_FR';
|
||||
public static $siteContent = 'fr_FR';
|
||||
public static $languages = [
|
||||
'az_AZ' => 'Azərbaycan dili',
|
||||
'bg_BG' => 'български език',
|
||||
@ -334,30 +334,30 @@ class common
|
||||
// Déterminer la langue du contenu du site
|
||||
if (isset($_SESSION['ZWII_CONTENT'])) {
|
||||
// Déterminé par la session présente
|
||||
self::$i18nContent = $_SESSION['ZWII_CONTENT'];
|
||||
self::$siteContent = $_SESSION['ZWII_CONTENT'];
|
||||
} else {
|
||||
// Détermine la langue par défaut
|
||||
foreach (self::$languages as $key => $value) {
|
||||
if (file_exists(self::DATA_DIR . $key . '/.default')) {
|
||||
self::$i18nContent = $key;
|
||||
self::$siteContent = $key;
|
||||
$_SESSION['ZWII_CONTENT'] = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
\setlocale(LC_ALL, self::$i18nContent . '.UTF8');
|
||||
\setlocale(LC_ALL, self::$siteContent . '.UTF8');
|
||||
|
||||
// Instanciation de la classe des entrées / sorties
|
||||
$this->jsonDB(self::$i18nContent);
|
||||
$this->jsonDB(self::$siteContent);
|
||||
|
||||
// Installation fraîche, initialisation des modules
|
||||
if ($this->user === []) {
|
||||
foreach ($this->dataFiles as $stageId => $item) {
|
||||
$folder = $this->dataPath($stageId, self::$i18nContent);
|
||||
$folder = $this->dataPath($stageId, self::$siteContent);
|
||||
if (
|
||||
file_exists($folder . $stageId . '.json') === false
|
||||
) {
|
||||
$this->initData($stageId, self::$i18nContent);
|
||||
$this->initData($stageId, self::$siteContent);
|
||||
common::$coreNotices[] = $stageId;
|
||||
}
|
||||
}
|
||||
@ -1391,7 +1391,7 @@ class common
|
||||
public function saveLog($message = '')
|
||||
{
|
||||
// Journalisation
|
||||
$dataLog = helper::dateUTF8('%Y %m %d', time(), self::$i18nContent) . ' - ' . helper::dateUTF8('%H:%M', time(), self::$i18nContent);
|
||||
$dataLog = helper::dateUTF8('%Y %m %d', time(), self::$siteContent) . ' - ' . helper::dateUTF8('%H:%M', time(), self::$siteContent);
|
||||
$dataLog .= helper::getIp($this->getData(['config', 'connect', 'anonymousIp'])) . ';';
|
||||
$dataLog .= empty($this->getUser('id')) ? 'visitor;' : $this->getUser('id') . ';';
|
||||
$dataLog .= $message ? $this->getUrl() . ';' . $message : $this->getUrl();
|
||||
|
@ -448,8 +448,8 @@ if ($this->getData(['core', 'dataVersion']) < 11000) {
|
||||
// Liste des pages dans pageList
|
||||
$hierarchy = array();
|
||||
// Creation du contenu de la page
|
||||
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
|
||||
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
||||
}
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
@ -459,7 +459,7 @@ if ($this->getData(['core', 'dataVersion']) < 11000) {
|
||||
}
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
$content = $this->getData(['page', $parent, 'content']);
|
||||
//file_put_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $parent . '.html', $content);
|
||||
//file_put_contents(self::DATA_DIR . self::$siteContent . '/content/' . $parent . '.html', $content);
|
||||
$this->setPage($parent, $content, 'fr');
|
||||
$this->setData(['page', $parent, 'content', $parent . '.html']);
|
||||
}
|
||||
@ -574,7 +574,7 @@ if ($this->getData(['core', 'dataVersion']) < 11203) {
|
||||
$success = false;
|
||||
// Boucler sur les pages
|
||||
foreach ($this->getHierarchy() as $parentId => $childIds) {
|
||||
$content = $this->getPage($parentId, self::$i18nContent);
|
||||
$content = $this->getPage($parentId, self::$siteContent);
|
||||
$titre = $this->getData(['page', $parentId, 'title']);
|
||||
$content = $titre . ' ' . $content;
|
||||
$replace = str_replace('href="' . $old, 'href="' . $new, stripslashes($content), $c1);
|
||||
@ -582,17 +582,17 @@ if ($this->getData(['core', 'dataVersion']) < 11203) {
|
||||
|
||||
if ($c1 > 0 || $c2 > 0) {
|
||||
$success = true;
|
||||
$this->setPage($parentId, $replace, self::$i18nContent);
|
||||
$this->setPage($parentId, $replace, self::$siteContent);
|
||||
$c3 += $c1 + $c2;
|
||||
}
|
||||
foreach ($childIds as $childId) {
|
||||
$content = $this->getPage($childId, self::$i18nContent);
|
||||
$content = $this->getPage($childId, self::$siteContent);
|
||||
$content = $titre . ' ' . $content;
|
||||
$replace = str_replace('href="' . $old, 'href="' . $new, stripslashes($content), $c1);
|
||||
$replace = str_replace('src="' . $old, 'src="' . $new, stripslashes($replace), $c2);
|
||||
if ($c1 > 0 || $c2 > 0) {
|
||||
$success = true;
|
||||
$this->setPage($childId, $replace, self::$i18nContent);
|
||||
$this->setPage($childId, $replace, self::$siteContent);
|
||||
$c3 += $c1 + $c2;
|
||||
}
|
||||
}
|
||||
@ -1053,7 +1053,7 @@ if ($this->getData(['core', 'dataVersion']) < 13000) {
|
||||
}
|
||||
|
||||
// Mise à jour des pages, le profil est mis à 0 pour les groupes sans profil et 1 pour es groupes avec profil
|
||||
$currentlanguage = self::$i18nContent;
|
||||
$currentlanguage = self::$siteContent;
|
||||
foreach ($languages as $langId) {
|
||||
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$i18nContent, 0, 2); ?>">
|
||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$i18nContent, 0, 2); ?>">
|
||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo substr(self::$i18nContent, 0, 2);?>">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo substr(self::$siteContent, 0, 2);?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$i18nContent, 0, 2); ?>">
|
||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
@ -780,7 +780,7 @@ class config extends common
|
||||
$d = $this->getData(['blacklist']);
|
||||
$data = '';
|
||||
foreach ($d as $key => $item) {
|
||||
$data .= helper::dateUTF8('%Y %m %d', $item['lastFail'], self::$i18nContent) . ' - ' . helper::dateUTF8('%H:%M', time(), self::$i18nContent);
|
||||
$data .= helper::dateUTF8('%Y %m %d', $item['lastFail'], self::$siteContent) . ' - ' . helper::dateUTF8('%H:%M', time(), self::$siteContent);
|
||||
$data .= $key . ';' . $item['ip'] . ';' . $item['connectFail'] . PHP_EOL;
|
||||
}
|
||||
file_put_contents($fileName, $data, FILE_APPEND);
|
||||
|
@ -255,7 +255,7 @@ class language extends common
|
||||
self::$languagesUiInstalled[$file] = [
|
||||
template::flag($file, '20 %') . ' ' . self::$languages[$file],
|
||||
$value['version'],
|
||||
helper::dateUTF8('%d/%m/%Y', $value['date'], self::$i18nContent),
|
||||
helper::dateUTF8('%d/%m/%Y', $value['date'], self::$siteContent),
|
||||
//self::$i18nUI === $file ? helper::translate('Interface') : '',
|
||||
'',
|
||||
/*
|
||||
@ -291,7 +291,7 @@ class language extends common
|
||||
self::$languagesStore[$file] = [
|
||||
template::flag($file, '20 %') . ' ' . self::$languages[$file],
|
||||
$value['version'],
|
||||
helper::dateUTF8('%d/%m/%Y', $value['date'], self::$i18nContent),
|
||||
helper::dateUTF8('%d/%m/%Y', $value['date'], self::$siteContent),
|
||||
'',
|
||||
template::button('translateContentLanguageUIDownload' . $file, [
|
||||
'class' => 'buttonGreen',
|
||||
@ -414,7 +414,7 @@ class language extends common
|
||||
];
|
||||
|
||||
// Sauvegarde hors méthodes si la langue n'est pas celle de l'UI
|
||||
if ($lang === self::$i18nContent) {
|
||||
if ($lang === self::$siteContent) {
|
||||
// Enregistrer les données par lecture directe du formulaire
|
||||
$this->setData(['locale', $data['locale']]);
|
||||
} else {
|
||||
@ -434,7 +434,7 @@ class language extends common
|
||||
//-----------------------------------------
|
||||
|
||||
// La locale est-elle celle de la langue de l'UI ?
|
||||
if ($lang === self::$i18nContent) {
|
||||
if ($lang === self::$siteContent) {
|
||||
self::$locales[$lang]['locale'] = $this->getData(['locale']);
|
||||
} else {
|
||||
// Lire les locales sans passer par les méthodes
|
||||
|
@ -41,7 +41,7 @@ class maintenance extends common
|
||||
? ''
|
||||
: $this->getData(['page', $this->getData(['locale', 'page302']), 'title']),
|
||||
//'content' => $this->getdata(['page',$this->getData(['locale','page302']),'content']),
|
||||
'content' => $this->getPage($this->getData(['locale', 'page302']), self::$i18nContent),
|
||||
'content' => $this->getPage($this->getData(['locale', 'page302']), self::$siteContent),
|
||||
'view' => 'index'
|
||||
]);
|
||||
} else {
|
||||
|
@ -174,11 +174,11 @@ class page extends common
|
||||
]
|
||||
]);
|
||||
// Creation du contenu de la page
|
||||
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
|
||||
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
||||
}
|
||||
//file_put_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
|
||||
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$i18nContent);
|
||||
//file_put_contents(self::DATA_DIR . self::$siteContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
|
||||
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$siteContent);
|
||||
|
||||
// Met à jour le sitemap
|
||||
$this->updateSitemap();
|
||||
@ -279,8 +279,8 @@ class page extends common
|
||||
}
|
||||
// Effacer la page
|
||||
$this->deleteData(['page', $page]);
|
||||
if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $page . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $page . '.html');
|
||||
if (file_exists(self::DATA_DIR . self::$siteContent . '/content/' . $page . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$siteContent . '/content/' . $page . '.html');
|
||||
}
|
||||
$this->deleteData(['module', $page]);
|
||||
|
||||
@ -369,8 +369,8 @@ class page extends common
|
||||
// Supprime l'ancienne page si l'id a changée
|
||||
if ($pageId !== $this->getUrl(2)) {
|
||||
$this->deleteData(['page', $this->getUrl(2)]);
|
||||
if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html');
|
||||
if (file_exists(self::DATA_DIR . self::$siteContent . '/content/' . $this->getUrl(2) . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$siteContent . '/content/' . $this->getUrl(2) . '.html');
|
||||
}
|
||||
}
|
||||
// Traitement des pages spéciales affectées dans la config :
|
||||
@ -508,11 +508,11 @@ class page extends common
|
||||
]);
|
||||
|
||||
// Creation du contenu de la page
|
||||
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
|
||||
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
||||
}
|
||||
$content = empty($this->getInput('pageEditContent', null)) ? '<p></p>' : str_replace('<p></p>', '<p> </p>', $this->getInput('pageEditContent', null));
|
||||
$this->setPage($pageId, $content, self::$i18nContent);
|
||||
$this->setPage($pageId, $content, self::$siteContent);
|
||||
|
||||
// Met à jour le sitemap
|
||||
$this->updateSitemap();
|
||||
|
@ -108,7 +108,7 @@
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageEditContent', [
|
||||
'class' => 'editorWysiwyg',
|
||||
'value' => $this->getPage($this->getUrl(2), self::$i18nContent)
|
||||
'value' => $this->getPage($this->getUrl(2), self::$siteContent)
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -377,7 +377,7 @@ class plugin extends common
|
||||
$store[$key]['category'],
|
||||
'<a href="' . self::BASEURL_STORE . self::MODULE_STORE . $key . '" target="_blank" >' . $store[$key]['title'] . '</a>',
|
||||
$store[$key]['version'],
|
||||
helper::dateUTF8('%d %B %Y', $store[$key]['versionDate'], self::$i18nContent),
|
||||
helper::dateUTF8('%d %B %Y', $store[$key]['versionDate'], self::$siteContent),
|
||||
implode(' - ', $pageInfos),
|
||||
template::button('moduleExport' . $key, [
|
||||
'class' => $class,
|
||||
@ -403,7 +403,7 @@ class plugin extends common
|
||||
{
|
||||
$store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true);
|
||||
self::$storeItem = $store[$this->getUrl(2)];
|
||||
self::$storeItem['fileDate'] = helper::dateUTF8('%d %B %Y', self::$storeItem['fileDate'], self::$i18nContent);
|
||||
self::$storeItem['fileDate'] = helper::dateUTF8('%d %B %Y', self::$storeItem['fileDate'], self::$siteContent);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Module ' . self::$storeItem['title']),
|
||||
@ -531,19 +531,19 @@ class plugin extends common
|
||||
$infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['version'],
|
||||
template::flag($keyi18n, '20px') . ' <a href ="' . helper::baseUrl() . $keyPage . '" target="_blank">' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')</a>',
|
||||
template::button('dataExport' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$siteContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download-cloud'),
|
||||
'help' => 'Sauvegarder les données du module dans le gestionnaire de fichiers'
|
||||
]),
|
||||
template::button('dataExport' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$siteContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download'),
|
||||
'help' => 'Sauvegarder et télécharger les données du module'
|
||||
]),
|
||||
template::button('dataDelete' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$siteContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('trash'),
|
||||
'class' => 'buttonRed dataDelete',
|
||||
|
@ -359,7 +359,7 @@ class blog extends common
|
||||
self::$dateFormat = $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat']);
|
||||
self::$timeFormat = $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat']);
|
||||
self::$comments[] = [
|
||||
helper::dateUTF8(self::$dateFormat, $comment['createdOn'], self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $comment['createdOn'], self::$i18nContent),
|
||||
helper::dateUTF8(self::$dateFormat, $comment['createdOn'], self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $comment['createdOn'], self::$siteContent),
|
||||
$comment['content'],
|
||||
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
|
||||
$buttonApproval,
|
||||
@ -528,7 +528,7 @@ class blog extends common
|
||||
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
|
||||
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) .
|
||||
'</a>',
|
||||
helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']), self::$i18nContent),
|
||||
helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']), self::$siteContent),
|
||||
self::$states[$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'state'])],
|
||||
// Bouton pour afficher les commentaires de l'article
|
||||
template::button('blogConfigComment' . $articleIds[$i], [
|
||||
|
@ -15,7 +15,7 @@
|
||||
<?php echo template::ico('user'); ?>
|
||||
<?php echo $module::$articleSignature; ?>
|
||||
<?php echo template::ico('calendar-empty'); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nContent); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?>
|
||||
<!-- Bloc edition -->
|
||||
<?php if (
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
<?php echo template::ico('user'); ?>
|
||||
<?php echo $module::$commentsSignature[$commentId]; ?>
|
||||
<?php echo template::ico('calendar-empty'); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $comment['createdOn'], self::$i18nContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $comment['createdOn'], self::$i18nContent); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $comment['createdOn'], self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $comment['createdOn'], self::$siteContent); ?>
|
||||
</h4>
|
||||
<?php echo $comment['content']; ?>
|
||||
</div>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<?php echo template::ico('user'); ?>
|
||||
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
||||
<?php echo template::ico('calendar-empty'); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nContent); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -143,7 +143,7 @@
|
||||
<?php echo template::ico('user'); ?>
|
||||
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId'])); ?>
|
||||
<?php echo template::ico('calendar-empty'); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'], self::$i18nContent), self::$i18nContent); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'], self::$siteContent), self::$siteContent); ?>
|
||||
</div>
|
||||
<div class="blogContent">
|
||||
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) !== 0 ? $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) : 500 ?>
|
||||
|
@ -230,9 +230,9 @@ class news extends common
|
||||
// News en fonction de la pagination
|
||||
for ($i = $pagination['first']; $i < $pagination['last']; $i++) {
|
||||
// Met en forme le tableau
|
||||
$dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent);
|
||||
$dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$siteContent);
|
||||
if ($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff'])) {
|
||||
$dateOff = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent);
|
||||
$dateOff = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$siteContent);
|
||||
} else {
|
||||
$dateOff = helper::translate('Permanent');
|
||||
}
|
||||
@ -332,9 +332,9 @@ class news extends common
|
||||
// News en fonction de la pagination
|
||||
for ($i = $pagination['first']; $i < $pagination['last']; $i++) {
|
||||
// Met en forme le tableau
|
||||
$dateOn = $dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$i18nContent);
|
||||
$dateOn = $dateOn = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOn']), self::$siteContent);
|
||||
if ($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff'])) {
|
||||
$dateOff = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$i18nContent);
|
||||
$dateOff = helper::dateUTF8(self::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$siteContent) . ' - ' . helper::dateUTF8(self::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'publishedOff']), self::$siteContent);
|
||||
} else {
|
||||
$dateOff = helper::translate('Permanent');
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
<?php echo template::ico('user'); ?>
|
||||
<?php echo $module::$articleSignature . ' - ';?>
|
||||
<?php echo template::ico('calendar-empty'); ?>
|
||||
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nContent) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nContent); ?>
|
||||
<?php echo helper::dateUTF8('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent) . ' - ' . helper::dateUTF8('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$siteContent); ?>
|
||||
<!-- Bloc edition -->
|
||||
<?php if (
|
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
|
@ -23,7 +23,7 @@
|
||||
<?php echo template::ico('user'); ?>
|
||||
<?php echo $news['userId']; ?>
|
||||
<?php echo template::ico('calendar-empty'); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn'], self::$i18nContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $news['publishedOn'], self::$i18nContent); ?>
|
||||
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn'], self::$siteContent) . ' - ' . helper::dateUTF8($module::$timeFormat, $news['publishedOn'], self::$siteContent); ?>
|
||||
<!-- Bloc edition -->
|
||||
<?php if (
|
||||
|
||||
|
@ -213,8 +213,8 @@ class search extends common
|
||||
) {
|
||||
$url = $parentId;
|
||||
$titre = $this->getData(['page', $parentId, 'title']);
|
||||
//$content = file_get_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getData(['page', $parentId, 'content']));
|
||||
$content = $this->getPage($parentId, self::$i18nContent);
|
||||
//$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
|
||||
$tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);
|
||||
@ -232,8 +232,8 @@ class search extends common
|
||||
) {
|
||||
$url = $childId;
|
||||
$titre = $this->getData(['page', $childId, 'title']);
|
||||
//$content = file_get_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getData(['page', $childId, 'content']));
|
||||
$content = $this->getPage($childId, self::$i18nContent);
|
||||
//$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);
|
||||
|
Loading…
Reference in New Issue
Block a user