Modifications 4305 et 4306

This commit is contained in:
SylvainLelievre 2022-09-11 09:42:42 +02:00
parent 3eac7f08df
commit ceb46bc140
118 changed files with 4727 additions and 5590 deletions

View File

@ -1,5 +1,16 @@
# Changelog # Changelog
## Version 4.3.06 de Deltacms
- Corrections :
- Personnalisation des thémes : color picker absent du paramétrage de la bannière et du footer.
## Version 4.3.05 de Deltacms
- Modifications :
- Form, Agenda, Gallery : les lexiques pour la langue d'administration sont déportés dans des dossiers 'lang',
- Modules du coeur, core.php, core.js.php : les lexiques pour la langue d'administration sont déportés dans des dossiers 'lang',
- Fichier sitemap.xml : exclusion des pages orphelines,
- Capture Opengraph : réduction du poids de l'image screenshot.jpg.
## Version 4.3.04 de Deltacms ## Version 4.3.04 de Deltacms
- Modifications : - Modifications :
- Fichiers .htaccess : Mise à jour vers Apache 2.4. Attention pour cette mise à jour vers la version Deltacms 4.3.04 - Fichiers .htaccess : Mise à jour vers Apache 2.4. Attention pour cette mise à jour vers la version Deltacms 4.3.04

View File

@ -1,5 +1,5 @@
# DeltaCMS 4.3.04 # DeltaCMS 4.3.06
DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation. DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
L'administration du site est bilingue anglais ou français, le site peut être rédigé dans une des principales langues européennes. L'administration du site est bilingue anglais ou français, le site peut être rédigé dans une des principales langues européennes.

View File

@ -65,14 +65,6 @@ core.colorVariants = function(rgba) {
* Crée un message de confirmation * Crée un message de confirmation
*/ */
core.confirm = function(text, yesCallback, noCallback) { core.confirm = function(text, yesCallback, noCallback) {
var textnon = "";
var textoui = "";
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'textnon = "Non"; textoui = "Oui";' ;
}
else{
echo 'textnon = "No"; textoui = "Yes";' ;
} ?>
var lightbox = lity(function($) { var lightbox = lity(function($) {
return $("<div>") return $("<div>")
.addClass("lightbox") .addClass("lightbox")
@ -83,7 +75,7 @@ core.confirm = function(text, yesCallback, noCallback) {
.append( .append(
$("<a>") $("<a>")
.addClass("button grey") .addClass("button grey")
.text(textnon) .text(textConfirmNo)
.on("click", function() { .on("click", function() {
lightbox.options('button', true); lightbox.options('button', true);
lightbox.close(); lightbox.close();
@ -93,7 +85,7 @@ core.confirm = function(text, yesCallback, noCallback) {
}), }),
$("<a>") $("<a>")
.addClass("button") .addClass("button")
.text(textoui) .text(textConfirmYes)
.on("click", function() { .on("click", function() {
lightbox.options('button', true); lightbox.options('button', true);
lightbox.close(); lightbox.close();
@ -297,16 +289,9 @@ core.start = function() {
// Mise à jour de l'affichage des champs d'upload // Mise à jour de l'affichage des champs d'upload
$(".inputFileHidden").on("change", function() { $(".inputFileHidden").on("change", function() {
var inputFileHiddenDOM = $(this); var inputFileHiddenDOM = $(this);
var text = "";
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Choisissez un fichier";' ;
}
else{
echo 'text = "Select a file";' ;
} ?>
var fileName = inputFileHiddenDOM.val(); var fileName = inputFileHiddenDOM.val();
if(fileName === "") { if(fileName === "") {
fileName = text; fileName = textSelectFile;
$(inputFileHiddenDOM).addClass("disabled"); $(inputFileHiddenDOM).addClass("disabled");
} }
else { else {
@ -324,27 +309,13 @@ core.start = function() {
}); });
// Confirmation de mise à jour // Confirmation de mise à jour
$("#barUpdate").on("click", function() { $("#barUpdate").on("click", function() {
var text = ""; return core.confirm( textUpdating, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Effectuer la mise à jour ?";' ;
}
else{
echo 'text = "Updating ?";' ;
} ?>
return core.confirm( text, function() {
$(location).attr("href", $("#barUpdate").attr("href")); $(location).attr("href", $("#barUpdate").attr("href"));
}); });
}); });
// Confirmation de déconnexion // Confirmation de déconnexion
var text = "";
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Se déconnecter ?";' ;
}
else{
echo 'text = "Logout ?";' ;
} ?>
$("#barLogout").on("click", function() { $("#barLogout").on("click", function() {
return core.confirm( text, function() { return core.confirm( textLogout, function() {
$(location).attr("href", $("#barLogout").attr("href")); $(location).attr("href", $("#barLogout").attr("href"));
}); });
}); });
@ -364,20 +335,13 @@ core.start = function() {
* Check adresse email * Check adresse email
*/ */
$("[type=email]").on("change", function() { $("[type=email]").on("change", function() {
var text = "";
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Format incorrect";' ;
}
else{
echo 'text = "Incorrect format";' ;
} ?>
var _this = $(this); var _this = $(this);
var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i; var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i;
if(pattern.test(_this.val())) { if(pattern.test(_this.val())) {
core.noticeRemove(_this.attr("id")); core.noticeRemove(_this.attr("id"));
} }
else { else {
core.noticeAdd(_this.attr("id"), text); core.noticeAdd(_this.attr("id"), textCheckMail);
} }
}); });
@ -435,14 +399,7 @@ core.start();
*/ */
$("#pageDelete").on("click", function() { $("#pageDelete").on("click", function() {
var _this = $(this); var _this = $(this);
var text = ""; return core.confirm( textPageDelete, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir supprimer cette page ?";' ;
}
else{
echo 'text = "Are you sure you want to delete this page ?";' ;
} ?>
return core.confirm( text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });
@ -577,8 +534,9 @@ $(document).ready(function(){
*/ */
var dataURL = {}; var dataURL = {};
$('#screenshot').click(function() { $('#screenshot').click(function() {
html2canvas(document.querySelector("#main_screenshot")).then(canvas => { html2canvas(document.querySelector("#main_screenshot")).then(canvas => {
dataURL = canvas.toDataURL(); dataURL = canvas.toDataURL('image/jpeg', 0.1);
console.log( dataURL);
$.ajax({ $.ajax({
type: "POST", type: "POST",
contentType:"application/x-www-form-urlencoded", contentType:"application/x-www-form-urlencoded",
@ -588,7 +546,7 @@ $(document).ready(function(){
}, },
dataType: "html" dataType: "html"
}); });
}); });
}); });
}); });

View File

@ -48,7 +48,7 @@ class common {
// Numéro de version // Numéro de version
const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/'; const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/';
const DELTA_VERSION = '4.3.04'; const DELTA_VERSION = '4.3.06';
const DELTA_UPDATE_CHANNEL = "v4"; const DELTA_UPDATE_CHANNEL = "v4";
public static $actions = []; public static $actions = [];
@ -123,48 +123,7 @@ class common {
], ],
'view' => '' 'view' => ''
]; ];
public static $groups = [ // Langues proposées, conserver ces 5 variables $i18nList...
self::GROUP_BANNED => 'Banni',
self::GROUP_VISITOR => 'Visiteur',
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
public static $groupEdits = [
self::GROUP_BANNED => 'Banni',
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
public static $groupEdits_en = [
self::GROUP_BANNED => 'Banned',
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
public static $groupNews = [
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
public static $groupNews_en = [
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
public static $groupPublics = [
self::GROUP_VISITOR => 'Visiteur',
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
public static $groupPublics_en = [
self::GROUP_VISITOR => 'Visitor',
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
// Langues proposées
public static $i18nList = [ public static $i18nList = [
'fr' => 'Français (fr)', 'fr' => 'Français (fr)',
'de' => 'Allemand (de)', 'de' => 'Allemand (de)',
@ -203,6 +162,10 @@ class common {
'eu' => 'Basque (eu)', 'eu' => 'Basque (eu)',
'none' => 'Other language' 'none' => 'Other language'
]; ];
public static $i18nList_admin = [
'fr' => 'Français (fr)',
'en' => 'English (en)'
];
public static $i18nList_int = [ public static $i18nList_int = [
'fr' => 'Français (fr)', 'fr' => 'Français (fr)',
'da' => 'Dansk (da)', 'da' => 'Dansk (da)',
@ -436,27 +399,18 @@ class common {
*/ */
public function addRequiredInputNotices($key) { public function addRequiredInputNotices($key) {
// Lexique // Lexique
$text = []; include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Obligatoire';
break;
case 'en' :
$text[0] = 'Mandatory';
break;
}
// La clef est un tableau // La clef est un tableau
if(preg_match('#\[(.*)\]#', $key, $secondKey)) { if(preg_match('#\[(.*)\]#', $key, $secondKey)) {
$firstKey = explode('[', $key)[0]; $firstKey = explode('[', $key)[0];
$secondKey = $secondKey[1]; $secondKey = $secondKey[1];
if(empty($this->input['_POST'][$firstKey][$secondKey])) { if(empty($this->input['_POST'][$firstKey][$secondKey])) {
common::$inputNotices[$firstKey . '_' . $secondKey] = $text[0]; common::$inputNotices[$firstKey . '_' . $secondKey] = $text['core']['addRequiredInputNotices'][0];
} }
} }
// La clef est une chaine // La clef est une chaine
elseif(empty($this->input['_POST'][$key])) { elseif(empty($this->input['_POST'][$key])) {
common::$inputNotices[$key] = $text[0]; common::$inputNotices[$key] = $text['core']['addRequiredInputNotices'][0];
} }
} }
@ -928,9 +882,10 @@ class common {
if ($this->getData(['config','seo', 'robots']) === true) { if ($this->getData(['config','seo', 'robots']) === true) {
foreach($this->getHierarchy(null, null, null) as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy(null, null, null) as $parentPageId => $childrenPageIds) {
// Exclure les barres et les pages non publiques et les pages masquées // Exclure les barres,les pages non publiques et les pages orphelines
if ($this->getData(['page',$parentPageId,'group']) !== 0 || if ($this->getData(['page',$parentPageId,'group']) !== 0 ||
$this->getData(['page', $parentPageId, 'block']) === 'bar' ) { $this->getData(['page', $parentPageId, 'block']) === 'bar' ||
$this->getData(['page', $parentPageId, 'position']) === 0 ) {
continue; continue;
} }
// Page désactivée, traiter les sous-pages sans prendre en compte la page parente. // Page désactivée, traiter les sous-pages sans prendre en compte la page parente.
@ -1074,6 +1029,7 @@ class common {
$layout = ob_get_clean(); $layout = ob_get_clean();
$mail = new PHPMailer\PHPMailer\PHPMailer; $mail = new PHPMailer\PHPMailer\PHPMailer;
$mail->CharSet = 'UTF-8'; $mail->CharSet = 'UTF-8';
// Langage par défaut : en
if( $this->getData(['config', 'i18n', 'langAdmin']) === 'fr')$mail->setLanguage('fr', 'core/class/phpmailer/phpmailer.lang-fr.php'); if( $this->getData(['config', 'i18n', 'langAdmin']) === 'fr')$mail->setLanguage('fr', 'core/class/phpmailer/phpmailer.lang-fr.php');
// Mail // Mail
try{ try{
@ -1641,21 +1597,8 @@ class common {
* Affiche le menu * Affiche le menu
*/ */
public function showMenu() { public function showMenu() {
// Lexique // Lexique
$text = []; include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Gérer les fichiers';
$text[1] = 'Gérer mon compte';
$text[2] = 'Me déconnecter';
break;
case 'en' :
$text[0] = 'Manage files';
$text[1] = 'Manage my account';
$text[2] = 'Logout';
break;
}
// Met en forme les items du menu // Met en forme les items du menu
$itemsLeft = ''; $itemsLeft = '';
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2); $currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
@ -1828,9 +1771,9 @@ class common {
|| $this->getData(['theme','footer','displayMemberBar']) === false || $this->getData(['theme','footer','displayMemberBar']) === false
) )
) { ) {
if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $itemsRight .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="'.$text[0].'" data-lity>' . template::ico('folder') . '</a></li>'; if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $itemsRight .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="'.$text['core']['showmenu'][0].'" data-lity>' . template::ico('folder') . '</a></li>';
$itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="'.$text[1].'">' . template::ico('user', 'right') . '</a></li>'; $itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="'.$text['core']['showmenu'][1].'">' . template::ico('user', 'right') . '</a></li>';
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="'.$text[2].'">' . template::ico('logout') . '</a></li>'; $itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="'.$text['core']['showmenu'][2].'">' . template::ico('logout') . '</a></li>';
} }
// Retourne les items du menu // Retourne les items du menu
echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight; echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight;
@ -1957,28 +1900,18 @@ class common {
*/ */
public function showNotification() { public function showNotification() {
// Lexique // Lexique
$text = []; include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Impossible de soumettre le formulaire, car il contient des erreurs';
$text[1] = 'Données absentes, restauration de ';
break;
case 'en' :
$text[0] = 'Unable to submit the form as it contains errors';
$text[1] = 'Missing data, restoration of ';
break;
}
if (common::$importNotices) { if (common::$importNotices) {
$notification = common::$importNotices [0]; $notification = common::$importNotices [0];
$notificationClass = 'notificationSuccess'; $notificationClass = 'notificationSuccess';
} }
if(common::$inputNotices) { if(common::$inputNotices) {
$notification = $text[0]; $notification = $text['core']['showNotification'][0];
$notificationClass = 'notificationError'; $notificationClass = 'notificationError';
} }
if (common::$coreNotices) { if (common::$coreNotices) {
$notification = $text[1].'<p> | '; $notification = $text['core']['showNotification'][1].'<p> | ';
foreach (common::$coreNotices as $item) $notification .= $item . ' | '; foreach (common::$coreNotices as $item) $notification .= $item . ' | ';
$notificationClass = 'notificationError'; $notificationClass = 'notificationError';
} }
@ -2007,64 +1940,22 @@ class common {
*/ */
public function showBar() { public function showBar() {
// Lexique // Lexique
$text = []; include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Choisissez une page';
$text[1] = 'Pages orphelines';
$text[2] = 'Pages du menu';
$text[3] = 'Barres latérales';
$text[4] = 'Créer une page ou<br>une barre latérale';
$text[5] = 'Modifier la page';
$text[6] = 'Configurer le module';
$text[7] = 'Dupliquer la page';
$text[8] = 'Effacer la page';
$text[9] = 'Gérer les fichiers';
$text[10] = 'Personnaliser les thèmes';
$text[11] = 'Gérer les modules';
$text[12] = 'Gestion des langues';
$text[13] = 'Configurer le site';
$text[14] = 'Configurer les utilisateurs';
$text[15] = 'Mettre à jour DeltaCMS ';
$text[16] = 'Configurer mon compte';
$text[17] = 'Me déconnecter';
break;
case 'en' :
$text[0] = 'Choose a page';
$text[1] = 'Orphan pages';
$text[2] = 'Menu pages';
$text[3] = 'Side bars';
$text[4] = 'Creating a page<br>or a sidebar';
$text[5] = 'Modify the page';
$text[6] = 'Configuring the module';
$text[7] = 'Duplicate the page';
$text[8] = 'Erase the page';
$text[9] = 'Managing files';
$text[10] = 'Customise themes';
$text[11] = 'Manage modules';
$text[12] = 'Language management';
$text[13] = 'Configuring the site';
$text[14] = 'Setting up users';
$text[15] = 'Updating DeltaCMS ';
$text[16] = 'Set up my account';
$text[17] = 'Logout';
break;
}
if($this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')) { if($this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')) {
// Items de gauche // Items de gauche
$leftItems = ''; $leftItems = '';
if($this->getUser('group') >= self::GROUP_MODERATOR) { if($this->getUser('group') >= self::GROUP_MODERATOR) {
$leftItems .= '<li><select id="barSelectPage">'; $leftItems .= '<li><select id="barSelectPage">';
$leftItems .= '<option value="">'.$text[0].'</option>'; $leftItems .= '<option value="">'.$text['core']['showBar'][0].'</option>';
$leftItems .= '<optgroup label="'.$text[1].'">'; $leftItems .= '<optgroup label="'.$text['core']['showBar'][1].'">';
$orpheline = true ; $orpheline = true ;
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2); $currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
foreach($this->getHierarchy(null,false) as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy(null,false) as $parentPageId => $childrenPageIds) {
if ($this->getData(['page', $parentPageId, 'position']) !== 0 && if ($this->getData(['page', $parentPageId, 'position']) !== 0 &&
$orpheline ) { $orpheline ) {
$orpheline = false; $orpheline = false;
$leftItems .= '<optgroup label="'.$text[2].'">'; $leftItems .= '<optgroup label="'.$text['core']['showBar'][2].'">';
} }
// Exclure les barres // Exclure les barres
if ($this->getData(['page', $parentPageId, 'block']) !== 'bar') { if ($this->getData(['page', $parentPageId, 'block']) !== 'bar') {
@ -2094,7 +1985,7 @@ class common {
} }
$leftItems .= '</optgroup'> $leftItems .= '</optgroup'>
// Afficher les barres // Afficher les barres
$leftItems .= '<optgroup label="'.$text[3].'">'; $leftItems .= '<optgroup label="'.$text['core']['showBar'][3].'">';
foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) {
$leftItems .= '<option value="' . helper::baseUrl() . $parentPageId . '"' . ($parentPageId === $currentPageId ? ' selected' : false) . '>' . $this->getData(['page', $parentPageId, 'shortTitle']) . '</option>'; $leftItems .= '<option value="' . helper::baseUrl() . $parentPageId . '"' . ($parentPageId === $currentPageId ? ' selected' : false) . '>' . $this->getData(['page', $parentPageId, 'shortTitle']) . '</option>';
foreach($childrenPageIds as $childKey) { foreach($childrenPageIds as $childKey) {
@ -2103,7 +1994,7 @@ class common {
} }
$leftItems .= '</optgroup>'; $leftItems .= '</optgroup>';
$leftItems .= '</select></li>'; $leftItems .= '</select></li>';
$leftItems .= '<li><a href="' . helper::baseUrl() . 'page/add" data-tippy-content="'.$text[4] .'"'. template::ico('plus') . '</a></li>'; $leftItems .= '<li><a href="' . helper::baseUrl() . 'page/add" data-tippy-content="'.$text['core']['showBar'][4] .'"'. template::ico('plus') . '</a></li>';
if( if(
// Sur un module de page qui autorise le bouton de modification de la page // Sur un module de page qui autorise le bouton de modification de la page
$this->output['showBarEditButton'] $this->output['showBarEditButton']
@ -2112,27 +2003,27 @@ class common {
// Sur une page d'accueil // Sur une page d'accueil
OR $this->getUrl(0) === '' OR $this->getUrl(0) === ''
) { ) {
$leftItems .= '<li><a href="' . helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '" data-tippy-content="'.$text[5].'">' . template::ico('pencil') . '</a></li>'; $leftItems .= '<li><a href="' . helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '" data-tippy-content="'.$text['core']['showBar'][5].'">' . template::ico('pencil') . '</a></li>';
if ($this->getData(['page', $this->getUrl(0),'moduleId'])) { if ($this->getData(['page', $this->getUrl(0),'moduleId'])) {
$leftItems .= '<li><a href="' . helper::baseUrl() . $this->getUrl(0) . '/config' . '" data-tippy-content="'.$text[6].'">' . template::ico('gear') . '</a></li>'; $leftItems .= '<li><a href="' . helper::baseUrl() . $this->getUrl(0) . '/config' . '" data-tippy-content="'.$text['core']['showBar'][6].'">' . template::ico('gear') . '</a></li>';
} }
$leftItems .= '<li><a id="pageDuplicate" href="' . helper::baseUrl() . 'page/duplicate/' . $this->getUrl(0) . '&csrf=' . $_SESSION['csrf'] . '" data-tippy-content="'.$text[7].'">' . template::ico('clone') . '</a></li>'; $leftItems .= '<li><a id="pageDuplicate" href="' . helper::baseUrl() . 'page/duplicate/' . $this->getUrl(0) . '&csrf=' . $_SESSION['csrf'] . '" data-tippy-content="'.$text['core']['showBar'][7].'">' . template::ico('clone') . '</a></li>';
$leftItems .= '<li><a id="pageDelete" href="' . helper::baseUrl() . 'page/delete/' . $this->getUrl(0) . '&csrf=' . $_SESSION['csrf'] . '" data-tippy-content="'.$text[8].'">' . template::ico('trash') . '</a></li>'; $leftItems .= '<li><a id="pageDelete" href="' . helper::baseUrl() . 'page/delete/' . $this->getUrl(0) . '&csrf=' . $_SESSION['csrf'] . '" data-tippy-content="'.$text['core']['showBar'][8].'">' . template::ico('trash') . '</a></li>';
} }
} }
// Items de droite // Items de droite
$rightItems = ''; $rightItems = '';
if($this->getUser('group') >= self::GROUP_MODERATOR) { if($this->getUser('group') >= self::GROUP_MODERATOR) {
$rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="'.$text[9] .'" data-lity>' . template::ico('folder') . '</a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="'.$text['core']['showBar'][9] .'" data-lity>' . template::ico('folder') . '</a></li>';
} }
if($this->getUser('group') >= self::GROUP_ADMIN) { if($this->getUser('group') >= self::GROUP_ADMIN) {
$rightItems .= '<li><a href="' . helper::baseUrl() . 'theme" data-tippy-content="'.$text[10] .'">' . template::ico('brush') . '</a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl() . 'theme" data-tippy-content="'.$text['core']['showBar'][10] .'">' . template::ico('brush') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'addon" data-tippy-content="'.$text[11].'">' . template::ico('puzzle') . '</a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl() . 'addon" data-tippy-content="'.$text['core']['showBar'][11].'">' . template::ico('puzzle') . '</a></li>';
if ($this->getData(['config', 'i18n', 'enable']) === true) { if ($this->getData(['config', 'i18n', 'enable']) === true) {
$rightItems .= '<li><a href="' . helper::baseUrl() . 'translate" data-tippy-content="'.$text[12].'">' . template::ico('flag') . '</a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl() . 'translate" data-tippy-content="'.$text['core']['showBar'][12].'">' . template::ico('flag') . '</a></li>';
} }
$rightItems .= '<li><a href="' . helper::baseUrl() . 'config" data-tippy-content="'.$text[13].'">' . template::ico('cog-alt') . '</a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl() . 'config" data-tippy-content="'.$text['core']['showBar'][13].'">' . template::ico('cog-alt') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user" data-tippy-content="'.$text[14].'">' . template::ico('users') . '</a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl() . 'user" data-tippy-content="'.$text['core']['showBar'][14].'">' . template::ico('users') . '</a></li>';
// Mise à jour automatique // Mise à jour automatique
$today = time(); $today = time();
// Une mise à jour est disponible + recherche auto activée + 1 jour de délai // Une mise à jour est disponible + recherche auto activée + 1 jour de délai
@ -2146,13 +2037,13 @@ class common {
// Afficher le bouton : Mise à jour détectée + activée // Afficher le bouton : Mise à jour détectée + activée
if ( $this->getData(['core','updateAvailable']) === true && if ( $this->getData(['core','updateAvailable']) === true &&
$this->getData(['config','autoUpdate']) === true ) { $this->getData(['config','autoUpdate']) === true ) {
$rightItems .= '<li><a id="barUpdate" href="' . helper::baseUrl() . 'install/update" data-tippy-content="'.$text[15]. common::DELTA_VERSION .' vers '. helper::getOnlineVersion(common::DELTA_UPDATE_CHANNEL) .'">' . template::ico('update colorRed') . '</a></li>'; $rightItems .= '<li><a id="barUpdate" href="' . helper::baseUrl() . 'install/update" data-tippy-content="'.$text['core']['showBar'][15]. common::DELTA_VERSION .' vers '. helper::getOnlineVersion(common::DELTA_UPDATE_CHANNEL) .'">' . template::ico('update colorRed') . '</a></li>';
} }
} }
if($this->getUser('group') >= self::GROUP_MODERATOR) { if($this->getUser('group') >= self::GROUP_MODERATOR) {
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="'.$text[16].'">' . template::ico('user', 'right') . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>'; $rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="'.$text['core']['showBar'][16].'">' . template::ico('user', 'right') . '<span id="displayUsername">' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</span></a></li>';
} }
$rightItems .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="'.$text[17].'">' . template::ico('logout') . '</a></li>'; $rightItems .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="'.$text['core']['showBar'][17].'">' . template::ico('logout') . '</a></li>';
// Barre de membre // Barre de membre
echo '<div id="bar"><div class="container"><ul id="barLeft">' . $leftItems . '</ul><ul id="barRight">' . $rightItems . '</ul></div></div>'; echo '<div id="bar"><div class="container"><ul id="barLeft">' . $leftItems . '</ul><ul id="barRight">' . $rightItems . '</ul></div></div>';
} }
@ -2162,6 +2053,17 @@ class common {
* Affiche le script * Affiche le script
*/ */
public function showScript() { public function showScript() {
// Lexique
include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
?><script>
var textUpdating = <?php echo '"'.$text['core_js'][0].'"'; ?>;
var textSelectFile = <?php echo '"'.$text['core_js'][1].'"'; ?>;
var textLogout = <?php echo '"'.$text['core_js'][2].'"'; ?>;
var textCheckMail = <?php echo '"'.$text['core_js'][3].'"'; ?>;
var textPageDelete = <?php echo '"'.$text['core_js'][4].'"'; ?>;
var textConfirmYes = <?php echo '"'.$text['core_js'][5].'"'; ?>;
var textConfirmNo = <?php echo '"'.$text['core_js'][6].'"'; ?>;
</script><?php
ob_start(); ob_start();
require 'core/core.js.php'; require 'core/core.js.php';
$coreScript = ob_get_clean(); $coreScript = ob_get_clean();

View File

@ -60,8 +60,8 @@ if ($this->getData(['core', 'dataVersion']) < 4202) {
$this->setData(['core', 'dataVersion', 4202]); $this->setData(['core', 'dataVersion', 4202]);
} }
if ($this->getData(['core', 'dataVersion']) < 4304) { if ($this->getData(['core', 'dataVersion']) < 4306) {
// Mise à jour // Mise à jour
$this->setData(['core', 'dataVersion', 4304]); $this->setData(['core', 'dataVersion', 4306]);
} }
?> ?>

42
core/lang/en/lex_core.php Normal file
View File

@ -0,0 +1,42 @@
<?php
// Lexique du module du coeur core.php et core.js.php en anglais
$text['core']['addRequiredInputNotices'][0] = 'Mandatory';
$text['core']['showmenu'][0] = 'Manage files';
$text['core']['showmenu'][1] = 'Manage my account';
$text['core']['showmenu'][2] = 'Logout';
$text['core']['showNotification'][0] = 'Unable to submit the form as it contains errors';
$text['core']['showNotification'][1] = 'Missing data, restoration of ';
$text['core']['showBar'][0] = 'Choose a page';
$text['core']['showBar'][1] = 'Orphan pages';
$text['core']['showBar'][2] = 'Menu pages';
$text['core']['showBar'][3] = 'Side bars';
$text['core']['showBar'][4] = 'Creating a page<br>or a sidebar';
$text['core']['showBar'][5] = 'Modify the page';
$text['core']['showBar'][6] = 'Configuring the module';
$text['core']['showBar'][7] = 'Duplicate the page';
$text['core']['showBar'][8] = 'Erase the page';
$text['core']['showBar'][9] = 'Managing files';
$text['core']['showBar'][10] = 'Customise themes';
$text['core']['showBar'][11] = 'Manage modules';
$text['core']['showBar'][12] = 'Language management';
$text['core']['showBar'][13] = 'Configuring the site';
$text['core']['showBar'][14] = 'Setting up users';
$text['core']['showBar'][15] = 'Updating DeltaCMS ';
$text['core']['showBar'][16] = 'Set up my account';
$text['core']['showBar'][17] = 'Logout';
// core.js.php
$text['core_js'][0] = "Updating ?";
// Select File
$text['core_js'][1] = "Select a file";
// Logout
$text['core_js'][2] = "Logout ?";
// Check adresse email
$text['core_js'][3] = "Incorrect format";
// Page delete
$text['core_js'][4] = "Are you sure you want to delete this page ?";
$text['core_js'][5] = 'Yes';
$text['core_js'][6] = 'No';
?>

43
core/lang/fr/lex_core.php Normal file
View File

@ -0,0 +1,43 @@
<?php
// Lexique du module du coeur core.php et core.js.php en français
$text['core']['addRequiredInputNotices'][0] = 'Obligatoire';
$text['core']['showmenu'][0] = 'Gérer les fichiers';
$text['core']['showmenu'][1] = 'Gérer mon compte';
$text['core']['showmenu'][2] = 'Me déconnecter';
$text['core']['showNotification'][0] = 'Impossible de soumettre le formulaire, car il contient des erreurs';
$text['core']['showNotification'][1] = 'Données absentes, restauration de ';
$text['core']['showBar'][0] = 'Choisissez une page';
$text['core']['showBar'][1] = 'Pages orphelines';
$text['core']['showBar'][2] = 'Pages du menu';
$text['core']['showBar'][3] = 'Barres latérales';
$text['core']['showBar'][4] = 'Créer une page ou<br>une barre latérale';
$text['core']['showBar'][5] = 'Modifier la page';
$text['core']['showBar'][6] = 'Configurer le module';
$text['core']['showBar'][7] = 'Dupliquer la page';
$text['core']['showBar'][8] = 'Effacer la page';
$text['core']['showBar'][9] = 'Gérer les fichiers';
$text['core']['showBar'][10] = 'Personnaliser les thèmes';
$text['core']['showBar'][11] = 'Gérer les modules';
$text['core']['showBar'][12] = 'Gestion des langues';
$text['core']['showBar'][13] = 'Configurer le site';
$text['core']['showBar'][14] = 'Configurer les utilisateurs';
$text['core']['showBar'][15] = 'Mettre à jour DeltaCMS ';
$text['core']['showBar'][16] = 'Configurer mon compte';
$text['core']['showBar'][17] = 'Me déconnecter';
// core.js.php
$text['core_js'][0] = "Effectuer la mise à jour ?";
// Select File
$text['core_js'][1] = "Choisissez un fichier";
// Logout
$text['core_js'][2] = "Se déconnecter ?";
// Check adresse email
$text['core_js'][3] = "Format incorrect";
// Page delete
$text['core_js'][4] = "Êtes-vous sûr de vouloir supprimer cette page ?";
// Message confirmation
$text['core_js'][5] = 'Oui';
$text['core_js'][6] = 'Non';
?>

View File

@ -214,7 +214,7 @@ if( $this->getInput('DELTA_I18N_SITE') !== '' && $this->getInput('DELTA_I18N_SIT
<!-- Corps de page --> <!-- Corps de page -->
<?php $this->showSection();?> <?php $this->showSection();?>
<!-- footer --> <!-- footer -->
<?php $this->showFooter();?> <?php $this->showFooter();?>

View File

@ -49,23 +49,7 @@ class addon extends common {
*/ */
public function delete() { public function delete() {
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Action non autorisée';
$text[1] = ' désinstallé';
$text[2] = ' désinstallé, il reste des données dans ';
$text[3] = 'La suppression a échouée';
break;
case 'en' :
$text[0] = 'Unauthorised action';
$text[1] = ' uninstalled';
$text[2] = ' uninstalled, there is data left in ';
$text[3] = 'Deletion failed';
break;
}
// Jeton incorrect // Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) { if ($this->getUrl(3) !== $_SESSION['csrf']) {
@ -73,7 +57,7 @@ class addon extends common {
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'addon', 'redirect' => helper::baseUrl() . 'addon',
'state' => false, 'state' => false,
'notification' => $text[0] 'notification' => $text['core_addon']['delete'][0]
]); ]);
} }
else{ else{
@ -83,16 +67,16 @@ class addon extends common {
//Liste des dossiers associés au module non effacés //Liste des dossiers associés au module non effacés
if( $this->removeDir('./module/'.$module ) === true ){ if( $this->removeDir('./module/'.$module ) === true ){
$success = true; $success = true;
$notification = 'Module '. $module .$text[1]; $notification = 'Module '. $module .$text['core_addon']['delete'][1];
if( is_dir($infoModules[$this->getUrl(2)]['dataDirectory']) ) { if( is_dir($infoModules[$this->getUrl(2)]['dataDirectory']) ) {
if (!$this->removeDir($infoModules[$this->getUrl(2)]['dataDirectory'])){ if (!$this->removeDir($infoModules[$this->getUrl(2)]['dataDirectory'])){
$notification = 'Module '.$module .$text[2] . $infoModules[$this->getUrl(2)]['dataDirectory']; $notification = 'Module '.$module .$text['core_addon']['delete'][2] . $infoModules[$this->getUrl(2)]['dataDirectory'];
} }
} }
} }
else{ else{
$success = false; $success = false;
$notification = $text[3]; $notification = $text['core_addon']['delete'][3];
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
@ -109,34 +93,7 @@ class addon extends common {
*/ */
private function install ($moduleName, $checkValid){ private function install ($moduleName, $checkValid){
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Ce n\'est pas l\'archive d\'un module !';
$text[1] = ' installé';
$text[2] = ' mis à jour';
$text[3] = 'Module ';
$text[4] = ' Version détectée ';
$text[5] = ' = à celle installée ';
$text[6] = ' < à celle installée ';
$text[7] = ' Mise à jour par ce procédé interdite par le concepteur du module';
$text[8] = ' Mise à jour par ce procédé interdite, votre version est trop ancienne';
$text[9] = 'Impossible d\'ouvrir l\'archive';
break;
case 'en' :
$text[0] = 'This is not the archive of a module !';
$text[1] = ' installed';
$text[2] = ' updated';
$text[3] = 'Module ';
$text[4] = ' Detected version ';
$text[5] = ' = to that installed ';
$text[6] = ' < to that installed ';
$text[7] = ' Updating by this process prohibited by the module designer';
$text[8] = ' Updating by this process is not allowed, your version is too old';
$text[9] = 'Unable to open the archive';
break;
}
$tempFolder = 'datamodules';//uniqid(); $tempFolder = 'datamodules';//uniqid();
$zip = new ZipArchive(); $zip = new ZipArchive();
if ($zip->open($moduleName) === TRUE) { if ($zip->open($moduleName) === TRUE) {
@ -145,7 +102,7 @@ class addon extends common {
$zip->extractTo(self::TEMP_DIR . $tempFolder ); $zip->extractTo(self::TEMP_DIR . $tempFolder );
// Archive de module ? // Archive de module ?
$success = false; $success = false;
$notification = $text[0]; $notification = $text['core_addon']['install'][0];
$moduleDir = self::TEMP_DIR . $tempFolder . '/module'; $moduleDir = self::TEMP_DIR . $tempFolder . '/module';
$moduleName = ''; $moduleName = '';
if ( is_dir( $moduleDir )) { if ( is_dir( $moduleDir )) {
@ -207,26 +164,26 @@ class addon extends common {
$this->copyDir( self::TEMP_DIR . $tempFolder, './' ); $this->copyDir( self::TEMP_DIR . $tempFolder, './' );
$success = true; $success = true;
if( ! $moduleInstal ){ if( ! $moduleInstal ){
$notification = $text[3].$moduleName. $text[1]; $notification = $text['core_addon']['install'][3].$moduleName. $text['core_addon']['install'][1];
} }
else{ else{
$notification = $text[3].$moduleName. $text[2]; $notification = $text['core_addon']['install'][3].$moduleName. $text['core_addon']['install'][2];
} }
} }
else{ else{
$success = false; $success = false;
if( $valNewVersion == $valInstalVersion){ if( $valNewVersion == $valInstalVersion){
$notification = $text[4].$version.$text[5].$infoModules[$moduleName]['version']; $notification = $text['core_addon']['install'][4].$version.$text['core_addon']['install'][5].$infoModules[$moduleName]['version'];
} }
else{ else{
$notification = $text[4].$version.$text[6].$infoModules[$moduleName]['version']; $notification = $text['core_addon']['install'][4].$version.$text['core_addon']['install'][6].$infoModules[$moduleName]['version'];
} }
if( $valUpdate === false){ if( $valUpdate === false){
if( $infoModules[$moduleName]['update'] === $update ){ if( $infoModules[$moduleName]['update'] === $update ){
$notification = $text[7]; $notification = $text['core_addon']['install'][7];
} }
else{ else{
$notification = $text[8]; $notification = $text['core_addon']['install'][8];
} }
} }
} }
@ -238,7 +195,7 @@ class addon extends common {
} else { } else {
// erreur à l'ouverture // erreur à l'ouverture
$success = false; $success = false;
$notification = $text[9]; $notification = $text['core_addon']['install'][9];
} }
return(['success' => $success, return(['success' => $success,
'notification'=> $notification 'notification'=> $notification
@ -250,16 +207,7 @@ class addon extends common {
*/ */
public function upload() { public function upload() {
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Installer un module';
break;
case 'en' :
$text[0] = 'Installing a module';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
@ -281,7 +229,7 @@ class addon extends common {
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_addon']['upload'][0],
'view' => 'upload' 'view' => 'upload'
]); ]);
} }
@ -413,17 +361,7 @@ class addon extends common {
*/ */
public function index() { public function index() {
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Gestion des modules';
break;
case 'en' :
$text[0] = 'Module management';
break;
}
// Lister les modules // Lister les modules
// $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory'] // $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory']
@ -468,7 +406,7 @@ class addon extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_addon']['index'][0],
'view' => 'index' 'view' => 'index'
]); ]);
} }
@ -478,25 +416,15 @@ class addon extends common {
*/ */
public function export(){ public function export(){
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Action non autorisée';
$text[1] = 'Quelque chose s\'est mal passé';
break;
case 'en' :
$text[0] = 'Unauthorised action';
$text[1] = 'Something went wrong';
break;
}
// Jeton incorrect // Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) { if ($this->getUrl(3) !== $_SESSION['csrf']) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'addon', 'redirect' => helper::baseUrl() . 'addon',
'state' => false, 'state' => false,
'notification' => $text[0] 'notification' => $text['core_addon']['export'][0]
]); ]);
} }
else { else {
@ -576,7 +504,7 @@ class addon extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'addon', 'redirect' => helper::baseUrl() . 'addon',
'notification' => $text[1], 'notification' => $text['core_addon']['export'][1],
'state' => false 'state' => false
]); ]);
} }
@ -588,31 +516,15 @@ class addon extends common {
*/ */
public function import(){ public function import(){
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Action non autorisée';
$text[1] = 'Import impossible la page suivante doit être renommée :';
$text[2] = 'Import impossible les pages suivantes doivent être renommées :';
$text[3] = 'Import réussi';
$text[4] = 'Importer des données de module';
break;
case 'en' :
$text[0] = 'Unauthorised action';
$text[1] = 'Impossible import the following page should be renamed :';
$text[2] = 'Import impossible the following pages should be renamed:';
$text[3] = 'Successful import';
$text[4] = 'Importing module data';
break;
}
// Jeton incorrect // Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) { if ($this->getUrl(3) !== $_SESSION['csrf']) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'addon', 'redirect' => helper::baseUrl() . 'addon',
'state' => false, 'state' => false,
'notification' => $text[0] 'notification' => $text['core_addon']['import'][0]
]); ]);
} }
else { else {
@ -673,11 +585,11 @@ class addon extends common {
$zip->close(); $zip->close();
if( $list !== '' ){ if( $list !== '' ){
$success = false; $success = false;
strpos( $list, ',') === false ? $notification = $text[1].$list : $notification = $text[2].$list; strpos( $list, ',') === false ? $notification = $text['core_addon']['import'][1].$list : $notification = $text['core_addon']['import'][2].$list;
} }
else{ else{
$success = true; $success = true;
$notification = $text[3]; $notification = $text['core_addon']['import'][3];
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
@ -688,7 +600,7 @@ class addon extends common {
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[4], 'title' => $text['core_addon']['import'][4],
'view' => 'import' 'view' => 'import'
]); ]);
} }

View File

@ -0,0 +1,51 @@
<?php
// Lexique du module du coeur Addon en anglais
$text['core_addon_view']['import'][0] = 'Back';
$text['core_addon_view']['import'][1] = 'Apply';
$text['core_addon_view']['import'][2] = 'Archive ZIP :';
$text['core_addon_view']['import'][3] = 'Installing module data';
$text['core_addon_view']['index'][0] = 'Back';
$text['core_addon_view']['index'][1] = 'Help';
$text['core_addon_view']['index'][2] = 'Installing a module';
$text['core_addon_view']['index'][3] = 'Installed module';
$text['core_addon_view']['index'][4] = 'Alias';
$text['core_addon_view']['index'][5] = 'Version';
$text['core_addon_view']['index'][6] = 'Page(s)';
$text['core_addon_view']['index'][7] = 'Delete';
$text['core_addon_view']['index'][8] = 'Export';
$text['core_addon_view']['index'][9] = 'Import';
$text['core_addon_view']['index'][10] = 'No module installed.';
$text['core_addon_view']['index'][11] = "Are you sure you want to delete this module ?";
$text['core_addon_view']['upload'][0] = 'Back';
$text['core_addon_view']['upload'][1] = 'Help';
$text['core_addon_view']['upload'][2] = 'Validate';
$text['core_addon_view']['upload'][3] = 'Archive ZIP :';
$text['core_addon_view']['upload'][4] = 'Allows you to force an update even if the version of the module is less than or equal to that of the installed module.';
$text['core_addon_view']['upload'][5] = 'Forced update';
$text['core_addon_view']['upload'][6] = 'Install or update a downloaded module';
$text['core_addon']['delete'][0] = 'Unauthorised action';
$text['core_addon']['delete'][1] = ' uninstalled';
$text['core_addon']['delete'][2] = ' uninstalled, there is data left in ';
$text['core_addon']['delete'][3] = 'Deletion failed';
$text['core_addon']['install'][0] = 'This is not the archive of a module !';
$text['core_addon']['install'][1] = ' installed';
$text['core_addon']['install'][2] = ' updated';
$text['core_addon']['install'][3] = 'Module ';
$text['core_addon']['install'][4] = ' Detected version ';
$text['core_addon']['install'][5] = ' = to that installed ';
$text['core_addon']['install'][6] = ' < to that installed ';
$text['core_addon']['install'][7] = ' Updating by this process prohibited by the module designer';
$text['core_addon']['install'][8] = ' Updating by this process is not allowed, your version is too old';
$text['core_addon']['install'][9] = 'Unable to open the archive';
$text['core_addon']['upload'][0] = 'Installing a module';
$text['core_addon']['index'][0] = 'Module management';
$text['core_addon']['export'][0] = 'Unauthorised action';
$text['core_addon']['export'][1] = 'Something went wrong';
$text['core_addon']['import'][0] = 'Unauthorised action';
$text['core_addon']['import'][1] = 'Impossible import the following page should be renamed :';
$text['core_addon']['import'][2] = 'Import impossible the following pages should be renamed:';
$text['core_addon']['import'][3] = 'Successful import';
$text['core_addon']['import'][4] = 'Importing module data';
?>

View File

@ -0,0 +1,51 @@
<?php
// Lexique du module du coeur Addon en français
$text['core_addon_view']['import'][0] = 'Retour';
$text['core_addon_view']['import'][1] = 'Appliquer';
$text['core_addon_view']['import'][2] = 'Archive ZIP :';
$text['core_addon_view']['import'][3] = 'Installer des données de module';
$text['core_addon_view']['index'][0] = 'Retour';
$text['core_addon_view']['index'][1] = 'Aide';
$text['core_addon_view']['index'][2] = 'Installer un module';
$text['core_addon_view']['index'][3] = 'Module installé';
$text['core_addon_view']['index'][4] = 'Alias';
$text['core_addon_view']['index'][5] = 'Version';
$text['core_addon_view']['index'][6] = 'Page(s)';
$text['core_addon_view']['index'][7] = 'Supprimer';
$text['core_addon_view']['index'][8] = 'Exporter';
$text['core_addon_view']['index'][9] = 'Importer';
$text['core_addon_view']['index'][10] = 'Aucun module installé.';
$text['core_addon_view']['index'][11] = "Êtes-vous sûr de vouloir supprimer ce module ?";
$text['core_addon_view']['upload'][0] = 'Retour';
$text['core_addon_view']['upload'][1] = 'Aide';
$text['core_addon_view']['upload'][2] = 'Valider';
$text['core_addon_view']['upload'][3] = 'Archive ZIP :';
$text['core_addon_view']['upload'][4] = 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.';
$text['core_addon_view']['upload'][5] = 'Mise à jour forcée';
$text['core_addon_view']['upload'][6] = 'Installer ou mettre à jour un module téléchargé';
$text['core_addon']['delete'][0] = 'Action non autorisée';
$text['core_addon']['delete'][1] = ' désinstallé';
$text['core_addon']['delete'][2] = ' désinstallé, il reste des données dans ';
$text['core_addon']['delete'][3] = 'La suppression a échouée';
$text['core_addon']['install'][0] = 'Ce n\'est pas l\'archive d\'un module !';
$text['core_addon']['install'][1] = ' installé';
$text['core_addon']['install'][2] = ' mis à jour';
$text['core_addon']['install'][3] = 'Module ';
$text['core_addon']['install'][4] = ' Version détectée ';
$text['core_addon']['install'][5] = ' = à celle installée ';
$text['core_addon']['install'][6] = ' < à celle installée ';
$text['core_addon']['install'][7] = ' Mise à jour par ce procédé interdite par le concepteur du module';
$text['core_addon']['install'][8] = ' Mise à jour par ce procédé interdite, votre version est trop ancienne';
$text['core_addon']['install'][9] = 'Impossible d\'ouvrir l\'archive';
$text['core_addon']['upload'][0] = 'Installer un module';
$text['core_addon']['index'][0] = 'Gestion des modules';
$text['core_addon']['export'][0] = 'Action non autorisée';
$text['core_addon']['export'][1] = 'Quelque chose s\'est mal passé';
$text['core_addon']['import'][0] = 'Action non autorisée';
$text['core_addon']['import'][1] = 'Import impossible la page suivante doit être renommée :';
$text['core_addon']['import'][2] = 'Import impossible les pages suivantes doivent être renommées :';
$text['core_addon']['import'][3] = 'Import réussi';
$text['core_addon']['import'][4] = 'Importer des données de module';
?>

View File

@ -1,46 +1,31 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('addonImportForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Appliquer';
$text[2] = 'Archive ZIP :';
$text[3] = 'Installer des données de module';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Apply';
$text[2] = 'Archive ZIP :';
$text[3] = 'Installing module data';
break;
}
?>
<?php echo template::formOpen('addonImportForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('addonImportBack', [ <?php echo template::button('addonImportBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'addon', 'href' => helper::baseUrl() . 'addon',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_addon_view']['import'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('addonImportSubmit', [ <?php echo template::submit('addonImportSubmit', [
'value' => $text[1] 'value' => $text['core_addon_view']['import'][1]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_addon_view']['import'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col6 offset3"> <div class="col6 offset3">
<?php echo template::file('addonImportFile', [ <?php echo template::file('addonImportFile', [
'label' => $text[2], 'label' => $text['core_addon_view']['import'][2],
'type' => 2 'type' => 2
]); ?> ]); ?>
</div> </div>

View File

@ -19,14 +19,7 @@
*/ */
$(".moduleDelete").on("click", function() { $(".moduleDelete").on("click", function() {
var _this = $(this); var _this = $(this);
var text = ""; return core.confirm( textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir supprimer ce module ?";' ;
}
else{
echo 'text = "Are you sure you want to delete this module ?";' ;
} ?>
return core.confirm( text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,35 +1,6 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Installer un module';
$text[3] = 'Module installé';
$text[4] = 'Alias';
$text[5] = 'Version';
$text[6] = 'Page(s)';
$text[7] = 'Supprimer';
$text[8] = 'Exporter';
$text[9] = 'Importer';
$text[10] = 'Aucun module installé.';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Installing a module';
$text[3] = 'Installed module';
$text[4] = 'Alias';
$text[5] = 'Version';
$text[6] = 'Page(s)';
$text[7] = 'Delete';
$text[8] = 'Export';
$text[9] = 'Import';
$text[10] = 'No module installed.';
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -37,7 +8,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl(), 'href' => helper::baseUrl(),
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_addon_view']['index'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -45,20 +16,23 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/gestion-des-modules', 'href' => 'https://doc.deltacms.fr/gestion-des-modules',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_addon_view']['index'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::button('configStoreUpload', [ <?php echo template::button('configStoreUpload', [
'href' => helper::baseUrl() . 'addon/upload', 'href' => helper::baseUrl() . 'addon/upload',
'value' => $text[2] 'value' => $text['core_addon_view']['index'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php if($module::$modInstal): ?> <?php if($module::$modInstal): ?>
<?php echo template::table([2, 2, 2, 2, 1, 1, 1], $module::$modInstal, [$text[3], $text[4], $text[5], $text[6], $text[7], $text[8], $text[9]]); ?> <?php echo template::table([2, 2, 2, 2, 1, 1, 1], $module::$modInstal, [$text['core_addon_view']['index'][3], $text['core_addon_view']['index'][4], $text['core_addon_view']['index'][5], $text['core_addon_view']['index'][6], $text['core_addon_view']['index'][7], $text['core_addon_view']['index'][8], $text['core_addon_view']['index'][9]]); ?>
<?php else: ?> <?php else: ?>
<?php echo template::speech($text[10]); ?> <?php echo template::speech($text['core_addon_view']['index'][10]); ?>
<?php endif; ?> <?php endif; ?>
<script>
var textConfirm = <?php echo '"'.$text['core_addon_view']['index'][11].'"'; ?>;
</script>

View File

@ -1,36 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/addon/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_addon.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('configModulesUpload'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Valider';
$text[3] = 'Archive ZIP :';
$text[4] = 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.';
$text[5] = 'Mise à jour forcée';
$text[6] = 'Installer ou mettre à jour un module téléchargé';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Validate';
$text[3] = 'Archive ZIP :';
$text[4] = 'Allows you to force an update even if the version of the module is less than or equal to that of the installed module.';
$text[5] = 'Forced update';
$text[6] = 'Install or update a downloaded module';
break;
}
?>
<?php echo template::formOpen('configModulesUpload'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('configModulesBack', [ <?php echo template::button('configModulesBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'addon', 'href' => helper::baseUrl() . 'addon',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_addon_view']['upload'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -39,7 +18,7 @@ switch ($val) {
'target' => '_blank', 'target' => '_blank',
'class' => 'buttonHelp', 'class' => 'buttonHelp',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1] 'value' => $text['core_addon_view']['upload'][1]
]); ?> ]); ?>
</div> </div>
<!-- Catalogue en ligne hors service <!-- Catalogue en ligne hors service
@ -52,7 +31,7 @@ switch ($val) {
--> -->
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('configModulesSubmit',[ <?php echo template::submit('configModulesSubmit',[
'value' => $text[2], 'value' => $text['core_addon_view']['upload'][2],
'ico' => 'check' 'ico' => 'check'
]); ?> ]); ?>
</div> </div>
@ -60,20 +39,20 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[6]; ?> </h4> <h4><?php echo $text['core_addon_view']['upload'][6]; ?> </h4>
<div class="row"> <div class="row">
<div class="col6 offset3"> <div class="col6 offset3">
<?php echo template::file('configModulesInstallation', [ <?php echo template::file('configModulesInstallation', [
'label' => $text[3], 'label' => $text['core_addon_view']['upload'][3],
'type' => 2 'type' => 2
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4 offset3"> <div class="col4 offset3">
<?php echo template::checkbox('configModulesCheck', true, $text[5], [ <?php echo template::checkbox('configModulesCheck', true, $text['core_addon_view']['upload'][5], [
'checked' => false, 'checked' => false,
'help' => $text[4], 'help' => $text['core_addon_view']['upload'][4],
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -153,78 +153,7 @@ class config extends common {
'tcp://' => 'TCP', 'tcp://' => 'TCP',
'http://' => 'HTTP' 'http://' => 'HTTP'
]; ];
// Authentification SMTP
public static $SMTPauth = [
true => 'Oui',
false => 'Non'
];
// Authentification SMTP EN
public static $SMTPauth_en = [
true => 'Yes',
false => 'No'
];
// Encryptation SMTP
public static $SMTPEnc = [
'' => 'Aucune',
'tls' => 'START TLS',
'ssl' => 'SSL/TLS'
];
// Encryptation SMTP EN
public static $SMTPEnc_en = [
'' => 'None',
'tls' => 'START TLS',
'ssl' => 'SSL/TLS'
];
// Sécurité de la connexion - tentative max avant blocage
public static $connectAttempt = [
999 => 'Sécurité désactivée',
3 => '3 tentatives',
5 => '5 tentatives',
10 => '10 tentatives'
];
// Sécurité de la connexion - tentative max avant blocage EN
public static $connectAttempt_en = [
999 => 'Security disabled',
3 => '3 attempts',
5 => '5 attempts',
10 => '10 attempts'
];
// Sécurité de la connexion - durée du blocage
public static $connectTimeout = [
0 => 'Sécurité désactivée',
300 => '5 minutes',
600 => '10 minutes',
900 => '15 minutes'
];
// Sécurité de la connexion - durée du blocage EN
public static $connectTimeout_en = [
0 => 'Safety off',
300 => '5 minutes',
600 => '10 minutes',
900 => '15 minutes'
];
// Anonymisation des IP du journal
public static $anonIP = [
4 => 'Non tronquées',
3 => 'Niveau 1 (192.168.12.x)',
2 => 'Niveau 2 (192.168.x.x)',
1 => 'Niveau 3 (192.x.x.x)'
];
// Anonymisation des IP du journal EN
public static $anonIP_en = [
4 => 'Not truncated',
3 => 'Level 1 (192.168.12.x)',
2 => 'Level 2 (192.168.x.x)',
1 => 'Level 3 (192.x.x.x)'
];
public static $captchaTypes = [
'num' => 'Chiffres',
'alpha' => 'Lettres'
];
public static $captchaTypes_en = [
'num' => 'Numbers',
'alpha' => 'Letters'
];
// Langue traduite courante // Langue traduite courante
public static $i18nSite = 'fr'; public static $i18nSite = 'fr';
@ -239,18 +168,8 @@ class config extends common {
*/ */
public function generateFiles() { public function generateFiles() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Mises à jour des fichiers sitemap et robots.txt';
$text[1] = 'Echec d\'écriture, le site map n\'a pas été mis à jour';
break;
case 'en' :
$text[0] = 'Updated sitemap and robots.txt files';
$text[1] = 'Writing failure, site map not updated';
break;
}
// Mettre à jour le site map // Mettre à jour le site map
$successSitemap=$this->createSitemap(); $successSitemap=$this->createSitemap();
@ -259,7 +178,7 @@ class config extends common {
/*'title' => 'Configuration', /*'title' => 'Configuration',
'view' => 'index',*/ 'view' => 'index',*/
'redirect' => helper::baseUrl() . 'config', 'redirect' => helper::baseUrl() . 'config',
'notification' => $successSitemap ? $text[0] : $text[1], 'notification' => $successSitemap ? $text['core_config']['generateFiles'][0] : $text['core_config']['generateFiles'][1],
'state' => $successSitemap 'state' => $successSitemap
]); ]);
} }
@ -270,16 +189,8 @@ class config extends common {
*/ */
public function backup() { public function backup() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Sauvegarder';
break;
case 'en' :
$text[0] = 'Save';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
// Creation du ZIP // Creation du ZIP
@ -301,7 +212,7 @@ class config extends common {
} else { } else {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['backup'][0],
'view' => 'backup' 'view' => 'backup'
]); ]);
} }
@ -312,26 +223,16 @@ class config extends common {
*/ */
public function configOpenGraph() { public function configOpenGraph() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Mode de capture Opengraph désactivé';
$text[1] = 'Mode de capture Opengraph activé';
break;
case 'en' :
$text[0] = 'Opengraph capture mode disabled';
$text[1] = 'Opengraph capture mode enabled';
break;
}
$texte=''; $texte='';
if( $_SESSION['screenshot'] === 'on'){ if( $_SESSION['screenshot'] === 'on'){
$_SESSION['screenshot'] = 'off'; $_SESSION['screenshot'] = 'off';
$texte = $text[0]; $texte = $text['core_config']['configOpenGraph'][0];
} }
else{ else{
$_SESSION['screenshot'] = 'on'; $_SESSION['screenshot'] = 'on';
$texte = $text[1]; $texte = $text['core_config']['configOpenGraph'][1];
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
@ -346,26 +247,8 @@ class config extends common {
*/ */
public function restore() { public function restore() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Restaurer';
$text[1] = 'Le fichier n\'est pas une archive valide';
$text[2] = 'Impossible de lire l\'archive';
$text[3] = 'Cette archive n\'est pas une sauvegarde valide';
$text[4] = 'Restauration effectuée avec succès';
$text[5] = 'Erreur inconnue';
break;
case 'en' :
$text[0] = 'Restore';
$text[1] = 'The file is not a valid archive';
$text[2] = 'Unable to read the archive';
$text[3] = 'This archive is not a valid backup';
$text[4] = 'Restoration completed successfully';
$text[5] = 'Unknown error';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost() ) { if($this->isPost() ) {
@ -380,9 +263,9 @@ class config extends common {
if ($file_parts['extension'] !== 'zip') { if ($file_parts['extension'] !== 'zip') {
// Valeurs en sortie erreur // Valeurs en sortie erreur
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['restore'][0],
'view' => 'restore', 'view' => 'restore',
'notification' => $text[1], 'notification' => $text['core_config']['restore'][1],
'state' => false 'state' => false
]); ]);
} }
@ -390,9 +273,9 @@ class config extends common {
if ($successOpen === FALSE) { if ($successOpen === FALSE) {
// Valeurs en sortie erreur // Valeurs en sortie erreur
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['restore'][0],
'view' => 'restore', 'view' => 'restore',
'notification' => $text[2], 'notification' => $text['core_config']['restore'][2],
'state' => false 'state' => false
]); ]);
} }
@ -416,11 +299,11 @@ class config extends common {
} }
// Message de notification // Message de notification
$notification = $success === true ? $text[4] : $text[5] ; $notification = $success === true ? $text['core_config']['restore'][4] : $text['core_config']['restore'][5] ;
$redirect = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/restore' : helper::baseUrl() . 'user/login/'; $redirect = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/restore' : helper::baseUrl() . 'user/login/';
// Valeurs en sortie erreur // Valeurs en sortie erreur
$this->addOutput([ $this->addOutput([
/*'title' => $text[0], /*'title' => $text['core_config']['restore'][0],
'view' => 'restore',*/ 'view' => 'restore',*/
'redirect' => $redirect, 'redirect' => $redirect,
'notification' => $notification, 'notification' => $notification,
@ -430,7 +313,7 @@ class config extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['restore'][0],
'view' => 'restore' 'view' => 'restore'
]); ]);
} }
@ -441,18 +324,8 @@ class config extends common {
*/ */
public function index() { public function index() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Configuration';
$text[1] = 'Modifications enregistrées ';
break;
case 'en' :
$text[0] = 'Configuration';
$text[1] = 'Saved changes';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
@ -639,9 +512,9 @@ class config extends common {
// $this->generateFiles(); // $this->generateFiles();
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['index'][0],
'redirect' => helper::baseUrl() . 'config', 'redirect' => helper::baseUrl() . 'config',
'notification' => $text[1] , 'notification' => $text['core_config']['index'][1] ,
'state' => true 'state' => true
]); ]);
} }
@ -664,7 +537,7 @@ class config extends common {
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['index'][0],
'view' => 'index' 'view' => 'index'
]); ]);
} }
@ -672,16 +545,8 @@ class config extends common {
public function script() { public function script() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Éditeur de script dans ';
break;
case 'en' :
$text[0] = 'Script editor in ';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
// Ecrire les fichiers de script // Ecrire les fichiers de script
@ -693,7 +558,7 @@ class config extends common {
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0] . ucfirst($this->geturl(2)) , 'title' => $text['core_config']['script'][0] . ucfirst($this->geturl(2)) ,
'vendor' => [ 'vendor' => [
'codemirror' 'codemirror'
], ],
@ -703,7 +568,7 @@ class config extends common {
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0] . ucfirst($this->geturl(2)) , 'title' => $text['core_config']['script'][0] . ucfirst($this->geturl(2)) ,
'vendor' => [ 'vendor' => [
'codemirror' 'codemirror'
], ],
@ -718,20 +583,8 @@ class config extends common {
public function logReset() { public function logReset() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Configuration';
$text[1] = 'Journal réinitialisé avec succès';
$text[2] = 'Aucun journal à effacer';
break;
case 'en' :
$text[0] = 'Configuration';
$text[1] = 'Log successfully reset';
$text[2] = 'No logs to clear';
break;
}
if ( file_exists(self::DATA_DIR . 'journal.log') ) { if ( file_exists(self::DATA_DIR . 'journal.log') ) {
unlink(self::DATA_DIR . 'journal.log'); unlink(self::DATA_DIR . 'journal.log');
// Créer les en-têtes des journaux // Créer les en-têtes des journaux
@ -739,17 +592,17 @@ class config extends common {
file_put_contents(self::DATA_DIR . 'journal.log',$d); file_put_contents(self::DATA_DIR . 'journal.log',$d);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['logReset'][0],
'view' => 'index', 'view' => 'index',
'notification' => $text[1], 'notification' => $text['core_config']['logReset'][1],
'state' => true 'state' => true
]); ]);
} else { } else {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['logReset'][0],
'view' => 'index', 'view' => 'index',
'notification' => $text[2], 'notification' => $text['core_config']['logReset'][2],
'state' => false 'state' => false
]); ]);
} }
@ -763,18 +616,8 @@ class config extends common {
*/ */
public function logDownload() { public function logDownload() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Configuration';
$text[1] = 'Aucun fichier journal à télécharger';
break;
case 'en' :
$text[0] = 'Configuration';
$text[1] = 'No log files to upload';
break;
}
$fileName = self::DATA_DIR . 'journal.log'; $fileName = self::DATA_DIR . 'journal.log';
if (file_exists($fileName)) { if (file_exists($fileName)) {
ob_start(); ob_start();
@ -788,9 +631,9 @@ class config extends common {
} else { } else {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['logDownload'][0],
'view' => 'index', 'view' => 'index',
'notification' => $text[1], 'notification' => $text['core_config']['logDownload'][1],
'state' => false 'state' => false
]); ]);
} }
@ -801,24 +644,11 @@ class config extends common {
*/ */
public function blacklistDownload () { public function blacklistDownload () {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Date dernière tentative;Heure dernière tentative;Id;Adresse IP;Nombre d\'échecs';
$text[1] = 'Configuration';
$text[2] = 'Aucune liste noire à télécharger';
break;
case 'en' :
$text[0] = 'Date last attempted;Time last attempted;Id;IP address;Number of failures';
$text[1] = 'Configuration';
$text[2] = 'No blacklist to download';
break;
}
ob_start(); ob_start();
$fileName = self::TEMP_DIR . 'blacklist.log'; $fileName = self::TEMP_DIR . 'blacklist.log';
$d = $text[0]. PHP_EOL; $d = $text['core_config']['blacklistDownload'][0]. PHP_EOL;
file_put_contents($fileName,$d); file_put_contents($fileName,$d);
if ( file_exists($fileName) ) { if ( file_exists($fileName) ) {
$d = $this->getData(['blacklist']); $d = $this->getData(['blacklist']);
@ -841,9 +671,9 @@ class config extends common {
} else { } else {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[1], 'title' => $text['core_config']['blacklistDownload'][1],
'view' => 'index', 'view' => 'index',
'notification' => $text[2], 'notification' => $text['core_config']['blacklistDownload'][2],
'state' => false 'state' => false
]); ]);
} }
@ -855,35 +685,23 @@ class config extends common {
public function blacklistReset() { public function blacklistReset() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Configuration';
$text[1] = 'Liste noire réinitialisée avec succès';
$text[2] = 'Pas de liste à effacer';
break;
case 'en' :
$text[0] = 'Configuration';
$text[1] = 'Blacklist successfully reset';
$text[2] = 'No list to clear';
break;
}
if ( file_exists(self::DATA_DIR . 'blacklist.json') ) { if ( file_exists(self::DATA_DIR . 'blacklist.json') ) {
$this->setData(['blacklist',[]]); $this->setData(['blacklist',[]]);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['blacklistReset'][0],
'view' => 'index', 'view' => 'index',
'notification' => $text[1], 'notification' => $text['core_config']['blacklistReset'][1],
'state' => true 'state' => true
]); ]);
} else { } else {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['blacklistReset'][0],
'view' => 'index', 'view' => 'index',
'notification' => $text[2], 'notification' => $text['core_config']['blacklistReset'][2],
'state' => false 'state' => false
]); ]);
} }
@ -894,18 +712,8 @@ class config extends common {
*/ */
public function copyBackups() { public function copyBackups() {
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Configuration';
$text[1] = 'Copie terminée';
break;
case 'en' :
$text[0] = 'Configuration';
$text[1] = 'Copy completed';
break;
}
// Créer le répertoire manquant // Créer le répertoire manquant
if (!is_dir(self::FILE_DIR.'source/backup')) { if (!is_dir(self::FILE_DIR.'source/backup')) {
mkdir(self::FILE_DIR.'source/backup', 0755); mkdir(self::FILE_DIR.'source/backup', 0755);
@ -913,9 +721,9 @@ class config extends common {
$this->copyDir(self::BACKUP_DIR, self::FILE_DIR . 'source/backup' ); $this->copyDir(self::BACKUP_DIR, self::FILE_DIR . 'source/backup' );
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_config']['copyBackups'][0],
'view' => 'index', 'view' => 'index',
'notification' => $text[1], 'notification' => $text['core_config']['copyBackups'][1],
'state' => true 'state' => true
]); ]);
} }

View File

@ -0,0 +1,229 @@
<?php
// Lexique du module du coeur Config en anglais
$text['core_config_view']['backup'][0] = 'Back';
$text['core_config_view']['backup'][1] = 'Save';
$text['core_config_view']['backup'][2] = 'Include the contents of the file manager';
$text['core_config_view']['backup'][3] = 'If the contents of the file manager are very large, it is better to copy them via FTP';
$text['core_config_view']['backup'][4] = 'Backup settings';
$text['core_config_view']['backup'][5] = 'The archive is generated in ';
$text['core_config_view']['backup'][6] = 'the Backup folder';
$text['core_config_view']['backup'][7] = ' of the file manager';
$text['core_config_view']['backup'][8] = "The backup was successfully generated.";
$text['core_config_view']['backup'][9] = "An error occurred, the backup was not generated !";
$text['core_config_view']['backup'][10] = "A backup with the contents of the file manager may take some time to generate. Can you confirm?";
$text['core_config_view']['bodyheadscript'][0] = 'External scripts';
$text['core_config_view']['bodyheadscript'][1] = 'Script in head';
$text['core_config_view']['bodyheadscript'][2] = 'Script in body';
$text['core_config_view']['connect'][0] = 'Login security';
$text['core_config_view']['connect'][1] = 'Captcha at login';
$text['core_config_view']['connect'][2] = 'Complex captcha';
$text['core_config_view']['connect'][3] = 'Recommended option to secure the connection. Applies to all captchas on the site. The simple captcha is limited to adding numbers from 0 to 10. The complex captcha uses four number operations from 0 to 20. Activation recommended.';
$text['core_config_view']['connect'][4] = 'Captcha type';
$text['core_config_view']['connect'][5] = 'Automatic logout';
$text['core_config_view']['connect'][6] = 'Disconnects previously opened sessions on other browsers or terminals. Activation recommended.';
$text['core_config_view']['connect'][7] = 'Successive logins';
$text['core_config_view']['connect'][8] = 'Block after failures';
$text['core_config_view']['connect'][9] = 'The blacklist lists login attempts from non-existent accounts. The date, time, account name and IP are stored. After the allowed number of attempts, the IP and account are blocked';
$text['core_config_view']['connect'][10] = 'Blacklist:';
$text['core_config_view']['connect'][11] = 'Download list';
$text['core_config_view']['connect'][12] = 'Reset list';
$text['core_config_view']['connect'][13] = 'Logging';
$text['core_config_view']['connect'][14] = 'Enable logging';
$text['core_config_view']['connect'][15] = 'Anonymise IP addresses';
$text['core_config_view']['connect'][16] = 'French regulations require level 2 anonymity';
$text['core_config_view']['connect'][17] = 'Download log';
$text['core_config_view']['connect'][18] = 'Reset log';
$text['core_config_view']['connect'][19] ='Complex captcha';
$text['core_config_view']['index'][0] = 'Home';
$text['core_config_view']['index'][1] = 'Help';
$text['core_config_view']['index'][2] = 'Configuration';
$text['core_config_view']['index'][3] = 'Register';
$text['core_config_view']['index'][4] = 'Location';
$text['core_config_view']['index'][5] = 'Referencing';
$text['core_config_view']['index'][6] = 'Connection';
$text['core_config_view']['index'][7] = 'Network';
$text['core_config_view']['index'][8] = 'Scripts';
$text['core_config_view']['locale'][0] = 'Foreign languages';
$text['core_config_view']['locale'][1] = 'Enable foreign language support';
$text['core_config_view']['locale'][2] = 'A new icon will appear in the admin bar. See the help for the relevant page to learn more.';
$text['core_config_view']['locale'][3] = 'Site identity ';
$text['core_config_view']['locale'][4] = 'Site title';
$text['core_config_view']['locale'][5] = 'It appears in the title bar and shares on social networks';
$text['core_config_view']['locale'][6] = 'DeltaCMS Version';
$text['core_config_view']['locale'][7] = 'Site description';
$text['core_config_view']['locale'][8] = 'The description of a page helps its referencing, each page must have a different description';
$text['core_config_view']['locale'][9] = 'Assignment of special pages ';
$text['core_config_view']['locale'][10] = 'Home page';
$text['core_config_view']['locale'][11] = 'The first page your visitors will see';
$text['core_config_view']['locale'][12] = 'Access denied, error 403';
$text['core_config_view']['locale'][13] = 'This page should not appear in the menu tree. Create an orphan page.';
$text['core_config_view']['locale'][14] = 'Page does not exist, error 404';
$text['core_config_view']['locale'][15] = 'Legal notice';
$text['core_config_view']['locale'][16] = 'Legal notices are mandatory in France. A footer option adds a discrete link to this page';
$text['core_config_view']['locale'][17] = 'Search the site';
$text['core_config_view']['locale'][18] = 'Select a page containing the module \'Search\'. A footer option adds a discrete link to this page';
$text['core_config_view']['locale'][19] = 'Default page';
$text['core_config_view']['locale'][20] = 'None';
$text['core_config_view']['locale'][21] = 'Site under maintenance';
$text['core_config_view']['locale'][22] = 'Special page labels ';
$text['core_config_view']['locale'][23] = 'Search';
$text['core_config_view']['locale'][24] = 'Site map';
$text['core_config_view']['locale'][25] = 'Cookies';
$text['core_config_view']['locale'][26] = 'Cookie acceptance message ';
$text['core_config_view']['locale'][27] = 'Enter the title of the cookie management window';
$text['core_config_view']['locale'][28] = 'Window title';
$text['core_config_view']['locale'][29] = 'Manage cookies';
$text['core_config_view']['locale'][30] = 'Enter the message for the cookies deposited by DeltaCMS, which are necessary for the operation and do not require consent';
$text['core_config_view']['locale'][31] = 'DeltaCMS cookies';
$text['core_config_view']['locale'][32] = 'This site uses cookies necessary for its operation, they allow to make its operation more fluid for example by memorizing the connection data, the language you have chosen or the validation of this message';
$text['core_config_view']['locale'][33] = 'Enter the text of the link to the legal notices, the page must be defined in the site configuration';
$text['core_config_view']['locale'][34] = 'Link to the legal notice page';
$text['core_config_view']['locale'][35] = 'View legal information';
$text['core_config_view']['locale'][36] = 'Enter message for cookies set by other applications that require consent, otherwise leave blank';
$text['core_config_view']['locale'][37] = 'Third party cookies';
$text['core_config_view']['locale'][38] = 'Enter the text of the checkbox for accepting third party cookies';
$text['core_config_view']['locale'][39] = 'Checkbox third party cookies';
$text['core_config_view']['locale'][40] = 'Validation button';
$text['core_config_view']['locale'][41] = 'Got it';
$text['core_config_view']['network'][0] = 'Settings';
$text['core_config_view']['network'][1] = 'Proxy type';
$text['core_config_view']['network'][2] = 'Proxy address';
$text['core_config_view']['network'][3] = 'Proxy port';
$text['core_config_view']['network'][4] = 'SMTP';
$text['core_config_view']['network'][5] = 'Enable SMTP';
$text['core_config_view']['network'][6] = 'Settings to be used when your webhost does not offer mail sending functionality';
$text['core_config_view']['network'][7] = 'SMTP address';
$text['core_config_view']['network'][8] = 'SMTP port';
$text['core_config_view']['network'][9] = 'Authentication';
$text['core_config_view']['network'][10] = 'User name';
$text['core_config_view']['network'][11] = 'Password';
$text['core_config_view']['network'][12] = 'Security';
$text['core_config_view']['restore'][0] = 'Return';
$text['core_config_view']['restore'][1] = 'Restore';
$text['core_config_view']['restore'][2] = 'Archive to restore';
$text['core_config_view']['restore'][3] = 'Select an archive in ZIP format';
$text['core_config_view']['restore'][4] = 'The archive has been dropped into the file manager.';
$text['core_config_view']['restore'][5] = 'Preserve user accounts already installed';
$text['core_config_view']['script'][0] = 'Return';
$text['core_config_view']['script'][1] = 'Validate';
$text['core_config_view']['setup'][0] = 'Parameters';
$text['core_config_view']['setup'][1] = 'Automated update';
$text['core_config_view']['setup'][2] = 'Maintenance';
$text['core_config_view']['setup'][3] = 'Remember to clear your browser\'s cache if the favicon does not change';
$text['core_config_view']['setup'][4] = 'Favicon';
$text['core_config_view']['setup'][5] = 'Select a suitable icon for a dark theme.<br>Remember to clear your browser\'s cache if the favicon does not change.';
$text['core_config_view']['setup'][6] = 'Favicon dark theme';
$text['core_config_view']['setup'][7] = 'Time zone';
$text['core_config_view']['setup'][8] = 'The time zone is useful for good referencing';
$text['core_config_view']['setup'][9] = 'Cookie consent message';
$text['core_config_view']['setup'][10] = 'Mandatory activation under French law unless you use your own consent system';
$text['core_config_view']['setup'][11] = 'Smart URLs';
$text['core_config_view']['setup'][12] = 'First check that your server allows URL rewriting (which is not the case with Free)';
$text['core_config_view']['setup'][13] = 'Search for an online update';
$text['core_config_view']['setup'][14] = 'The check is daily. Option disabled if server configuration does not allow it.';
$text['core_config_view']['setup'][15] = 'Preserve the root htaccess file';
$text['core_config_view']['setup'][16] = 'On auto-update, keep the root htaccess file';
$text['core_config_view']['setup'][17] = 'Reinstall';
$text['core_config_view']['setup'][18] = 'Automatic daily site backup';
$text['core_config_view']['setup'][19] = 'An archive containing the folder /site/data is copied to the folder \'site/backup\'. The backup is kept for 30 days.</p><p>Site files are not backed up automatically. Activation recommended.';
$text['core_config_view']['setup'][20] = 'Site under maintenance';
$text['core_config_view']['setup'][21] = 'Save';
$text['core_config_view']['setup'][22] = 'Restore';
$text['core_config_view']['setup'][23] = 'Auto backup copy';
$text['core_config_view']['setup'][24] = 'Information to send to support in case of malfunction';
$text['core_config_view']['setup'][25] = 'Deltacms version: ';
$text['core_config_view']['setup'][26] = 'PHP version: ';
$text['core_config_view']['setup'][27] = 'Server type: ';
$text['core_config_view']['setup'][28] = 'Smart URL: ';
$text['core_config_view']['setup'][29] = 'yes';
$text['core_config_view']['setup'][30] = 'no';
$text['core_config_view']['setup'][31] = 'PHP modules installed: ';
$text['core_config_view']['setup'][32] = 'Module(s) missing: ';
$text['core_config_view']['setup'][33] = 'The necessary modules are installed.';
$text['core_config_view']['setup'][34] = 'Deltacms modules installed: ';
$text['core_config_view']['setup'][35] = 'Generate a pdf';
$text['core_config_view']['setup'][36] = 'Directive ';
$text['core_config_view']['setup'][37] = 'Function ';
$text['core_config_view']['social'][0] = 'Settings';
$text['core_config_view']['social'][1] = 'Disable Open Graph capture mode';
$text['core_config_view']['social'][2] = 'Enable Open Graph capture mode';
$text['core_config_view']['social'][3] = 'Generate sitemap.xml and robots.txt';
$text['core_config_view']['social'][4] = 'Allow robots to reference the site';
$text['core_config_view']['social'][5] = 'This screenshot is required for social media sharing. To regenerate it, activate the Open Graph capture mode and click on the camera at the bottom right';
$text['core_config_view']['social'][6] = '<h4>Image screenshot.jpg absent</h4><p>Enabling the Open Graph capture mode causes a camera to appear at the bottom of the page. Clicking it generates a screenshot.jpg image from the active page.</p>';
$text['core_config_view']['social'][7] = 'Social networks';
$text['core_config_view']['social'][8] = 'Enter your ID: https://www.facebook.com/[ID].';
$text['core_config_view']['social'][9] = 'Enter your ID: https://www.instagram.com/[ID].';
$text['core_config_view']['social'][10] = 'String ID: https://www.youtube.com/channel/[ID].';
$text['core_config_view']['social'][11] = 'Enter your User ID: https://www.youtube.com/user/[ID].';
$text['core_config_view']['social'][12] = 'Enter your ID: https://twitter.com/[ID].';
$text['core_config_view']['social'][13] = 'Enter your ID: https://pinterest.com/[ID].';
$text['core_config_view']['social'][14] = 'Enter your Linkedin ID: https://fr.linkedin.com/in/[ID].';
$text['core_config_view']['social'][15] = 'Enter your Github ID: https://github.com/[ID].';
$text['core_config']['generateFiles'][0] = 'Updated sitemap and robots.txt files';
$text['core_config']['generateFiles'][1] = 'Writing failure, site map not updated';
$text['core_config']['backup'][0] = 'Save';
$text['core_config']['configOpenGraph'][0] = 'Opengraph capture mode disabled';
$text['core_config']['configOpenGraph'][1] = 'Opengraph capture mode enabled';
$text['core_config']['restore'][0] = 'Restore';
$text['core_config']['restore'][1] = 'The file is not a valid archive';
$text['core_config']['restore'][2] = 'Unable to read the archive';
$text['core_config']['restore'][3] = 'This archive is not a valid backup';
$text['core_config']['restore'][4] = 'Restoration completed successfully';
$text['core_config']['restore'][5] = 'Unknown error';
$text['core_config']['index'][0] = 'Configuration';
$text['core_config']['index'][1] = 'Saved changes';
$text['core_config']['script'][0] = 'Script editor in ';
$text['core_config']['logReset'][0] = 'Configuration';
$text['core_config']['logReset'][1] = 'Log successfully reset';
$text['core_config']['logReset'][2] = 'No logs to clear';
$text['core_config']['logDownload'][0] = 'Configuration';
$text['core_config']['logDownload'][1] = 'No log files to upload';
$text['core_config']['blacklistDownload'][0] = 'Date last attempted;Time last attempted;Id;IP address;Number of failures';
$text['core_config']['blacklistDownload'][1] = 'Configuration';
$text['core_config']['blacklistDownload'][2] = 'No blacklist to download';
$text['core_config']['blacklistReset'][0] = 'Configuration';
$text['core_config']['blacklistReset'][1] = 'Blacklist successfully reset';
$text['core_config']['blacklistReset'][2] = 'No list to clear';
$text['core_config']['copyBackups'][0] = 'Configuration';
$text['core_config']['copyBackups'][1] = 'Copy completed';
// Selects
// Authentification SMTP EN
$SMTPauth = [
true => 'Yes',
false => 'No'
];
// Encryptation SMTP EN
$SMTPEnc = [
'' => 'None',
'tls' => 'START TLS',
'ssl' => 'SSL/TLS'
];
// Sécurité de la connexion - tentative max avant blocage EN
$connectAttempt = [
999 => 'Security disabled',
3 => '3 attempts',
5 => '5 attempts',
10 => '10 attempts'
];
// Sécurité de la connexion - durée du blocage EN
$connectTimeout = [
0 => 'Safety off',
300 => '5 minutes',
600 => '10 minutes',
900 => '15 minutes'
];
// Anonymisation des IP du journal EN
$anonIP = [
4 => 'Not truncated',
3 => 'Level 1 (192.168.12.x)',
2 => 'Level 2 (192.168.x.x)',
1 => 'Level 3 (192.x.x.x)'
];
$captchaTypes = [
'num' => 'Numbers',
'alpha' => 'Letters'
];
?>

View File

@ -0,0 +1,229 @@
<?php
// Lexique du module du coeur Config en français
$text['core_config_view']['backup'][0] = 'Retour';
$text['core_config_view']['backup'][1] = 'Sauvegarder';
$text['core_config_view']['backup'][2] = 'Inclure le contenu du gestionnaire de fichiers';
$text['core_config_view']['backup'][3] = 'Si le contenu du gestionnaire de fichiers est très volumineux, mieux vaut une copie par FTP.';
$text['core_config_view']['backup'][4] = 'Paramètres de la sauvegarde';
$text['core_config_view']['backup'][5] = 'L\'archive est générée dans ';
$text['core_config_view']['backup'][6] = 'le dossier Backup';
$text['core_config_view']['backup'][7] = ' du gestionnaire de fichiers.';
$text['core_config_view']['backup'][8] = "La sauvegarde a été générée avec succès.";
$text['core_config_view']['backup'][9] = "Une erreur s\'est produite, la sauvegarde n\'a pas été générée !";
$text['core_config_view']['backup'][10] = "Une sauvegarde avec le contenu du gestionnaire de fichier peut prendre du temps à générer. Confirmez-vous ?";
$text['core_config_view']['bodyheadscript'][0] = 'Scripts externes';
$text['core_config_view']['bodyheadscript'][1] = 'Script dans head';
$text['core_config_view']['bodyheadscript'][2] = 'Script dans body';
$text['core_config_view']['connect'][0] = 'Sécurité de la connexion';
$text['core_config_view']['connect'][1] = 'Captcha à la connexion';
$text['core_config_view']['connect'][2] = 'Captcha complexe';
$text['core_config_view']['connect'][3] = 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.';
$text['core_config_view']['connect'][4] = 'Type de captcha';
$text['core_config_view']['connect'][5] = 'Déconnexion automatique';
$text['core_config_view']['connect'][6] = 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.';
$text['core_config_view']['connect'][7] = 'Connexions successives';
$text['core_config_view']['connect'][8] = 'Blocage après échecs';
$text['core_config_view']['connect'][9] = 'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP. Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.';
$text['core_config_view']['connect'][10] = 'Liste noire :';
$text['core_config_view']['connect'][11] = 'Télécharger la liste';
$text['core_config_view']['connect'][12] = 'Réinitialiser la liste';
$text['core_config_view']['connect'][13] = 'Journalisation';
$text['core_config_view']['connect'][14] = 'Activer la journalisation';
$text['core_config_view']['connect'][15] = 'Anonymat des adresses IP';
$text['core_config_view']['connect'][16] = 'La réglementation française impose un anonymat de niveau 2';
$text['core_config_view']['connect'][17] = 'Télécharger le journal';
$text['core_config_view']['connect'][18] = 'Réinitialiser le journal';
$text['core_config_view']['connect'][19] ='Captcha complexe';
$text['core_config_view']['index'][0] = 'Accueil';
$text['core_config_view']['index'][1] = 'Aide';
$text['core_config_view']['index'][2] = 'Configuration';
$text['core_config_view']['index'][3] = 'Enregistrer';
$text['core_config_view']['index'][4] = 'Localisation';
$text['core_config_view']['index'][5] = 'Référencement';
$text['core_config_view']['index'][6] = 'Connexion';
$text['core_config_view']['index'][7] = 'Réseau';
$text['core_config_view']['index'][8] = 'Scripts';
$text['core_config_view']['locale'][0] = 'Langues étrangères';
$text['core_config_view']['locale'][1] = 'Activer la gestion des langues étrangères';
$text['core_config_view']['locale'][2] = 'Une nouvelle icône apparaîtra dans la barre d\'administration. Consultez l\'aide de la page concernée pour en apprendre plus.';
$text['core_config_view']['locale'][3] = 'Identité du site ';
$text['core_config_view']['locale'][4] = 'Titre du site';
$text['core_config_view']['locale'][5] = 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.';
$text['core_config_view']['locale'][6] = 'DeltaCMS Version';
$text['core_config_view']['locale'][7] = 'Description du site';
$text['core_config_view']['locale'][8] = 'La description d\'une page participe à son référencement, chaque page doit disposer d\'une description différente.';
$text['core_config_view']['locale'][9] = 'Assignation des pages spéciales ';
$text['core_config_view']['locale'][10] = 'Accueil du site';
$text['core_config_view']['locale'][11] = 'La première page que vos visiteurs verront.';
$text['core_config_view']['locale'][12] = 'Accès interdit, erreur 403';
$text['core_config_view']['locale'][13] = 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.';
$text['core_config_view']['locale'][14] = 'Page inexistante, erreur 404';
$text['core_config_view']['locale'][15] = 'Mentions légales';
$text['core_config_view']['locale'][16] = 'Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.';
$text['core_config_view']['locale'][17] = 'Recherche dans le site';
$text['core_config_view']['locale'][18] = 'Sélectionnez une page contenant le module \'Recherche\'. Une option du pied de page ajoute un lien discret vers cette page.';
$text['core_config_view']['locale'][19] = 'Page par défaut';
$text['core_config_view']['locale'][20] = 'Aucune';
$text['core_config_view']['locale'][21] = 'Site en maintenance';
$text['core_config_view']['locale'][22] = 'Etiquettes des pages spéciales ';
$text['core_config_view']['locale'][23] = 'Rechercher';
$text['core_config_view']['locale'][24] = 'Plan du site';
$text['core_config_view']['locale'][25] = 'Cookies';
$text['core_config_view']['locale'][26] = 'Message d\'acceptation des Cookies ';
$text['core_config_view']['locale'][27] = 'Saisissez le titre de la fenêtre de gestion des cookies.';
$text['core_config_view']['locale'][28] = 'Titre de la fenêtre';
$text['core_config_view']['locale'][29] = 'Gérer les cookies';
$text['core_config_view']['locale'][30] = 'Saisissez le message pour les cookies déposés par DeltaCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.';
$text['core_config_view']['locale'][31] = 'Cookies Deltacms';
$text['core_config_view']['locale'][32] = 'Ce site utilise des cookies nécessaires à son fonctionnement, ils permettent de fluidifier son fonctionnement par exemple en mémorisant les données de connexion, la langue que vous avez choisie ou la validation de ce message.';
$text['core_config_view']['locale'][33] = 'Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.';
$text['core_config_view']['locale'][34] = 'Lien page des mentions légales.';
$text['core_config_view']['locale'][35] = 'Consulter les mentions légales';
$text['core_config_view']['locale'][36] = 'Saisissez le message pour les cookies déposés par d\'autres applications dont le consentement est requis sinon laissez vide.';
$text['core_config_view']['locale'][37] = 'Cookies tiers';
$text['core_config_view']['locale'][38] = 'Saisissez le texte de la case à cocher d\'acceptation des cookies tiers.';
$text['core_config_view']['locale'][39] = 'Checkbox cookies tiers';
$text['core_config_view']['locale'][40] = 'Bouton de validation';
$text['core_config_view']['locale'][41] = 'J\'ai compris';
$text['core_config_view']['network'][0] = 'Paramètres';
$text['core_config_view']['network'][1] = 'Type de proxy';
$text['core_config_view']['network'][2] = 'Adresse du proxy';
$text['core_config_view']['network'][3] = 'Port du proxy';
$text['core_config_view']['network'][4] = 'SMTP';
$text['core_config_view']['network'][5] = 'Activer SMTP';
$text['core_config_view']['network'][6] = 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.';
$text['core_config_view']['network'][7] = 'Adresse SMTP';
$text['core_config_view']['network'][8] = 'Port SMTP';
$text['core_config_view']['network'][9] = 'Authentification';
$text['core_config_view']['network'][10] = 'Nom utilisateur';
$text['core_config_view']['network'][11] = 'Mot de passe';
$text['core_config_view']['network'][12] = 'Sécurité';
$text['core_config_view']['restore'][0] = 'Retour';
$text['core_config_view']['restore'][1] = 'Restaurer';
$text['core_config_view']['restore'][2] = 'Archive à restaurer';
$text['core_config_view']['restore'][3] = 'Sélectionnez une archive au format ZIP';
$text['core_config_view']['restore'][4] = 'L\'archive a été déposée dans le gestionnaire de fichiers.';
$text['core_config_view']['restore'][5] = 'Préserver les comptes des utilisateurs déjà installés';
$text['core_config_view']['script'][0] = 'Retour';
$text['core_config_view']['script'][1] = 'Valider';
$text['core_config_view']['setup'][0] = 'Paramètres';
$text['core_config_view']['setup'][1] = 'Mise à jour automatisée';
$text['core_config_view']['setup'][2] = 'Maintenance';
$text['core_config_view']['setup'][3] = 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.';
$text['core_config_view']['setup'][4] = 'Favicon';
$text['core_config_view']['setup'][5] = 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.';
$text['core_config_view']['setup'][6] = 'Favicon thème sombre';
$text['core_config_view']['setup'][7] = 'Fuseau horaire';
$text['core_config_view']['setup'][8] = 'Le fuseau horaire est utile au bon référencement';
$text['core_config_view']['setup'][9] = 'Message de consentement aux cookies';
$text['core_config_view']['setup'][10] = 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.';
$text['core_config_view']['setup'][11] = 'URL intelligentes';
$text['core_config_view']['setup'][12] = 'Vérifiez d\'abord que votre serveur autorise l\'URL rewriting (ce qui n\'est pas le cas chez Free).';
$text['core_config_view']['setup'][13] = 'Rechercher une mise à jour en ligne';
$text['core_config_view']['setup'][14] = 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.';
$text['core_config_view']['setup'][15] = 'Préserver le fichier htaccess racine';
$text['core_config_view']['setup'][16] = 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.';
$text['core_config_view']['setup'][17] = 'Réinstaller';
$text['core_config_view']['setup'][18] = 'Sauvegarde automatique quotidienne du site';
$text['core_config_view']['setup'][19] = 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.';
$text['core_config_view']['setup'][20] = 'Site en maintenance';
$text['core_config_view']['setup'][21] = 'Sauvegarder';
$text['core_config_view']['setup'][22] = 'Restaurer';
$text['core_config_view']['setup'][23] = 'Copie sauvegardes auto';
$text['core_config_view']['setup'][24] = 'Informations à transmettre au support en cas de dysfonctionnement';
$text['core_config_view']['setup'][25] = 'Version de Deltacms: ';
$text['core_config_view']['setup'][26] = 'Version de PHP: ';
$text['core_config_view']['setup'][27] = 'Type de serveur: ';
$text['core_config_view']['setup'][28] = 'URL intelligentes: ';
$text['core_config_view']['setup'][29] = 'oui';
$text['core_config_view']['setup'][30] = 'non';
$text['core_config_view']['setup'][31] = 'Modules PHP installés: ';
$text['core_config_view']['setup'][32] = 'Module(s) absent(s): ';
$text['core_config_view']['setup'][33] = 'Les modules nécessaires sont installés.';
$text['core_config_view']['setup'][34] = 'Modules Deltacms installés: ';
$text['core_config_view']['setup'][35] = 'Générer un pdf';
$text['core_config_view']['setup'][36] = 'Directive ';
$text['core_config_view']['setup'][37] = 'Fonction ';
$text['core_config_view']['social'][0] = 'Paramètres';
$text['core_config_view']['social'][1] = 'Désactiver le mode de capture Open Graph';
$text['core_config_view']['social'][2] = 'Activer le mode de capture Open Graph';
$text['core_config_view']['social'][3] = 'Générer sitemap.xml et robots.txt';
$text['core_config_view']['social'][4] = 'Autoriser les robots à référencer le site';
$text['core_config_view']['social'][5] = 'Cette capture d\'écran est nécessaire aux partages sur les réseaux sociaux. Pour la régénérer activer le mode de capture Open Graph et cliquer sur l\'appareil photo en bas à droite.';
$text['core_config_view']['social'][6] = '<h4>Image screenshot.jpg absente</h4><p>L\'activation du mode de capture Open Graph fait apparaître un appareil photo en bas de page. Un clic dessus génère une image screenshot.jpg à partir de la page active.</p>';
$text['core_config_view']['social'][7] = 'Réseaux sociaux';
$text['core_config_view']['social'][8] = 'Saisissez votre ID : https://www.facebook.com/[ID].';
$text['core_config_view']['social'][9] = 'Saisissez votre ID : https://www.instagram.com/[ID].';
$text['core_config_view']['social'][10] = 'ID de la chaîne : https://www.youtube.com/channel/[ID].';
$text['core_config_view']['social'][11] = 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].';
$text['core_config_view']['social'][12] = 'Saisissez votre ID : https://twitter.com/[ID].';
$text['core_config_view']['social'][13] = 'Saisissez votre ID : https://pinterest.com/[ID].';
$text['core_config_view']['social'][14] = 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].';
$text['core_config_view']['social'][15] = 'Saisissez votre ID Github : https://github.com/[ID].';
$text['core_config']['generateFiles'][0] = 'Mises à jour des fichiers sitemap et robots.txt';
$text['core_config']['generateFiles'][1] = 'Echec d\'écriture, le site map n\'a pas été mis à jour';
$text['core_config']['backup'][0] = 'Sauvegarder';
$text['core_config']['configOpenGraph'][0] = 'Mode de capture Opengraph désactivé';
$text['core_config']['configOpenGraph'][1] = 'Mode de capture Opengraph activé';
$text['core_config']['restore'][0] = 'Restaurer';
$text['core_config']['restore'][1] = 'Le fichier n\'est pas une archive valide';
$text['core_config']['restore'][2] = 'Impossible de lire l\'archive';
$text['core_config']['restore'][3] = 'Cette archive n\'est pas une sauvegarde valide';
$text['core_config']['restore'][4] = 'Restauration effectuée avec succès';
$text['core_config']['restore'][5] = 'Erreur inconnue';
$text['core_config']['index'][0] = 'Configuration';
$text['core_config']['index'][1] = 'Modifications enregistrées ';
$text['core_config']['script'][0] = 'Éditeur de script dans ';
$text['core_config']['logReset'][0] = 'Configuration';
$text['core_config']['logReset'][1] = 'Journal réinitialisé avec succès';
$text['core_config']['logReset'][2] = 'Aucun journal à effacer';
$text['core_config']['logDownload'][0] = 'Configuration';
$text['core_config']['logDownload'][1] = 'Aucun fichier journal à télécharger';
$text['core_config']['blacklistDownload'][0] = 'Date dernière tentative;Heure dernière tentative;Id;Adresse IP;Nombre d\'échecs';
$text['core_config']['blacklistDownload'][1] = 'Configuration';
$text['core_config']['blacklistDownload'][2] = 'Aucune liste noire à télécharger';
$text['core_config']['blacklistReset'][0] = 'Configuration';
$text['core_config']['blacklistReset'][1] = 'Liste noire réinitialisée avec succès';
$text['core_config']['blacklistReset'][2] = 'Pas de liste à effacer';
$text['core_config']['copyBackups'][0] = 'Configuration';
$text['core_config']['copyBackups'][1] = 'Copie terminée';
// Selects
// Authentification SMTP
$SMTPauth = [
true => 'Oui',
false => 'Non'
];
// Encryptation SMTP
$SMTPEnc = [
'' => 'Aucune',
'tls' => 'START TLS',
'ssl' => 'SSL/TLS'
];
// Sécurité de la connexion - tentative max avant blocage
$connectAttempt = [
999 => 'Sécurité désactivée',
3 => '3 tentatives',
5 => '5 tentatives',
10 => '10 tentatives'
];
// Sécurité de la connexion - durée du blocage
$connectTimeout = [
0 => 'Sécurité désactivée',
300 => '5 minutes',
600 => '10 minutes',
900 => '15 minutes'
];
// Anonymisation des IP du journal
$anonIP = [
4 => 'Non tronquées',
3 => 'Niveau 1 (192.168.12.x)',
2 => 'Niveau 2 (192.168.x.x)',
1 => 'Niveau 3 (192.x.x.x)'
];
$captchaTypes = [
'num' => 'Chiffres',
'alpha' => 'Lettres'
];
?>

View File

@ -15,19 +15,7 @@
*/ */
$( document).ready(function() { $( document).ready(function() {
var text1 = "";
var text2 = "";
var text3 = "";
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text1 = "La sauvegarde a été générée avec succès.";' ;
echo 'text2 = "Une erreur s\'est produite, la sauvegarde n\'a pas été générée !";' ;
echo 'text3 = "Une sauvegarde avec le contenu du gestionnaire de fichier peut prendre du temps à générer. Confirmez-vous ?";' ;
}
else{
echo 'text1 = "The backup was successfully generated.";' ;
echo 'text2 = "An error occurred, the backup was not generated !";' ;
echo 'text3 = "A backup with the contents of the file manager may take some time to generate. Can you confirm?";' ;
} ?>
$("#configBackupForm").submit( function(e){ $("#configBackupForm").submit( function(e){
//$("#configBackupSubmit").addClass("disabled").prop("disabled", true); //$("#configBackupSubmit").addClass("disabled").prop("disabled", true);
e.preventDefault(); e.preventDefault();

View File

@ -1,43 +1,20 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('configBackupForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Sauvegarder';
$text[2] = 'Inclure le contenu du gestionnaire de fichiers';
$text[3] = 'Si le contenu du gestionnaire de fichiers est très volumineux, mieux vaut une copie par FTP.';
$text[4] = 'Paramètres de la sauvegarde';
$text[5] = 'L\'archive est générée dans ';
$text[6] = 'le dossier Backup';
$text[7] = ' du gestionnaire de fichiers.';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Save';
$text[2] = 'Include the contents of the file manager';
$text[3] = 'If the contents of the file manager are very large, it is better to copy them via FTP';
$text[4] = 'Backup settings';
$text[5] = 'The archive is generated in ';
$text[6] = 'the Backup folder';
$text[7] = ' of the file manager';
break;
}
?>
<?php echo template::formOpen('configBackupForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('configBackupBack', [ <?php echo template::button('configBackupBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config', 'href' => helper::baseUrl() . 'config',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_config_view']['backup'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('configBackupSubmit',[ <?php echo template::submit('configBackupSubmit',[
'value' => $text[1], 'value' => $text['core_config_view']['backup'][1],
'uniqueSubmission' => true 'uniqueSubmission' => true
]); ?> ]); ?>
</div> </div>
@ -45,19 +22,24 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[4]; ?></h4> <h4><?php echo $text['core_config_view']['backup'][4]; ?></h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::checkbox('configBackupOption', true, $text[2], [ <?php echo template::checkbox('configBackupOption', true, $text['core_config_view']['backup'][2], [
'checked' => true, 'checked' => true,
'help' => $text[3] 'help' => $text['core_config_view']['backup'][3]
]); ?> ]); ?>
</div> </div>
<div class="col12"> <div class="col12">
<em><?php echo $text[5]; ?><a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR.'core.json'); ?>" data-lity><?php echo $text[6]; ?></a><?php echo $text[7]; ?></em> <em><?php echo $text['core_config_view']['backup'][5]; ?><a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR.'core.json'); ?>" data-lity><?php echo $text['core_config_view']['backup'][6]; ?></a><?php echo $text['core_config_view']['backup'][7]; ?></em>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var text1 = <?php echo '"'.$text['core_config_view']['backup'][8].'"'; ?>;
var text2 = <?php echo '"'.$text['core_config_view']['backup'][9].'"'; ?>;
var text3 = <?php echo '"'.$text['core_config_view']['backup'][10].'"'; ?>;
</script>

View File

@ -1,25 +1,12 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Scripts externes';
$text[1] = 'Script dans head';
$text[2] = 'Script dans body';
break;
case 'en' :
$text[0] = 'External scripts';
$text[1] = 'Script in head';
$text[2] = 'Script in body';
break;
}
?> ?>
<div id="scriptContainer"> <div id="scriptContainer">
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[0]; ?> <h4><?php echo $text['core_config_view']['bodyheadscript'][0]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/scripts" target="_blank"> <a href="https://doc.deltacms.fr/scripts" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -30,14 +17,14 @@ switch ($val) {
<div class="col3 offset3 verticalAlignBottom"> <div class="col3 offset3 verticalAlignBottom">
<?php echo template::button('socialScriptHead', [ <?php echo template::button('socialScriptHead', [
'href' => helper::baseUrl() . 'config/script/head', 'href' => helper::baseUrl() . 'config/script/head',
'value' => $text[1], 'value' => $text['core_config_view']['bodyheadscript'][1],
'ico' => 'pencil' 'ico' => 'pencil'
]); ?> ]); ?>
</div> </div>
<div class="col3 verticalAlignBottom"> <div class="col3 verticalAlignBottom">
<?php echo template::button('socialScriptBody', [ <?php echo template::button('socialScriptBody', [
'href' => helper::baseUrl() . 'config/script/body', 'href' => helper::baseUrl() . 'config/script/body',
'value' => $text[2], 'value' => $text['core_config_view']['bodyheadscript'][2],
'ico' => 'pencil' 'ico' => 'pencil'
]); ?> ]); ?>
</div> </div>

View File

@ -1,67 +1,12 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Sécurité de la connexion';
$text[1] = 'Captcha à la connexion';
$text[2] = 'Captcha complexe';
$text[3] = 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.';
$text[4] = 'Type de captcha';
$text[5] = 'Déconnexion automatique';
$text[6] = 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.';
$text[7] = 'Connexions successives';
$text[8] = 'Blocage après échecs';
$text[9] = 'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP. Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.';
$text[10] = 'Liste noire :';
$text[11] = 'Télécharger la liste';
$text[12] = 'Réinitialiser la liste';
$text[13] = 'Journalisation';
$text[14] = 'Activer la journalisation';
$text[15] = 'Anonymat des adresses IP';
$text[16] = 'La réglementation française impose un anonymat de niveau 2';
$text[17] = 'Télécharger le journal';
$text[18] = 'Réinitialiser le journal';
$text[19] ='Captcha complexe';
$captchaTypes = $module::$captchaTypes;
$connectAttempt = $module::$connectAttempt;
$connectTimeout = $module::$connectTimeout;
$anonIP = $module::$anonIP;
break;
case 'en' :
$text[0] = 'Login security';
$text[1] = 'Captcha at login';
$text[2] = 'Complex captcha';
$text[3] = 'Recommended option to secure the connection. Applies to all captchas on the site. The simple captcha is limited to adding numbers from 0 to 10. The complex captcha uses four number operations from 0 to 20. Activation recommended.';
$text[4] = 'Captcha type';
$text[5] = 'Automatic logout';
$text[6] = 'Disconnects previously opened sessions on other browsers or terminals. Activation recommended.';
$text[7] = 'Successive logins';
$text[8] = 'Block after failures';
$text[9] = 'The blacklist lists login attempts from non-existent accounts. The date, time, account name and IP are stored. After the allowed number of attempts, the IP and account are blocked';
$text[10] = 'Blacklist:';
$text[11] = 'Download list';
$text[12] = 'Reset list';
$text[13] = 'Logging';
$text[14] = 'Enable logging';
$text[15] = 'Anonymise IP addresses';
$text[16] = 'French regulations require level 2 anonymity';
$text[17] = 'Download log';
$text[18] = 'Reset log';
$text[19] ='Complex captcha';
$captchaTypes = $module::$captchaTypes_en;
$connectAttempt = $module::$connectAttempt_en;
$connectTimeout = $module::$connectTimeout_en;
$anonIP = $module::$anonIP_en;
break;
}
?> ?>
<div id="connectContainer"> <div id="connectContainer">
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[0]; ?> <h4><?php echo $text['core_config_view']['connect'][0]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/connexion" target="_blank"> <a href="https://doc.deltacms.fr/connexion" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -70,50 +15,50 @@ switch ($val) {
</h4> </h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('connectCaptcha', true, $text[1], [ <?php echo template::checkbox('connectCaptcha', true, $text['core_config_view']['connect'][1], [
'checked' => $this->getData(['config', 'connect','captcha']) 'checked' => $this->getData(['config', 'connect','captcha'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('connectCaptchaStrong', true, $text[19], [ <?php echo template::checkbox('connectCaptchaStrong', true, $text['core_config_view']['connect'][19], [
'checked' => $this->getData(['config', 'connect', 'captchaStrong']), 'checked' => $this->getData(['config', 'connect', 'captchaStrong']),
'help' => $text[3] 'help' => $text['core_config_view']['connect'][3]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('connectCaptchaType', $captchaTypes , [ <?php echo template::select('connectCaptchaType', $captchaTypes , [
'label' => $text[4], 'label' => $text['core_config_view']['connect'][4],
'selected' => $this->getData(['config', 'connect', 'captchaType']) 'selected' => $this->getData(['config', 'connect', 'captchaType'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('connectAutoDisconnect', true, $text[5], [ <?php echo template::checkbox('connectAutoDisconnect', true, $text['core_config_view']['connect'][5], [
'checked' => $this->getData(['config','connect', 'autoDisconnect']), 'checked' => $this->getData(['config','connect', 'autoDisconnect']),
'help' => $text[6] 'help' => $text['core_config_view']['connect'][6]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::select('connectAttempt', $connectAttempt , [ <?php echo template::select('connectAttempt', $connectAttempt , [
'label' => $text[7], 'label' => $text['core_config_view']['connect'][7],
'selected' => $this->getData(['config', 'connect', 'attempt']) 'selected' => $this->getData(['config', 'connect', 'attempt'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('connectTimeout', $connectTimeout , [ <?php echo template::select('connectTimeout', $connectTimeout , [
'label' => $text[8], 'label' => $text['core_config_view']['connect'][8],
'selected' => $this->getData(['config', 'connect', 'timeout']) 'selected' => $this->getData(['config', 'connect', 'timeout'])
]); ?> ]); ?>
</div> </div>
<div class="col3 verticalAlignBottom"> <div class="col3 verticalAlignBottom">
<label id="helpBlacklist"><?php echo $text[10]; ?> <label id="helpBlacklist"><?php echo $text['core_config_view']['connect'][10]; ?>
<?php echo template::help($text[9]); <?php echo template::help($text['core_config_view']['connect'][9]);
?> ?>
</label> </label>
<?php echo template::button('ConnectBlackListDownload', [ <?php echo template::button('ConnectBlackListDownload', [
'href' => helper::baseUrl() . 'config/blacklistDownload', 'href' => helper::baseUrl() . 'config/blacklistDownload',
'value' => $text[11], 'value' => $text['core_config_view']['connect'][11],
'ico' => 'download' 'ico' => 'download'
]); ?> ]); ?>
</div> </div>
@ -121,7 +66,7 @@ switch ($val) {
<?php echo template::button('CnnectBlackListReset', [ <?php echo template::button('CnnectBlackListReset', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/blacklistReset', 'href' => helper::baseUrl() . 'config/blacklistReset',
'value' => $text[12], 'value' => $text['core_config_view']['connect'][12],
'ico' => 'cancel' 'ico' => 'cancel'
]); ?> ]); ?>
</div> </div>
@ -132,7 +77,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[13];?> <h4><?php echo $text['core_config_view']['connect'][13];?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/connexion#journalisation" target="_blank"> <a href="https://doc.deltacms.fr/connexion#journalisation" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -141,21 +86,21 @@ switch ($val) {
</h4> </h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('connectLog', true, $text[14], [ <?php echo template::checkbox('connectLog', true, $text['core_config_view']['connect'][14], [
'checked' => $this->getData(['config', 'connect', 'log']) 'checked' => $this->getData(['config', 'connect', 'log'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('connectAnonymousIp', $anonIP, [ <?php echo template::select('connectAnonymousIp', $anonIP, [
'label' => $text[15], 'label' => $text['core_config_view']['connect'][15],
'selected' => $this->getData(['config', 'connect', 'anonymousIp']), 'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
'help' => $text[16] 'help' => $text['core_config_view']['connect'][16]
]); ?> ]); ?>
</div> </div>
<div class="col3 verticalAlignBottom"> <div class="col3 verticalAlignBottom">
<?php echo template::button('ConfigLogDownload', [ <?php echo template::button('ConfigLogDownload', [
'href' => helper::baseUrl() . 'config/logDownload', 'href' => helper::baseUrl() . 'config/logDownload',
'value' => $text[17], 'value' => $text['core_config_view']['connect'][17],
'ico' => 'download' 'ico' => 'download'
]); ?> ]); ?>
</div> </div>
@ -163,7 +108,7 @@ switch ($val) {
<?php echo template::button('ConnectLogReset', [ <?php echo template::button('ConnectLogReset', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/logReset', 'href' => helper::baseUrl() . 'config/logReset',
'value' => $text[18], 'value' => $text['core_config_view']['connect'][18],
'ico' => 'cancel' 'ico' => 'cancel'
]); ?> ]); ?>
</div> </div>

View File

@ -1,40 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('configForm');?>
case 'fr' :
$text[0] = 'Accueil';
$text[1] = 'Aide';
$text[2] = 'Configuration';
$text[3] = 'Enregistrer';
$text[4] = 'Localisation';
$text[5] = 'Référencement';
$text[6] = 'Connexion';
$text[7] = 'Réseau';
$text[8] = 'Scripts';
break;
case 'en' :
$text[0] = 'Home';
$text[1] = 'Help';
$text[2] = 'Configuration';
$text[3] = 'Register';
$text[4] = 'Location';
$text[5] = 'Referencing';
$text[6] = 'Connection';
$text[7] = 'Network';
$text[8] = 'Scripts';
break;
}
?>
<?php echo template::formOpen('configForm');?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('configBack', [ <?php echo template::button('configBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl(false), 'href' => helper::baseUrl(false),
'ico' => 'home', 'ico' => 'home',
'value' => $text[0] 'value' => $text['core_config_view']['index'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2 "> <div class="col2 ">
@ -43,12 +18,12 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/configuration-du-site', 'href' => 'https://doc.deltacms.fr/configuration-du-site',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1] 'value' => $text['core_config_view']['index'][1]
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('Submit', [ <?php echo template::submit('Submit', [
'value' => $text[3] 'value' => $text['core_config_view']['index'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -57,32 +32,32 @@ switch ($val) {
<div class="row textAlignCenter"> <div class="row textAlignCenter">
<div class="col2"> <div class="col2">
<?php echo template::button('configSetupButton', [ <?php echo template::button('configSetupButton', [
'value' => $text[2] 'value' => $text['core_config_view']['index'][2]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('configLocaleButton', [ <?php echo template::button('configLocaleButton', [
'value' => $text[4] 'value' => $text['core_config_view']['index'][4]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('configSocialButton', [ <?php echo template::button('configSocialButton', [
'value' => $text[5] 'value' => $text['core_config_view']['index'][5]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('configConnectButton', [ <?php echo template::button('configConnectButton', [
'value' => $text[6] 'value' => $text['core_config_view']['index'][6]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('configNetworkButton', [ <?php echo template::button('configNetworkButton', [
'value' => $text[7] 'value' => $text['core_config_view']['index'][7]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('configScriptButton', [ <?php echo template::button('configScriptButton', [
'value' => $text[8] 'value' => $text['core_config_view']['index'][8]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,99 +1,8 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { // drapeau pour la langue d'origine ou la langue en traduction rédigée
case 'fr' :
$text[0] = 'Langues étrangères';
$text[1] = 'Activer la gestion des langues étrangères';
$text[2] = 'Une nouvelle icône apparaîtra dans la barre d\'administration. Consultez l\'aide de la page concernée pour en apprendre plus.';
$text[3] = 'Identité du site ';
$text[4] = 'Titre du site';
$text[5] = 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.';
$text[6] = 'DeltaCMS Version';
$text[7] = 'Description du site';
$text[8] = 'La description d\'une page participe à son référencement, chaque page doit disposer d\'une description différente.';
$text[9] = 'Assignation des pages spéciales ';
$text[10] = 'Accueil du site';
$text[11] = 'La première page que vos visiteurs verront.';
$text[12] = 'Accès interdit, erreur 403';
$text[13] = 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.';
$text[14] = 'Page inexistante, erreur 404';
$text[15] = 'Mentions légales';
$text[16] = 'Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.';
$text[17] = 'Recherche dans le site';
$text[18] = 'Sélectionnez une page contenant le module \'Recherche\'. Une option du pied de page ajoute un lien discret vers cette page.';
$text[19] = 'Page par défaut';
$text[20] = 'Aucune';
$text[21] = 'Site en maintenance';
$text[22] = 'Etiquettes des pages spéciales ';
$text[23] = 'Rechercher';
$text[24] = 'Plan du site';
$text[25] = 'Cookies';
$text[26] = 'Message d\'acceptation des Cookies ';
$text[27] = 'Saisissez le titre de la fenêtre de gestion des cookies.';
$text[28] = 'Titre de la fenêtre';
$text[29] = 'Gérer les cookies';
$text[30] = 'Saisissez le message pour les cookies déposés par DeltaCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.';
$text[31] = 'Cookies Deltacms';
$text[32] = 'Ce site utilise des cookies nécessaires à son fonctionnement, ils permettent de fluidifier son fonctionnement par exemple en mémorisant les données de connexion, la langue que vous avez choisie ou la validation de ce message.';
$text[33] = 'Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.';
$text[34] = 'Lien page des mentions légales.';
$text[35] = 'Consulter les mentions légales';
$text[36] = 'Saisissez le message pour les cookies déposés par d\'autres applications dont le consentement est requis sinon laissez vide.';
$text[37] = 'Cookies tiers';
$text[38] = 'Saisissez le texte de la case à cocher d\'acceptation des cookies tiers.';
$text[39] = 'Checkbox cookies tiers';
$text[40] = 'Bouton de validation';
$text[41] = 'J\'ai compris';
break;
case 'en' :
$text[0] = 'Foreign languages';
$text[1] = 'Enable foreign language support';
$text[2] = 'A new icon will appear in the admin bar. See the help for the relevant page to learn more.';
$text[3] = 'Site identity ';
$text[4] = 'Site title';
$text[5] = 'It appears in the title bar and shares on social networks';
$text[6] = 'DeltaCMS Version';
$text[7] = 'Site description';
$text[8] = 'The description of a page helps its referencing, each page must have a different description';
$text[9] = 'Assignment of special pages ';
$text[10] = 'Home page';
$text[11] = 'The first page your visitors will see';
$text[12] = 'Access denied, error 403';
$text[13] = 'This page should not appear in the menu tree. Create an orphan page.';
$text[14] = 'Page does not exist, error 404';
$text[15] = 'Legal notice';
$text[16] = 'Legal notices are mandatory in France. A footer option adds a discrete link to this page';
$text[17] = 'Search the site';
$text[18] = 'Select a page containing the module \'Search\'. A footer option adds a discrete link to this page';
$text[19] = 'Default page';
$text[20] = 'None';
$text[21] = 'Site under maintenance';
$text[22] = 'Special page labels ';
$text[23] = 'Search';
$text[24] = 'Site map';
$text[25] = 'Cookies';
$text[26] = 'Cookie acceptance message ';
$text[27] = 'Enter the title of the cookie management window';
$text[28] = 'Window title';
$text[29] = 'Manage cookies';
$text[30] = 'Enter the message for the cookies deposited by DeltaCMS, which are necessary for the operation and do not require consent';
$text[31] = 'DeltaCMS cookies';
$text[32] = 'This site uses cookies necessary for its operation, they allow to make its operation more fluid for example by memorizing the connection data, the language you have chosen or the validation of this message';
$text[33] = 'Enter the text of the link to the legal notices, the page must be defined in the site configuration';
$text[34] = 'Link to the legal notice page';
$text[35] = 'View legal information';
$text[36] = 'Enter message for cookies set by other applications that require consent, otherwise leave blank';
$text[37] = 'Third party cookies';
$text[38] = 'Enter the text of the checkbox for accepting third party cookies';
$text[39] = 'Checkbox third party cookies';
$text[40] = 'Validation button';
$text[41] = 'Got it';
break;
}
?>
<?php // drapeau pour la langue d'origine ou la langue en traduction rédigée
if( $this->getInput('DELTA_I18N_SITE') === '' || $this->getInput('DELTA_I18N_SITE')=== null || $this->getInput('DELTA_I18N_SITE') === 'base'){ if( $this->getInput('DELTA_I18N_SITE') === '' || $this->getInput('DELTA_I18N_SITE')=== null || $this->getInput('DELTA_I18N_SITE') === 'base'){
$flag = $this->getData(['config', 'i18n', 'langBase']); $flag = $this->getData(['config', 'i18n', 'langBase']);
} }
@ -105,12 +14,12 @@ else{
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[0]; ?></h4> <h4><?php echo $text['core_config_view']['locale'][0]; ?></h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::checkbox('localei18n', true, $text[1], [ <?php echo template::checkbox('localei18n', true, $text['core_config_view']['locale'][1], [
'checked' => $this->getData(['config', 'i18n', 'enable']), 'checked' => $this->getData(['config', 'i18n', 'enable']),
'help'=> $text[2] 'help'=> $text['core_config_view']['locale'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -120,7 +29,7 @@ else{
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?><?php echo template::flag($flag, '20px');?> <h4><?php echo $text['core_config_view']['locale'][3]; ?><?php echo template::flag($flag, '20px');?>
<span id="localeHelpButton" class="helpDisplayButton"> <span id="localeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/localisation" target="_blank"> <a href="https://doc.deltacms.fr/localisation" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -130,14 +39,14 @@ else{
<div class="row"> <div class="row">
<div class="col9"> <div class="col9">
<?php echo template::text('localeTitle', [ <?php echo template::text('localeTitle', [
'label' => $text[4], 'label' => $text['core_config_view']['locale'][4],
'value' => $this->getData(['locale', 'title']), 'value' => $this->getData(['locale', 'title']),
'help' => $text[5] 'help' => $text['core_config_view']['locale'][5]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('localeVersion', [ <?php echo template::text('localeVersion', [
'label' => $text[6], 'label' => $text['core_config_view']['locale'][6],
'value' => common::DELTA_VERSION, 'value' => common::DELTA_VERSION,
'readonly' => true 'readonly' => true
]); ?> ]); ?>
@ -146,9 +55,9 @@ else{
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::textarea('localeMetaDescription', [ <?php echo template::textarea('localeMetaDescription', [
'label' => $text[7], 'label' => $text['core_config_view']['locale'][7],
'value' => $this->getData(['locale', 'metaDescription']), 'value' => $this->getData(['locale', 'metaDescription']),
'help' => $text[8] 'help' => $text['core_config_view']['locale'][8]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -158,7 +67,7 @@ else{
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[9]; echo template::flag($flag, '20px');?> <h4><?php echo $text['core_config_view']['locale'][9]; echo template::flag($flag, '20px');?>
<span id="localeHelpButton" class="helpDisplayButton"> <span id="localeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/localisation#pages-speciales" target="_blank"> <a href="https://doc.deltacms.fr/localisation#pages-speciales" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -168,47 +77,47 @@ else{
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('localeHomePageId', helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC'), [ <?php echo template::select('localeHomePageId', helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC'), [
'label' => $text[10], 'label' => $text['core_config_view']['locale'][10],
'selected' =>$this->getData(['locale', 'homePageId']), 'selected' =>$this->getData(['locale', 'homePageId']),
'help' => $text[11] 'help' => $text['core_config_view']['locale'][11]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('localePage403', array_merge(['none' => $text[19]],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [ <?php echo template::select('localePage403', array_merge(['none' => $text['core_config_view']['locale'][19]],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => $text[12], 'label' => $text['core_config_view']['locale'][12],
'selected' =>$this->getData(['locale', 'page403']), 'selected' =>$this->getData(['locale', 'page403']),
'help' => $text[13] 'help' => $text['core_config_view']['locale'][13]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('localePage404', array_merge(['none' => $text[19]],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [ <?php echo template::select('localePage404', array_merge(['none' => $text['core_config_view']['locale'][19]],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => $text[14], 'label' => $text['core_config_view']['locale'][14],
'selected' =>$this->getData(['locale', 'page404']), 'selected' =>$this->getData(['locale', 'page404']),
'help' => $text[13] 'help' => $text['core_config_view']['locale'][13]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('localeLegalPageId', array_merge(['none' => $text[20]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [ <?php echo template::select('localeLegalPageId', array_merge(['none' => $text['core_config_view']['locale'][20]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => $text[15], 'label' => $text['core_config_view']['locale'][15],
'selected' => $this->getData(['locale', 'legalPageId']), 'selected' => $this->getData(['locale', 'legalPageId']),
'help' => $text[16] 'help' => $text['core_config_view']['locale'][16]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('localeSearchPageId', array_merge(['none' => $text[20]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [ <?php echo template::select('localeSearchPageId', array_merge(['none' => $text['core_config_view']['locale'][20]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => $text[17], 'label' => $text['core_config_view']['locale'][17],
'selected' => $this->getData(['locale', 'searchPageId']), 'selected' => $this->getData(['locale', 'searchPageId']),
'help' => $text[18] 'help' => $text['core_config_view']['locale'][18]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php <?php
echo template::select('localePage302', array_merge(['none' => $text[19]],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [ echo template::select('localePage302', array_merge(['none' => $text['core_config_view']['locale'][19]],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => $text[21], 'label' => $text['core_config_view']['locale'][21],
'selected' =>$this->getData(['locale', 'page302']), 'selected' =>$this->getData(['locale', 'page302']),
'help' => $text[13] 'help' => $text['core_config_view']['locale'][13]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -218,7 +127,7 @@ else{
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[22]; echo template::flag($flag, '20px');?> <h4><?php echo $text['core_config_view']['locale'][22]; echo template::flag($flag, '20px');?>
<span id="labelHelpButton" class="helpDisplayButton"> <span id="labelHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/localisation#etiquettes" target="_blank"> <a href="https://doc.deltacms.fr/localisation#etiquettes" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -228,15 +137,15 @@ else{
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('localeLegalPageLabel', [ <?php echo template::text('localeLegalPageLabel', [
'label' => $text[15], 'label' => $text['core_config_view']['locale'][15],
'placeholder' => $text[15], 'placeholder' => $text['core_config_view']['locale'][15],
'value' => $this->getData(['locale', 'legalPageLabel']) 'value' => $this->getData(['locale', 'legalPageLabel'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('localeSearchPageLabel', [ <?php echo template::text('localeSearchPageLabel', [
'label' => $text[23], 'label' => $text['core_config_view']['locale'][23],
'placeholder' => $text[23], 'placeholder' => $text['core_config_view']['locale'][23],
'value' => $this->getData(['locale', 'searchPageLabel']) 'value' => $this->getData(['locale', 'searchPageLabel'])
]); ?> ]); ?>
</div> </div>
@ -244,16 +153,16 @@ else{
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('localeSitemapPageLabel', [ <?php echo template::text('localeSitemapPageLabel', [
'label' => $text[24], 'label' => $text['core_config_view']['locale'][24],
'placeholder' => $text[24], 'placeholder' => $text['core_config_view']['locale'][24],
'value' => $this->getData(['locale', 'sitemapPageLabel']), 'value' => $this->getData(['locale', 'sitemapPageLabel']),
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('localeCookiesFooterText', [ <?php echo template::text('localeCookiesFooterText', [
'label' => $text[25], 'label' => $text['core_config_view']['locale'][25],
'value' => $this->getData(['locale', 'cookies', 'cookiesFooterText']), 'value' => $this->getData(['locale', 'cookies', 'cookiesFooterText']),
'placeHolder' => $text[25] 'placeHolder' => $text['core_config_view']['locale'][25]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -263,7 +172,7 @@ else{
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[26]; echo template::flag($flag, '20px');?> <h4><?php echo $text['core_config_view']['locale'][26]; echo template::flag($flag, '20px');?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/localisation#cookies" target="_blank"> <a href="https://doc.deltacms.fr/localisation#cookies" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -273,45 +182,45 @@ else{
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::text('localeCookiesTitleText', [ <?php echo template::text('localeCookiesTitleText', [
'help' => $text[27], 'help' => $text['core_config_view']['locale'][27],
'label' => $text[28] , 'label' => $text['core_config_view']['locale'][28] ,
'value' => $this->getData(['locale', 'cookies', 'cookiesTitleText']), 'value' => $this->getData(['locale', 'cookies', 'cookiesTitleText']),
'placeHolder' => $text[29] 'placeHolder' => $text['core_config_view']['locale'][29]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col8"> <div class="col8">
<?php echo template::textarea('localeCookiesDeltaText', [ <?php echo template::textarea('localeCookiesDeltaText', [
'help' => $text[30], 'help' => $text['core_config_view']['locale'][30],
'label' => $text[31], 'label' => $text['core_config_view']['locale'][31],
'value' => $this->getData(['locale', 'cookies', 'cookiesDeltaText']), 'value' => $this->getData(['locale', 'cookies', 'cookiesDeltaText']),
'placeHolder' => $text[32] 'placeHolder' => $text['core_config_view']['locale'][32]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('localeCookiesLinkMlText', [ <?php echo template::text('localeCookiesLinkMlText', [
'help' => $text[33], 'help' => $text['core_config_view']['locale'][33],
'label' => $text[34], 'label' => $text['core_config_view']['locale'][34],
'value' => $this->getData(['locale', 'cookies', 'cookiesLinkMlText']), 'value' => $this->getData(['locale', 'cookies', 'cookiesLinkMlText']),
'placeHolder' => $text[35] 'placeHolder' => $text['core_config_view']['locale'][35]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col8"> <div class="col8">
<?php echo template::textarea('localeCookiesExtText', [ <?php echo template::textarea('localeCookiesExtText', [
'help' => $text[36], 'help' => $text['core_config_view']['locale'][36],
'label' => $text[37], 'label' => $text['core_config_view']['locale'][37],
'value' => $this->getData(['locale', 'cookies', 'cookiesExtText']) 'value' => $this->getData(['locale', 'cookies', 'cookiesExtText'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('localeCookiesCheckboxExtText', [ <?php echo template::text('localeCookiesCheckboxExtText', [
'help' => $text[38], 'help' => $text['core_config_view']['locale'][38],
'label' => $text[39], 'label' => $text['core_config_view']['locale'][39],
'value' => $this->getData(['locale', 'cookies', 'cookiesCheckboxExtText']) 'value' => $this->getData(['locale', 'cookies', 'cookiesCheckboxExtText'])
]); ?> ]); ?>
</div> </div>
@ -319,9 +228,9 @@ else{
<div class="row"> <div class="row">
<div class="col4 offset4"> <div class="col4 offset4">
<?php echo template::text('localeCookiesButtonText', [ <?php echo template::text('localeCookiesButtonText', [
'label' => $text[40], 'label' => $text['core_config_view']['locale'][40],
'value' => $this->getData(['locale', 'cookies', 'cookiesButtonText']), 'value' => $this->getData(['locale', 'cookies', 'cookiesButtonText']),
'placeHolder' => $text[41] 'placeHolder' => $text['core_config_view']['locale'][41]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,49 +1,12 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Paramètres';
$text[1] = 'Type de proxy';
$text[2] = 'Adresse du proxy';
$text[3] = 'Port du proxy';
$text[4] = 'SMTP';
$text[5] = 'Activer SMTP';
$text[6] = 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.';
$text[7] = 'Adresse SMTP';
$text[8] = 'Port SMTP';
$text[9] = 'Authentification';
$text[10] = 'Nom utilisateur';
$text[11] = 'Mot de passe';
$text[12] = 'Sécurité';
$SMTPauth = $module::$SMTPauth;
$SMTPEnc = $module::$SMTPEnc;
break;
case 'en' :
$text[0] = 'Settings';
$text[1] = 'Proxy type';
$text[2] = 'Proxy address';
$text[3] = 'Proxy port';
$text[4] = 'SMTP';
$text[5] = 'Enable SMTP';
$text[6] = 'Settings to be used when your webhost does not offer mail sending functionality';
$text[7] = 'SMTP address';
$text[8] = 'SMTP port';
$text[9] = 'Authentication';
$text[10] = 'User name';
$text[11] = 'Password';
$text[12] = 'Security';
$SMTPauth = $module::$SMTPauth_en;
$SMTPEnc = $module::$SMTPEnc_en;
break;
}
?> ?>
<div id="networkContainer"> <div id="networkContainer">
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[0]; ?> <h4><?php echo $text['core_config_view']['network'][0]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/reseau" target="_blank"> <a href="https://doc.deltacms.fr/reseau" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -53,20 +16,20 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::select('configProxyType', $module::$proxyType, [ <?php echo template::select('configProxyType', $module::$proxyType, [
'label' => $text[1], 'label' => $text['core_config_view']['network'][1],
'selected' => $this->getData(['config', 'proxyType']) 'selected' => $this->getData(['config', 'proxyType'])
]); ?> ]); ?>
</div> </div>
<div class="col8"> <div class="col8">
<?php echo template::text('configProxyUrl', [ <?php echo template::text('configProxyUrl', [
'label' => $text[2], 'label' => $text['core_config_view']['network'][2],
'placeholder' => 'cache.proxy.fr', 'placeholder' => 'cache.proxy.fr',
'value' => $this->getData(['config', 'proxyUrl']) 'value' => $this->getData(['config', 'proxyUrl'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::text('configProxyPort', [ <?php echo template::text('configProxyPort', [
'label' => $text[3], 'label' => $text['core_config_view']['network'][3],
'placeholder' => '6060', 'placeholder' => '6060',
'value' => $this->getData(['config', 'proxyPort']) 'value' => $this->getData(['config', 'proxyPort'])
]); ?> ]); ?>
@ -78,7 +41,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[4]; ?> <h4><?php echo $text['core_config_view']['network'][4]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/reseau#smtp" target="_blank"> <a href="https://doc.deltacms.fr/reseau#smtp" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -87,9 +50,9 @@ switch ($val) {
</h4> </h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::checkbox('smtpEnable', true, $text[5], [ <?php echo template::checkbox('smtpEnable', true, $text['core_config_view']['network'][5], [
'checked' => $this->getData(['config', 'smtp','enable']), 'checked' => $this->getData(['config', 'smtp','enable']),
'help' => $text[6] 'help' => $text['core_config_view']['network'][6]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -97,21 +60,21 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col8"> <div class="col8">
<?php echo template::text('smtpHost', [ <?php echo template::text('smtpHost', [
'label' => $text[7], 'label' => $text['core_config_view']['network'][7],
'placeholder' => 'smtp.fr', 'placeholder' => 'smtp.fr',
'value' => $this->getData(['config', 'smtp','host']) 'value' => $this->getData(['config', 'smtp','host'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::text('smtpPort', [ <?php echo template::text('smtpPort', [
'label' => $text[8], 'label' => $text['core_config_view']['network'][8],
'placeholder' => '589', 'placeholder' => '589',
'value' => $this->getData(['config', 'smtp','port']) 'value' => $this->getData(['config', 'smtp','port'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::select('smtpAuth', $SMTPauth, [ <?php echo template::select('smtpAuth', $SMTPauth, [
'label' => $text[9], 'label' => $text['core_config_view']['network'][9],
'selected' => $this->getData(['config', 'smtp','auth']) 'selected' => $this->getData(['config', 'smtp','auth'])
]); ?> ]); ?>
</div> </div>
@ -120,20 +83,20 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col5"> <div class="col5">
<?php echo template::text('smtpUsername', [ <?php echo template::text('smtpUsername', [
'label' => $text[10], 'label' => $text['core_config_view']['network'][10],
'value' => $this->getData(['config', 'smtp','username' ]) 'value' => $this->getData(['config', 'smtp','username' ])
]); ?> ]); ?>
</div> </div>
<div class="col5"> <div class="col5">
<?php echo template::password('smtpPassword', [ <?php echo template::password('smtpPassword', [
'label' => $text[11], 'label' => $text['core_config_view']['network'][11],
'autocomplete' => 'off', 'autocomplete' => 'off',
'value' => $this->getData(['config', 'smtp','username' ]) ? helper::decrypt ($this->getData(['config', 'smtp','username' ]),$this->getData(['config','smtp','password'])) : '' 'value' => $this->getData(['config', 'smtp','username' ]) ? helper::decrypt ($this->getData(['config', 'smtp','username' ]),$this->getData(['config','smtp','password'])) : ''
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::select('smtpSecure', $SMTPEnc , [ <?php echo template::select('smtpSecure', $SMTPEnc , [
'label' => $text[12], 'label' => $text['core_config_view']['network'][12],
'selected' => $this->getData(['config', 'smtp','secure']) 'selected' => $this->getData(['config', 'smtp','secure'])
]); ?> ]); ?>
</div> </div>

View File

@ -1,39 +1,20 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('configRestoreForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Restaurer';
$text[2] = 'Archive à restaurer';
$text[3] = 'Sélectionnez une archive au format ZIP';
$text[4] = 'L\'archive a été déposée dans le gestionnaire de fichiers.';
$text[5] = 'Préserver les comptes des utilisateurs déjà installés';
break;
case 'en' :
$text[0] = 'Return';
$text[1] = 'Restore';
$text[2] = 'Archive to restore';
$text[3] = 'Select an archive in ZIP format';
$text[4] = 'The archive has been dropped into the file manager.';
$text[5] = 'Preserve user accounts already installed';
break;
}
?>
<?php echo template::formOpen('configRestoreForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('configRestoreBack', [ <?php echo template::button('configRestoreBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config', 'href' => helper::baseUrl() . 'config',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_config_view']['restore'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('configRestoreSubmit',[ <?php echo template::submit('configRestoreSubmit',[
'value' => $text[1], 'value' => $text['core_config_view']['restore'][1],
'uniqueSubmission' => true, 'uniqueSubmission' => true,
]); ?> ]); ?>
</div> </div>
@ -41,18 +22,18 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[2]; ?></h4> <h4><?php echo $text['core_config_view']['restore'][2]; ?></h4>
<div class="row"> <div class="row">
<div class="col10 offset1"> <div class="col10 offset1">
<div class="row"> <div class="row">
<?php echo template::file('configRestoreImportFile', [ <?php echo template::file('configRestoreImportFile', [
'label' => $text[3], 'label' => $text['core_config_view']['restore'][3],
'type' => 2, 'type' => 2,
'help' => $text[4] 'help' => $text['core_config_view']['restore'][4]
]); ?> ]); ?>
</div> </div>
<div class="row"> <div class="row">
<?php echo template::checkbox('configRestoreImportUser', true, $text[5], [ <?php echo template::checkbox('configRestoreImportUser', true, $text['core_config_view']['restore'][5], [
'checked' => true 'checked' => true
]); ?> ]); ?>
</div> </div>

View File

@ -1,31 +1,20 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('configScript'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Valider';
break;
case 'en' :
$text[0] = 'Return';
$text[1] = 'Validate';
break;
}
?>
<?php echo template::formOpen('configScript'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('configManageBack', [ <?php echo template::button('configManageBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config', 'href' => helper::baseUrl() . 'config',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_config_view']['script'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('configManageSubmit',[ <?php echo template::submit('configManageSubmit',[
'value' => $text[1], 'value' => $text['core_config_view']['script'][1],
'ico' => 'check' 'ico' => 'check'
]); ?> ]); ?>
</div> </div>

View File

@ -1,96 +1,13 @@
<script src="core/vendor/jspdf/jspdf.min.js"></script> <script src="core/vendor/jspdf/jspdf.min.js"></script>
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Paramètres';
$text[1] = 'Mise à jour automatisée';
$text[2] = 'Maintenance';
$text[3] = 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.';
$text[4] = 'Favicon';
$text[5] = 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.';
$text[6] = 'Favicon thème sombre';
$text[7] = 'Fuseau horaire';
$text[8] = 'Le fuseau horaire est utile au bon référencement';
$text[9] = 'Message de consentement aux cookies';
$text[10] = 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.';
$text[11] = 'URL intelligentes';
$text[12] = 'Vérifiez d\'abord que votre serveur autorise l\'URL rewriting (ce qui n\'est pas le cas chez Free).';
$text[13] = 'Rechercher une mise à jour en ligne';
$text[14] = 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.';
$text[15] = 'Préserver le fichier htaccess racine';
$text[16] = 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.';
$text[17] = 'Réinstaller';
$text[18] = 'Sauvegarde automatique quotidienne du site';
$text[19] = 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.';
$text[20] = 'Site en maintenance';
$text[21] = 'Sauvegarder';
$text[22] = 'Restaurer';
$text[23] = 'Copie sauvegardes auto';
$text[24] = 'Informations à transmettre au support en cas de dysfonctionnement';
$text[25] = 'Version de Deltacms: ';
$text[26] = 'Version de PHP: ';
$text[27] = 'Type de serveur: ';
$text[28] = 'URL intelligentes: ';
$text[29] = 'oui';
$text[30] = 'non';
$text[31] = 'Modules PHP installés: ';
$text[32] = 'Module(s) absent(s): ';
$text[33] = 'Les modules nécessaires sont installés.';
$text[34] = 'Modules Deltacms installés: ';
$text[35] = 'Générer un pdf';
$text[36] = 'Directive ';
$text[37] = 'Fonction ';
break;
case 'en' :
$text[0] = 'Parameters';
$text[1] = 'Automated update';
$text[2] = 'Maintenance';
$text[3] = 'Remember to clear your browser\'s cache if the favicon does not change';
$text[4] = 'Favicon';
$text[5] = 'Select a suitable icon for a dark theme.<br>Remember to clear your browser\'s cache if the favicon does not change.';
$text[6] = 'Favicon dark theme';
$text[7] = 'Time zone';
$text[8] = 'The time zone is useful for good referencing';
$text[9] = 'Cookie consent message';
$text[10] = 'Mandatory activation under French law unless you use your own consent system';
$text[11] = 'Smart URLs';
$text[12] = 'First check that your server allows URL rewriting (which is not the case with Free)';
$text[13] = 'Search for an online update';
$text[14] = 'The check is daily. Option disabled if server configuration does not allow it.';
$text[15] = 'Preserve the root htaccess file';
$text[16] = 'On auto-update, keep the root htaccess file';
$text[17] = 'Reinstall';
$text[18] = 'Automatic daily site backup';
$text[19] = 'An archive containing the folder /site/data is copied to the folder \'site/backup\'. The backup is kept for 30 days.</p><p>Site files are not backed up automatically. Activation recommended.';
$text[20] = 'Site under maintenance';
$text[21] = 'Save';
$text[22] = 'Restore';
$text[23] = 'Auto backup copy';
$text[24] = 'Information to send to support in case of malfunction';
$text[25] = 'Deltacms version: ';
$text[26] = 'PHP version: ';
$text[27] = 'Server type: ';
$text[28] = 'Smart URL: ';
$text[29] = 'yes';
$text[30] = 'no';
$text[31] = 'PHP modules installed: ';
$text[32] = 'Module(s) missing: ';
$text[33] = 'The necessary modules are installed.';
$text[34] = 'Deltacms modules installed: ';
$text[35] = 'Generate a pdf';
$text[36] = 'Directive ';
$text[37] = 'Function ';
break;
}
?> ?>
<div id="setupContainer"> <div id="setupContainer">
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[0]; ?> <h4><?php echo $text['core_config_view']['setup'][0]; ?>
<span id="setupHelpButton" class="helpDisplayButton"> <span id="setupHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/configuration" target="_blank"> <a href="https://doc.deltacms.fr/configuration" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -101,38 +18,38 @@ switch ($val) {
<div class="col4"> <div class="col4">
<?php echo template::file('configFavicon', [ <?php echo template::file('configFavicon', [
'type' => 1, 'type' => 1,
'help' => $text[3], 'help' => $text['core_config_view']['setup'][3],
'label' => $text[4], 'label' => $text['core_config_view']['setup'][4],
'value' => $this->getData(['config', 'favicon']) 'value' => $this->getData(['config', 'favicon'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::file('configFaviconDark', [ <?php echo template::file('configFaviconDark', [
'type' => 1, 'type' => 1,
'help' => $text[5], 'help' => $text['core_config_view']['setup'][5],
'label' => $text[6], 'label' => $text['core_config_view']['setup'][6],
'value' => $this->getData(['config', 'faviconDark']) 'value' => $this->getData(['config', 'faviconDark'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('configTimezone', $module::$timezones, [ <?php echo template::select('configTimezone', $module::$timezones, [
'label' => $text[7], 'label' => $text['core_config_view']['setup'][7],
'selected' => $this->getData(['config', 'timezone']), 'selected' => $this->getData(['config', 'timezone']),
'help' => $text[8] 'help' => $text['core_config_view']['setup'][8]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('configCookieConsent', true, $text[9], [ <?php echo template::checkbox('configCookieConsent', true, $text['core_config_view']['setup'][9], [
'checked' => $this->getData(['config', 'cookieConsent']), 'checked' => $this->getData(['config', 'cookieConsent']),
'help' => $text[10] 'help' => $text['core_config_view']['setup'][10]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('configRewrite', true, $text[11], [ <?php echo template::checkbox('configRewrite', true, $text['core_config_view']['setup'][11], [
'checked' => helper::checkRewrite(), 'checked' => helper::checkRewrite(),
'help' => $text[12] 'help' => $text['core_config_view']['setup'][12]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -142,7 +59,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[1]; ?> <h4><?php echo $text['core_config_view']['setup'][1]; ?>
<span id="updateHelpButton" class="helpDisplayButton"> <span id="updateHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/configuration#mise-a-jour" target="_blank"> <a href="https://doc.deltacms.fr/configuration#mise-a-jour" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -152,16 +69,16 @@ switch ($val) {
<?php $updateError = helper::urlGetContents(common::DELTA_UPDATE_URL . common::DELTA_UPDATE_CHANNEL . '/version');?> <?php $updateError = helper::urlGetContents(common::DELTA_UPDATE_URL . common::DELTA_UPDATE_CHANNEL . '/version');?>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::checkbox('configAutoUpdate', true, $text[13], [ <?php echo template::checkbox('configAutoUpdate', true, $text['core_config_view']['setup'][13], [
'checked' => $this->getData(['config', 'autoUpdate']), 'checked' => $this->getData(['config', 'autoUpdate']),
'help' => $text[14], 'help' => $text['core_config_view']['setup'][14],
'disabled' => !$updateError 'disabled' => !$updateError
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::checkbox('configAutoUpdateHtaccess', true, $text[15], [ <?php echo template::checkbox('configAutoUpdateHtaccess', true, $text['core_config_view']['setup'][15], [
'checked' => $this->getData(['config', 'autoUpdateHtaccess']), 'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
'help' => $text[16], 'help' => $text['core_config_view']['setup'][16],
'disabled' => !$updateError 'disabled' => !$updateError
]); ?> ]); ?>
</div> </div>
@ -169,7 +86,7 @@ switch ($val) {
<?php echo template::button('configUpdateForced', [ <?php echo template::button('configUpdateForced', [
'ico' => 'download-cloud', 'ico' => 'download-cloud',
'href' => helper::baseUrl() . 'install/update', 'href' => helper::baseUrl() . 'install/update',
'value' => $text[17], 'value' => $text['core_config_view']['setup'][17],
'class' => 'buttonRed', 'class' => 'buttonRed',
'disabled' => !$updateError 'disabled' => !$updateError
]); ?> ]); ?>
@ -181,7 +98,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[2]; ?> <h4><?php echo $text['core_config_view']['setup'][2]; ?>
<span id="maintenanceHelpButton" class="helpDisplayButton"> <span id="maintenanceHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/configuration#maintenance" target="_blank"> <a href="https://doc.deltacms.fr/configuration#maintenance" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -190,13 +107,13 @@ switch ($val) {
</h4> </h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('configAutoBackup', true, $text[18], [ <?php echo template::checkbox('configAutoBackup', true, $text['core_config_view']['setup'][18], [
'checked' => $this->getData(['config', 'autoBackup']), 'checked' => $this->getData(['config', 'autoBackup']),
'help' => $text[19] 'help' => $text['core_config_view']['setup'][19]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('configMaintenance', true, $text[20], [ <?php echo template::checkbox('configMaintenance', true, $text['core_config_view']['setup'][20], [
'checked' => $this->getData(['config', 'maintenance']) 'checked' => $this->getData(['config', 'maintenance'])
]); ?> ]); ?>
</div> </div>
@ -205,21 +122,21 @@ switch ($val) {
<div class="col3"> <div class="col3">
<?php echo template::button('configBackupButton', [ <?php echo template::button('configBackupButton', [
'href' => helper::baseUrl() . 'config/backup', 'href' => helper::baseUrl() . 'config/backup',
'value' => $text[21], 'value' => $text['core_config_view']['setup'][21],
'ico' => 'download-cloud' 'ico' => 'download-cloud'
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::button('configRestoreButton', [ <?php echo template::button('configRestoreButton', [
'href' => helper::baseUrl() . 'config/restore', 'href' => helper::baseUrl() . 'config/restore',
'value' => $text[22], 'value' => $text['core_config_view']['setup'][22],
'ico' => 'upload-cloud' 'ico' => 'upload-cloud'
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::button('configBackupCopyButton', [ <?php echo template::button('configBackupCopyButton', [
'href' => helper::baseUrl() . 'config/copyBackups', 'href' => helper::baseUrl() . 'config/copyBackups',
'value' => $text[23], 'value' => $text['core_config_view']['setup'][23],
'ico' => 'download-cloud' 'ico' => 'download-cloud'
]); ?> ]); ?>
</div> </div>
@ -231,12 +148,12 @@ switch ($val) {
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<div id="infotopdf"> <div id="infotopdf">
<h4><?php echo $text[24]; ?></h4> <h4><?php echo $text['core_config_view']['setup'][24]; ?></h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php $textRewrite = $text[30]; <?php $textRewrite = $text['core_config_view']['setup'][30];
if( helper::checkRewrite() === true ) $textRewrite = $text[29]; if( helper::checkRewrite() === true ) $textRewrite = $text['core_config_view']['setup'][29];
$listText = $text[25]. common::DELTA_VERSION."\n".$text[26]. phpversion()."\n".$text[27]. $_SERVER['SERVER_SOFTWARE']."\n".$text[28].$textRewrite; $listText = $text['core_config_view']['setup'][25]. common::DELTA_VERSION."\n".$text['core_config_view']['setup'][26]. phpversion()."\n".$text['core_config_view']['setup'][27]. $_SERVER['SERVER_SOFTWARE']."\n".$text['core_config_view']['setup'][28].$textRewrite;
echo template::textarea('modulesPhp',[ echo template::textarea('modulesPhp',[
'value' => $listText 'value' => $listText
]); ?> ]); ?>
@ -246,7 +163,7 @@ switch ($val) {
<div class="col12"> <div class="col12">
<?php $listMod = get_loaded_extensions(); <?php $listMod = get_loaded_extensions();
natcasesort($listMod); natcasesort($listMod);
$listModText = $text[31]; $listModText = $text['core_config_view']['setup'][31];
$listModSmall = []; $listModSmall = [];
foreach( $listMod as $key=>$value){ foreach( $listMod as $key=>$value){
$listModText .= $value.' - '; $listModText .= $value.' - ';
@ -256,13 +173,13 @@ switch ($val) {
$listModRequired = array('exif', 'gd', 'mbstring', 'xmlwriter', 'zip', 'date', 'fileinfo', 'phar'); $listModRequired = array('exif', 'gd', 'mbstring', 'xmlwriter', 'zip', 'date', 'fileinfo', 'phar');
$listDiff = array_diff( $listModRequired, $listModSmall ); $listDiff = array_diff( $listModRequired, $listModSmall );
if( count($listDiff) > 0) { if( count($listDiff) > 0) {
$listModText .= "\n\n".$text[32]; $listModText .= "\n\n".$text['core_config_view']['setup'][32];
foreach( $listDiff as $key=>$value){ foreach( $listDiff as $key=>$value){
$listModText .= $value.' - '; $listModText .= $value.' - ';
} }
$listModText = substr( $listModText, 0, strlen($listModText) - 3); $listModText = substr( $listModText, 0, strlen($listModText) - 3);
} else{ } else{
$listModText .= "\n\n".$text[33]; $listModText .= "\n\n".$text['core_config_view']['setup'][33];
} }
echo template::textarea('modulesPhp',[ echo template::textarea('modulesPhp',[
'value' => $listModText 'value' => $listModText
@ -277,20 +194,20 @@ switch ($val) {
$directives = array( 'allow_url_include', 'allow_url_fopen'); $directives = array( 'allow_url_include', 'allow_url_fopen');
foreach( $directives as $key=>$value){ foreach( $directives as $key=>$value){
if( ini_get($value)) { if( ini_get($value)) {
$texte .= $text[36].$value.' ON - '; $texte .= $text['core_config_view']['setup'][36].$value.' ON - ';
} }
else{ else{
$texte .= $text[36].$value.' OFF - '; $texte .= $text['core_config_view']['setup'][36].$value.' OFF - ';
} }
} }
// Tests des fonctions php // Tests des fonctions php
$functions = array( 'fopen', 'file_get_contents', 'curl_version', 'stream_get_contents', 'datefmt_create'); $functions = array( 'fopen', 'file_get_contents', 'curl_version', 'stream_get_contents', 'datefmt_create');
foreach( $functions as $key=>$value){ foreach( $functions as $key=>$value){
if(function_exists($value)){ if(function_exists($value)){
$texte .= $text[37].$value.' ON - '; $texte .= $text['core_config_view']['setup'][37].$value.' ON - ';
} }
else{ else{
$texte .= $text[37].$value.' OFF - '; $texte .= $text['core_config_view']['setup'][37].$value.' OFF - ';
} }
} }
echo template::textarea('directivesFunctionsPhp',[ echo template::textarea('directivesFunctionsPhp',[
@ -304,7 +221,7 @@ switch ($val) {
<div class="col12"> <div class="col12">
<?php // $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory'] <?php // $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory']
$infoModules = helper::getModules(); $infoModules = helper::getModules();
$listModDeltaText = $text[34]; $listModDeltaText = $text['core_config_view']['setup'][34];
foreach( $infoModules as $key=>$value){ foreach( $infoModules as $key=>$value){
$listModDeltaText .= $key.' '.$infoModules[$key]['version'].' - '; $listModDeltaText .= $key.' '.$infoModules[$key]['version'].' - ';
} }
@ -319,7 +236,7 @@ switch ($val) {
<div class="col2 offset5"> <div class="col2 offset5">
<?php echo template::button('buttonHtmlToPdf', [ <?php echo template::button('buttonHtmlToPdf', [
'class' => 'buttontopdf', 'class' => 'buttontopdf',
'value' => $text[35] 'value' => $text['core_config_view']['setup'][35]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,51 +1,12 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_config.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Paramètres';
$text[1] = 'Désactiver le mode de capture Open Graph';
$text[2] = 'Activer le mode de capture Open Graph';
$text[3] = 'Générer sitemap.xml et robots.txt';
$text[4] = 'Autoriser les robots à référencer le site';
$text[5] = 'Cette capture d\'écran est nécessaire aux partages sur les réseaux sociaux. Pour la régénérer activer le mode de capture Open Graph et cliquer sur l\'appareil photo en bas à droite.';
$text[6] = '<h4>Image screenshot.jpg absente</h4><p>L\'activation du mode de capture Open Graph fait apparaître un appareil photo en bas de page. Un clic dessus génère une image screenshot.jpg à partir de la page active.</p>';
$text[7] = 'Réseaux sociaux';
$text[8] = 'Saisissez votre ID : https://www.facebook.com/[ID].';
$text[9] = 'Saisissez votre ID : https://www.instagram.com/[ID].';
$text[10] = 'ID de la chaîne : https://www.youtube.com/channel/[ID].';
$text[11] = 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].';
$text[12] = 'Saisissez votre ID : https://twitter.com/[ID].';
$text[13] = 'Saisissez votre ID : https://pinterest.com/[ID].';
$text[14] = 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].';
$text[15] = 'Saisissez votre ID Github : https://github.com/[ID].';
break;
case 'en' :
$text[0] = 'Settings';
$text[1] = 'Disable Open Graph capture mode';
$text[2] = 'Enable Open Graph capture mode';
$text[3] = 'Generate sitemap.xml and robots.txt';
$text[4] = 'Allow robots to reference the site';
$text[5] = 'This screenshot is required for social media sharing. To regenerate it, activate the Open Graph capture mode and click on the camera at the bottom right';
$text[6] = '<h4>Image screenshot.jpg absent</h4><p>Enabling the Open Graph capture mode causes a camera to appear at the bottom of the page. Clicking it generates a screenshot.jpg image from the active page.</p>';
$text[7] = 'Social networks';
$text[8] = 'Enter your ID: https://www.facebook.com/[ID].';
$text[9] = 'Enter your ID: https://www.instagram.com/[ID].';
$text[10] = 'String ID: https://www.youtube.com/channel/[ID].';
$text[11] = 'Enter your User ID: https://www.youtube.com/user/[ID].';
$text[12] = 'Enter your ID: https://twitter.com/[ID].';
$text[13] = 'Enter your ID: https://pinterest.com/[ID].';
$text[14] = 'Enter your Linkedin ID: https://fr.linkedin.com/in/[ID].';
$text[15] = 'Enter your Github ID: https://github.com/[ID].';
break;
}
?> ?>
<div id="socialContainer"> <div id="socialContainer">
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[0]; ?> <h4><?php echo $text['core_config_view']['social'][0]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/referencement" target="_blank"> <a href="https://doc.deltacms.fr/referencement" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -57,8 +18,8 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12" id="take_screenshoot"> <div class="col12" id="take_screenshoot">
<?php <?php
$texte = $text[2]; $texte = $text['core_config_view']['social'][2];
if( isset($_SESSION['screenshot'])) $texte = $_SESSION['screenshot'] === 'on' ? $text[1]: $text[2]; if( isset($_SESSION['screenshot'])) $texte = $_SESSION['screenshot'] === 'on' ? $text['core_config_view']['social'][1]: $text['core_config_view']['social'][2];
echo template::button('socialMetaImage', [ echo template::button('socialMetaImage', [
'href' => helper::baseUrl() . 'config/configOpenGraph', 'href' => helper::baseUrl() . 'config/configOpenGraph',
'value' => $texte 'value' => $texte
@ -70,13 +31,13 @@ switch ($val) {
<div class="col12"> <div class="col12">
<?php echo template::button('socialSiteMap', [ <?php echo template::button('socialSiteMap', [
'href' => helper::baseUrl() . 'config/generateFiles', 'href' => helper::baseUrl() . 'config/generateFiles',
'value' => $text[3] 'value' => $text['core_config_view']['social'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::checkbox('seoRobots', true, $text[4], [ <?php echo template::checkbox('seoRobots', true, $text['core_config_view']['social'][4], [
'checked' => $this->getData(['config', 'seo','robots']) 'checked' => $this->getData(['config', 'seo','robots'])
]); ?> ]); ?>
</div> </div>
@ -86,13 +47,13 @@ switch ($val) {
<?php if (file_exists(self::FILE_DIR.'source/screenshot.jpg')){ ?> <?php if (file_exists(self::FILE_DIR.'source/screenshot.jpg')){ ?>
<div class="row"> <div class="row">
<div class="col8 offset2 textAlignCenter"> <div class="col8 offset2 textAlignCenter">
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.jpg'.'?n='.uniqid();?>" data-tippy-content="<?php echo $text[5]; ?>" /> <img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.jpg'.'?n='.uniqid();?>" data-tippy-content="<?php echo $text['core_config_view']['social'][5]; ?>" />
</div> </div>
</div> </div>
<?php } else{?> <?php } else{?>
<div class="row"> <div class="row">
<div class="col8 offset2 textAlignCenter"> <div class="col8 offset2 textAlignCenter">
<?php echo $text[6]; ?> <?php echo $text['core_config_view']['social'][6]; ?>
</div> </div>
</div> </div>
<?php }?> <?php }?>
@ -104,7 +65,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[7]; ?> <h4><?php echo $text['core_config_view']['social'][7]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/referencement#reseaux-sociaux" target="_blank"> <a href="https://doc.deltacms.fr/referencement#reseaux-sociaux" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -114,28 +75,28 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::text('socialFacebookId', [ <?php echo template::text('socialFacebookId', [
'help' => $text[8], 'help' => $text['core_config_view']['social'][8],
'label' => 'Facebook', 'label' => 'Facebook',
'value' => $this->getData(['config', 'social', 'facebookId']) 'value' => $this->getData(['config', 'social', 'facebookId'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('socialInstagramId', [ <?php echo template::text('socialInstagramId', [
'help' => $text[9], 'help' => $text['core_config_view']['social'][9],
'label' => 'Instagram', 'label' => 'Instagram',
'value' => $this->getData(['config', 'social', 'instagramId']) 'value' => $this->getData(['config', 'social', 'instagramId'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('socialYoutubeId', [ <?php echo template::text('socialYoutubeId', [
'help' => $text[10], 'help' => $text['core_config_view']['social'][10],
'label' => 'Chaîne Youtube', 'label' => 'Chaîne Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId']) 'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('socialYoutubeUserId', [ <?php echo template::text('socialYoutubeUserId', [
'help' => $text[11], 'help' => $text['core_config_view']['social'][11],
'label' => 'Youtube', 'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeUserId']) 'value' => $this->getData(['config', 'social', 'youtubeUserId'])
]); ?> ]); ?>
@ -144,28 +105,28 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::text('socialTwitterId', [ <?php echo template::text('socialTwitterId', [
'help' => $text[12], 'help' => $text['core_config_view']['social'][12],
'label' => 'Twitter', 'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId']) 'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('socialPinterestId', [ <?php echo template::text('socialPinterestId', [
'help' => $text[13], 'help' => $text['core_config_view']['social'][13],
'label' => 'Pinterest', 'label' => 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId']) 'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('socialLinkedinId', [ <?php echo template::text('socialLinkedinId', [
'help' => $text[14], 'help' => $text['core_config_view']['social'][14],
'label' => 'Linkedin', 'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId']) 'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('socialGithubId', [ <?php echo template::text('socialGithubId', [
'help' => $text[15], 'help' => $text['core_config_view']['social'][15],
'label' => 'Github', 'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId']) 'value' => $this->getData(['config', 'social', 'githubId'])
]); ?> ]); ?>

View File

@ -83,37 +83,18 @@ class install extends common {
]); ]);
// Lexique // Lexique
$text = []; include('./core/module/install/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_install.php');
switch ($langAdmin) {
case 'fr' :
$text[0] = 'Installation de votre site';
$text[1] = 'Bonjour';
$text[2] = 'Voici les détails de votre installation';
$text[3] = 'URL du site';
$text[4] = 'Identifiant du compte';
$text[5] = 'Installation terminée';
break;
case 'en' :
$text[0] = 'Setting up your website';
$text[1] = 'Hello';
$text[2] = 'Here are the details of your installation';
$text[3] = 'Site URL';
$text[4] = 'Account ID';
$text[5] = 'Installation completed';
break;
}
// Compte créé, envoi du mail et création des données du site // Compte créé, envoi du mail et création des données du site
if ($success) { // Formulaire complété envoi du mail if ($success) { // Formulaire complété envoi du mail
// Envoie le mail // Envoie le mail
// Sent contient true si réussite sinon code erreur d'envoi en clair // Sent contient true si réussite sinon code erreur d'envoi en clair
$sent = $this->sendMail( $sent = $this->sendMail(
$userMail, $userMail,
$text[0], $text['core_install']['index'][0],
$text[1] . ' <strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' . $text['core_install']['index'][1] . ' <strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' .
$text[2].'<br><br>' . $text['core_install']['index'][2].'<br><br>' .
'<strong>'.$text[3].' : </strong> <a href="' . helper::baseUrl(false) . '" target="_blank">' . helper::baseUrl(false) . '</a><br>' . '<strong>'.$text['core_install']['index'][3].' : </strong> <a href="' . helper::baseUrl(false) . '" target="_blank">' . helper::baseUrl(false) . '</a><br>' .
'<strong>'.$text[4].' : </strong> ' . $this->getInput('installId') . '<br>', '<strong>'.$text['core_install']['index'][4].' : </strong> ' . $this->getInput('installId') . '<br>',
null null
); );
// Nettoyer les cookies de langue d'une précédente installation // Nettoyer les cookies de langue d'une précédente installation
@ -129,21 +110,20 @@ class install extends common {
} }
} }
// Installation du site de test en anglais // Installation du site de test dans une langue d'administration différente du français
if( $langAdmin === 'en'){ if( $langAdmin !== 'fr'){
if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) { if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) {
$this->copyDir( './core/module/install/ressource/database_en/base/', './site/data/base/'); $this->copyDir( './core/module/install/ressource/database_'.$langAdmin.'/base/', './site/data/base/');
$this->copyDir( './core/module/install/ressource/database_en/search/', './site/data/search/'); $this->copyDir( './core/module/install/ressource/database_'.$langAdmin.'/search/', './site/data/search/');
} }
else{ else{
$this->copyDir( './core/module/install/ressource/databaselight_en/base/', './site/data/base/'); $this->copyDir( './core/module/install/ressource/databaselight_'.$langAdmin.'/base/', './site/data/base/');
} }
} }
// Personnalisation de la page d'accueil en fonction de la langue de rédaction choisie // Personnalisation de la page d'accueil en fonction de la langue de rédaction choisie
if( $langBase !== 'fr' && $langBase !== 'en' && file_exists( './core/module/install/ressource/'. $langBase . '/accueil.html' )){ if( $langBase !== $langAdmin && file_exists( './core/module/install/ressource/'. $langBase . '/accueil.html' )){
$accueil = 'accueil.html'; $accueil = $text['core_install']['index'][6];
if( $langAdmin === 'en') $accueil = 'home.html';
copy('./core/module/install/ressource/'. $langBase . '/accueil.html', './site/data/base/content/'. $accueil); copy('./core/module/install/ressource/'. $langBase . '/accueil.html', './site/data/base/content/'. $accueil);
} }
@ -189,10 +169,10 @@ class install extends common {
unlink(self::FILE_DIR . 'source/theme/themes.json'); unlink(self::FILE_DIR . 'source/theme/themes.json');
// Modification du texte 'Pied de page personnalisé' situé dans theme.json ( $this->setData pose problème) // Modification du texte 'Pied de page personnalisé' situé dans theme.json ( $this->setData pose problème)
if( $langAdmin === 'en'){ if( $langAdmin !== 'fr'){
$theme = file_get_contents( self::DATA_DIR.'theme.json'); $theme = file_get_contents( self::DATA_DIR.'theme.json');
$theme = json_decode( $theme, true); $theme = json_decode( $theme, true);
$theme['theme']['footer']['text'] = 'Custom footer'; $theme['theme']['footer']['text'] = $text['core_install']['index'][7];
$json = json_encode($theme); $json = json_encode($theme);
file_put_contents(self::DATA_DIR.'theme.json',$json); file_put_contents(self::DATA_DIR.'theme.json',$json);
} }
@ -200,7 +180,7 @@ class install extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl(false), 'redirect' => helper::baseUrl(false),
'notification' => $sent === true ? $text[5] : $sent, 'notification' => $sent === true ? $text['core_install']['index'][5] : $sent,
'state' => ($sent === true && $success === true) ? true : null 'state' => ($sent === true && $success === true) ? true : null
]); ]);
} }
@ -339,22 +319,13 @@ class install extends common {
*/ */
public function update() { public function update() {
// Lexique // Lexique
$text = []; include('./core/module/install/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_install.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ( $val ) {
case 'fr' :
$text[0] = 'Mise à jour';
break;
case 'en' :
$text[0] = 'Update';
break;
}
// Nouvelle version // Nouvelle version
self::$newVersion = helper::urlGetContents(common::DELTA_UPDATE_URL . common::DELTA_UPDATE_CHANNEL . '/version'); self::$newVersion = helper::urlGetContents(common::DELTA_UPDATE_URL . common::DELTA_UPDATE_CHANNEL . '/version');
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT, 'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => $text[0], 'title' => $text['core_install']['update'][0],
'view' => 'update' 'view' => 'update'
]); ]);
} }

View File

@ -0,0 +1,24 @@
<?php
// Lexique du module du coeur Install en anglais
$text['core_install_view']['update'][0] = 'Updating Deltacms ';
$text['core_install_view']['update'][1] = ' to Deltacms ';
$text['core_install_view']['update'][2] = 'To ensure the proper functioning of Deltacms, please do not close this page until the operation is complete.';
$text['core_install_view']['update'][3] = '1/4: Preparation...';
$text['core_install_view']['update'][4] = '2/4 : Download...';
$text['core_install_view']['update'][5] = '3/4 : Installation...';
$text['core_install_view']['update'][6] = '4/4 : Configuration...';
$text['core_install_view']['update'][7] = 'An error occurred in the step';
$text['core_install_view']['update'][8] = 'Update successfully completed.';
$text['core_install_view']['update'][9] = 'Finish';
$text['core_install']['update'][0] = 'Update';
$text['core_install']['index'][0] = 'Setting up your website';
$text['core_install']['index'][1] = 'Hello';
$text['core_install']['index'][2] = 'Here are the details of your installation';
$text['core_install']['index'][3] = 'Site URL';
$text['core_install']['index'][4] = 'Account ID';
$text['core_install']['index'][5] = 'Installation completed';
// Nom de la page d'accueil dans cette langue d'administration
$text['core_install']['index'][6] = 'home.html';
// Texte par défaut à gauche du footer
$text['core_install']['index'][7] = 'Custom footer';
?>

View File

@ -0,0 +1,24 @@
<?php
// Lexique du module du coeur Install en français
$text['core_install_view']['update'][0] = 'Mise à jour de Deltacms ';
$text['core_install_view']['update'][1] = ' vers Deltacms ';
$text['core_install_view']['update'][2] = 'Afin d\'assurer le bon fonctionnement de Deltacms, veuillez ne pas fermer cette page avant la fin de l\'opération.';
$text['core_install_view']['update'][3] = '1/4 : Préparation...';
$text['core_install_view']['update'][4] = '2/4 : Téléchargement...';
$text['core_install_view']['update'][5] = '3/4 : Installation...';
$text['core_install_view']['update'][6] = '4/4 : Configuration...';
$text['core_install_view']['update'][7] = 'Une erreur est survenue lors de l\'étape';
$text['core_install_view']['update'][8] = 'Mise à jour terminée avec succès.';
$text['core_install_view']['update'][9] = 'Terminer';
$text['core_install']['update'][0] = 'Mise à jour';
$text['core_install']['index'][0] = 'Installation de votre site';
$text['core_install']['index'][1] = 'Bonjour';
$text['core_install']['index'][2] = 'Voici les détails de votre installation';
$text['core_install']['index'][3] = 'URL du site';
$text['core_install']['index'][4] = 'Identifiant du compte';
$text['core_install']['index'][5] = 'Installation terminée';
// Nom de la page d'accueil dans cette langue d'administration
$text['core_install']['index'][6] = 'accueil.html';
// Texte par défaut à gauche du footer
$text['core_install']['index'][7] = 'Pied de page personnalisé';
?>

View File

@ -120,7 +120,7 @@
"style": "site\/data\/gallery\/galeries\/theme.css" "style": "site\/data\/gallery\/galeries\/theme.css"
}, },
"config": { "config": {
"versionData": "4.0" "versionData": "4.1"
} }
}, },
"deltacms": { "deltacms": {
@ -141,7 +141,7 @@
"logoUrl": "", "logoUrl": "",
"logoWidth": "40", "logoWidth": "40",
"maxSizeUpload": "500000", "maxSizeUpload": "500000",
"versionData": "4.2", "versionData": "4.3",
"uploadJpg": true, "uploadJpg": true,
"uploadPng": true, "uploadPng": true,
"uploadPdf": false, "uploadPdf": false,

View File

@ -120,7 +120,7 @@
"style": "site\/data\/gallery\/galeries\/theme.css" "style": "site\/data\/gallery\/galeries\/theme.css"
}, },
"config": { "config": {
"versionData": "4.0" "versionData": "4.1"
} }
}, },
"deltacms": { "deltacms": {
@ -141,7 +141,7 @@
"logoUrl": "", "logoUrl": "",
"logoWidth": "40", "logoWidth": "40",
"maxSizeUpload": "1000000", "maxSizeUpload": "1000000",
"versionData": "4.2", "versionData": "4.3",
"uploadJpg": true, "uploadJpg": true,
"uploadPng": true, "uploadPng": true,
"uploadPdf": false, "uploadPdf": false,

View File

@ -70,7 +70,7 @@ class init extends common {
] ]
], ],
'core' => [ 'core' => [
'dataVersion' => 4304, 'dataVersion' => 4306,
'lastBackup' => 0, 'lastBackup' => 0,
'lastClearTmp' => 0, 'lastClearTmp' => 0,
'lastAutoUpdate' => 0, 'lastAutoUpdate' => 0,

View File

@ -1,58 +1,30 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/install/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_install.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Mise à jour de Deltacms ';
$text[1] = ' vers Deltacms ';
$text[2] = 'Afin d\'assurer le bon fonctionnement de Deltacms, veuillez ne pas fermer cette page avant la fin de l\'opération.';
$text[3] = '1/4 : Préparation...';
$text[4] = '2/4 : Téléchargement...';
$text[5] = '3/4 : Installation...';
$text[6] = '4/4 : Configuration...';
$text[7] = 'Une erreur est survenue lors de l\'étape';
$text[8] = 'Mise à jour terminée avec succès.';
$text[9] = 'Terminer';
break;
case 'en' :
$text[0] = 'Updating Deltacms ';
$text[1] = ' to Deltacms ';
$text[2] = 'To ensure the proper functioning of Deltacms, please do not close this page until the operation is complete.';
$text[3] = '1/4: Preparation...';
$text[4] = '2/4 : Download...';
$text[5] = '3/4 : Installation...';
$text[6] = '4/4 : Configuration...';
$text[7] = 'An error occurred in the step';
$text[8] = 'Update successfully completed.';
$text[9] = 'Finish';
break;
}
?> ?>
<p><strong><?php echo $text[0] . self::DELTA_VERSION . $text[1] . $module::$newVersion; ?>.</strong></p> <p><strong><?php echo $text['core_install_view']['update'][0] . self::DELTA_VERSION . $text['core_install_view']['update'][1] . $module::$newVersion; ?>.</strong></p>
<p><?php echo $text[2]; ?></p> <p><?php echo $text['core_install_view']['update'][2]; ?></p>
<div class="row"> <div class="row">
<div class="col9 verticalAlignMiddle"> <div class="col9 verticalAlignMiddle">
<div id="installUpdateProgress"> <div id="installUpdateProgress">
<?php echo template::ico('spin', '', true); ?> <?php echo template::ico('spin', '', true); ?>
<span class="installUpdateProgressText" data-id="1"><?php echo $text[3]; ?></span> <span class="installUpdateProgressText" data-id="1"><?php echo $text['core_install_view']['update'][3]; ?></span>
<span class="installUpdateProgressText displayNone" data-id="2"><?php echo $text[4]; ?></span> <span class="installUpdateProgressText displayNone" data-id="2"><?php echo $text['core_install_view']['update'][4]; ?></span>
<span class="installUpdateProgressText displayNone" data-id="3"><?php echo $text[5]; ?></span> <span class="installUpdateProgressText displayNone" data-id="3"><?php echo $text['core_install_view']['update'][5]; ?></span>
<span class="installUpdateProgressText displayNone" data-id="4"><?php echo $text[6]; ?></span> <span class="installUpdateProgressText displayNone" data-id="4"><?php echo $text['core_install_view']['update'][6]; ?></span>
</div> </div>
<div id="installUpdateError" class="colorRed displayNone"> <div id="installUpdateError" class="colorRed displayNone">
<?php echo template::ico('cancel', ''); ?> <?php echo template::ico('cancel', ''); ?>
<?php echo $text[7]; ?> <span id="installUpdateErrorStep"></span>. <?php echo $text['core_install_view']['update'][7]; ?> <span id="installUpdateErrorStep"></span>.
</div> </div>
<div id="installUpdateSuccess" class="colorGreen displayNone"> <div id="installUpdateSuccess" class="colorGreen displayNone">
<?php echo template::ico('check', ''); ?> <?php echo template::ico('check', ''); ?>
<?php echo $text[8]; ?> <?php echo $text['core_install_view']['update'][8]; ?>
</div> </div>
</div> </div>
<div class="col3 verticalAlignMiddle"> <div class="col3 verticalAlignMiddle">
<?php echo template::button('installUpdateEnd', [ <?php echo template::button('installUpdateEnd', [
'value' => $text[9], 'value' => $text['core_install_view']['update'][9],
'href' => helper::baseUrl() . 'config', 'href' => helper::baseUrl() . 'config',
'ico' => 'check', 'ico' => 'check',
'class' => 'disabled' 'class' => 'disabled'

View File

@ -0,0 +1,5 @@
<?php
// Lexique du module du coeur Maintenance en anglais
$text['core_maintenance']['index'][0] = 'Maintenance in progress...';
$text['core_maintenance']['index'][1] = "Our site is currently undergoing maintenance. We apologise for the inconvenience and are doing our best to be back soon.";
?>

View File

@ -0,0 +1,5 @@
<?php
// Lexique du module du coeur Maintenance en français
$text['core_maintenance']['index'][0] = 'Maintenance en cours...';
$text['core_maintenance']['index'][1] = "Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.";
?>

View File

@ -27,16 +27,8 @@ class maintenance extends common {
*/ */
public function index() { public function index() {
// Lexique // Lexique
$text = []; include('./core/module/maintenance/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_maintenance.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Maintenance en cours...';
break;
case 'en' :
$text[0] = 'Maintenance in progress...';
break;
}
// Redirection vers l'accueil après rafraîchissement et que la maintenance est terminée. // Redirection vers l'accueil après rafraîchissement et que la maintenance est terminée.
if($this->getData(['config', 'maintenance']) == False){ if($this->getData(['config', 'maintenance']) == False){
header('Location:' . helper::baseUrl()); header('Location:' . helper::baseUrl());
@ -58,7 +50,7 @@ class maintenance extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT, 'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => $text[0], 'title' => $text['core_maintenance']['index'][0],
'view' => 'index' 'view' => 'index'
]); ]);
} }

View File

@ -1,5 +1,9 @@
<p>Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.</p> <?php
<p>Our site is currently undergoing maintenance. We apologise for the inconvenience and are doing our best to be back soon.</p> // Lexique
include('./core/module/maintenance/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_maintenance.php');
?>
<p><?php echo $text['core_maintenance']['index'][1]; ?></p>
<div class="row"> <div class="row">
<div class="col4 offset8 textAlignCenter"> <div class="col4 offset8 textAlignCenter">
<?php echo template::button('maintenanceLogin', [ <?php echo template::button('maintenanceLogin', [

View File

@ -0,0 +1,90 @@
<?php
// Lexique du module du coeur Page en anglais
$text['core_page_view']['edit'][0] = 'Back';
$text['core_page_view']['edit'][1] = 'Help';
$text['core_page_view']['edit'][2] = 'Duplicate';
$text['core_page_view']['edit'][3] = 'Delete';
$text['core_page_view']['edit'][4] = 'OK';
$text['core_page_view']['edit'][5] = 'General information';
$text['core_page_view']['edit'][6] = 'Title';
$text['core_page_view']['edit'][7] = 'Short title';
$text['core_page_view']['edit'][8] = 'The short title is displayed in the menus. It can be identical to the page title.';
$text['core_page_view']['edit'][9] = 'If the module is changed, the data of the previous module will be deleted.';
$text['core_page_view']['edit'][10] = 'Module';
$text['core_page_view']['edit'][11] = 'Aspect of the link';
$text['core_page_view']['edit'][12] = 'Select a small image or icon';
$text['core_page_view']['edit'][13] = 'Icon';
$text['core_page_view']['edit'][14] = 'In free position add the module by placing [MODULE] at the desired location on your page.';
$text['core_page_view']['edit'][15] = 'Module position';
$text['core_page_view']['edit'][16] = 'Layout';
$text['core_page_view']['edit'][17] = 'Page templates / Sidebar';
$text['core_page_view']['edit'][18] = 'To set the page as a sidebar, choose the option from the list.';
$text['core_page_view']['edit'][19] = 'Left sidebar :';
$text['core_page_view']['edit'][20] = 'Right sidebar :';
$text['core_page_view']['edit'][21] = 'Content of the vertical menu';
$text['core_page_view']['edit'][22] = 'By default the menu is displayed AFTER the page content. To position it at a specific location, insert [MENU] into the page content.';
$text['core_page_view']['edit'][23] = 'Location in the menu';
$text['core_page_view']['edit'][24] = 'Position';
$text['core_page_view']['edit'][25] = 'Do not display creates an orphan page that cannot be accessed via the menus.';
$text['core_page_view']['edit'][26] = 'Parent page';
$text['core_page_view']['edit'][27] = 'A deactivated page is not clickable in disconnected mode, the child pages are visible and accessible. The home page cannot be disabled.';
$text['core_page_view']['edit'][28] = 'Displays the parent page name followed by the page name, the title should not be hidden.';
$text['core_page_view']['edit'][29] = 'Advanced location options';
$text['core_page_view']['edit'][30] = 'Hide child pages in the horizontal menu';
$text['core_page_view']['edit'][31] = 'Hide the page and child pages in the sidebar menu';
$text['core_page_view']['edit'][32] = 'The page is displayed in a horizontal menu but not in the vertical menu of a sidebar.';
$text['core_page_view']['edit'][33] = 'Permission and referencing';
$text['core_page_view']['edit'][34] = 'Group required to access the page:';
$text['core_page_view']['edit'][35] = 'Meta title';
$text['core_page_view']['edit'][36] = 'Meta description';
$text['core_page_view']['edit'][37] = 'Disabled';
$text['core_page_view']['edit'][38] = 'New tab';
$text['core_page_view']['edit'][39] = 'Title hidden';
$text['core_page_view']['edit'][40] = 'Breadcrumb';
$text['core_page_view']['edit'][41] = "Are you sure you want to delete this page ?";
$text['core_page_view']['edit'][42] = "The data in the module ";
$text['core_page_view']['edit'][43] = " will be deleted. Do you confirm?";
// Tinymce et Flatpickr
$lang_admin = 'en_GB';
$lang_flatpickr = 'default';
// Selects
$pagesNoParentId = [
'' => 'None'
];
$pagesBarId = [
'' => 'None'
];
$typeMenu = [
'text' => 'Text',
'icon' => 'Icon',
'icontitle' => 'Icon with text bubble'
];
$modulePosition = [
'bottom' => 'Bottom',
'top' => 'Top',
'free' => 'Free'
];
$pageBlocks = [
'12' => 'Standard page',
'4-8' => 'Bar 1/3 - page 2/3',
'8-4' => 'Page 2/3 - bar 1/3',
'3-9' => 'Bar 1/4 - page 3/4',
'9-3' => 'Page 3/4 - bar 1/4',
'3-6-3' => 'Bar 1/4 - page 1/2 - bar 1/4',
'2-7-3' => 'Bar 2/12 - page 7/12 - bar 3/12 ',
'3-7-2' => 'Bar 3/12 - page 7/12 - bar 2/12 ',
'bar' => 'Sidebar'
];
$displayMenu = [
'none' => 'None',
'parents' => 'Menu',
'children' => 'The submenu of the parent page'
];
$groupPublics = [
self::GROUP_VISITOR => 'Visitor',
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
?>

View File

@ -0,0 +1,91 @@
<?php
// Lexique du module du coeur Page en français
$text['core_page_view']['edit'][0] = 'Retour';
$text['core_page_view']['edit'][1] = 'Aide';
$text['core_page_view']['edit'][2] = 'Dupliquer';
$text['core_page_view']['edit'][3] = 'Supprimer';
$text['core_page_view']['edit'][4] = 'Enregistrer';
$text['core_page_view']['edit'][5] = 'Informations générales';
$text['core_page_view']['edit'][6] = 'Titre';
$text['core_page_view']['edit'][7] = 'Titre court';
$text['core_page_view']['edit'][8] = 'Le titre court est affiché dans les menus. Il peut être identique au titre de la page.';
$text['core_page_view']['edit'][9] = 'En cas de changement de module, les données du module précédent seront supprimées.';
$text['core_page_view']['edit'][10] = 'Module';
$text['core_page_view']['edit'][11] = 'Aspect du lien';
$text['core_page_view']['edit'][12] = 'Sélectionnez une image ou une icône de petite dimension';
$text['core_page_view']['edit'][13] = 'Icône';
$text['core_page_view']['edit'][14] = 'En position libre ajoutez le module en plaçant [MODULE] à l\'endroit voulu dans votre page.';
$text['core_page_view']['edit'][15] = 'Position du module';
$text['core_page_view']['edit'][16] = 'Mise en page';
$text['core_page_view']['edit'][17] = 'Gabarits de page / Barre latérale';
$text['core_page_view']['edit'][18] = 'Pour définir la page comme barre latérale, choisissez l\'option dans la liste.';
$text['core_page_view']['edit'][19] = 'Barre latérale gauche :';
$text['core_page_view']['edit'][20] = 'Barre latérale droite :';
$text['core_page_view']['edit'][21] = 'Contenu du menu vertical';
$text['core_page_view']['edit'][22] = 'Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.';
$text['core_page_view']['edit'][23] = 'Emplacement dans le menu';
$text['core_page_view']['edit'][24] = 'Position';
$text['core_page_view']['edit'][25] = '\'Ne pas afficher\' crée une page orpheline non accessible par le biais des menus.';
$text['core_page_view']['edit'][26] = 'Page parent';
$text['core_page_view']['edit'][27] = 'Une page désactivée n\'est pas cliquable en mode déconnecté, les pages enfants sont visibles et accessibles. La page d\'accueil n\'est pas désactivable.';
$text['core_page_view']['edit'][28] = 'Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.';
$text['core_page_view']['edit'][29] = 'Options d\'emplacement avancées';
$text['core_page_view']['edit'][30] = 'Masquer les pages enfants dans le menu horizontal';
$text['core_page_view']['edit'][31] = 'Masquer la page et les pages enfants dans le menu d\'une barre latérale';
$text['core_page_view']['edit'][32] = 'La page est affichée dans un menu horizontal mais pas dans le menu vertical d\'une barre latérale.';
$text['core_page_view']['edit'][33] = 'Permission et référencement';
$text['core_page_view']['edit'][34] = 'Groupe requis pour accéder à la page :';
$text['core_page_view']['edit'][35] = 'Méta-titre';
$text['core_page_view']['edit'][36] = 'Méta-description';
$text['core_page_view']['edit'][37] = 'Désactivée';
$text['core_page_view']['edit'][38] = 'Nouvel onglet';
$text['core_page_view']['edit'][39] = 'Titre masqué';
$text['core_page_view']['edit'][40] = 'Fil d\'Ariane';
$text['core_page_view']['edit'][41] = "Êtes-vous sûr de vouloir supprimer cette page ?";
$text['core_page_view']['edit'][42] = "Les données du module ";
$text['core_page_view']['edit'][43] = " seront effacées. Confirmez-vous ?";
// Tinymce et Flatpickr
$lang_admin = 'fr_FR';
$lang_flatpickr = 'fr';
// Selects
$pagesNoParentId = [
'' => 'Aucune'
];
$pagesBarId = [
'' => 'Aucune'
];
$typeMenu = [
'text' => 'Texte',
'icon' => 'Icône',
'icontitle' => 'Icône avec bulle de texte'
];
// Position du module
$modulePosition = [
'bottom' => 'En bas',
'top' => 'En haut',
'free' => 'Libre'
];
$pageBlocks = [
'12' => 'Page standard',
'4-8' => 'Barre 1/3 - page 2/3',
'8-4' => 'Page 2/3 - barre 1/3',
'3-9' => 'Barre 1/4 - page 3/4',
'9-3' => 'Page 3/4 - barre 1/4',
'3-6-3' => 'Barre 1/4 - page 1/2 - barre 1/4',
'2-7-3' => 'Barre 2/12 - page 7/12 - barre 3/12 ',
'3-7-2' => 'Barre 3/12 - page 7/12 - barre 2/12 ',
'bar' => 'Barre latérale'
];
$displayMenu = [
'none' => 'Aucun',
'parents' => 'Le menu',
'children' => 'Le sous-menu de la page parente'
];
$groupPublics = [
self::GROUP_VISITOR => 'Visiteur',
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
?>

View File

@ -24,79 +24,17 @@ class page extends common {
'edit' => self::GROUP_MODERATOR, 'edit' => self::GROUP_MODERATOR,
'duplicate' => self::GROUP_MODERATOR 'duplicate' => self::GROUP_MODERATOR
]; ];
public static $pagesNoParentId = [
'' => 'Aucune'
];
public static $pagesNoParentId_en = [
'' => 'None'
];
public static $pagesBarId = [
'' => 'Aucune'
];
public static $pagesBarId_en = [
'' => 'None'
];
public static $moduleIds = [];
public static $typeMenu = [ public static $moduleIds = [];
'text' => 'Texte', public static $pagesBarId = [];
'icon' => 'Icône', public static $pagesNoParentId = [];
'icontitle' => 'Icône avec bulle de texte'
];
public static $typeMenu_en = [
'text' => 'Text',
'icon' => 'Icon',
'icontitle' => 'Icon with text bubble'
];
// Position du module
public static $modulePosition = [
'bottom' => 'En bas',
'top' => 'En haut',
'free' => 'Libre'
];
public static $modulePosition_en = [
'bottom' => 'Bottom',
'top' => 'Top',
'free' => 'Free'
];
public static $pageBlocks = [
'12' => 'Page standard',
'4-8' => 'Barre 1/3 - page 2/3',
'8-4' => 'Page 2/3 - barre 1/3',
'3-9' => 'Barre 1/4 - page 3/4',
'9-3' => 'Page 3/4 - barre 1/4',
'3-6-3' => 'Barre 1/4 - page 1/2 - barre 1/4',
'2-7-3' => 'Barre 2/12 - page 7/12 - barre 3/12 ',
'3-7-2' => 'Barre 3/12 - page 7/12 - barre 2/12 ',
'bar' => 'Barre latérale'
];
public static $pageBlocks_en = [
'12' => 'Standard page',
'4-8' => 'Bar 1/3 - page 2/3',
'8-4' => 'Page 2/3 - bar 1/3',
'3-9' => 'Bar 1/4 - page 3/4',
'9-3' => 'Page 3/4 - bar 1/4',
'3-6-3' => 'Bar 1/4 - page 1/2 - bar 1/4',
'2-7-3' => 'Bar 2/12 - page 7/12 - bar 3/12 ',
'3-7-2' => 'Bar 3/12 - page 7/12 - bar 2/12 ',
'bar' => 'Sidebar'
];
public static $displayMenu = [
'none' => 'Aucun',
'parents' => 'Le menu',
'children' => 'Le sous-menu de la page parente'
];
public static $displayMenu_en = [
'none' => 'None',
'parents' => 'Menu',
'children' => 'The submenu of the parent page'
];
/** /**
* Duplication * Duplication
*/ */
public function duplicate() { public function duplicate() {
// Lexique // Lexique
include('./core/module/page/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_page.php');
$text = []; $text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']); $val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { switch ($val) {
@ -172,6 +110,7 @@ class page extends common {
*/ */
public function add() { public function add() {
// Lexique // Lexique
include('./core/module/page/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_page.php');
$text = []; $text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']); $val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { switch ($val) {
@ -237,6 +176,7 @@ class page extends common {
*/ */
public function delete() { public function delete() {
// Lexique // Lexique
include('./core/module/page/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_page.php');
$text = []; $text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']); $val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { switch ($val) {
@ -388,6 +328,7 @@ class page extends common {
*/ */
public function edit() { public function edit() {
// Lexique // Lexique
include('./core/module/page/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_page.php');
$text = []; $text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']); $val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { switch ($val) {
@ -588,36 +529,27 @@ class page extends common {
} }
} }
self::$moduleIds = array_merge( ['' => $text[1]] , helper::arrayCollumn(helper::getModules(),'realName','SORT_ASC')); // Pages sans parent self::$moduleIds = array_merge( ['' => $text[1]] , helper::arrayCollumn(helper::getModules(),'realName','SORT_ASC')); // Pages sans parent
self::$pagesNoParentId = $pagesNoParentId;
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
if($parentPageId !== $this->getUrl(2)) { if($parentPageId !== $this->getUrl(2)) {
self::$pagesNoParentId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']); self::$pagesNoParentId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
self::$pagesNoParentId_en[$parentPageId] = $this->getData(['page', $parentPageId, 'title']); //self::$pagesNoParentId_en[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
} }
} }
// Pages barre latérales // Pages barre latérales
self::$pagesBarId = $pagesBarId;
foreach($this->getHierarchy(null,false,true) as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy(null,false,true) as $parentPageId => $childrenPageIds) {
if($parentPageId !== $this->getUrl(2) && if($parentPageId !== $this->getUrl(2) &&
$this->getData(['page', $parentPageId, 'block']) === 'bar') { $this->getData(['page', $parentPageId, 'block']) === 'bar') {
self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']); self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
self::$pagesBarId_en[$parentPageId] = $this->getData(['page', $parentPageId, 'title']); //self::$pagesBarId_en[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
} }
} }
// Mise à jour de la liste des pages pour TinyMCE // Mise à jour de la liste des pages pour TinyMCE
$this->pages2Json(); $this->pages2Json();
// Passage de la langue d'administration à Tinymce
$lang_admin = 'fr_FR';
if( $this->getData(['config', 'i18n', 'langAdmin']) ==='en') $lang_admin = 'en_GB';
?>
<script>
var lang_admin = "<?php echo $lang_admin; ?>";
</script>
<?php
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $this->getData(['page', $this->getUrl(2), 'title']), 'title' => $this->getData(['page', $this->getUrl(2), 'title']),
'vendor' => [
'tinymce'
],
'view' => 'edit' 'view' => 'edit'
]); ]);
} }

View File

@ -20,14 +20,7 @@
*/ */
$("#pageEditDelete").on("click", function() { $("#pageEditDelete").on("click", function() {
var _this = $(this); var _this = $(this);
var text = ""; return core.confirm( textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir supprimer cette page ?";' ;
}
else{
echo 'text = "Are you sure you want to delete this page ?";' ;
} ?>
return core.confirm( text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });
@ -43,17 +36,7 @@ function protectModule() {
if ( oldModule !== "" && if ( oldModule !== "" &&
oldModule !== newModule) { oldModule !== newModule) {
var _this = $(this); var _this = $(this);
var text1 = ""; core.confirm( text1Confirm + oldModuleText + text2Confirm,
var text2 = "";
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text1 = "Les données du module ";' ;
echo 'text2 = " seront effacées. Confirmez-vous ?";' ;
}
else{
echo 'text1 = "The data in the module ";' ;
echo 'text2 = " will be deleted. Do you confirm?";' ;
} ?>
core.confirm( text1 + oldModuleText + text2,
function() { function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
return true; return true;

View File

@ -1,111 +1,18 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/page/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_page.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Dupliquer';
$text[3] = 'Supprimer';
$text[4] = 'Enregistrer';
$text[5] = 'Informations générales';
$text[6] = 'Titre';
$text[7] = 'Titre court';
$text[8] = 'Le titre court est affiché dans les menus. Il peut être identique au titre de la page.';
$text[9] = 'En cas de changement de module, les données du module précédent seront supprimées.';
$text[10] = 'Module';
$text[11] = 'Aspect du lien';
$text[12] = 'Sélectionnez une image ou une icône de petite dimension';
$text[13] = 'Icône';
$text[14] = 'En position libre ajoutez le module en plaçant [MODULE] à l\'endroit voulu dans votre page.';
$text[15] = 'Position du module';
$text[16] = 'Mise en page';
$text[17] = 'Gabarits de page / Barre latérale';
$text[18] = 'Pour définir la page comme barre latérale, choisissez l\'option dans la liste.';
$text[19] = 'Barre latérale gauche :';
$text[20] = 'Barre latérale droite :';
$text[21] = 'Contenu du menu vertical';
$text[22] = 'Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.';
$text[23] = 'Emplacement dans le menu';
$text[24] = 'Position';
$text[25] = '\'Ne pas afficher\' crée une page orpheline non accessible par le biais des menus.';
$text[26] = 'Page parent';
$text[27] = 'Une page désactivée n\'est pas cliquable en mode déconnecté, les pages enfants sont visibles et accessibles. La page d\'accueil n\'est pas désactivable.';
$text[28] = 'Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.';
$text[29] = 'Options d\'emplacement avancées';
$text[30] = 'Masquer les pages enfants dans le menu horizontal';
$text[31] = 'Masquer la page et les pages enfants dans le menu d\'une barre latérale';
$text[32] = 'La page est affichée dans un menu horizontal mais pas dans le menu vertical d\'une barre latérale.';
$text[33] = 'Permission et référencement';
$text[34] = 'Groupe requis pour accéder à la page :';
$text[35] = 'Méta-titre';
$text[36] = 'Méta-description';
$text[37] = 'Désactivée';
$text[38] = 'Nouvel onglet';
$text[39] = 'Titre masqué';
$text[40] = 'Fil d\'Ariane';
$typeMenu = $module::$typeMenu;
$modulePosition = $module::$modulePosition;
$pageBlocks = $module::$pageBlocks;
$displayMenu = $module::$displayMenu;
$groupPublics = self::$groupPublics;
$pagesBarId = $module::$pagesBarId;
$pagesNoParentId = $module::$pagesNoParentId;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Duplicate';
$text[3] = 'Delete';
$text[4] = 'OK';
$text[5] = 'General information';
$text[6] = 'Title';
$text[7] = 'Short title';
$text[8] = 'The short title is displayed in the menus. It can be identical to the page title.';
$text[9] = 'If the module is changed, the data of the previous module will be deleted.';
$text[10] = 'Module';
$text[11] = 'Aspect of the link';
$text[12] = 'Select a small image or icon';
$text[13] = 'Icon';
$text[14] = 'In free position add the module by placing [MODULE] at the desired location on your page.';
$text[15] = 'Module position';
$text[16] = 'Layout';
$text[17] = 'Page templates / Sidebar';
$text[18] = 'To set the page as a sidebar, choose the option from the list.';
$text[19] = 'Left sidebar :';
$text[20] = 'Right sidebar :';
$text[21] = 'Content of the vertical menu';
$text[22] = 'By default the menu is displayed AFTER the page content. To position it at a specific location, insert [MENU] into the page content.';
$text[23] = 'Location in the menu';
$text[24] = 'Position';
$text[25] = 'Do not display creates an orphan page that cannot be accessed via the menus.';
$text[26] = 'Parent page';
$text[27] = 'A deactivated page is not clickable in disconnected mode, the child pages are visible and accessible. The home page cannot be disabled.';
$text[28] = 'Displays the parent page name followed by the page name, the title should not be hidden.';
$text[29] = 'Advanced location options';
$text[30] = 'Hide child pages in the horizontal menu';
$text[31] = 'Hide the page and child pages in the sidebar menu';
$text[32] = 'The page is displayed in a horizontal menu but not in the vertical menu of a sidebar.';
$text[33] = 'Permission and referencing';
$text[34] = 'Group required to access the page:';
$text[35] = 'Meta title';
$text[36] = 'Meta description';
$text[37] = 'Disabled';
$text[38] = 'New tab';
$text[39] = 'Title hidden';
$text[40] = 'Breadcrumb';
$typeMenu = $module::$typeMenu_en;
$modulePosition = $module::$modulePosition_en;
$pageBlocks = $module::$pageBlocks_en;
$displayMenu = $module::$displayMenu_en;
$groupPublics = self::$groupPublics_en;
$pagesBarId = $module::$pagesBarId_en;
$pagesNoParentId = $module::$pagesNoParentId_en;
break;
}
?> ?>
<?php echo template::formOpen('pageEditForm'); ?> <script>
var lang_admin = "<?php echo $lang_admin; ?>";
var lang_flatpickr = "<?php echo $lang_flatpickr; ?>";
</script>
<?php
// Inclusion de tinymce
echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/tinymce.min.js' . '"></script>';
echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.js' . '"></script>';
echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.css' . '">';
echo template::formOpen('pageEditForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php $href = helper::baseUrl() . $this->getUrl(2); ?> <?php $href = helper::baseUrl() . $this->getUrl(2); ?>
@ -114,7 +21,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => $href, 'href' => $href,
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_page_view']['edit'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -122,14 +29,14 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/edition', 'href' => 'https://doc.deltacms.fr/edition',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_page_view']['edit'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset2"> <div class="col2 offset2">
<?php echo template::button('pageEditDuplicate', [ <?php echo template::button('pageEditDuplicate', [
'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'], 'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
'value' => $text[2], 'value' => $text['core_page_view']['edit'][2],
'ico' => 'clone' 'ico' => 'clone'
]); ?> ]); ?>
</div> </div>
@ -137,21 +44,21 @@ switch ($val) {
<?php echo template::button('pageEditDelete', [ <?php echo template::button('pageEditDelete', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'], 'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
'value' => $text[3], 'value' => $text['core_page_view']['edit'][3],
'ico' => 'cancel' 'ico' => 'cancel'
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::submit('pageEditSubmit', [ <?php echo template::submit('pageEditSubmit', [
'uniqueSubmission' => true, 'uniqueSubmission' => true,
'value' => $text[4] 'value' => $text['core_page_view']['edit'][4]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block" id="info"> <div class="block" id="info">
<h4><?php echo $text[5]; ?> <h4><?php echo $text['core_page_view']['edit'][5]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/informations-generales" target="_blank"> <a href="https://doc.deltacms.fr/informations-generales" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -161,15 +68,15 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('pageEditTitle', [ <?php echo template::text('pageEditTitle', [
'label' => $text[6], 'label' => $text['core_page_view']['edit'][6],
'value' => $this->getData(['page', $this->getUrl(2), 'title']) 'value' => $this->getData(['page', $this->getUrl(2), 'title'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::text('pageEditShortTitle', [ <?php echo template::text('pageEditShortTitle', [
'label' => $text[7], 'label' => $text['core_page_view']['edit'][7],
'value' => $this->getData(['page', $this->getUrl(2), 'shortTitle']), 'value' => $this->getData(['page', $this->getUrl(2), 'shortTitle']),
'help' => $text[8] 'help' => $text['core_page_view']['edit'][8]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
@ -177,8 +84,8 @@ switch ($val) {
<div class="col9"> <div class="col9">
<?php echo template::hidden('pageEditModuleRedirect'); ?> <?php echo template::hidden('pageEditModuleRedirect'); ?>
<?php echo template::select('pageEditModuleId', $module::$moduleIds, [ <?php echo template::select('pageEditModuleId', $module::$moduleIds, [
'help' => $text[9], 'help' => $text['core_page_view']['edit'][9],
'label' => $text[10], 'label' => $text['core_page_view']['edit'][10],
'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId']) 'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId'])
]); ?> ]); ?>
<?php echo template::hidden('pageEditModuleIdOld',['value' => $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?> <?php echo template::hidden('pageEditModuleIdOld',['value' => $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?>
@ -202,21 +109,21 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('pageTypeMenu', $typeMenu,[ <?php echo template::select('pageTypeMenu', $typeMenu,[
'label' => $text[11], 'label' => $text['core_page_view']['edit'][11],
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu']) 'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::file('pageIconUrl', [ <?php echo template::file('pageIconUrl', [
'help' => $text[12], 'help' => $text['core_page_view']['edit'][12],
'label' => $text[13], 'label' => $text['core_page_view']['edit'][13],
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) 'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('configModulePosition', $modulePosition,[ <?php echo template::select('configModulePosition', $modulePosition,[
'help' => $text[14], 'help' => $text['core_page_view']['edit'][14],
'label' => $text[15], 'label' => $text['core_page_view']['edit'][15],
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition']) 'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
]); ?> ]); ?>
</div> </div>
@ -236,7 +143,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12" id="pageEditBlockLayout"> <div class="col12" id="pageEditBlockLayout">
<div class="block"> <div class="block">
<h4><?php echo $text[16]; ?> <h4><?php echo $text['core_page_view']['edit'][16]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/mise-en-page" target="_blank"> <a href="https://doc.deltacms.fr/mise-en-page" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -249,8 +156,8 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::select('pageEditBlock', $pageBlocks, [ <?php echo template::select('pageEditBlock', $pageBlocks, [
'label' => $text[17], 'label' => $text['core_page_view']['edit'][17],
'help' => $text[18], 'help' => $text['core_page_view']['edit'][18],
'selected' => $this->getData(['page', $this->getUrl(2) , 'block']) 'selected' => $this->getData(['page', $this->getUrl(2) , 'block'])
]); ?> ]); ?>
</div> </div>
@ -263,8 +170,8 @@ switch ($val) {
'value' => $this->getData(['page', $this->getUrl(2), 'barLeft']) 'value' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
]); ?> ]); ?>
<?php else: ?> <?php else: ?>
<?php echo template::select('pageEditBarLeft', $pagesBarId, [ <?php echo template::select('pageEditBarLeft', $module::$pagesBarId, [
'label' => $text[19], 'label' => $text['core_page_view']['edit'][19],
'selected' => $this->getData(['page', $this->getUrl(2), 'barLeft']) 'selected' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
]); ?> ]); ?>
<?php endif; ?> <?php endif; ?>
@ -273,15 +180,15 @@ switch ($val) {
'value' => $this->getData(['page', $this->getUrl(2), 'barRight']) 'value' => $this->getData(['page', $this->getUrl(2), 'barRight'])
]); ?> ]); ?>
<?php else: ?> <?php else: ?>
<?php echo template::select('pageEditBarRight', $pagesBarId, [ <?php echo template::select('pageEditBarRight', $module::$pagesBarId, [
'label' => $text[20], 'label' => $text['core_page_view']['edit'][20],
'selected' => $this->getData(['page', $this->getUrl(2), 'barRight']) 'selected' => $this->getData(['page', $this->getUrl(2), 'barRight'])
]); ?> ]); ?>
<?php endif; ?> <?php endif; ?>
<?php echo template::select('pageEditDisplayMenu', $displayMenu, [ <?php echo template::select('pageEditDisplayMenu', $displayMenu, [
'label' => $text[21], 'label' => $text['core_page_view']['edit'][21],
'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']), 'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']),
'help' => $text[22] 'help' => $text['core_page_view']['edit'][22]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -292,7 +199,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12" id="pageEditMenu"> <div class="col12" id="pageEditMenu">
<div class="block"> <div class="block">
<h4><?php echo $text[23]; ?> <h4><?php echo $text['core_page_view']['edit'][23]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/emplacement-dans-le-menu" target="_blank"> <a href="https://doc.deltacms.fr/emplacement-dans-le-menu" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -303,8 +210,8 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('pageEditPosition', [], [ <?php echo template::select('pageEditPosition', [], [
'label' => $text[24], 'label' => $text['core_page_view']['edit'][24],
'help' => $text[25] 'help' => $text['core_page_view']['edit'][25]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
@ -313,8 +220,8 @@ switch ($val) {
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId']) 'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
]); ?> ]); ?>
<?php else: ?> <?php else: ?>
<?php echo template::select('pageEditParentPageId', $pagesNoParentId, [ <?php echo template::select('pageEditParentPageId', $module::$pagesNoParentId, [
'label' => $text[26], 'label' => $text['core_page_view']['edit'][26],
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId']) 'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
]); ?> ]); ?>
<?php endif; ?> <?php endif; ?>
@ -323,27 +230,27 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditDisable', true, $text[37], [ <?php echo template::checkbox('pageEditDisable', true, $text['core_page_view']['edit'][37], [
'checked' => $this->getData(['page', $this->getUrl(2), 'disable']), 'checked' => $this->getData(['page', $this->getUrl(2), 'disable']),
'help' => $text[27] 'help' => $text['core_page_view']['edit'][27]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditTargetBlank', true, $text[38], [ <?php echo template::checkbox('pageEditTargetBlank', true, $text['core_page_view']['edit'][38], [
'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank']) 'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditHideTitle', true, $text[39], [ <?php echo template::checkbox('pageEditHideTitle', true, $text['core_page_view']['edit'][39], [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle']) 'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditbreadCrumb', true, $text[40], [ <?php echo template::checkbox('pageEditbreadCrumb', true, $text['core_page_view']['edit'][40], [
'checked' => $this->getData(['page', $this->getUrl(2), 'breadCrumb']), 'checked' => $this->getData(['page', $this->getUrl(2), 'breadCrumb']),
'help' => $text[28] 'help' => $text['core_page_view']['edit'][28]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -354,7 +261,7 @@ switch ($val) {
<div class='row' id="pageEditAdvancedWrapper"> <div class='row' id="pageEditAdvancedWrapper">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[29]; ?> <h4><?php echo $text['core_page_view']['edit'][29]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/options-d-emplacement-avancees" target="_blank"> <a href="https://doc.deltacms.fr/options-d-emplacement-avancees" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -364,14 +271,14 @@ switch ($val) {
<div class="blockContainer"> <div class="blockContainer">
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditHideMenuChildren', true, $text[30], [ <?php echo template::checkbox('pageEditHideMenuChildren', true, $text['core_page_view']['edit'][30], [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuChildren']) 'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuChildren'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditHideMenuSide', true, $text[31] , [ <?php echo template::checkbox('pageEditHideMenuSide', true, $text['core_page_view']['edit'][31] , [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuSide']), 'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuSide']),
'help' => $text[32] 'help' => $text['core_page_view']['edit'][32]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -382,7 +289,7 @@ switch ($val) {
<div class='row' id="pageEditSeoWrapper"> <div class='row' id="pageEditSeoWrapper">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[33]; ?> <h4><?php echo $text['core_page_view']['edit'][33]; ?>
<span id="specialeHelpButton" class="helpDisplayButton"> <span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/permission-et-referencement" target="_blank"> <a href="https://doc.deltacms.fr/permission-et-referencement" target="_blank">
<?php echo template::ico('help', 'left');?> <?php echo template::ico('help', 'left');?>
@ -393,17 +300,17 @@ switch ($val) {
<div class="row"> <div class="row">
<div class='col6'> <div class='col6'>
<?php echo template::select('pageEditGroup', $groupPublics, [ <?php echo template::select('pageEditGroup', $groupPublics, [
'label' => $text[34], 'label' => $text['core_page_view']['edit'][34],
'selected' => $this->getData(['page', $this->getUrl(2), 'group']) 'selected' => $this->getData(['page', $this->getUrl(2), 'group'])
]); ?> ]); ?>
</div> </div>
<div class='col12'> <div class='col12'>
<?php echo template::text('pageEditMetaTitle', [ <?php echo template::text('pageEditMetaTitle', [
'label' => $text[35], 'label' => $text['core_page_view']['edit'][35],
'value' => $this->getData(['page', $this->getUrl(2), 'metaTitle']) 'value' => $this->getData(['page', $this->getUrl(2), 'metaTitle'])
]); ?> ]); ?>
<?php echo template::textarea('pageEditMetaDescription', [ <?php echo template::textarea('pageEditMetaDescription', [
'label' => $text[36], 'label' => $text['core_page_view']['edit'][36],
//'maxlength' => '500', //'maxlength' => '500',
'value' => $this->getData(['page', $this->getUrl(2), 'metaDescription']) 'value' => $this->getData(['page', $this->getUrl(2), 'metaDescription'])
]); ?> ]); ?>
@ -414,3 +321,8 @@ switch ($val) {
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_page_view']['edit'][41].'"'; ?>;
var text1Confirm = <?php echo '"'.$text['core_page_view']['edit'][42].'"'; ?>;
var text2Confirm = <?php echo '"'.$text['core_page_view']['edit'][43].'"'; ?>;
</script>

View File

@ -0,0 +1,5 @@
<?php
// Lexique du module du coeur Sitemap en anglais
$text['core_sitemap']['index'][0] = 'Site map';
?>

View File

@ -0,0 +1,5 @@
<?php
// Lexique du module du coeur Sitemap en français
$text['core_sitemap']['index'][0] = 'Plan du site';
?>

View File

@ -29,16 +29,8 @@ class sitemap extends common
*/ */
public function index() { public function index() {
// Lexique // Lexique
$text = []; include('./core/module/sitemap/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_sitemap.php');
$val = $this->getData(['config', 'i18n', 'langBase']);
switch ($val) {
case 'fr' :
$text[0] = 'Plan du site';
break;
default :
$text[0] = 'Site map';
break;
}
$items = '<ul>'; $items = '<ul>';
foreach ($this->getHierarchy(null, true, null) as $parentId => $childIds) { foreach ($this->getHierarchy(null, true, null) as $parentId => $childIds) {
$items .= ' <li>'; $items .= ' <li>';
@ -118,7 +110,7 @@ class sitemap extends common
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_sitemap']['index'][0],
'view' => 'index' 'view' => 'index'
]); ]);
} }

View File

@ -0,0 +1,515 @@
<?php
// Lexique du module du coeur Theme en anglais
$text['core_theme_view']['addFonts'][0] = 'Back';
$text['core_theme_view']['addFonts'][1] = 'Help';
$text['core_theme_view']['addFonts'][2] = 'Save';
$text['core_theme_view']['addFonts'][3] = 'New font settings';
$text['core_theme_view']['addFonts'][4] = 'Name';
$text['core_theme_view']['addFonts'][5] = 'Font name, upper case and spaces allowed';
$text['core_theme_view']['addFonts'][6] = 'Link to a font file';
$text['core_theme_view']['addFonts'][7] = 'The font file is sent, or not, from a local repository';
$text['core_theme_view']['addFonts'][8] = 'You must first upload the font file, ttf, woff, otf, eot or woff2 to the fonts folder with the file manager';
$text['core_theme_view']['addFonts'][9] = 'Select a font';
$text['core_theme_view']['addFonts'][10] = 'License';
$text['core_theme_view']['addFonts'][11] = 'License type of the font';
$text['core_theme_view']['addFonts'][12] = "Are you sure you want to delete this font ?";
$text['core_theme_view']['admin'][0] = 'Back';
$text['core_theme_view']['admin'][1] = 'Help';
$text['core_theme_view']['admin'][3] = 'Reset';
$text['core_theme_view']['admin'][4] = 'Validate';
$text['core_theme_view']['admin'][5] = 'Colors';
$text['core_theme_view']['admin'][6] = 'The colour visible in the absence of an image.<br /> The horizontal slider adjusts the level of transparency.';
$text['core_theme_view']['admin'][7] = 'The colour visible in the absence of an image.<br /> The horizontal slider adjusts the level of transparency. The text colour is automatic.';
$text['core_theme_view']['admin'][8] = 'Background';
$text['core_theme_view']['admin'][9] = 'Title';
$text['core_theme_view']['admin'][10] = 'Text';
$text['core_theme_view']['admin'][11] = 'Field background';
$text['core_theme_view']['admin'][12] = 'Field border';
$text['core_theme_view']['admin'][13] = 'Help button';
$text['core_theme_view']['admin'][14] = 'Back button';
$text['core_theme_view']['admin'][15] = 'Standard button';
$text['core_theme_view']['admin'][16] = 'Delete button';
$text['core_theme_view']['admin'][17] = 'Validation button';
$text['core_theme_view']['admin'][18] = 'Text formatting';
$text['core_theme_view']['admin'][19] = 'Text font';
$text['core_theme_view']['admin'][20] = 'Size';
$text['core_theme_view']['admin'][21] = 'Title font';
$text['core_theme_view']['admin'][22] = "Are you sure you want to reset the administration theme to its original state ?";
$text['core_theme_view']['advanced'][0] = 'Back';
$text['core_theme_view']['advanced'][1] = 'Help';
$text['core_theme_view']['advanced'][2] = 'Reset';
$text['core_theme_view']['advanced'][3] = 'Save';
$text['core_theme_view']['advanced'][4] = "Are you sure you want to reset the advanced customization to its original state ?";
$text['core_theme_view']['body'][0] = 'Back';
$text['core_theme_view']['body'][1] = 'Help';
$text['core_theme_view']['body'][2] = 'Save';
$text['core_theme_view']['body'][3] = 'Colors';
$text['core_theme_view']['body'][4] = 'Color visible in the absence of an image.<br />The horizontal slider adjusts the level of transparency.';
$text['core_theme_view']['body'][5] = 'Background';
$text['core_theme_view']['body'][6] = 'The horizontal slider sets the transparency level';
$text['core_theme_view']['body'][7] = 'Top icon background';
$text['core_theme_view']['body'][8] = 'Top icon';
$text['core_theme_view']['body'][9] = 'Image';
$text['core_theme_view']['body'][10] = 'Select an image';
$text['core_theme_view']['body'][11] = 'Background';
$text['core_theme_view']['body'][12] = 'Repeat';
$text['core_theme_view']['body'][13] = 'Position';
$text['core_theme_view']['body'][14] = 'Scroll';
$text['core_theme_view']['body'][15] = 'Size';
$text['core_theme_view']['editFonts'][0] = 'Back';
$text['core_theme_view']['editFonts'][1] = 'Help';
$text['core_theme_view']['editFonts'][2] = 'Save';
$text['core_theme_view']['editFonts'][3] = 'Font settings';
$text['core_theme_view']['editFonts'][4] = 'Selected font name';
$text['core_theme_view']['editFonts'][5] = 'Value not editable';
$text['core_theme_view']['editFonts'][6] = 'Link to a font file';
$text['core_theme_view']['editFonts'][7] = 'The font file is sent, or not, from a local repository';
$text['core_theme_view']['editFonts'][8] = 'You must first upload the font file, ttf, woff, otf, eot or woff2 to the fonts folder with the file manager';
$text['core_theme_view']['editFonts'][9] = 'Select a font';
$text['core_theme_view']['editFonts'][10] = 'License';
$text['core_theme_view']['editFonts'][11] = 'License type of the font';
$text['core_theme_view']['fonts'][0] = 'Back';
$text['core_theme_view']['fonts'][1] = 'Help';
$text['core_theme_view']['fonts'][2] = 'Police';
$text['core_theme_view']['fonts'][3] = 'Username';
$text['core_theme_view']['fonts'][4] = 'Name';
$text['core_theme_view']['fonts'][5] = 'File';
$text['core_theme_view']['fonts'][6] = 'Preview';
$text['core_theme_view']['fonts'][7] = "Are you sure you want to delete this font ?";
$text['core_theme_view']['footer'][0] = 'Back';
$text['core_theme_view']['footer'][1] = 'Help';
$text['core_theme_view']['footer'][2] = 'Save';
$text['core_theme_view']['footer'][3] = 'Settings';
$text['core_theme_view']['footer'][4] = 'Position';
$text['core_theme_view']['footer'][5] = 'Vertical margins';
$text['core_theme_view']['footer'][6] = 'Colours';
$text['core_theme_view']['footer'][7] = 'Text';
$text['core_theme_view']['footer'][8] = 'Background';
$text['core_theme_view']['footer'][9] = 'When the footer is inside the site, the transparent background shows the page background. When the footer is outside the site, the transparent background shows the site background';
$text['core_theme_view']['footer'][10] = 'Content';
$text['core_theme_view']['footer'][11] = 'Powered by';
$text['core_theme_view']['footer'][12] = 'Displays this in front of DeltaCMS';
$text['core_theme_view']['footer'][13] = 'Version';
$text['core_theme_view']['footer'][14] = 'Displays the version number after DeltaCMS';
$text['core_theme_view']['footer'][15] = 'Site map';
$text['core_theme_view']['footer'][16] = 'Cookies';
$text['core_theme_view']['footer'][17] = 'Cookie information message, available if cookie acceptance is enabled';
$text['core_theme_view']['footer'][18] = 'Login link';
$text['core_theme_view']['footer'][19] = 'To limit hacking attempts, save the login page as a favourite and disable this option';
$text['core_theme_view']['footer'][20] = 'Member bar';
$text['core_theme_view']['footer'][21] = 'Displays account management and logout icons for simple logged-in members, does not apply to editors and administrators';
$text['core_theme_view']['footer'][22] = 'Legal notice';
$text['core_theme_view']['footer'][23] = 'Option active if a page has been selected';
$text['core_theme_view']['footer'][24] = 'None';
$text['core_theme_view']['footer'][25] = 'Legal page ';
$text['core_theme_view']['footer'][26] = 'Search';
$text['core_theme_view']['footer'][27] = 'Option active if a page has been selected';
$text['core_theme_view']['footer'][28] = 'Search page ';
$text['core_theme_view']['footer'][29] = 'Options same as site configuration';
$text['core_theme_view']['footer'][30] = 'Text formatting';
$text['core_theme_view']['footer'][31] = 'Font';
$text['core_theme_view']['footer'][32] = 'Size';
$text['core_theme_view']['footer'][33] = 'Proportional to that defined in the site';
$text['core_theme_view']['footer'][34] = 'Style';
$text['core_theme_view']['footer'][35] = 'Character case';
$text['core_theme_view']['footer'][36] = 'Layout';
$text['core_theme_view']['footer'][37] = 'Breakdown';
$text['core_theme_view']['footer'][38] = 'Custom content';
$text['core_theme_view']['footer'][39] = 'Position';
$text['core_theme_view']['footer'][40] = 'Alignment';
$text['core_theme_view']['footer'][41] = 'Social networks';
$text['core_theme_view']['footer'][42] = 'Information';
$text['core_theme_view']['footer'][43] = 'Alignment with content';
$text['core_theme_view']['footer'][44] = 'Fixed footer';
$text['core_theme_view']['footer'][45] = 'Customised content';
$text['core_theme_view']['footer'][46] = "{
4: {'hide' : 'Hidden', 'left' : 'Top', 'center' : 'Middle', 'right' : 'Bottom'} ,
3: {'hide': 'Hidden', 'left': 'Left', 'center': 'Center', 'right': 'Right'} ,
2: {'hide': 'Hidden', 'left': 'Left', 'right': 'Right'} ,
1: {'hide': 'Hidden', 'center': 'Display'}
}";
$text['core_theme_view']['header'][0] = 'Back';
$text['core_theme_view']['header'][1] = 'Help';
$text['core_theme_view']['header'][2] = 'Settings';
$text['core_theme_view']['header'][3] = 'Position';
$text['core_theme_view']['header'][4] = 'Type of content';
$text['core_theme_view']['header'][5] = 'Maximum height';
$text['core_theme_view']['header'][6] = 'The maximum height is 600 pixels, even if the selected image size is larger. <br/>When the adaptation is set to Responsive, the height decreases in proportion to the width.';
$text['core_theme_view']['header'][7] = 'Width';
$text['core_theme_view']['header'][8] = 'Hide banner in small screen';
$text['core_theme_view']['header'][9] = 'Align banner with content';
$text['core_theme_view']['header'][10] = 'Colors';
$text['core_theme_view']['header'][11] = 'Horizontal slider sets transparency level';
$text['core_theme_view']['header'][12] = 'Background';
$text['core_theme_view']['header'][13] = 'Horizontal slider sets transparency level';
$text['core_theme_view']['header'][14] = 'Text';
$text['core_theme_view']['header'][15] = 'Title formatting';
$text['core_theme_view']['header'][16] = 'Hide site title';
$text['core_theme_view']['header'][17] = 'Font';
$text['core_theme_view']['header'][18] = 'Size';
$text['core_theme_view']['header'][19] = 'Style';
$text['core_theme_view']['header'][20] = 'Character case';
$text['core_theme_view']['header'][21] = 'Proportional to that defined in the site';
$text['core_theme_view']['header'][22] = 'Content alignment';
$text['core_theme_view']['header'][23] = 'Wallpaper';
$text['core_theme_view']['header'][24] = 'Select an image with the following recommended dimensions';
$text['core_theme_view']['header'][25] = 'Image';
$text['core_theme_view']['header'][26] = 'Repeat';
$text['core_theme_view']['header'][27] = 'Adaptation';
$text['core_theme_view']['header'][28] = 'Responsive modes allow proportional dimensions to be maintained.<br/>Cover for an image larger than the banner, Contain for a smaller image. The Auto and Stretch modes do not change the height of the banner.';
$text['core_theme_view']['header'][29] = 'Clickable banner';
$text['core_theme_view']['header'][30] = 'Width : ';
$text['core_theme_view']['header'][31] = ' | Height : ';
$text['core_theme_view']['header'][32] = ' | ratio : ';
$text['core_theme_view']['header'][33] = 'Custom content';
$text['core_theme_view']['header'][34] ='Save';
$text['core_theme_view']['header'][35] = "Height of the selected image (";
$text['core_theme_view']['index'][0] = 'Click on an area to access its customisation options. You can also display hidden areas using the button below';
$text['core_theme_view']['index'][1] = 'Home';
$text['core_theme_view']['index'][2] = 'Help';
$text['core_theme_view']['index'][3] = 'Hidden areas';
$text['core_theme_view']['index'][4] = 'Management';
$text['core_theme_view']['index'][5] = 'Administration';
$text['core_theme_view']['index'][6] = 'CSS Editor';
$text['core_theme_view']['index'][7] = 'Fonts';
$text['core_theme_view']['index'][8] = 'Click on a zone to access its customisation options';
$text['core_theme_view']['manage'][0] = 'Back';
$text['core_theme_view']['manage'][1] = 'Help';
$text['core_theme_view']['manage'][2] = 'Reset';
$text['core_theme_view']['manage'][3] = 'Apply';
$text['core_theme_view']['manage'][4] = 'Install archived theme (site or admin)';
$text['core_theme_view']['manage'][5] = 'ZIP archive:';
$text['core_theme_view']['manage'][6] = 'Save theme in ';
$text['core_theme_view']['manage'][7] = 'files';
$text['core_theme_view']['manage'][8] = ' of the site';
$text['core_theme_view']['manage'][9] = 'Site theme';
$text['core_theme_view']['manage'][10] = 'Administration theme';
$text['core_theme_view']['manage'][11] = 'Download theme';
$text['core_theme_view']['manage'][12] = 'Site theme';
$text['core_theme_view']['manage'][13] = 'Administration theme';
$text['core_theme_view']['manage'][14] = "Are you sure you want to reset the site theme to its original state ?";
$text['core_theme_view']['menu'][0] = 'Back';
$text['core_theme_view']['menu'][1] = 'Help';
$text['core_theme_view']['menu'][2] = 'Save';
$text['core_theme_view']['menu'][3] = 'Settings';
$text['core_theme_view']['menu'][4] = 'Position';
$text['core_theme_view']['menu'][5] = 'Width';
$text['core_theme_view']['menu'][6] = 'Rounded edges';
$text['core_theme_view']['menu'][7] = 'Around the selected page';
$text['core_theme_view']['menu'][8] = 'Height';
$text['core_theme_view']['menu'][9] = 'Alignment of content';
$text['core_theme_view']['menu'][10] = 'Align menu with content';
$text['core_theme_view']['menu'][11] = 'Fixed menu';
$text['core_theme_view']['menu'][12] = 'Contents';
$text['core_theme_view']['menu'][13] = 'Login link';
$text['core_theme_view']['menu'][14] = 'Member bar';
$text['core_theme_view']['menu'][15] = 'Account management and logout icons. Only for logged in members';
$text['core_theme_view']['menu'][16] = 'Display in burger menu';
$text['core_theme_view']['menu'][17] = 'The burger menu replaces the full menu when the screen width is not sufficient';
$text['core_theme_view']['menu'][18] = 'Select an image, its dimensions will be adapted automatically';
$text['core_theme_view']['menu'][19] = 'Logo of the burger menu';
$text['core_theme_view']['menu'][20] = 'Colors';
$text['core_theme_view']['menu'][21] = 'The horizontal slider sets the transparency level';
$text['core_theme_view']['menu'][22] = 'Text';
$text['core_theme_view']['menu'][23] = 'Horizontal slider sets transparency level';
$text['core_theme_view']['menu'][24] = 'Background';
$text['core_theme_view']['menu'][25] = 'Submenu background';
$text['core_theme_view']['menu'][26] = 'Text active page';
$text['core_theme_view']['menu'][27] = 'The background colour of the active page can be set automatically or according to a defined colour, such as the background colour of the pages.';
$text['core_theme_view']['menu'][28] = 'Background colour of the page selected in the menu.<br>The horizontal slider sets the transparency level.';
$text['core_theme_view']['menu'][29] = 'Active page background';
$text['core_theme_view']['menu'][30] = 'Text formatting';
$text['core_theme_view']['menu'][31] = 'Font';
$text['core_theme_view']['menu'][32] = 'Size';
$text['core_theme_view']['menu'][33] = 'Proportional to that defined in the site';
$text['core_theme_view']['menu'][34] = 'Style';
$text['core_theme_view']['menu'][35] = 'Character case';
$text['core_theme_view']['menu'][36] = 'Automatic background color';
$text['core_theme_view']['site'][0] = 'Back';
$text['core_theme_view']['site'][1] = 'Help';
$text['core_theme_view']['site'][2] = 'Save';
$text['core_theme_view']['site'][3] = 'Settings';
$text['core_theme_view']['site'][4] = 'Site width';
$text['core_theme_view']['site'][5] = 'Rounding of corners';
$text['core_theme_view']['site'][6] = 'Shadow on site edges';
$text['core_theme_view']['site'][7] = 'No margin above and below site';
$text['core_theme_view']['site'][8] = 'Colors';
$text['core_theme_view']['site'][9] = 'Horizontal slider sets transparency level';
$text['core_theme_view']['site'][10] = 'Background';
$text['core_theme_view']['site'][11] = 'Text';
$text['core_theme_view']['site'][12] = 'Title';
$text['core_theme_view']['site'][13] = 'Links';
$text['core_theme_view']['site'][14] = 'Color visible in the absence of an image';
$text['core_theme_view']['site'][15] = 'Background of blocks';
$text['core_theme_view']['site'][16] = 'Block border';
$text['core_theme_view']['site'][17] = 'Block corner rounding';
$text['core_theme_view']['site'][18] = 'Shadow on block edges';
$text['core_theme_view']['site'][19] = 'Block title background';
$text['core_theme_view']['site'][20] = 'Buttons';
$text['core_theme_view']['site'][21] = 'Title';
$text['core_theme_view']['site'][22] = 'Subtitle';
$text['core_theme_view']['site'][23] = 'Button';
$text['core_theme_view']['site'][24] = 'Block';
$text['core_theme_view']['site'][25] = 'Text formatting';
$text['core_theme_view']['site'][26] = 'Font';
$text['core_theme_view']['site'][27] = 'Style';
$text['core_theme_view']['site'][28] = 'Character case';
$text['core_theme_view']['site'][29] = 'Size';
$text['core_theme_view']['site'][30] = 'Reference size for the site. The font sizes of the banner, menu and footer are proportional to this size';
$text['core_theme_view']['site'][31] = 'Title formatting';
$text['core_theme']['admin'][0] = 'Saved changes';
$text['core_theme']['admin'][1] = 'Administration';
$text['core_theme']['advanced'][0] = 'Saved changes';
$text['core_theme']['advanced'][1] = 'CSS Editor';
$text['core_theme']['fonts'][0] = 'Font management';
$text['core_theme']['editFonts'][0] = 'Select file...';
$text['core_theme']['editFonts'][1] = 'You need to select a file';
$text['core_theme']['editFonts'][2] = 'Changes saved';
$text['core_theme']['editFonts'][3] = 'No file in folder';
$text['core_theme']['editFonts'][4] = 'File';
$text['core_theme']['editFonts'][5] = 'Non-existent';
$text['core_theme']['editFonts'][6] = 'Editing a font';
$text['core_theme']['deleteFonts'][0] = 'Deleted font';
$text['core_theme']['addFonts'][0] = 'Select file...';
$text['core_theme']['addFonts'][1] = 'You need to select a file';
$text['core_theme']['addFonts'][2] = 'Changes saved';
$text['core_theme']['addFonts'][3] = 'No file in folder';
$text['core_theme']['addFonts'][4] = 'File';
$text['core_theme']['addFonts'][5] = 'Non-existent';
$text['core_theme']['addFonts'][6] = 'Adding a font';
$text['core_theme']['body'][0] = 'Changes saved';
$text['core_theme']['body'][1] = 'Customise background';
$text['core_theme']['footer'][0] = 'Select at least one content to display';
$text['core_theme']['footer'][1] = 'Saved changes';
$text['core_theme']['footer'][2] = 'Customise footer';
$text['core_theme']['header'][0] = 'Changes saved';
$text['core_theme']['header'][1] = 'Customise banner';
$text['core_theme']['index'][0] = 'Theme customisation';
$text['core_theme']['menu'][0] = 'Saved changes';
$text['core_theme']['menu'][1] = 'Customise menu';
$text['core_theme']['reset'][0] = 'Reset performed';
$text['core_theme']['reset'][1] = 'Incorrect token';
$text['core_theme']['site'][0] = 'Changes saved';
$text['core_theme']['site'][1] = 'Site customisation';
$text['core_theme']['manage'][0] = 'Theme management';
$text['core_theme']['import'][0] = 'The theme has been imported';
$text['core_theme']['import'][1] = 'Error while extracting, check permissions';
$text['core_theme']['import'][2] = 'This is not a theme archive!';
$text['core_theme']['import'][3] = 'Unable to open the archive';
$text['core_theme']['import'][4] = 'Archive not specified or not found';
$text['core_theme']['save'][0] = 'Archive ';
$text['core_theme']['save'][1] = ' successfully saved';
// $text[
// Passage de la langue d'administration à Tinymce
$lang_admin = 'en_GB';
// Selects
$aligns = [
'left' => 'Left',
'center' => 'Center',
'right' => 'Right'
];
$attachments = [
'scroll' => 'Standard',
'fixed' => 'Fixed'
];
$containerWides = [
'container' => 'Limited to the site',
'none' => 'Extended to the page'
];
$footerblocks = [
1 => [
'hide' => 'Hidden',
'center' => 'Affiché' ],
2 => [
'hide' => 'Hidden',
'left' => 'Left',
'right' => 'Right' ],
3 => [
'hide' => 'Hidden',
'left' => 'Left',
'center' => 'Center',
'right' => 'Right' ],
4 => [
'hide' => 'Hidden',
'left' => 'Top',
'center' => 'Middle',
'right' => 'Bottom' ]
];
$fontWeights = [
'normal' => 'Thin',
'bold' => 'Bold'
];
$footerHeights = [
'0px' => 'Nome (0px)',
'5px' => 'Very small (5px)',
'10px' => 'small (10px)',
'15px' => 'Medium (15px)',
'20px' => 'Large (20px)'
];
$footerPositions = [
'hide' => 'Hidden',
'site' => 'In the site',
'body' => 'Below the site'
];
$footerFontSizes = [
'.8em' => 'Very small (80%)',
'.9em' => 'Small (90%)',
'1em' => 'Standard (100%)',
'1.1em' => 'Medium (110%)',
'1.2em' => 'Large (120%)',
'1.3em' => 'Very large (130%)'
];
$headerFontSizes = [
'1.6em' => 'Very small (160%)',
'1.8em' => 'Small (180%)',
'2em' => 'Medium (200%)',
'2.2em' => 'Large (220%)',
'2.4vmax' => 'Very large (240%)'
];
$headerHeights = [
'unset' => 'Free', // texte dynamique cf header.js.php
'100px' => 'Very small (100px) ',
'150px' => 'Small (150px)',
'200px' => 'Medium (200px)',
'300px' => 'Large (300px)',
'400px' => 'Very large (400px)',
];
$headerPositions = [
'body' => 'Above the site',
'site' => 'In the site',
'hide' => 'Hidden'
];
$headerFeatures = [
'wallpaper' => 'Solid colour or wallpaper',
'feature' => 'Custom content'
];
$imagePositions = [
'top left' => 'Top left',
'top center' => 'Top center',
'top right' => 'Top right',
'center left' => 'Middle left',
'center center' => 'Middle center',
'center right' => 'Middle right',
'bottom left' => 'Bottom left',
'bottom center' => 'Bottom center',
'bottom right' => 'Bottom right'
];
$menuFontSizes = [
'.8em' => 'Very small (80%)',
'.9em' => 'Small (90%)',
'1em' => 'Standard (100%)',
'1.1em' => 'Medium (110%)',
'1.2em' => 'Large (120%)',
'1.3em' => 'Very large (130%)'
];
$menuBurgerFontSizes = [
'1em' => 'Very small (100%)',
'1.2em' => 'Small (120%)',
'1.5em' => 'Standard (150%)',
'1.8em' => 'Medium (180%)',
'2em' => 'Large (200%)',
'2.5em' => 'Very large (250%)'
];
$menuHeights = [
'5px 10px' => 'Very small',
'10px' => 'Small',
'15px 10px' => 'Medium',
'20px 15px' => 'Large',
'25px 15px' => 'Very large'
];
$menuPositionsSite = [
'top' => 'Outside the site',
'site-first' => 'Before the banner',
'site-second' => 'After the banner',
'hide' => 'Hidden'
];
$menuPositionsBody = [
'top' => 'Outside the site',
'body-first' => 'Before the banner',
'body-second' => 'After the banner',
'site' => 'In the site',
'hide' => 'Hidden'
];
$menuRadius = [
'0px' => 'None',
'3px 3px 0px 0px' => 'Very light',
'6px 6px 0px 0px' => 'Light',
'9px 9px 0px 0px' => 'Medium',
'12px 12px 0px 0px' => 'Important',
'15px 15px 0px 0px' => 'Very important'
];
$radius = [
'0px' => 'None',
'5px' => 'Very light',
'10px' => 'Light',
'15px' => 'Medium',
'25px' => 'Important',
'50px' => 'Very important'
];
$repeats = [
'no-repeat' => 'Do not repeat',
'repeat-x' => 'On the horizontal axis',
'repeat-y' => 'On the vertical axis',
'repeat' => 'On both axes'
];
$shadows = [
'0px 0px 0px' => 'None',
'1px 1px 5px' => 'Very light',
'1px 1px 10px' => 'Light',
'1px 1px 15px' => 'Medium',
'1px 1px 25px' => 'Importante',
'1px 1px 50px' => 'Very importante'
];
$blockShadows = [
'0px 0px 0px' => 'None',
'1px 1px 2px' => 'Very light',
'2px 2px 4px' => 'Light',
'3px 3px 6px' => 'Medium',
'5px 5px 10px' => 'Important',
'10px 10px 20px' => 'Very important'
];
$bodySizes = [
'auto' => 'Automatic',
'100% 100%' => 'Stretched image (100% 100%)',
'cover' => 'Responsive (cover)',
'contain' => 'Responsive (contain)'
];
$textTransforms = [
'none' => 'Standard',
'lowercase' => 'Lowercase',
'uppercase' => 'Upper case',
'capitalize' => 'Capitalize every word'
];
$siteWidths = [
'750px' => 'Small (750 pixels)',
'960px' => 'Medium (960 pixels)',
'1170px' => 'Large (1170 pixels)',
'100%' => 'Fluide (100%)'
];
$headerWide = [
'auto auto' => 'Automatic',
'100% 100%' => 'Stretched image (100% 100%)',
'cover' => 'Responsive (cover)',
'contain' => 'Responsive (contain)'
];
$footerTemplate = [
'1' => 'One column',
'2' => 'Two columns : 1/2 - 1/2',
'3' => 'Three columns : 1/3 - 1/3 - 1/3',
'4' => 'Three rows on top of each'
];
$burgerContent = [
'none' => 'None',
'title' => 'Site title',
'logo' => 'Site logo'
];
$typeAddFont = [
'none' => 'None',
'file' => 'Local file'
//'link' => 'Fichier externe avec link',
//'import' => 'Fichier externe avec import'
];
?>

View File

@ -0,0 +1,514 @@
<?php
// Lexique du module du coeur Theme en français
$text['core_theme_view']['addFonts'][0] = 'Retour';
$text['core_theme_view']['addFonts'][1] = 'Aide';
$text['core_theme_view']['addFonts'][2] = 'Enregistrer';
$text['core_theme_view']['addFonts'][3] = 'Paramètres de la nouvelle police';
$text['core_theme_view']['addFonts'][4] = 'Nom';
$text['core_theme_view']['addFonts'][5] = 'Nom de la police, majuscules et espaces autorisés';
$text['core_theme_view']['addFonts'][6] = 'Liaison avec un fichier de police';
$text['core_theme_view']['addFonts'][7] = 'Le fichier de police est envoyé, ou pas, depuis un dépôt local';
$text['core_theme_view']['addFonts'][8] = 'Vous devez au préalable téléverser le fichier de police, ttf, woff, otf, eot ou woff2 dans le dossier fonts avec le gestionnaire de fichiers.';
$text['core_theme_view']['addFonts'][9] = 'Sélection d\'une police';
$text['core_theme_view']['addFonts'][10] = 'License';
$text['core_theme_view']['addFonts'][11] = 'Type de license de la police';
$text['core_theme_view']['addFonts'][12] = "Êtes-vous sûr de vouloir supprimer cette police ?";
$text['core_theme_view']['admin'][0] = 'Retour';
$text['core_theme_view']['admin'][1] = 'Aide';
$text['core_theme_view']['admin'][3] = 'Réinitialiser';
$text['core_theme_view']['admin'][4] = 'Valider';
$text['core_theme_view']['admin'][5] = 'Couleurs';
$text['core_theme_view']['admin'][6] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['admin'][7] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.';
$text['core_theme_view']['admin'][8] = 'Arrière-plan';
$text['core_theme_view']['admin'][9] = 'Titres';
$text['core_theme_view']['admin'][10] = 'Texte';
$text['core_theme_view']['admin'][11] = 'Arrière-plan des champs';
$text['core_theme_view']['admin'][12] = 'Bordure des champs';
$text['core_theme_view']['admin'][13] = 'Bouton Aide';
$text['core_theme_view']['admin'][14] = 'Bouton retour';
$text['core_theme_view']['admin'][15] = 'Bouton standard';
$text['core_theme_view']['admin'][16] = 'Bouton effacement';
$text['core_theme_view']['admin'][17] = 'Bouton validation';
$text['core_theme_view']['admin'][18] = 'Mise en forme du texte';
$text['core_theme_view']['admin'][19] = 'Police du texte';
$text['core_theme_view']['admin'][20] = 'Taille';
$text['core_theme_view']['admin'][21] = 'Police des titres';
$text['core_theme_view']['admin'][22] = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine le thème de l\'administration ?";
$text['core_theme_view']['advanced'][0] = 'Retour';
$text['core_theme_view']['advanced'][1] = 'Aide';
$text['core_theme_view']['advanced'][2] = 'Réinitialiser';
$text['core_theme_view']['advanced'][3] = 'Enregistrer';
$text['core_theme_view']['advanced'][4] = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine la personnalisation avancée ?";
$text['core_theme_view']['body'][0] = 'Retour';
$text['core_theme_view']['body'][1] = 'Aide';
$text['core_theme_view']['body'][2] = 'Enregistrer';
$text['core_theme_view']['body'][3] = 'Couleurs';
$text['core_theme_view']['body'][4] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['body'][5] = 'Arrière-plan';
$text['core_theme_view']['body'][6] = 'Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['body'][7] = 'Fond icône haut de page';
$text['core_theme_view']['body'][8] = 'Icône haut de page';
$text['core_theme_view']['body'][9] = 'Image';
$text['core_theme_view']['body'][10] = 'Sélectionner une image';
$text['core_theme_view']['body'][11] = 'Arrière-plan';
$text['core_theme_view']['body'][12] = 'Répétition';
$text['core_theme_view']['body'][13] = 'Position';
$text['core_theme_view']['body'][14] = 'Défilement';
$text['core_theme_view']['body'][15] = 'Taille';
$text['core_theme_view']['editFonts'][0] = 'Retour';
$text['core_theme_view']['editFonts'][1] = 'Aide';
$text['core_theme_view']['editFonts'][2] = 'Enregistrer';
$text['core_theme_view']['editFonts'][3] = 'Paramètres de la police';
$text['core_theme_view']['editFonts'][4] = 'Nom de la police sélectionnée';
$text['core_theme_view']['editFonts'][5] = 'Valeur non modifiable';
$text['core_theme_view']['editFonts'][6] = 'Liaison avec un fichier de police';
$text['core_theme_view']['editFonts'][7] = 'Le fichier de police est envoyé, ou pas, depuis un dépôt local';
$text['core_theme_view']['editFonts'][8] = 'Vous devez au préalable téléverser le fichier de police, ttf, woff, otf, eot ou woff2 dans le dossier fonts avec le gestionnaire de fichiers.';
$text['core_theme_view']['editFonts'][9] = 'Sélection d\'une police';
$text['core_theme_view']['editFonts'][10] = 'License';
$text['core_theme_view']['editFonts'][11] = 'Type de license de la police';
$text['core_theme_view']['fonts'][0] = 'Retour';
$text['core_theme_view']['fonts'][1] = 'Aide';
$text['core_theme_view']['fonts'][2] = 'Police';
$text['core_theme_view']['fonts'][3] = 'Identifiant';
$text['core_theme_view']['fonts'][4] = 'Nom';
$text['core_theme_view']['fonts'][5] = 'Fichier';
$text['core_theme_view']['fonts'][6] = 'Aperçu';
$text['core_theme_view']['fonts'][7] = "Êtes-vous sûr de vouloir supprimer cette police ?";
$text['core_theme_view']['footer'][0] = 'Retour';
$text['core_theme_view']['footer'][1] = 'Aide';
$text['core_theme_view']['footer'][2] = 'Enregistrer';
$text['core_theme_view']['footer'][3] = 'Paramètres';
$text['core_theme_view']['footer'][4] = 'Position';
$text['core_theme_view']['footer'][5] = 'Marges verticales';
$text['core_theme_view']['footer'][6] = 'Couleurs';
$text['core_theme_view']['footer'][7] = 'Texte';
$text['core_theme_view']['footer'][8] = 'Arrière-plan';
$text['core_theme_view']['footer'][9] = 'Quand le pied de page est dans le site, l\'arrière plan transparent montre le fond de la page. Quand le pied de page est hors du site, l\'arrière plan transparent montre le fond du site.';
$text['core_theme_view']['footer'][10] = 'Contenu';
$text['core_theme_view']['footer'][11] = 'Motorisé par';
$text['core_theme_view']['footer'][12] = 'Affiche cette mention devant DeltaCMS';
$text['core_theme_view']['footer'][13] = 'Version';
$text['core_theme_view']['footer'][14] = 'Affiche le numéro de version après DeltaCMS';
$text['core_theme_view']['footer'][15] = 'Plan du site';
$text['core_theme_view']['footer'][16] = 'Cookies';
$text['core_theme_view']['footer'][17] = 'Message d\'information relatif aux cookies, disponible si l\'acceptation des cookies est activé.';
$text['core_theme_view']['footer'][18] = 'Lien de connexion';
$text['core_theme_view']['footer'][19] = 'Pour limiter les tentatives de piratage, enregistrez la page de connexion en favori et désactivez cette option.';
$text['core_theme_view']['footer'][20] = 'Barre du membre';
$text['core_theme_view']['footer'][21] = 'Affiche les icônes de gestion du compte et de déconnexion des membres simples connectés, ne s\'applique pas aux éditeurs et administrateurs.';
$text['core_theme_view']['footer'][22] = 'Mentions légales';
$text['core_theme_view']['footer'][23] = 'Option active si une page a été sélectionnée.';
$text['core_theme_view']['footer'][24] = 'Aucune';
$text['core_theme_view']['footer'][25] = 'Page "Mentions légales" ';
$text['core_theme_view']['footer'][26] = 'Rechercher';
$text['core_theme_view']['footer'][27] = 'Option active si une page a été sélectionnée.';
$text['core_theme_view']['footer'][28] = 'Page "Rechercher" ';
$text['core_theme_view']['footer'][29] = 'Options identique à la configuration du site';
$text['core_theme_view']['footer'][30] = 'Mise en forme du texte';
$text['core_theme_view']['footer'][31] = 'Police';
$text['core_theme_view']['footer'][32] = 'Taille';
$text['core_theme_view']['footer'][33] = 'Proportionnelle à celle définie dans le site.';
$text['core_theme_view']['footer'][34] = 'Style';
$text['core_theme_view']['footer'][35] = 'Casse';
$text['core_theme_view']['footer'][36] = 'Dispositions';
$text['core_theme_view']['footer'][37] = 'Répartition';
$text['core_theme_view']['footer'][38] = 'Contenu personnalisé';
$text['core_theme_view']['footer'][39] = 'Position';
$text['core_theme_view']['footer'][40] = 'Alignement';
$text['core_theme_view']['footer'][41] = 'Réseaux sociaux';
$text['core_theme_view']['footer'][42] = 'Informations';
$text['core_theme_view']['footer'][43] = 'Alignement avec le contenu';
$text['core_theme_view']['footer'][44] = 'Pied de page fixe';
$text['core_theme_view']['footer'][45] = 'Contenu personnalisé';
$text['core_theme_view']['footer'][46] = "{
4: {'hide' : 'Masqué', 'left' : 'En haut', 'center' : 'Au milieu', 'right' : 'En bas'} ,
3: {'hide': 'Masqué', 'left': 'A gauche', 'center': 'Au centre', 'right': 'A droite'} ,
2: {'hide': 'Masqué', 'left': 'A gauche', 'right': 'A droite'} ,
1: {'hide': 'Masqué', 'center': 'Affiché'}
}";
$text['core_theme_view']['header'][0] = 'Retour';
$text['core_theme_view']['header'][1] = 'Aide';
$text['core_theme_view']['header'][2] = 'Paramètres';
$text['core_theme_view']['header'][3] = 'Position';
$text['core_theme_view']['header'][4] = 'Nature de contenu';
$text['core_theme_view']['header'][5] = 'Hauteur maximale';
$text['core_theme_view']['header'][6] = 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures. <br />Lorsque l\'adaptation est positionnée sur Responsive, la hauteur diminue proportionnellement à la largeur.';
$text['core_theme_view']['header'][7] = 'Largeur';
$text['core_theme_view']['header'][8] = 'Masquer la bannière en écran réduit';
$text['core_theme_view']['header'][9] = 'Aligner la bannière avec le contenu';
$text['core_theme_view']['header'][10] = 'Couleurs';
$text['core_theme_view']['header'][11] = 'Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['header'][12] = 'Arrière-plan';
$text['core_theme_view']['header'][13] = 'Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['header'][14] = 'Texte';
$text['core_theme_view']['header'][15] = 'Mise en forme du titre';
$text['core_theme_view']['header'][16] = 'Masquer le titre du site';
$text['core_theme_view']['header'][17] = 'Police';
$text['core_theme_view']['header'][18] = 'Taille';
$text['core_theme_view']['header'][19] = 'Style';
$text['core_theme_view']['header'][20] = 'Casse';
$text['core_theme_view']['header'][21] = 'Proportionnelle à celle définie dans le site.';
$text['core_theme_view']['header'][22] = 'Alignement du contenu';
$text['core_theme_view']['header'][23] = 'Papier peint';
$text['core_theme_view']['header'][24] = 'Sélectionner une image aux dimensions recommandées ci-dessous';
$text['core_theme_view']['header'][25] = 'Image';
$text['core_theme_view']['header'][26] = 'Répétition';
$text['core_theme_view']['header'][27] = 'Adaptation';
$text['core_theme_view']['header'][28] = 'Les modes responsives permettent de conserver des dimensions proportionnelles.<br />Cover pour une image plus grande que la bannière, Contain pour une image plus petite. Les modes Auto et Etiré ne provoquent pas de modification de la hauteur de la bannière.';
$text['core_theme_view']['header'][29] = 'Bannière cliquable';
$text['core_theme_view']['header'][30] = 'Largeur : ';
$text['core_theme_view']['header'][31] = ' | Hauteur : ';
$text['core_theme_view']['header'][32] = ' | ratio : ';
$text['core_theme_view']['header'][33] = 'Contenu personnalisé';
$text['core_theme_view']['header'][34] ='Enregistrer';
$text['core_theme_view']['header'][35] = "Hauteur de l\'image sélectionnée (";
$text['core_theme_view']['index'][0] = 'Cliquez sur une zone afin d\'accéder à ses options de personnalisation. Vous pouvez également afficher les zones cachées à l\'aide du bouton ci-dessous.';
$text['core_theme_view']['index'][1] = 'Accueil';
$text['core_theme_view']['index'][2] = 'Aide';
$text['core_theme_view']['index'][3] = 'Zones cachées';
$text['core_theme_view']['index'][4] = 'Gestion';
$text['core_theme_view']['index'][5] = 'Administration';
$text['core_theme_view']['index'][6] = 'Éditeur CSS';
$text['core_theme_view']['index'][7] = 'Polices';
$text['core_theme_view']['index'][8] = 'Cliquez sur une zone afin d\'accéder à ses options de personnalisation.';
$text['core_theme_view']['manage'][0] = 'Retour';
$text['core_theme_view']['manage'][1] = 'Aide';
$text['core_theme_view']['manage'][2] = 'Réinitialiser';
$text['core_theme_view']['manage'][3] = 'Appliquer';
$text['core_theme_view']['manage'][4] = 'Installer un thème archivé (site ou administration)';
$text['core_theme_view']['manage'][5] = 'Archive ZIP :';
$text['core_theme_view']['manage'][6] = 'Sauvegarde du thème dans les ';
$text['core_theme_view']['manage'][7] = 'fichiers';
$text['core_theme_view']['manage'][8] = ' du site';
$text['core_theme_view']['manage'][9] = 'Thème du site';
$text['core_theme_view']['manage'][10] = 'Thème de l\'administration';
$text['core_theme_view']['manage'][11] = 'Télécharger le thème';
$text['core_theme_view']['manage'][12] = 'Thème du site';
$text['core_theme_view']['manage'][13] = 'Thème de l\'administration';
$text['core_theme_view']['manage'][14] = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine le thème du site ?";
$text['core_theme_view']['menu'][0] = 'Retour';
$text['core_theme_view']['menu'][1] = 'Aide';
$text['core_theme_view']['menu'][2] = 'Enregistrer';
$text['core_theme_view']['menu'][3] = 'Paramètres';
$text['core_theme_view']['menu'][4] = 'Position';
$text['core_theme_view']['menu'][5] = 'Largeur';
$text['core_theme_view']['menu'][6] = 'Bords arrondis';
$text['core_theme_view']['menu'][7] = 'Autour de la page sélectionnée';
$text['core_theme_view']['menu'][8] = 'Hauteur';
$text['core_theme_view']['menu'][9] = 'Alignement du contenu';
$text['core_theme_view']['menu'][10] = 'Aligner le menu avec le contenu';
$text['core_theme_view']['menu'][11] = 'Menu fixe';
$text['core_theme_view']['menu'][12] = 'Contenus';
$text['core_theme_view']['menu'][13] = 'Lien de connexion';
$text['core_theme_view']['menu'][14] = 'Barre de membre';
$text['core_theme_view']['menu'][15] = 'Icônes de gestion de compte et de déconnexion. Uniquement pour les membres connectés';
$text['core_theme_view']['menu'][16] = 'Affichage dans le menu burger';
$text['core_theme_view']['menu'][17] = 'Le menu burger remplace le menu complet lorsque la largeur de l\'écran n\'est pas suffisante.';
$text['core_theme_view']['menu'][18] = 'Sélectionner une image, ses dimensions seront adaptées automatiquement';
$text['core_theme_view']['menu'][19] = 'Logo du menu burger';
$text['core_theme_view']['menu'][20] = 'Couleurs';
$text['core_theme_view']['menu'][21] = 'Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['menu'][22] = 'Texte';
$text['core_theme_view']['menu'][23] = 'Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['menu'][24] = 'Arrière-plan';
$text['core_theme_view']['menu'][25] = 'Fond du sous-menu';
$text['core_theme_view']['menu'][26] = 'Texte page active';
$text['core_theme_view']['menu'][27] = 'La couleur de fond de la page active peut être définie automatique ou selon une couleur définie, comme par exemple celle de fond des pages.';
$text['core_theme_view']['menu'][28] = 'Couleur de fond de la page sélectionnée dans le menu.<br>Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['menu'][29] = 'Fond page active';
$text['core_theme_view']['menu'][30] = 'Mise en forme du texte';
$text['core_theme_view']['menu'][31] = 'Police';
$text['core_theme_view']['menu'][32] = 'Taille';
$text['core_theme_view']['menu'][33] = 'Proportionnelle à celle définie dans le site';
$text['core_theme_view']['menu'][34] = 'Style';
$text['core_theme_view']['menu'][35] = 'Casse';
$text['core_theme_view']['menu'][36] = 'Couleur de fond automatique';
$text['core_theme_view']['site'][0] = 'Retour';
$text['core_theme_view']['site'][1] = 'Aide';
$text['core_theme_view']['site'][2] = 'Enregistrer';
$text['core_theme_view']['site'][3] = 'Paramètres';
$text['core_theme_view']['site'][4] = 'Largeur du site';
$text['core_theme_view']['site'][5] = 'Arrondi des angles';
$text['core_theme_view']['site'][6] = 'Ombre sur les bords du site';
$text['core_theme_view']['site'][7] = 'Pas de marge au-dessus et en-dessous du site';
$text['core_theme_view']['site'][8] = 'Couleurs';
$text['core_theme_view']['site'][9] = 'Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['site'][10] = 'Arrière-plan';
$text['core_theme_view']['site'][11] = 'Texte';
$text['core_theme_view']['site'][12] = 'Titres';
$text['core_theme_view']['site'][13] = 'Liens';
$text['core_theme_view']['site'][14] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text['core_theme_view']['site'][15] = 'Arrière-plan des blocs';
$text['core_theme_view']['site'][16] = 'Bordure des blocs';
$text['core_theme_view']['site'][17] = 'Arrondi des angles du bloc';
$text['core_theme_view']['site'][18] = 'Ombre sur les bords du bloc';
$text['core_theme_view']['site'][19] = 'Arrière-plan du titre des blocs';
$text['core_theme_view']['site'][20] = 'Boutons';
$text['core_theme_view']['site'][21] = 'Titre';
$text['core_theme_view']['site'][22] = 'Sous-titre';
$text['core_theme_view']['site'][23] = 'Bouton';
$text['core_theme_view']['site'][24] = 'Bloc';
$text['core_theme_view']['site'][25] = 'Mise en forme du texte';
$text['core_theme_view']['site'][26] = 'Police';
$text['core_theme_view']['site'][27] = 'Style';
$text['core_theme_view']['site'][28] = 'Casse';
$text['core_theme_view']['site'][29] = 'Taille';
$text['core_theme_view']['site'][30] = 'Taille de référence pour le site. Les tailles des polices de la bannière, de menu et de pied de page sont proportionnelles à cette taille.';
$text['core_theme_view']['site'][31] = 'Mise en forme des titres';
$text['core_theme']['admin'][0] = 'Modifications enregistrées';
$text['core_theme']['admin'][1] = 'Administration';
$text['core_theme']['advanced'][0] = 'Modifications enregistrées';
$text['core_theme']['advanced'][1] = 'Éditeur CSS';
$text['core_theme']['fonts'][0] = 'Gestion des polices';
$text['core_theme']['editFonts'][0] = 'Sélectionner le fichier...';
$text['core_theme']['editFonts'][1] = 'Vous devez sélectionner un fichier';
$text['core_theme']['editFonts'][2] = 'Modifications enregistrées';
$text['core_theme']['editFonts'][3] = 'Pas de fichier dans le dossier ';
$text['core_theme']['editFonts'][4] = 'Dossier ';
$text['core_theme']['editFonts'][5] = 'inexistant';
$text['core_theme']['editFonts'][6] = 'Édition d\'une police';
$text['core_theme']['deleteFonts'][0] = 'Police supprimée';
$text['core_theme']['addFonts'][0] = 'Sélectionner le fichier...';
$text['core_theme']['addFonts'][1] = 'Vous devez sélectionner un fichier';
$text['core_theme']['addFonts'][2] = 'Modifications enregistrées';
$text['core_theme']['addFonts'][3] = 'Pas de fichier dans le dossier ';
$text['core_theme']['addFonts'][4] = 'Dossier ';
$text['core_theme']['addFonts'][5] = 'inexistant';
$text['core_theme']['addFonts'][6] = 'Ajout d\'une police';
$text['core_theme']['body'][0] = 'Modifications enregistrées';
$text['core_theme']['body'][1] = 'Personnalisation de l\'arrière plan';
$text['core_theme']['footer'][0] = 'Sélectionnez au moins un contenu à afficher';
$text['core_theme']['footer'][1] = 'Modifications enregistrées';
$text['core_theme']['footer'][2] = 'Personnalisation du pied de page';
$text['core_theme']['header'][0] = 'Modifications enregistrées';
$text['core_theme']['header'][1] = 'Personnalisation de la bannière';
$text['core_theme']['index'][0] = 'Personnalisation des thèmes';
$text['core_theme']['menu'][0] = 'Modifications enregistrées';
$text['core_theme']['menu'][1] = 'Personnalisation du menu';
$text['core_theme']['reset'][0] = 'Réinitialisation effectuée';
$text['core_theme']['reset'][1] = 'Jeton incorrect';
$text['core_theme']['site'][0] = 'Modifications enregistrées';
$text['core_theme']['site'][1] = 'Personnalisation du site';
$text['core_theme']['manage'][0] = 'Gestion des thèmes';
$text['core_theme']['import'][0] = 'Le thème a été importé';
$text['core_theme']['import'][1] = 'Erreur lors de l\'extraction, vérifiez les permissions.';
$text['core_theme']['import'][2] = 'Ce n\'est pas l\'archive d\'un thème !';
$text['core_theme']['import'][3] = 'Impossible d\'ouvrir l\'archive';
$text['core_theme']['import'][4] = 'Archive non spécifiée ou introuvable';
$text['core_theme']['save'][0] = 'Archive ';
$text['core_theme']['save'][1] = ' sauvegardée avec succès';
// $text[
// Passage de la langue d'administration à Tinymce
$lang_admin = 'fr_FR';
// Selects
$aligns = [
'left' => 'À gauche',
'center' => 'Au centre',
'right' => 'À droite'
];
$attachments = [
'scroll' => 'Standard',
'fixed' => 'Fixe'
];
$containerWides = [
'container' => 'Limitée au site',
'none' => 'Etendue sur la page'
];
$footerblocks = [
1 => [
'hide' => 'Masqué',
'center' => 'Affiché' ],
2 => [
'hide' => 'Masqué',
'left' => 'À gauche',
'right' => 'À droite' ],
3 => [
'hide' => 'Masqué',
'left' => 'À gauche',
'center' => 'Au centre',
'right' => 'À droite' ],
4 => [
'hide' => 'Masqué',
'left' => 'En haut',
'center' => 'Au milieu',
'right' => 'En bas' ]
];
$fontWeights = [
'normal' => 'Maigre',
'bold' => 'Gras'
];
$footerHeights = [
'0px' => 'Nulles (0px)',
'5px' => 'Très petites (5px)',
'10px' => 'Petites (10px)',
'15px' => 'Moyennes (15px)',
'20px' => 'Grandes (20px)'
];
$footerPositions = [
'hide' => 'Caché',
'site' => 'Dans le site',
'body' => 'En dessous du site'
];
$footerFontSizes = [
'.8em' => 'Très petite (80%)',
'.9em' => 'Petite (90%)',
'1em' => 'Standard (100%)',
'1.1em' => 'Moyenne (110%)',
'1.2em' => 'Grande (120%)',
'1.3em' => 'Très grande (130%)'
];
$headerFontSizes = [
'1.6em' => 'Très petite (160%)',
'1.8em' => 'Petite (180%)',
'2em' => 'Moyenne (200%)',
'2.2em' => 'Grande (220%)',
'2.4vmax' => 'Très grande (240%)'
];
$headerHeights = [
'unset' => 'Libre', // texte dynamique cf header.js.php
'100px' => 'Très petite (100px) ',
'150px' => 'Petite (150px)',
'200px' => 'Moyenne (200px)',
'300px' => 'Grande (300px)',
'400px' => 'Très grande (400px)',
];
$headerPositions = [
'body' => 'Au dessus du site',
'site' => 'Dans le site',
'hide' => 'Cachée'
];
$headerFeatures = [
'wallpaper' => 'Couleur unie ou papier-peint',
'feature' => 'Contenu personnalisé'
];
$imagePositions = [
'top left' => 'En haut à gauche',
'top center' => 'En haut au centre',
'top right' => 'En haut à droite',
'center left' => 'Au milieu à gauche',
'center center' => 'Au milieu au centre',
'center right' => 'Au milieu à droite',
'bottom left' => 'En bas à gauche',
'bottom center' => 'En bas au centre',
'bottom right' => 'En bas à droite'
];
$menuFontSizes = [
'.8em' => 'Très petite (80%)',
'.9em' => 'Petite (90%)',
'1em' => 'Standard (100%)',
'1.1em' => 'Moyenne (110%)',
'1.2em' => 'Grande (120%)',
'1.3em' => 'Très grande (130%)'
];
$menuBurgerFontSizes = [
'1em' => 'Très petite (100%)',
'1.2em' => 'Petite (120%)',
'1.5em' => 'Standard (150%)',
'1.8em' => 'Moyenne (180%)',
'2em' => 'Grande (200%)',
'2.5em' => 'Très grande (250%)'
];
$menuHeights = [
'5px 10px' => 'Très petite',
'10px' => 'Petite',
'15px 10px' => 'Moyenne',
'20px 15px' => 'Grande',
'25px 15px' => 'Très grande'
];
$menuPositionsSite = [
'top' => 'En-dehors du site',
'site-first' => 'Avant la bannière',
'site-second' => 'Après la bannière',
'hide' => 'Caché'
];
$menuPositionsBody = [
'top' => 'En-dehors du site',
'body-first' => 'Avant la bannière',
'body-second' => 'Après la bannière',
'site' => 'Dans le site',
'hide' => 'Caché'
];
$menuRadius = [
'0px' => 'Aucun',
'3px 3px 0px 0px' => 'Très léger',
'6px 6px 0px 0px' => 'Léger',
'9px 9px 0px 0px' => 'Moyen',
'12px 12px 0px 0px' => 'Important',
'15px 15px 0px 0px' => 'Très important'
];
$radius = [
'0px' => 'Aucun',
'5px' => 'Très léger',
'10px' => 'Léger',
'15px' => 'Moyen',
'25px' => 'Important',
'50px' => 'Très important'
];
$repeats = [
'no-repeat' => 'Ne pas répéter',
'repeat-x' => 'Sur l\'axe horizontal',
'repeat-y' => 'Sur l\'axe vertical',
'repeat' => 'Sur les deux axes'
];
$shadows = [
'0px 0px 0px' => 'Aucune',
'1px 1px 5px' => 'Très légère',
'1px 1px 10px' => 'Légère',
'1px 1px 15px' => 'Moyenne',
'1px 1px 25px' => 'Importante',
'1px 1px 50px' => 'Très importante'
];
$blockShadows = [
'0px 0px 0px' => 'Aucune',
'1px 1px 2px' => 'Très légère',
'2px 2px 4px' => 'Légère',
'3px 3px 6px' => 'Moyenne',
'5px 5px 10px' => 'Important',
'10px 10px 20px' => 'Très important'
];
$bodySizes = [
'auto' => 'Automatique',
'100% 100%' => 'Image étirée (100% 100%)',
'cover' => 'Responsive (cover)',
'contain' => 'Responsive (contain)'
];
$textTransforms = [
'none' => 'Standard',
'lowercase' => 'Minuscules',
'uppercase' => 'Majuscules',
'capitalize' => 'Majuscule à chaque mot'
];
$siteWidths = [
'750px' => 'Petite (750 pixels)',
'960px' => 'Moyenne (960 pixels)',
'1170px' => 'Grande (1170 pixels)',
'100%' => 'Fluide (100%)'
];
$headerWide = [
'auto auto' => 'Automatique',
'100% 100%' => 'Image étirée (100% 100%)',
'cover' => 'Responsive (cover)',
'contain' => 'Responsive (contain)'
];
$footerTemplate = [
'1' => 'Une seule colonne',
'2' => 'Deux colonnes : 1/2 - 1/2',
'3' => 'Trois colonnes : 1/3 - 1/3 - 1/3',
'4' => 'Trois lignes superposées'
];
$burgerContent = [
'none' => 'Aucun',
'title' => 'Titre du site',
'logo' => 'Logo du site'
];
$typeAddFont = [
'none' => 'Aucune',
'file' => 'Fichier local'
//'link' => 'Fichier externe avec link',
//'import' => 'Fichier externe avec import'
];
?>

File diff suppressed because it is too large Load Diff

View File

@ -19,14 +19,7 @@
*/ */
$(".fontDelete").on("click", function() { $(".fontDelete").on("click", function() {
var _this = $(this); var _this = $(this);
var text=""; return core.confirm(textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir supprimer cette police ?";' ;
}
else{
echo 'text = "Are you sure you want to delete this font ?";' ;
} ?>
return core.confirm(text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,49 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Enregistrer';
$text[3] = 'Paramètres de la nouvelle police';
$text[4] = 'Nom';
$text[5] = 'Nom de la police, majuscules et espaces autorisés';
$text[6] = 'Liaison avec un fichier de police';
$text[7] = 'Le fichier de police est envoyé, ou pas, depuis un dépôt local';
$text[8] = 'Vous devez au préalable téléverser le fichier de police, ttf, woff, otf, eot ou woff2 dans le dossier fonts avec le gestionnaire de fichiers.';
$text[9] = 'Sélection d\'une police';
$text[10] = 'License';
$text[11] = 'Type de license de la police';
$typeAddFont = $module::$typeAddFont;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'New font settings';
$text[4] = 'Name';
$text[5] = 'Font name, upper case and spaces allowed';
$text[6] = 'Link to a font file';
$text[7] = 'The font file is sent, or not, from a local repository';
$text[8] = 'You must first upload the font file, ttf, woff, otf, eot or woff2 to the fonts folder with the file manager';
$text[9] = 'Select a font';
$text[10] = 'License';
$text[11] = 'License type of the font';
$typeAddFont = $module::$typeAddFont_en;
break;
}
?>
<?php echo template::formOpen('themeAddFonts'); ?>
echo template::formOpen('themeAddFonts'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeFontsBack', [ <?php echo template::button('themeFontsBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme/fonts', 'href' => helper::baseUrl() . 'theme/fonts',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['addFonts'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -51,39 +17,39 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/polices', 'href' => 'https://doc.deltacms.fr/polices',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['addFonts'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('addFontSubmit',[ <?php echo template::submit('addFontSubmit',[
'value' => $text[2] 'value' => $text['core_theme_view']['addFonts'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_theme_view']['addFonts'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('nameAddFont', [ <?php echo template::text('nameAddFont', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[4], 'label' => $text['core_theme_view']['addFonts'][4],
'help' => $text[5] 'help' => $text['core_theme_view']['addFonts'][5]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('typeAddFont', $typeAddFont, [ <?php echo template::select('typeAddFont', $typeAddFont, [
'label' => $text[6], 'label' => $text['core_theme_view']['addFonts'][6],
'selected' => 'file', 'selected' => 'file',
'help' => $text[7] 'help' => $text['core_theme_view']['addFonts'][7]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<!-- Sélection d'un fichier font --> <!-- Sélection d'un fichier font -->
<?php echo template::select('fileAddFont', $module::$fontFiles, [ <?php echo template::select('fileAddFont', $module::$fontFiles, [
'help' => $text[8], 'help' => $text['core_theme_view']['addFonts'][8],
'label' => $text[9] 'label' => $text['core_theme_view']['addFonts'][9]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -92,13 +58,13 @@ switch ($val) {
<div class="col4"> <div class="col4">
<?php echo template::text('licenseAddFont', [ <?php echo template::text('licenseAddFont', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[10], 'label' => $text['core_theme_view']['addFonts'][10],
'help' => $text[11] 'help' => $text['core_theme_view']['addFonts'][11]
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_theme_view']['addFonts'][12].'"'; ?>;
</script>

View File

@ -56,14 +56,7 @@ $("input, select").on("change", function() {
*/ */
$("#configAdminReset").on("click", function() { $("#configAdminReset").on("click", function() {
var _this = $(this); var _this = $(this);
var text=""; return core.confirm(textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine le thème de l\'administration ?";' ;
}
else{
echo 'text = "Are you sure you want to reset the administration theme to its original state ?";' ;
} ?>
return core.confirm(text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,64 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('configAdminForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[3] = 'Réinitialiser';
$text[4] = 'Valider';
$text[5] = 'Couleurs';
$text[6] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text[7] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.';
$text[8] = 'Arrière-plan';
$text[9] = 'Titres';
$text[10] = 'Texte';
$text[11] = 'Arrière-plan des champs';
$text[12] = 'Bordure des champs';
$text[13] = 'Bouton Aide';
$text[14] = 'Bouton retour';
$text[15] = 'Bouton standard';
$text[16] = 'Bouton effacement';
$text[17] = 'Bouton validation';
$text[18] = 'Mise en forme du texte';
$text[19] = 'Police du texte';
$text[20] = 'Taille';
$text[21] = 'Police des titres';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[3] = 'Reset';
$text[4] = 'Validate';
$text[5] = 'Colors';
$text[6] = 'The colour visible in the absence of an image.<br /> The horizontal slider adjusts the level of transparency.';
$text[7] = 'The colour visible in the absence of an image.<br /> The horizontal slider adjusts the level of transparency. The text colour is automatic.';
$text[8] = 'Background';
$text[9] = 'Title';
$text[10] = 'Text';
$text[11] = 'Field background';
$text[12] = 'Field border';
$text[13] = 'Help button';
$text[14] = 'Back button';
$text[15] = 'Standard button';
$text[16] = 'Delete button';
$text[17] = 'Validation button';
$text[18] = 'Text formatting';
$text[19] = 'Text font';
$text[20] = 'Size';
$text[21] = 'Title font';
break;
}
?>
<?php echo template::formOpen('configAdminForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('configAdminBack', [ <?php echo template::button('configAdminBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['admin'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -66,7 +17,7 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/administration', 'href' => 'https://doc.deltacms.fr/administration',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['admin'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
@ -74,13 +25,13 @@ switch ($val) {
<?php echo template::button('configAdminReset', [ <?php echo template::button('configAdminReset', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/reset/admin' . '&csrf=' . $_SESSION['csrf'], 'href' => helper::baseUrl() . 'theme/reset/admin' . '&csrf=' . $_SESSION['csrf'],
'value' => $text[3], 'value' => $text['core_theme_view']['admin'][3],
'ico' => 'cancel' 'ico' => 'cancel'
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::submit('configAdminSubmit',[ <?php echo template::submit('configAdminSubmit',[
'value' => $text[4], 'value' => $text['core_theme_view']['admin'][4],
'ico' => 'check' 'ico' => 'check'
]); ?> ]); ?>
</div> </div>
@ -88,29 +39,29 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[5]; ?></h4> <h4><?php echo $text['core_theme_view']['admin'][5]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('adminBackgroundColor', [ <?php echo template::text('adminBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[8], 'label' => $text['core_theme_view']['admin'][8],
'value' => $this->getData(['admin', 'backgroundColor']) 'value' => $this->getData(['admin', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('adminColorTitle', [ <?php echo template::text('adminColorTitle', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[9], 'label' => $text['core_theme_view']['admin'][9],
'value' => $this->getData(['admin', 'colorTitle']) 'value' => $this->getData(['admin', 'colorTitle'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('adminColorText', [ <?php echo template::text('adminColorText', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[10], 'label' => $text['core_theme_view']['admin'][10],
'value' => $this->getData(['admin', 'colorText']) 'value' => $this->getData(['admin', 'colorText'])
]); ?> ]); ?>
</div> </div>
@ -119,24 +70,24 @@ switch ($val) {
<div class="col4"> <div class="col4">
<?php echo template::text('adminBackGroundBlockColor', [ <?php echo template::text('adminBackGroundBlockColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[7], 'help' => $text['core_theme_view']['admin'][7],
'label' => $text[11], 'label' => $text['core_theme_view']['admin'][11],
'value' => $this->getData(['admin', 'backgroundBlockColor']) 'value' => $this->getData(['admin', 'backgroundBlockColor'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('adminBorderBlockColor', [ <?php echo template::text('adminBorderBlockColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[12], 'label' => $text['core_theme_view']['admin'][12],
'value' => $this->getData(['admin', 'borderBlockColor']) 'value' => $this->getData(['admin', 'borderBlockColor'])
]); ?> ]); ?>
</div> </div>
<div class="col3 offset1"> <div class="col3 offset1">
<?php echo template::text('adminColorHelp', [ <?php echo template::text('adminColorHelp', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[13], 'label' => $text['core_theme_view']['admin'][13],
'value' => $this->getData(['admin', 'backgroundColorButtonHelp']) 'value' => $this->getData(['admin', 'backgroundColorButtonHelp'])
]); ?> ]); ?>
</div> </div>
@ -145,32 +96,32 @@ switch ($val) {
<div class="col3"> <div class="col3">
<?php echo template::text('adminColorGrey', [ <?php echo template::text('adminColorGrey', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[14], 'label' => $text['core_theme_view']['admin'][14],
'value' => $this->getData(['admin', 'backgroundColorButtonGrey']) 'value' => $this->getData(['admin', 'backgroundColorButtonGrey'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('adminColorButton', [ <?php echo template::text('adminColorButton', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[15], 'label' => $text['core_theme_view']['admin'][15],
'value' => $this->getData(['admin', 'backgroundColorButton']) 'value' => $this->getData(['admin', 'backgroundColorButton'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('adminColorRed', [ <?php echo template::text('adminColorRed', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[16], 'label' => $text['core_theme_view']['admin'][16],
'value' => $this->getData(['admin', 'backgroundColorButtonRed']) 'value' => $this->getData(['admin', 'backgroundColorButtonRed'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::text('adminColorGreen', [ <?php echo template::text('adminColorGreen', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['admin'][6],
'label' => $text[17], 'label' => $text['core_theme_view']['admin'][17],
'value' => $this->getData(['admin', 'backgroundColorButtonGreen']) 'value' => $this->getData(['admin', 'backgroundColorButtonGreen'])
]); ?> ]); ?>
</div> </div>
@ -181,24 +132,24 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[18]; ?></h4> <h4><?php echo $text['core_theme_view']['admin'][18]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('adminFontText', $module::$fonts, [ <?php echo template::select('adminFontText', $module::$fonts, [
'label' => $text[19], 'label' => $text['core_theme_view']['admin'][19],
'selected' => $this->getData(['admin', 'fontText']), 'selected' => $this->getData(['admin', 'fontText']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('adminFontTextSize', $module::$siteFontSizes, [ <?php echo template::select('adminFontTextSize', $module::$siteFontSizes, [
'label' => $text[20], 'label' => $text['core_theme_view']['admin'][20],
'selected' => $this->getData(['admin', 'fontSize']) 'selected' => $this->getData(['admin', 'fontSize'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('adminFontTitle', $module::$fonts, [ <?php echo template::select('adminFontTitle', $module::$fonts, [
'label' => $text[21], 'label' => $text['core_theme_view']['admin'][21],
'selected' => $this->getData(['admin', 'fontTitle']), 'selected' => $this->getData(['admin', 'fontTitle']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
@ -209,3 +160,6 @@ switch ($val) {
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_theme_view']['admin'][22].'"'; ?>;
</script>

View File

@ -32,14 +32,7 @@ $("#themeAdvancedCss").on("change keydown keyup", function() {
*/ */
$("#themeAdvancedReset").on("click", function() { $("#themeAdvancedReset").on("click", function() {
var _this = $(this); var _this = $(this);
var text=""; return core.confirm(textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine la personnalisation avancée ?";' ;
}
else{
echo 'text = "Are you sure you want to reset the advanced customization to its original state ?";' ;
} ?>
return core.confirm(text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,30 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('themeAdvancedForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Réinitialiser';
$text[3] = 'Enregistrer';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Reset';
$text[3] = 'Save';
break;
}
?>
<?php echo template::formOpen('themeAdvancedForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeAdvancedBack', [ <?php echo template::button('themeAdvancedBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['advanced'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -32,7 +17,7 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/editeur-css', 'href' => 'https://doc.deltacms.fr/editeur-css',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['advanced'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
@ -41,12 +26,12 @@ switch ($val) {
'href' => helper::baseUrl() . 'theme/reset/custom' . '&csrf=' . $_SESSION['csrf'], 'href' => helper::baseUrl() . 'theme/reset/custom' . '&csrf=' . $_SESSION['csrf'],
'class' => 'buttonRed', 'class' => 'buttonRed',
'ico' => 'cancel', 'ico' => 'cancel',
'value' => $text[2] 'value' => $text['core_theme_view']['advanced'][2]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::submit('themeAdvancedSubmit',[ <?php echo template::submit('themeAdvancedSubmit',[
'value' => $text[3] 'value' => $text['core_theme_view']['advanced'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -58,4 +43,7 @@ switch ($val) {
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_theme_view']['advanced'][4].'"'; ?>;
</script>

View File

@ -1,62 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('themeBodyForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Enregistrer';
$text[3] = 'Couleurs';
$text[4] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text[5] = 'Arrière-plan';
$text[6] = 'Le curseur horizontal règle le niveau de transparence.';
$text[7] = 'Fond icône haut de page';
$text[8] = 'Icône haut de page';
$text[9] = 'Image';
$text[10] = 'Sélectionner une image';
$text[11] = 'Arrière-plan';
$text[12] = 'Répétition';
$text[13] = 'Position';
$text[14] = 'Défilement';
$text[15] = 'Taille';
$repeats = $module::$repeats;
$imagePositions = $module::$imagePositions;
$attachments = $module::$attachments;
$bodySizes = $module::$bodySizes;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'Colors';
$text[4] = 'Color visible in the absence of an image.<br />The horizontal slider adjusts the level of transparency.';
$text[5] = 'Background';
$text[6] = 'The horizontal slider sets the transparency level';
$text[7] = 'Top icon background';
$text[8] = 'Top icon';
$text[9] = 'Image';
$text[10] = 'Select an image';
$text[11] = 'Background';
$text[12] = 'Repeat';
$text[13] = 'Position';
$text[14] = 'Scroll';
$text[15] = 'Size';
$repeats = $module::$repeats_en;
$imagePositions = $module::$imagePositions_en;
$attachments = $module::$attachments_en;
$bodySizes = $module::$bodySizes_en;
break;
}
?>
<?php echo template::formOpen('themeBodyForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeBodyBack', [ <?php echo template::button('themeBodyBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['body'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -64,26 +17,26 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/personnalisation-de-l-arriere-plan', 'href' => 'https://doc.deltacms.fr/personnalisation-de-l-arriere-plan',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['body'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('themeBodySubmit',[ <?php echo template::submit('themeBodySubmit',[
'value' => $text[2] 'value' => $text['core_theme_view']['body'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_theme_view']['body'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('themeBodyBackgroundColor', [ <?php echo template::text('themeBodyBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[4], 'help' => $text['core_theme_view']['body'][4],
'label' => $text[5], 'label' => $text['core_theme_view']['body'][5],
'value' => $this->getData(['theme', 'body', 'backgroundColor']) 'value' => $this->getData(['theme', 'body', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
@ -92,16 +45,16 @@ switch ($val) {
<div class="col6"> <div class="col6">
<?php echo template::text('themeBodyToTopBackground', [ <?php echo template::text('themeBodyToTopBackground', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['body'][6],
'label' => $text[7], 'label' => $text['core_theme_view']['body'][7],
'value' => $this->getData(['theme', 'body', 'toTopbackgroundColor']) 'value' => $this->getData(['theme', 'body', 'toTopbackgroundColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('themeBodyToTopColor', [ <?php echo template::text('themeBodyToTopColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[6], 'help' => $text['core_theme_view']['body'][6],
'label' => $text[8], 'label' => $text['core_theme_view']['body'][8],
'value' => $this->getData(['theme', 'body', 'toTopColor']) 'value' => $this->getData(['theme', 'body', 'toTopColor'])
]); ?> ]); ?>
</div> </div>
@ -112,14 +65,14 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[9]; ?></h4> <h4><?php echo $text['core_theme_view']['body'][9]; ?></h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php <?php
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : ""; $imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : "";
echo template::file('themeBodyImage', [ echo template::file('themeBodyImage', [
'help' => $text[10], 'help' => $text['core_theme_view']['body'][10],
'label' => $text[11], 'label' => $text['core_theme_view']['body'][11],
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
]); ?> ]); ?>
@ -129,13 +82,13 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeBodyImageRepeat', $repeats, [ <?php echo template::select('themeBodyImageRepeat', $repeats, [
'label' => $text[12], 'label' => $text['core_theme_view']['body'][12],
'selected' => $this->getData(['theme', 'body', 'imageRepeat']) 'selected' => $this->getData(['theme', 'body', 'imageRepeat'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeBodyImagePosition', $imagePositions, [ <?php echo template::select('themeBodyImagePosition', $imagePositions, [
'label' => $text[13], 'label' => $text['core_theme_view']['body'][13],
'selected' => $this->getData(['theme', 'body', 'imagePosition']) 'selected' => $this->getData(['theme', 'body', 'imagePosition'])
]); ?> ]); ?>
</div> </div>
@ -143,13 +96,13 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeBodyImageAttachment', $attachments, [ <?php echo template::select('themeBodyImageAttachment', $attachments, [
'label' => $text[14], 'label' => $text['core_theme_view']['body'][14],
'selected' => $this->getData(['theme', 'body', 'imageAttachment']) 'selected' => $this->getData(['theme', 'body', 'imageAttachment'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeBodyImageSize', $bodySizes, [ <?php echo template::select('themeBodyImageSize', $bodySizes, [
'label' => $text[15], 'label' => $text['core_theme_view']['body'][15],
'selected' => $this->getData(['theme', 'body', 'imageSize']) 'selected' => $this->getData(['theme', 'body', 'imageSize'])
]); ?> ]); ?>
</div> </div>

View File

@ -1,49 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Enregistrer';
$text[3] = 'Paramètres de la police';
$text[4] = 'Nom de la police sélectionnée';
$text[5] = 'Valeur non modifiable';
$text[6] = 'Liaison avec un fichier de police';
$text[7] = 'Le fichier de police est envoyé, ou pas, depuis un dépôt local';
$text[8] = 'Vous devez au préalable téléverser le fichier de police, ttf, woff, otf, eot ou woff2 dans le dossier fonts avec le gestionnaire de fichiers.';
$text[9] = 'Sélection d\'une police';
$text[10] = 'License';
$text[11] = 'Type de license de la police';
$typeAddFont = $module::$typeAddFont;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'Font settings';
$text[4] = 'Selected font name';
$text[5] = 'Value not editable';
$text[6] = 'Link to a font file';
$text[7] = 'The font file is sent, or not, from a local repository';
$text[8] = 'You must first upload the font file, ttf, woff, otf, eot or woff2 to the fonts folder with the file manager';
$text[9] = 'Select a font';
$text[10] = 'License';
$text[11] = 'License type of the font';
$typeAddFont = $module::$typeAddFont_en;
break;
}
?>
<?php echo template::formOpen('themeEditFonts'); ?>
echo template::formOpen('themeEditFonts'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeFontsBack', [ <?php echo template::button('themeFontsBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme/fonts', 'href' => helper::baseUrl() . 'theme/fonts',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['editFonts'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -51,33 +17,33 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/polices', 'href' => 'https://doc.deltacms.fr/polices',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['editFonts'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('editFontSubmit',[ <?php echo template::submit('editFontSubmit',[
'value' => $text[2] 'value' => $text['core_theme_view']['editFonts'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_theme_view']['editFonts'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('nameEditFont', [ <?php echo template::text('nameEditFont', [
'value' => $this->getData(['fonts', $this->getUrl(2),'name']), 'value' => $this->getData(['fonts', $this->getUrl(2),'name']),
'label' => $text[4], 'label' => $text['core_theme_view']['editFonts'][4],
'readonly' => true, 'readonly' => true,
'help' => $text[5] 'help' => $text['core_theme_view']['editFonts'][5]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('typeEditFont', $typeAddFont, [ <?php echo template::select('typeEditFont', $typeAddFont, [
'label' => $text[6], 'label' => $text['core_theme_view']['editFonts'][6],
'selected' => $this->getData(['fonts', $this->getUrl(2),'type']), 'selected' => $this->getData(['fonts', $this->getUrl(2),'type']),
'help' => $text[7] 'help' => $text['core_theme_view']['editFonts'][7]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
@ -85,8 +51,8 @@ switch ($val) {
<?php $key = array_search( $this->getData(['fonts', $this->getUrl(2),'file']), $module::$fontFiles); <?php $key = array_search( $this->getData(['fonts', $this->getUrl(2),'file']), $module::$fontFiles);
echo template::select('fileEditFont', $module::$fontFiles, [ echo template::select('fileEditFont', $module::$fontFiles, [
'selected' => $key, 'selected' => $key,
'help' => $text[8], 'help' => $text['core_theme_view']['editFonts'][8],
'label' => $text[9] 'label' => $text['core_theme_view']['editFonts'][9]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -95,8 +61,8 @@ switch ($val) {
<div class="col4"> <div class="col4">
<?php echo template::text('licenseEditFont', [ <?php echo template::text('licenseEditFont', [
'value' => $this->getData(['fonts', $this->getUrl(2),'license']), 'value' => $this->getData(['fonts', $this->getUrl(2),'license']),
'label' => $text[10], 'label' => $text['core_theme_view']['editFonts'][10],
'help' => $text[11] 'help' => $text['core_theme_view']['editFonts'][11]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -20,13 +20,7 @@
$(".fontDelete").on("click", function() { $(".fontDelete").on("click", function() {
var _this = $(this); var _this = $(this);
var text=""; var text="";
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){ return core.confirm(textConfirm, function() {
echo 'text = "Êtes-vous sûr de vouloir supprimer cette police ?";' ;
}
else{
echo 'text = "Are you sure you want to delete this font ?";' ;
} ?>
return core.confirm(text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,27 +1,6 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Police';
$text[3] = 'Identifiant';
$text[4] = 'Nom';
$text[5] = 'Fichier';
$text[6] = 'Aperçu';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Police';
$text[3] = 'Username';
$text[4] = 'Name';
$text[5] = 'File';
$text[6] = 'Preview';
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -29,7 +8,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['fonts'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -37,7 +16,7 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/polices', 'href' => 'https://doc.deltacms.fr/polices',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['fonts'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
@ -45,9 +24,12 @@ switch ($val) {
<?php echo template::button('fontAdd', [ <?php echo template::button('fontAdd', [
'href' => helper::baseUrl() . 'theme/addFonts', 'href' => helper::baseUrl() . 'theme/addFonts',
'ico' => 'plus', 'ico' => 'plus',
'value' => $text[2] 'value' => $text['core_theme_view']['fonts'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php echo template::table([2, 2, 3, 3, 1, 1], $module::$fonts, [$text[3], $text[4], $text[5], $text[6], '', '']); ?> <?php echo template::table([2, 2, 3, 3, 1, 1], $module::$fonts, [$text['core_theme_view']['fonts'][3], $text['core_theme_view']['fonts'][4], $text['core_theme_view']['fonts'][5], $text['core_theme_view']['fonts'][6], '', '']); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_theme_view']['fonts'][7].'"'; ?>;
</script>

View File

@ -24,7 +24,7 @@
*/ */
.titleWysiwygContent { .titleWysiwygContent {
font-family: "Oswald",sans-serif; font-family: "Oswald",sans-serif;
font-weight: normal; font-weight: bold;
text-transform: none; text-transform: none;
font-size: 1.0em; font-size: 1.0em;
margin: 10px; margin: 10px;

View File

@ -120,25 +120,6 @@ $(".themeFooterContent").on("change",function() {
// Modification dynamique de la mise en page // Modification dynamique de la mise en page
$("#themeFooterTemplate").on("change",function() { $("#themeFooterTemplate").on("change",function() {
// Nettoyage des sélecteurs des contenus // Nettoyage des sélecteurs des contenus
var newOptions = {};
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo " newOptions = {
4: {'hide' : 'Masqué', 'left' : 'En haut', 'center' : 'Au milieu', 'right' : 'En bas'} ,
3: {'hide': 'Masqué', 'left': 'A gauche', 'center': 'Au centre', 'right': 'A droite'} ,
2: {'hide': 'Masqué', 'left': 'A gauche', 'right': 'A droite'} ,
1: {'hide': 'Masqué', 'center': 'Affiché'}
};";
}
else{
echo " newOptions = {
4: {'hide' : 'Hidden', 'left' : 'Top', 'center' : 'Middle', 'right' : 'Bottom'} ,
3: {'hide': 'Hidden', 'left': 'Left', 'center': 'Center', 'right': 'Right'} ,
2: {'hide': 'Hidden', 'left': 'Left', 'right': 'Right'} ,
1: {'hide': 'Hidden', 'center': 'Display'}
};" ;
} ?>
var $el = $(".themeFooterContent"); var $el = $(".themeFooterContent");
$el.empty(); $el.empty();
// Eléments des position de contenus // Eléments des position de contenus

View File

@ -1,130 +1,26 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { // Passage de la langue d'administration à Tinymce
case 'fr' : ?>
$text[0] = 'Retour'; <script>
$text[1] = 'Aide'; var lang_admin = "<?php echo $lang_admin ?>";
$text[2] = 'Enregistrer'; </script>
$text[3] = 'Paramètres'; <?php
$text[4] = 'Position'; // Inclusion de tinymce
$text[5] = 'Marges verticales'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/tinymce.min.js' . '"></script>';
$text[6] = 'Couleurs'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.js' . '"></script>';
$text[7] = 'Texte'; echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.css' . '">';
$text[8] = 'Arrière-plan'; echo template::formOpen('themeFooterForm');
$text[9] = 'Quand le pied de page est dans le site, l\'arrière plan transparent montre le fond de la page. Quand le pied de page est hors du site, l\'arrière plan transparent montre le fond du site.';
$text[10] = 'Contenu';
$text[11] = 'Motorisé par';
$text[12] = 'Affiche cette mention devant DeltaCMS';
$text[13] = 'Version';
$text[14] = 'Affiche le numéro de version après DeltaCMS';
$text[15] = 'Plan du site';
$text[16] = 'Cookies';
$text[17] = 'Message d\'information relatif aux cookies, disponible si l\'acceptation des cookies est activé.';
$text[18] = 'Lien de connexion';
$text[19] = 'Pour limiter les tentatives de piratage, enregistrez la page de connexion en favori et désactivez cette option.';
$text[20] = 'Barre du membre';
$text[21] = 'Affiche les icônes de gestion du compte et de déconnexion des membres simples connectés, ne s\'applique pas aux éditeurs et administrateurs.';
$text[22] = 'Mentions légales';
$text[23] = 'Option active si une page a été sélectionnée.';
$text[24] = 'Aucune';
$text[25] = 'Page "Mentions légales" ';
$text[26] = 'Rechercher';
$text[27] = 'Option active si une page a été sélectionnée.';
$text[28] = 'Page "Rechercher" ';
$text[29] = 'Options identique à la configuration du site';
$text[30] = 'Mise en forme du texte';
$text[31] = 'Police';
$text[32] = 'Taille';
$text[33] = 'Proportionnelle à celle définie dans le site.';
$text[34] = 'Style';
$text[35] = 'Casse';
$text[36] = 'Dispositions';
$text[37] = 'Répartition';
$text[38] = 'Contenu personnalisé';
$text[39] = 'Position';
$text[40] = 'Alignement';
$text[41] = 'Réseaux sociaux';
$text[42] = 'Informations';
$text[43] = 'Alignement avec le contenu';
$text[44] = 'Pied de page fixe';
$text[45] = 'Contenu personnalisé';
$footerPositions = $module::$footerPositions;
$footerHeights = $module::$footerHeights;
$footerFontSizes = $module::$footerFontSizes;
$fontWeights = $module::$fontWeights;
$textTransforms = $module::$textTransforms;
$footerblocks = $module::$footerblocks;
$footerTemplate = $module::$footerTemplate;
$aligns = $module::$aligns;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'Settings';
$text[4] = 'Position';
$text[5] = 'Vertical margins';
$text[6] = 'Colours';
$text[7] = 'Text';
$text[8] = 'Background';
$text[9] = 'When the footer is inside the site, the transparent background shows the page background. When the footer is outside the site, the transparent background shows the site background';
$text[10] = 'Content';
$text[11] = 'Powered by';
$text[12] = 'Displays this in front of DeltaCMS';
$text[13] = 'Version';
$text[14] = 'Displays the version number after DeltaCMS';
$text[15] = 'Site map';
$text[16] = 'Cookies';
$text[17] = 'Cookie information message, available if cookie acceptance is enabled';
$text[18] = 'Login link';
$text[19] = 'To limit hacking attempts, save the login page as a favourite and disable this option';
$text[20] = 'Member bar';
$text[21] = 'Displays account management and logout icons for simple logged-in members, does not apply to editors and administrators';
$text[22] = 'Legal notice';
$text[23] = 'Option active if a page has been selected';
$text[24] = 'None';
$text[25] = 'Legal page ';
$text[26] = 'Search';
$text[27] = 'Option active if a page has been selected';
$text[28] = 'Search page ';
$text[29] = 'Options same as site configuration';
$text[30] = 'Text formatting';
$text[31] = 'Font';
$text[32] = 'Size';
$text[33] = 'Proportional to that defined in the site';
$text[34] = 'Style';
$text[35] = 'Character case';
$text[36] = 'Layout';
$text[37] = 'Breakdown';
$text[38] = 'Custom content';
$text[39] = 'Position';
$text[40] = 'Alignment';
$text[41] = 'Social networks';
$text[42] = 'Information';
$text[43] = 'Alignment with content';
$text[44] = 'Fixed footer';
$text[45] = 'Customised content';
$footerPositions = $module::$footerPositions_en;
$footerHeights = $module::$footerHeights_en;
$footerFontSizes = $module::$footerFontSizes_en;
$fontWeights = $module::$fontWeights_en;
$textTransforms = $module::$textTransforms_en;
$footerblocks = $module::$footerblocks_en;
$footerTemplate = $module::$footerTemplate_en;
$aligns = $module::$aligns_en;
break;
}
?> ?>
<?php echo template::formOpen('themeFooterForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeFooterBack', [ <?php echo template::button('themeFooterBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['footer'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -132,30 +28,30 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/personnalisation-du-pied-de-page', 'href' => 'https://doc.deltacms.fr/personnalisation-du-pied-de-page',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['footer'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('themeFooterSubmit',[ <?php echo template::submit('themeFooterSubmit',[
'value' => $text[2] 'value' => $text['core_theme_view']['footer'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_theme_view']['footer'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeFooterPosition', $footerPositions, [ <?php echo template::select('themeFooterPosition', $footerPositions, [
'label' => $text[4], 'label' => $text['core_theme_view']['footer'][4],
'selected' => $this->getData(['theme', 'footer', 'position']) 'selected' => $this->getData(['theme', 'footer', 'position'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeFooterHeight', $footerHeights, [ <?php echo template::select('themeFooterHeight', $footerHeights, [
'label' => $text[5], 'label' => $text['core_theme_view']['footer'][5],
'selected' => $this->getData(['theme', 'footer', 'height']) 'selected' => $this->getData(['theme', 'footer', 'height'])
]); ?> ]); ?>
</div> </div>
@ -166,21 +62,21 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[6]; ?></h4> <h4><?php echo $text['core_theme_view']['footer'][6]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('themeFooterTextColor', [ <?php echo template::text('themeFooterTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'label' => $text[7], 'label' => $text['core_theme_view']['footer'][7],
'value' => $this->getData(['theme', 'footer', 'textColor']) 'value' => $this->getData(['theme', 'footer', 'textColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('themeFooterBackgroundColor', [ <?php echo template::text('themeFooterBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'label' => $text[8], 'label' => $text['core_theme_view']['footer'][8],
'value' => $this->getData(['theme', 'footer', 'backgroundColor']), 'value' => $this->getData(['theme', 'footer', 'backgroundColor']),
'help' => $text[9] 'help' => $text['core_theme_view']['footer'][9]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -190,77 +86,77 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[10]; ?></h4> <h4><?php echo $text['core_theme_view']['footer'][10]; ?></h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themefooterDisplayCopyright', true, $text[11], [ <?php echo template::checkbox('themefooterDisplayCopyright', true, $text['core_theme_view']['footer'][11], [
'checked' => $this->getData(['theme', 'footer','displayCopyright']), 'checked' => $this->getData(['theme', 'footer','displayCopyright']),
'help' => $text[12] 'help' => $text['core_theme_view']['footer'][12]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themefooterDisplayVersion', true, $text[13], [ <?php echo template::checkbox('themefooterDisplayVersion', true, $text['core_theme_view']['footer'][13], [
'checked' => $this->getData(['theme', 'footer','displayVersion']), 'checked' => $this->getData(['theme', 'footer','displayVersion']),
'help' => $text[14] 'help' => $text['core_theme_view']['footer'][14]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themefooterDisplaySiteMap', true, $text[15], [ <?php echo template::checkbox('themefooterDisplaySiteMap', true, $text['core_theme_view']['footer'][15], [
'checked' => $this->getData(['theme', 'footer', 'displaySiteMap']) 'checked' => $this->getData(['theme', 'footer', 'displaySiteMap'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themefooterDisplayCookie', true, $text[16], [ <?php echo template::checkbox('themefooterDisplayCookie', true, $text['core_theme_view']['footer'][16], [
'checked' => $this->getData(['config', 'cookieConsent']) === true ? $this->getData(['theme', 'footer', 'displayCookie']) : false, 'checked' => $this->getData(['config', 'cookieConsent']) === true ? $this->getData(['theme', 'footer', 'displayCookie']) : false,
'help' => $text[17], 'help' => $text['core_theme_view']['footer'][17],
'disabled' => !$this->getData(['config', 'cookieConsent']) 'disabled' => !$this->getData(['config', 'cookieConsent'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themeFooterLoginLink', true, $text[18], [ <?php echo template::checkbox('themeFooterLoginLink', true, $text['core_theme_view']['footer'][18], [
'checked' => $this->getData(['theme', 'footer', 'loginLink']), 'checked' => $this->getData(['theme', 'footer', 'loginLink']),
'help' => $text[19] 'help' => $text['core_theme_view']['footer'][19]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themeFooterDisplayMemberBar', true, $text[20], [ <?php echo template::checkbox('themeFooterDisplayMemberBar', true, $text['core_theme_view']['footer'][20], [
'checked' => $this->getData(['theme', 'footer', 'displayMemberBar']), 'checked' => $this->getData(['theme', 'footer', 'displayMemberBar']),
'help' => $text[21] 'help' => $text['core_theme_view']['footer'][21]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themeFooterDisplayLegal', true, $text[22], [ <?php echo template::checkbox('themeFooterDisplayLegal', true, $text['core_theme_view']['footer'][22], [
'checked' => $this->getData(['locale', 'legalPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displayLegal']), 'checked' => $this->getData(['locale', 'legalPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displayLegal']),
'disabled' => $this->getData(['locale', 'legalPageId']) === 'none' ? true : false, 'disabled' => $this->getData(['locale', 'legalPageId']) === 'none' ? true : false,
'help' => $text[23] 'help' => $text['core_theme_view']['footer'][23]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php // drapeau pour la langue d'origine ou la langue en traduction rédigée <?php // drapeau pour la langue d'origine ou la langue en traduction rédigée
$flag = 'site'; $flag = 'site';
if( $this->getInput('DELTA_I18N_SITE') === 'base') $flag = $this->getData(['config', 'i18n', 'langBase']); ?> if( $this->getInput('DELTA_I18N_SITE') === 'base') $flag = $this->getData(['config', 'i18n', 'langBase']); ?>
<?php echo template::select('configLegalPageId', array_merge(['none' => $text[24]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [ <?php echo template::select('configLegalPageId', array_merge(['none' => $text['core_theme_view']['footer'][24]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => $text[25] . template::flag($flag, '20px'), 'label' => $text['core_theme_view']['footer'][25] . template::flag($flag, '20px'),
'selected' => $this->getData(['locale', 'legalPageId']) 'selected' => $this->getData(['locale', 'legalPageId'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themeFooterDisplaySearch', true, $text[26], [ <?php echo template::checkbox('themeFooterDisplaySearch', true, $text['core_theme_view']['footer'][26], [
'checked' => $this->getData(['locale', 'searchPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displaySearch']), 'checked' => $this->getData(['locale', 'searchPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displaySearch']),
'disabled' => $this->getData(['locale', 'searchPageId']) === 'none' ? true : false, 'disabled' => $this->getData(['locale', 'searchPageId']) === 'none' ? true : false,
'help' => $text[27] 'help' => $text['core_theme_view']['footer'][27]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('configSearchPageId', array_merge(['none' => $text[24]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [ <?php echo template::select('configSearchPageId', array_merge(['none' => $text['core_theme_view']['footer'][24]] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => $text[28] . template::flag($flag, '20px'), 'label' => $text['core_theme_view']['footer'][28] . template::flag($flag, '20px'),
'selected' => $this->getData(['locale', 'searchPageId']), 'selected' => $this->getData(['locale', 'searchPageId']),
'help' => $text[29] 'help' => $text['core_theme_view']['footer'][29]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -270,7 +166,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::textarea('themeFooterText', [ <?php echo template::textarea('themeFooterText', [
'label' => '<div class="titleWysiwygContent">'.$text[45].'</div>', 'label' => '<div class="titleWysiwygContent">'.$text['core_theme_view']['footer'][45].'</div>',
'value' => $this->getData(['theme', 'footer', 'text']), 'value' => $this->getData(['theme', 'footer', 'text']),
'class' => 'editorWysiwyg' 'class' => 'editorWysiwyg'
]); ?> ]); ?>
@ -279,31 +175,31 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[30]; ?></h4> <h4><?php echo $text['core_theme_view']['footer'][30]; ?></h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::select('themeFooterFont', $module::$fonts, [ <?php echo template::select('themeFooterFont', $module::$fonts, [
'label' => $text[31], 'label' => $text['core_theme_view']['footer'][31],
'selected' => $this->getData(['theme', 'footer', 'font']), 'selected' => $this->getData(['theme', 'footer', 'font']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('themeFooterFontSize', $footerFontSizes, [ <?php echo template::select('themeFooterFontSize', $footerFontSizes, [
'label' => $text[32], 'label' => $text['core_theme_view']['footer'][32],
'help' => $text[33], 'help' => $text['core_theme_view']['footer'][33],
'selected' => $this->getData(['theme', 'footer', 'fontSize']) 'selected' => $this->getData(['theme', 'footer', 'fontSize'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('themeFooterFontWeight', $fontWeights, [ <?php echo template::select('themeFooterFontWeight', $fontWeights, [
'label' => $text[34], 'label' => $text['core_theme_view']['footer'][34],
'selected' => $this->getData(['theme', 'footer', 'fontWeight']) 'selected' => $this->getData(['theme', 'footer', 'fontWeight'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('themeFooterTextTransform', $textTransforms, [ <?php echo template::select('themeFooterTextTransform', $textTransforms, [
'label' => $text[35], 'label' => $text['core_theme_view']['footer'][35],
'selected' => $this->getData(['theme', 'footer', 'textTransform']) 'selected' => $this->getData(['theme', 'footer', 'textTransform'])
]); ?> ]); ?>
</div> </div>
@ -314,23 +210,23 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[36]; ?></h4> <h4><?php echo $text['core_theme_view']['footer'][36]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php $footerBlockPosition = is_null($this->getData(['theme', 'footer', 'template'])) ? $footerblocks[3] : $footerblocks [$this->getData(['theme', 'footer', 'template'])] ;?> <?php $footerBlockPosition = is_null($this->getData(['theme', 'footer', 'template'])) ? $footerblocks[3] : $footerblocks [$this->getData(['theme', 'footer', 'template'])] ;?>
<?php echo template::select('themeFooterTemplate', $footerTemplate, [ <?php echo template::select('themeFooterTemplate', $footerTemplate, [
'label' => $text[37], 'label' => $text['core_theme_view']['footer'][37],
'selected' => is_null($this->getData(['theme', 'footer', 'template'])) ? 4 : $this->getData(['theme', 'footer', 'template']) 'selected' => is_null($this->getData(['theme', 'footer', 'template'])) ? 4 : $this->getData(['theme', 'footer', 'template'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<p><strong><?php echo $text[38]; ?></strong></p> <p><strong><?php echo $text['core_theme_view']['footer'][38]; ?></strong></p>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::select('themeFooterTextPosition', $footerBlockPosition, [ <?php echo template::select('themeFooterTextPosition', $footerBlockPosition, [
'label' => $text[39], 'label' => $text['core_theme_view']['footer'][39],
'selected' => $this->getData(['theme', 'footer', 'textPosition']), 'selected' => $this->getData(['theme', 'footer', 'textPosition']),
'class' => 'themeFooterContent' 'class' => 'themeFooterContent'
]); ?> ]); ?>
@ -339,18 +235,18 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::select('themeFooterTextAlign', $aligns, [ <?php echo template::select('themeFooterTextAlign', $aligns, [
'label' => $text[40], 'label' => $text['core_theme_view']['footer'][40],
'selected' => $this->getData(['theme', 'footer', 'textAlign']) 'selected' => $this->getData(['theme', 'footer', 'textAlign'])
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
<div class="col4"> <div class="col4">
<p><strong><?php echo $text[41]; ?></strong></p> <p><strong><?php echo $text['core_theme_view']['footer'][41]; ?></strong></p>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::select('themeFooterSocialsPosition', $footerBlockPosition, [ <?php echo template::select('themeFooterSocialsPosition', $footerBlockPosition, [
'label' => $text[39], 'label' => $text['core_theme_view']['footer'][39],
'selected' => $this->getData(['theme', 'footer', 'socialsPosition']), 'selected' => $this->getData(['theme', 'footer', 'socialsPosition']),
'class' => 'themeFooterContent' 'class' => 'themeFooterContent'
]); ?> ]); ?>
@ -359,18 +255,18 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::select('themeFooterSocialsAlign', $aligns, [ <?php echo template::select('themeFooterSocialsAlign', $aligns, [
'label' => $text[40], 'label' => $text['core_theme_view']['footer'][40],
'selected' => $this->getData(['theme', 'footer', 'socialsAlign']) 'selected' => $this->getData(['theme', 'footer', 'socialsAlign'])
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
<div class="col4"> <div class="col4">
<p><strong><?php echo $text[42]; ?></strong></p> <p><strong><?php echo $text['core_theme_view']['footer'][42]; ?></strong></p>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::select('themeFooterCopyrightPosition', $footerBlockPosition, [ <?php echo template::select('themeFooterCopyrightPosition', $footerBlockPosition, [
'label' => $text[39], 'label' => $text['core_theme_view']['footer'][39],
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']), 'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']),
'class' => 'themeFooterContent' 'class' => 'themeFooterContent'
]); ?> ]); ?>
@ -379,7 +275,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::select('themeFooterCopyrightAlign', $aligns, [ <?php echo template::select('themeFooterCopyrightAlign', $aligns, [
'label' => $text[40], 'label' => $text['core_theme_view']['footer'][40],
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign']) 'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
]); ?> ]); ?>
</div> </div>
@ -387,14 +283,14 @@ switch ($val) {
</div> </div>
<div class="col6"> <div class="col6">
<div id="themeFooterPositionOptions"> <div id="themeFooterPositionOptions">
<?php echo template::checkbox('themeFooterMargin', true, $text[43], [ <?php echo template::checkbox('themeFooterMargin', true, $text['core_theme_view']['footer'][43], [
'checked' => $this->getData(['theme', 'footer', 'margin']) 'checked' => $this->getData(['theme', 'footer', 'margin'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="col6"> <div class="col6">
<div id="themeFooterPositionFixed" class="displayNone"> <div id="themeFooterPositionFixed" class="displayNone">
<?php echo template::checkbox('themeFooterFixed', true, $text[44], [ <?php echo template::checkbox('themeFooterFixed', true, $text['core_theme_view']['footer'][44], [
'checked' => $this->getData(['theme', 'footer', 'fixed']) 'checked' => $this->getData(['theme', 'footer', 'fixed'])
]); ?> ]); ?>
</div> </div>
@ -404,3 +300,6 @@ switch ($val) {
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var newOptions = <?php echo $text['core_theme_view']['footer'][46]; ?>;
</script>

View File

@ -23,7 +23,7 @@
*/ */
.titleWysiwygContent { .titleWysiwygContent {
font-family: "Oswald",sans-serif; font-family: "Oswald",sans-serif;
font-weight: normal; font-weight: bold;
text-transform: none; text-transform: none;
font-size: 1.0em; font-size: 1.0em;
margin: 10px; margin: 10px;

View File

@ -70,14 +70,7 @@ $("input, select").on("change", function() {
// Modifier la valeur // Modifier la valeur
$("#themeHeaderHeight option:eq(0)").val(tmpImgHeight + "px"); $("#themeHeaderHeight option:eq(0)").val(tmpImgHeight + "px");
// Modifier l'option // Modifier l'option
var text=""; $("#themeHeaderHeight option:eq(0)").html( textOption + tmpImgHeight + "px)");
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Hauteur de l\'image sélectionnée (";' ;
}
else{
echo 'text = "Height of the selected image (";' ;
} ?>
$("#themeHeaderHeight option:eq(0)").html( text + tmpImgHeight + "px)");
} }
}; };

View File

@ -1,114 +1,27 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']); // Passage de la langue d'administration à Tinymce
switch ($val) { ?>
case 'fr' : <script>
$text[0] = 'Retour'; var lang_admin = "<?php echo $lang_admin ?>";
$text[1] = 'Aide'; </script>
$text[2] = 'Paramètres'; <?php
$text[3] = 'Position'; // Inclusion de tinymce
$text[4] = 'Nature de contenu'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/tinymce.min.js' . '"></script>';
$text[5] = 'Hauteur maximale'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.js' . '"></script>';
$text[6] = 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures. <br />Lorsque l\'adaptation est positionnée sur Responsive, la hauteur diminue proportionnellement à la largeur.'; echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.css' . '">';
$text[7] = 'Largeur'; echo template::formOpen('themeFooterForm');
$text[8] = 'Masquer la bannière en écran réduit';
$text[9] = 'Aligner la bannière avec le contenu'; echo template::formOpen('themeHeaderForm');
$text[10] = 'Couleurs';
$text[11] = 'Le curseur horizontal règle le niveau de transparence.';
$text[12] = 'Arrière-plan';
$text[13] = 'Le curseur horizontal règle le niveau de transparence.';
$text[14] = 'Texte';
$text[15] = 'Mise en forme du titre';
$text[16] = 'Masquer le titre du site';
$text[17] = 'Police';
$text[18] = 'Taille';
$text[19] = 'Style';
$text[20] = 'Casse';
$text[21] = 'Proportionnelle à celle définie dans le site.';
$text[22] = 'Alignement du contenu';
$text[23] = 'Papier peint';
$text[24] = 'Sélectionner une image aux dimensions recommandées ci-dessous :';
$text[25] = 'Image';
$text[26] = 'Répétition';
$text[27] = 'Adaptation';
$text[28] = 'Les modes responsives permettent de conserver des dimensions proportionnelles.<br />Cover pour une image plus grande que la bannière, Contain pour une image plus petite. Les modes Auto et Etiré ne provoquent pas de modification de la hauteur de la bannière.';
$text[29] = 'Bannière cliquable';
$text[30] = 'Largeur : ';
$text[31] = ' | Hauteur : ';
$text[32] = ' | ratio : ';
$text[33] = 'Contenu personnalisé';
$text[34] ='Enregistrer';
$headerPositions = $module::$headerPositions;
$headerFeatures = $module::$headerFeatures;
$headerHeights = $module::$headerHeights;
$containerWides = $module::$containerWides;
$headerFontSizes = $module::$headerFontSizes;
$fontWeights = $module::$fontWeights;
$textTransforms = $module::$textTransforms;
$aligns = $module::$aligns;
$repeats = $module::$repeats;
$headerWide = $module::$headerWide;
$imagePositions = $module::$imagePositions;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Settings';
$text[3] = 'Position';
$text[4] = 'Type of content';
$text[5] = 'Maximum height';
$text[6] = 'The maximum height is 600 pixels, even if the selected image size is larger. <br/>When the adaptation is set to Responsive, the height decreases in proportion to the width.';
$text[7] = 'Width';
$text[8] = 'Hide banner in small screen';
$text[9] = 'Align banner with content';
$text[10] = 'Colors';
$text[11] = 'Horizontal slider sets transparency level';
$text[12] = 'Background';
$text[13] = 'Horizontal slider sets transparency level';
$text[14] = 'Text';
$text[15] = 'Title formatting';
$text[16] = 'Hide site title';
$text[17] = 'Font';
$text[18] = 'Size';
$text[19] = 'Style';
$text[20] = 'Character case';
$text[21] = 'Proportional to that defined in the site';
$text[22] = 'Content alignment';
$text[23] = 'Wallpaper';
$text[24] = 'Select an image with the following recommended dimensions:';
$text[25] = 'Image';
$text[26] = 'Repeat';
$text[27] = 'Adaptation';
$text[28] = 'Responsive modes allow proportional dimensions to be maintained.<br/>Cover for an image larger than the banner, Contain for a smaller image. The Auto and Stretch modes do not change the height of the banner.';
$text[29] = 'Clickable banner';
$text[30] = 'Width : ';
$text[31] = ' | Height : ';
$text[32] = ' | ratio : ';
$text[33] = 'Custom content';
$text[34] ='Save';
$headerPositions = $module::$headerPositions_en;
$headerFeatures = $module::$headerFeatures_en;
$headerHeights = $module::$headerHeights_en;
$containerWides = $module::$containerWides_en;
$headerFontSizes = $module::$headerFontSizes_en;
$fontWeights = $module::$fontWeights_en;
$textTransforms = $module::$textTransforms_en;
$aligns = $module::$aligns_en;
$repeats = $module::$repeats_en;
$headerWide = $module::$headerWide_en;
$imagePositions = $module::$imagePositions_en;
break;
}
?> ?>
<?php echo template::formOpen('themeHeaderForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeHeaderBack', [ <?php echo template::button('themeHeaderBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['header'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -116,59 +29,59 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/personnalisation-de-la-banniere', 'href' => 'https://doc.deltacms.fr/personnalisation-de-la-banniere',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['header'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('themeHeaderSubmit',[ <?php echo template::submit('themeHeaderSubmit',[
'value' => $text[34] 'value' => $text['core_theme_view']['header'][34]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[2]; ?></h4> <h4><?php echo $text['core_theme_view']['header'][2]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderPosition', $headerPositions, [ <?php echo template::select('themeHeaderPosition', $headerPositions, [
'label' => $text[3], 'label' => $text['core_theme_view']['header'][3],
'selected' => $this->getData(['theme', 'header', 'position']) 'selected' => $this->getData(['theme', 'header', 'position'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderFeature', $headerFeatures, [ <?php echo template::select('themeHeaderFeature', $headerFeatures, [
'label' => $text[4], 'label' => $text['core_theme_view']['header'][4],
'selected' => $this->getData(['theme', 'header', 'feature']) 'selected' => $this->getData(['theme', 'header', 'feature'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderHeight', $headerHeights, [ <?php echo template::select('themeHeaderHeight', $headerHeights, [
'label' => $text[5], 'label' => $text['core_theme_view']['header'][5],
'selected' => $this->getData(['theme', 'header', 'height']), 'selected' => $this->getData(['theme', 'header', 'height']),
'help' => $text[6] 'help' => $text['core_theme_view']['header'][6]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderWide', $containerWides, [ <?php echo template::select('themeHeaderWide', $containerWides, [
'label' => $text[7], 'label' => $text['core_theme_view']['header'][7],
'selected' => $this->getData(['theme', 'header', 'wide']) 'selected' => $this->getData(['theme', 'header', 'wide'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<div id="themeHeaderSmallDisplay" class="displayNone"> <div id="themeHeaderSmallDisplay" class="displayNone">
<?php echo template::checkbox('themeHeaderTinyHidden', true, $text[8], [ <?php echo template::checkbox('themeHeaderTinyHidden', true, $text['core_theme_view']['header'][8], [
'checked' => $this->getData(['theme', 'header', 'tinyHidden']) 'checked' => $this->getData(['theme', 'header', 'tinyHidden'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="col4"> <div class="col4">
<div id="themeHeaderPositionOptions" class="displayNone"> <div id="themeHeaderPositionOptions" class="displayNone">
<?php echo template::checkbox('themeHeaderMargin', true, $text[9], [ <?php echo template::checkbox('themeHeaderMargin', true, $text['core_theme_view']['header'][9], [
'checked' => $this->getData(['theme', 'header', 'margin']) 'checked' => $this->getData(['theme', 'header', 'margin'])
]); ?> ]); ?>
</div> </div>
@ -180,21 +93,21 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[10]; ?></h4> <h4><?php echo $text['core_theme_view']['header'][10]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('themeHeaderBackgroundColor', [ <?php echo template::text('themeHeaderBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[11], 'help' => $text['core_theme_view']['header'][11],
'label' => $text[12], 'label' => $text['core_theme_view']['header'][12],
'value' => $this->getData(['theme', 'header', 'backgroundColor']) 'value' => $this->getData(['theme', 'header', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('themeHeaderTextColor', [ <?php echo template::text('themeHeaderTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[13], 'help' => $text['core_theme_view']['header'][13],
'label' => $text[14], 'label' => $text['core_theme_view']['header'][14],
'value' => $this->getData(['theme', 'header', 'textColor']) 'value' => $this->getData(['theme', 'header', 'textColor'])
]); ?> ]); ?>
</div> </div>
@ -205,24 +118,24 @@ switch ($val) {
<div class="row wallpaperContainer"> <div class="row wallpaperContainer">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[15]; ?></h4> <h4><?php echo $text['core_theme_view']['header'][15]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::checkbox('themeHeaderTextHide', true, $text[16], [ <?php echo template::checkbox('themeHeaderTextHide', true, $text['core_theme_view']['header'][16], [
'checked' => $this->getData(['theme', 'header', 'textHide']) 'checked' => $this->getData(['theme', 'header', 'textHide'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderFont', $module::$fonts, [ <?php echo template::select('themeHeaderFont', $module::$fonts, [
'label' => $text[17], 'label' => $text['core_theme_view']['header'][17],
'selected' => $this->getData(['theme', 'header', 'font']), 'selected' => $this->getData(['theme', 'header', 'font']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderFontSize', $headerFontSizes, [ <?php echo template::select('themeHeaderFontSize', $headerFontSizes, [
'label' => $text[18], 'label' => $text['core_theme_view']['header'][18],
'help' => $text[21], 'help' => $text['core_theme_view']['header'][21],
'selected' => $this->getData(['theme', 'header', 'fontSize']) 'selected' => $this->getData(['theme', 'header', 'fontSize'])
]); ?> ]); ?>
</div> </div>
@ -230,19 +143,19 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderFontWeight', $fontWeights, [ <?php echo template::select('themeHeaderFontWeight', $fontWeights, [
'label' => $text[19], 'label' => $text['core_theme_view']['header'][19],
'selected' => $this->getData(['theme', 'header', 'fontWeight']) 'selected' => $this->getData(['theme', 'header', 'fontWeight'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderTextTransform', $textTransforms, [ <?php echo template::select('themeHeaderTextTransform', $textTransforms, [
'label' => $text[20], 'label' => $text['core_theme_view']['header'][20],
'selected' => $this->getData(['theme', 'header', 'textTransform']) 'selected' => $this->getData(['theme', 'header', 'textTransform'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeHeaderTextAlign', $aligns, [ <?php echo template::select('themeHeaderTextAlign', $aligns, [
'label' => $text[22], 'label' => $text['core_theme_view']['header'][22],
'selected' => $this->getData(['theme', 'header', 'textAlign']) 'selected' => $this->getData(['theme', 'header', 'textAlign'])
]); ?> ]); ?>
</div> </div>
@ -254,15 +167,15 @@ switch ($val) {
<div class="row wallpaperContainer"> <div class="row wallpaperContainer">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[23]; ?></h4> <h4><?php echo $text['core_theme_view']['header'][23]; ?></h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php <?php
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ? $imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ?
$this->getData(['theme', 'header', 'image']) : ""; $this->getData(['theme', 'header', 'image']) : "";
echo template::file('themeHeaderImage', [ echo template::file('themeHeaderImage', [
'help' => $text[24], 'help' => $text['core_theme_view']['header'][24],
'label' => $text[25], 'label' => $text['core_theme_view']['header'][25],
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
]); ?> ]); ?>
@ -272,25 +185,25 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::select('themeHeaderImageRepeat', $repeats, [ <?php echo template::select('themeHeaderImageRepeat', $repeats, [
'label' => $text[26], 'label' => $text['core_theme_view']['header'][26],
'selected' => $this->getData(['theme', 'header', 'imageRepeat']) 'selected' => $this->getData(['theme', 'header', 'imageRepeat'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('themeHeaderImageContainer', $headerWide, [ <?php echo template::select('themeHeaderImageContainer', $headerWide, [
'label' => $text[27], 'label' => $text['core_theme_view']['header'][27],
'selected' => $this->getData(['theme', 'header', 'imageContainer']), 'selected' => $this->getData(['theme', 'header', 'imageContainer']),
'help' => $text[28] 'help' => $text['core_theme_view']['header'][28]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('themeHeaderImagePosition', $imagePositions, [ <?php echo template::select('themeHeaderImagePosition', $imagePositions, [
'label' => $text[3], 'label' => $text['core_theme_view']['header'][3],
'selected' => $this->getData(['theme', 'header', 'imagePosition']) 'selected' => $this->getData(['theme', 'header', 'imagePosition'])
]); ?> ]); ?>
</div> </div>
<div id="themeHeaderShow" class="col3"> <div id="themeHeaderShow" class="col3">
<?php echo template::checkbox('themeHeaderlinkHomePage', true, $text[29], [ <?php echo template::checkbox('themeHeaderlinkHomePage', true, $text['core_theme_view']['header'][29], [
'checked' => $this->getData(['theme', 'header', 'linkHomePage']) 'checked' => $this->getData(['theme', 'header', 'linkHomePage'])
]); ?> ]); ?>
</div> </div>
@ -298,7 +211,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12 textAlignCenter"> <div class="col12 textAlignCenter">
<span id="themeHeaderImage"> <span id="themeHeaderImage">
<?php echo $text[30]; ?><span id="themeHeaderImageWidth"></span><?php echo $text[31]; ?><span id="themeHeaderImageHeight"></span><?php echo $text[32]; ?><span id="themeHeaderImageRatio"></span> <?php echo $text['core_theme_view']['header'][30]; ?><span id="themeHeaderImageWidth"></span><?php echo $text['core_theme_view']['header'][31]; ?><span id="themeHeaderImageHeight"></span><?php echo $text['core_theme_view']['header'][32]; ?><span id="themeHeaderImageRatio"></span>
</span> </span>
</div> </div>
</div> </div>
@ -311,7 +224,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::textarea('themeHeaderText', [ <?php echo template::textarea('themeHeaderText', [
'label' => '<div class="titleWysiwygContent">'.$text[33].'</div>', 'label' => '<div class="titleWysiwygContent">'.$text['core_theme_view']['header'][33].'</div>',
'class' => 'editorWysiwyg', 'class' => 'editorWysiwyg',
'value' => $this->getData(['theme', 'header', 'featureContent']) 'value' => $this->getData(['theme', 'header', 'featureContent'])
]); ?> ]); ?>
@ -323,3 +236,6 @@ switch ($val) {
<?php echo $this->getData(['theme','header','featureContent']);?> <?php echo $this->getData(['theme','header','featureContent']);?>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var textOption = <?php echo $text['core_theme_view']['header'][35]; ?>;
</script>

View File

@ -1,45 +1,20 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { if(
case 'fr' :
$text[0] = 'Cliquez sur une zone afin d\'accéder à ses options de personnalisation. Vous pouvez également afficher les zones cachées à l\'aide du bouton ci-dessous.';
$text[1] = 'Accueil';
$text[2] = 'Aide';
$text[3] = 'Zones cachées';
$text[4] = 'Gestion';
$text[5] = 'Administration';
$text[6] = 'Éditeur CSS';
$text[7] = 'Polices';
$text[8] = 'Cliquez sur une zone afin d\'accéder à ses options de personnalisation.';
break;
case 'en' :
$text[0] = 'Click on an area to access its customisation options. You can also display hidden areas using the button below';
$text[1] = 'Home';
$text[2] = 'Help';
$text[3] = 'Hidden areas';
$text[4] = 'Management';
$text[5] = 'Administration';
$text[6] = 'CSS Editor';
$text[7] = 'Fonts';
$text[8] = 'Click on a zone to access its customisation options';
break;
}
?>
<?php if(
$this->getData(['theme', 'header', 'position']) === 'hide' $this->getData(['theme', 'header', 'position']) === 'hide'
OR $this->getData(['theme', 'menu', 'position']) === 'hide' OR $this->getData(['theme', 'menu', 'position']) === 'hide'
OR $this->getData(['theme', 'footer', 'position']) === 'hide' OR $this->getData(['theme', 'footer', 'position']) === 'hide'
): ?> ): ?>
<?php echo template::speech($text[0]); ?> <?php echo template::speech($text['core_theme_view']['index'][0]); ?>
<div class="row"> <div class="row">
<div class="col2 offset3"> <div class="col2 offset3">
<?php echo template::button('themeBack', [ <?php echo template::button('themeBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl(false), 'href' => helper::baseUrl(false),
'ico' => 'home', 'ico' => 'home',
'value' => $text[1] 'value' => $text['core_theme_view']['index'][1]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -47,14 +22,14 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/theme-2', 'href' => 'https://doc.deltacms.fr/theme-2',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[2], 'value' => $text['core_theme_view']['index'][2],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('themeShowAll', [ <?php echo template::button('themeShowAll', [
'ico' => 'eye', 'ico' => 'eye',
'value' => $text[3] 'value' => $text['core_theme_view']['index'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -63,14 +38,14 @@ switch ($val) {
<?php echo template::button('themeManage', [ <?php echo template::button('themeManage', [
'ico' => 'cogs', 'ico' => 'cogs',
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage', 'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
'value' => $text[4] 'value' => $text['core_theme_view']['index'][4]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('themeAdmin', [ <?php echo template::button('themeAdmin', [
'ico' => 'brush', 'ico' => 'brush',
'href' => helper::baseUrl() . $this->getUrl(0) . '/admin', 'href' => helper::baseUrl() . $this->getUrl(0) . '/admin',
'value' => $text[5] 'value' => $text['core_theme_view']['index'][5]
]); ?> ]); ?>
</div> </div>
@ -78,7 +53,7 @@ switch ($val) {
<?php echo template::button('themeAdvanced', [ <?php echo template::button('themeAdvanced', [
'ico' => 'code', 'ico' => 'code',
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced', 'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
'value' => $text[6] 'value' => $text['core_theme_view']['index'][6]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -87,19 +62,19 @@ switch ($val) {
<?php echo template::button('themeFonts', [ <?php echo template::button('themeFonts', [
'ico' => 'pencil', 'ico' => 'pencil',
'href' => helper::baseUrl() . $this->getUrl(0) . '/fonts', 'href' => helper::baseUrl() . $this->getUrl(0) . '/fonts',
'value' => $text[7] 'value' => $text['core_theme_view']['index'][7]
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php else: ?> <?php else: ?>
<?php echo template::speech($text[8]); ?> <?php echo template::speech($text['core_theme_view']['index'][8]); ?>
<div class="row"> <div class="row">
<div class="col2 offset4"> <div class="col2 offset4">
<?php echo template::button('themeBack', [ <?php echo template::button('themeBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl(false), 'href' => helper::baseUrl(false),
'ico' => 'home', 'ico' => 'home',
'value' => $text[1] 'value' => $text['core_theme_view']['index'][1]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -107,7 +82,7 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/theme-2', 'href' => 'https://doc.deltacms.fr/theme-2',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[2], 'value' => $text['core_theme_view']['index'][2],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
@ -117,14 +92,14 @@ switch ($val) {
<?php echo template::button('themeManage', [ <?php echo template::button('themeManage', [
'ico' => 'cogs', 'ico' => 'cogs',
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage', 'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
'value' => $text[4] 'value' => $text['core_theme_view']['index'][4]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('themeAdmin', [ <?php echo template::button('themeAdmin', [
'ico' => 'brush', 'ico' => 'brush',
'href' => helper::baseUrl() . $this->getUrl(0) . '/admin', 'href' => helper::baseUrl() . $this->getUrl(0) . '/admin',
'value' => $text[5] 'value' => $text['core_theme_view']['index'][5]
]); ?> ]); ?>
</div> </div>
@ -132,7 +107,7 @@ switch ($val) {
<?php echo template::button('themeAdvanced', [ <?php echo template::button('themeAdvanced', [
'ico' => 'code', 'ico' => 'code',
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced', 'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
'value' => $text[6] 'value' => $text['core_theme_view']['index'][6]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -141,7 +116,7 @@ switch ($val) {
<?php echo template::button('themeFonts', [ <?php echo template::button('themeFonts', [
'ico' => 'pencil', 'ico' => 'pencil',
'href' => helper::baseUrl() . $this->getUrl(0) . '/fonts', 'href' => helper::baseUrl() . $this->getUrl(0) . '/fonts',
'value' => $text[7] 'value' => $text['core_theme_view']['index'][7]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -19,14 +19,7 @@
*/ */
$("#configManageReset").on("click", function() { $("#configManageReset").on("click", function() {
var _this = $(this); var _this = $(this);
var text=""; return core.confirm(textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine le thème du site ?";' ;
}
else{
echo 'text = "Are you sure you want to reset the site theme to its original state ?";' ;
} ?>
return core.confirm(text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,50 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('themeManageForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Réinitialiser';
$text[3] = 'Appliquer';
$text[4] = 'Installer un thème archivé (site ou administration)';
$text[5] = 'Archive ZIP :';
$text[6] = 'Sauvegarde du thème dans les ';
$text[7] = 'fichiers';
$text[8] = ' du site';
$text[9] = 'Thème du site';
$text[10] = 'Thème de l\'administration';
$text[11] = 'Télécharger le thème';
$text[12] = 'Thème du site';
$text[13] = 'Thème de l\'administration';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Reset';
$text[3] = 'Apply';
$text[4] = 'Install archived theme (site or admin)';
$text[5] = 'ZIP archive:';
$text[6] = 'Save theme in ';
$text[7] = 'files';
$text[8] = ' of the site';
$text[9] = 'Site theme';
$text[10] = 'Administration theme';
$text[11] = 'Download theme';
$text[12] = 'Site theme';
$text[13] = 'Administration theme';
break;
}
?>
<?php echo template::formOpen('themeManageForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeManageBack', [ <?php echo template::button('themeManageBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['manage'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -52,7 +17,7 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/gestion', 'href' => 'https://doc.deltacms.fr/gestion',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['manage'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
@ -60,24 +25,24 @@ switch ($val) {
<?php echo template::button('configManageReset', [ <?php echo template::button('configManageReset', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/reset/manage' . '&csrf=' . $_SESSION['csrf'], 'href' => helper::baseUrl() . 'theme/reset/manage' . '&csrf=' . $_SESSION['csrf'],
'value' => $text[2], 'value' => $text['core_theme_view']['manage'][2],
'ico' => 'cancel' 'ico' => 'cancel'
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::submit('themeImportSubmit', [ <?php echo template::submit('themeImportSubmit', [
'value' => $text[3] 'value' => $text['core_theme_view']['manage'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[4]; ?></h4> <h4><?php echo $text['core_theme_view']['manage'][4]; ?></h4>
<div class="row"> <div class="row">
<div class="col6 offset3"> <div class="col6 offset3">
<?php echo template::file('themeManageImport', [ <?php echo template::file('themeManageImport', [
'label' => $text[5], 'label' => $text['core_theme_view']['manage'][5],
'type' => 2 'type' => 2
]); ?> ]); ?>
</div> </div>
@ -88,20 +53,20 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[6]; ?><a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR.'core.json'); ?>" data-lity><?php echo $text[7]; ?></a><?php echo $text[8]; ?></h4> <h4><?php echo $text['core_theme_view']['manage'][6]; ?><a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR.'core.json'); ?>" data-lity><?php echo $text['core_theme_view']['manage'][7]; ?></a><?php echo $text['core_theme_view']['manage'][8]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::button('themeSave', [ <?php echo template::button('themeSave', [
'href' => helper::baseUrl() . 'theme/save/theme', 'href' => helper::baseUrl() . 'theme/save/theme',
'ico' => 'download-cloud', 'ico' => 'download-cloud',
'value' => $text[9] 'value' => $text['core_theme_view']['manage'][9]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::button('themeSaveAdmin', [ <?php echo template::button('themeSaveAdmin', [
'href' => helper::baseUrl() . 'theme/save/admin', 'href' => helper::baseUrl() . 'theme/save/admin',
'ico' => 'download-cloud', 'ico' => 'download-cloud',
'value' => $text[10] 'value' => $text['core_theme_view']['manage'][10]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -110,20 +75,20 @@ switch ($val) {
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[11]; ?></h4> <h4><?php echo $text['core_theme_view']['manage'][11]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::button('themeExport', [ <?php echo template::button('themeExport', [
'href' => helper::baseUrl() . 'theme/export/theme', 'href' => helper::baseUrl() . 'theme/export/theme',
'ico' => 'download', 'ico' => 'download',
'value' => $text[12] 'value' => $text['core_theme_view']['manage'][12]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::button('themeExport', [ <?php echo template::button('themeExport', [
'href' => helper::baseUrl() . 'theme/export/admin', 'href' => helper::baseUrl() . 'theme/export/admin',
'ico' => 'download', 'ico' => 'download',
'value' => $text[13] 'value' => $text['core_theme_view']['manage'][13]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -131,3 +96,6 @@ switch ($val) {
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_theme_view']['manage'][14].'"'; ?>;
</script>

View File

@ -1,118 +1,15 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('themeMenuForm'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Enregistrer';
$text[3] = 'Paramètres';
$text[4] = 'Position';
$text[5] = 'Largeur';
$text[6] = 'Bords arrondis';
$text[7] = 'Autour de la page sélectionnée';
$text[8] = 'Hauteur';
$text[9] = 'Alignement du contenu';
$text[10] = 'Aligner le menu avec le contenu';
$text[11] = 'Menu fixe';
$text[12] = 'Contenus';
$text[13] = 'Lien de connexion';
$text[14] = 'Barre de membre';
$text[15] = 'Icônes de gestion de compte et de déconnexion. Uniquement pour les membres connectés';
$text[16] = 'Affichage dans le menu burger';
$text[17] = 'Le menu burger remplace le menu complet lorsque la largeur de l\'écran n\'est pas suffisante.';
$text[18] = 'Sélectionner une image, ses dimensions seront adaptées automatiquement';
$text[19] = 'Logo du menu burger';
$text[20] = 'Couleurs';
$text[21] = 'Le curseur horizontal règle le niveau de transparence.';
$text[22] = 'Texte';
$text[23] = 'Le curseur horizontal règle le niveau de transparence.';
$text[24] = 'Arrière-plan';
$text[25] = 'Fond du sous-menu';
$text[26] = 'Texte page active';
$text[27] = 'La couleur de fond de la page active peut être définie automatique ou selon une couleur définie, comme par exemple celle de fond des pages.';
$text[28] = 'Couleur de fond de la page sélectionnée dans le menu.<br>Le curseur horizontal règle le niveau de transparence.';
$text[29] = 'Fond page active';
$text[30] = 'Mise en forme du texte';
$text[31] = 'Police';
$text[32] = 'Taille';
$text[33] = 'Proportionnelle à celle définie dans le site';
$text[34] = 'Style';
$text[35] = 'Casse';
$text[36] = 'Couleur de fond automatique';
$menuPositionsSite = $module::$menuPositionsSite;
$menuPositionsBody = $module::$menuPositionsBody;
$containerWides = $module::$containerWides;
$menuRadius = $module::$menuRadius;
$menuHeights = $module::$menuHeights;
$aligns = $module::$aligns;
$burgerContent = $module::$burgerContent;
$menuFontSizes = $module::$menuFontSizes;
$menuBurgerFontSizes = $module::$menuBurgerFontSizes;
$fontWeights = $module::$fontWeights;
$textTransforms = $module::$textTransforms;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'Settings';
$text[4] = 'Position';
$text[5] = 'Width';
$text[6] = 'Rounded edges';
$text[7] = 'Around the selected page';
$text[8] = 'Height';
$text[9] = 'Alignment of content';
$text[10] = 'Align menu with content';
$text[11] = 'Fixed menu';
$text[12] = 'Contents';
$text[13] = 'Login link';
$text[14] = 'Member bar';
$text[15] = 'Account management and logout icons. Only for logged in members';
$text[16] = 'Display in burger menu';
$text[17] = 'The burger menu replaces the full menu when the screen width is not sufficient';
$text[18] = 'Select an image, its dimensions will be adapted automatically';
$text[19] = 'Logo of the burger menu';
$text[20] = 'Colors';
$text[21] = 'The horizontal slider sets the transparency level';
$text[22] = 'Text';
$text[23] = 'Horizontal slider sets transparency level';
$text[24] = 'Background';
$text[25] = 'Submenu background';
$text[26] = 'Text active page';
$text[27] = 'The background colour of the active page can be set automatically or according to a defined colour, such as the background colour of the pages.';
$text[28] = 'Background colour of the page selected in the menu.<br>The horizontal slider sets the transparency level.';
$text[29] = 'Active page background';
$text[30] = 'Text formatting';
$text[31] = 'Font';
$text[32] = 'Size';
$text[33] = 'Proportional to that defined in the site';
$text[34] = 'Style';
$text[35] = 'Character case';
$text[36] = 'Automatic background color';
$menuPositionsSite = $module::$menuPositionsSite_en;
$menuPositionsBody = $module::$menuPositionsBody_en;
$containerWides = $module::$containerWides_en;
$menuRadius = $module::$menuRadius_en;
$menuHeights = $module::$menuHeights_en;
$aligns = $module::$aligns_en;
$burgerContent = $module::$burgerContent_en;
$menuFontSizes = $module::$menuFontSizes_en;
$menuBurgerFontSizes = $module::$menuBurgerFontSizes_en;
$fontWeights = $module::$fontWeights_en;
$textTransforms = $module::$textTransforms_en;
break;
}
?>
<?php echo template::formOpen('themeMenuForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeMenuBack', [ <?php echo template::button('themeMenuBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['menu'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -120,38 +17,38 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/personnalisation-du-menu', 'href' => 'https://doc.deltacms.fr/personnalisation-du-menu',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['menu'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('themeMenuSubmit',[ <?php echo template::submit('themeMenuSubmit',[
'value' => $text[2] 'value' => $text['core_theme_view']['menu'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_theme_view']['menu'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php <?php
if ( $this->getData(['theme', 'header', 'position']) == "site") if ( $this->getData(['theme', 'header', 'position']) == "site")
{ echo template::select('themeMenuPosition', $menuPositionsSite, [ { echo template::select('themeMenuPosition', $menuPositionsSite, [
'label' => $text[4], 'label' => $text['core_theme_view']['menu'][4],
'selected' => $this->getData(['theme', 'menu', 'position']) 'selected' => $this->getData(['theme', 'menu', 'position'])
]); ]);
}else{ }else{
echo template::select('themeMenuPosition', $menuPositionsBody, [ echo template::select('themeMenuPosition', $menuPositionsBody, [
'label' => $text[4], 'label' => $text['core_theme_view']['menu'][4],
'selected' => $this->getData(['theme', 'menu', 'position']) 'selected' => $this->getData(['theme', 'menu', 'position'])
]); } ]); }
?> ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeMenuWide', $containerWides, [ <?php echo template::select('themeMenuWide', $containerWides, [
'label' => $text[5], 'label' => $text['core_theme_view']['menu'][5],
'selected' => $this->getData(['theme', 'menu', 'wide']) 'selected' => $this->getData(['theme', 'menu', 'wide'])
]); ?> ]); ?>
</div> </div>
@ -159,31 +56,31 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeMenuRadius', $menuRadius, [ <?php echo template::select('themeMenuRadius', $menuRadius, [
'label' => $text[6], 'label' => $text['core_theme_view']['menu'][6],
'selected' => $this->getData(['theme', 'menu', 'radius']), 'selected' => $this->getData(['theme', 'menu', 'radius']),
'help' => $text[7] 'help' => $text['core_theme_view']['menu'][7]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeMenuHeight', $menuHeights, [ <?php echo template::select('themeMenuHeight', $menuHeights, [
'label' => $text[8], 'label' => $text['core_theme_view']['menu'][8],
'selected' => $this->getData(['theme', 'menu', 'height']) 'selected' => $this->getData(['theme', 'menu', 'height'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeMenuTextAlign', $aligns, [ <?php echo template::select('themeMenuTextAlign', $aligns, [
'label' => $text[9], 'label' => $text['core_theme_view']['menu'][9],
'selected' => $this->getData(['theme', 'menu', 'textAlign']) 'selected' => $this->getData(['theme', 'menu', 'textAlign'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div id="themeMenuPositionOptions" class="displayNone"> <div id="themeMenuPositionOptions" class="displayNone">
<?php echo template::checkbox('themeMenuMargin', true, $text[10], [ <?php echo template::checkbox('themeMenuMargin', true, $text['core_theme_view']['menu'][10], [
'checked' => $this->getData(['theme', 'menu', 'margin']) 'checked' => $this->getData(['theme', 'menu', 'margin'])
]); ?> ]); ?>
</div> </div>
<div id="themeMenuPositionFixed" class="displayNone"> <div id="themeMenuPositionFixed" class="displayNone">
<?php echo template::checkbox('themeMenuFixed', true, $text[11], [ <?php echo template::checkbox('themeMenuFixed', true, $text['core_theme_view']['menu'][11], [
'checked' => $this->getData(['theme', 'menu', 'fixed']) 'checked' => $this->getData(['theme', 'menu', 'fixed'])
]); ?> ]); ?>
</div> </div>
@ -193,24 +90,24 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[12]; ?></h4> <h4><?php echo $text['core_theme_view']['menu'][12]; ?></h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themeMenuLoginLink', true, $text[13], [ <?php echo template::checkbox('themeMenuLoginLink', true, $text['core_theme_view']['menu'][13], [
'checked' => $this->getData(['theme', 'menu', 'loginLink']) 'checked' => $this->getData(['theme', 'menu', 'loginLink'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::checkbox('themeMenuMemberBar', true, $text[14], [ <?php echo template::checkbox('themeMenuMemberBar', true, $text['core_theme_view']['menu'][14], [
'checked' => $this->getData(['theme', 'menu', 'memberBar']), 'checked' => $this->getData(['theme', 'menu', 'memberBar']),
'help' => $text[15] 'help' => $text['core_theme_view']['menu'][15]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeMenuBurgerContent', $burgerContent, [ <?php echo template::select('themeMenuBurgerContent', $burgerContent, [
'label' => $text[16], 'label' => $text['core_theme_view']['menu'][16],
'selected' => $this->getData(['theme', 'menu', 'burgerContent']), 'selected' => $this->getData(['theme', 'menu', 'burgerContent']),
'help' => $text[17] 'help' => $text['core_theme_view']['menu'][17]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -219,15 +116,15 @@ switch ($val) {
<div class="col3 offset6"> <div class="col3 offset6">
<?php echo template::text('themeMenuBurgerTextColor', [ <?php echo template::text('themeMenuBurgerTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[21], 'help' => $text['core_theme_view']['menu'][21],
'label' => $text[22], 'label' => $text['core_theme_view']['menu'][22],
'value' => $this->getData(['theme', 'menu', 'burgerTextColor']) 'value' => $this->getData(['theme', 'menu', 'burgerTextColor'])
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::select('themeMenuBurgerFontSize', $menuBurgerFontSizes, [ <?php echo template::select('themeMenuBurgerFontSize', $menuBurgerFontSizes, [
'label' => $text[32], 'label' => $text['core_theme_view']['menu'][32],
'help' => $text[33], 'help' => $text['core_theme_view']['menu'][33],
'selected' => $this->getData(['theme', 'menu', 'burgerFontSize']) 'selected' => $this->getData(['theme', 'menu', 'burgerFontSize'])
]); ?> ]); ?>
</div> </div>
@ -239,8 +136,8 @@ switch ($val) {
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'menu', 'burgerLogo'])) ? $imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'menu', 'burgerLogo'])) ?
$this->getData(['theme', 'menu', 'burgerLogo']) : ""; $this->getData(['theme', 'menu', 'burgerLogo']) : "";
echo template::file('themeMenuBurgerLogo', [ echo template::file('themeMenuBurgerLogo', [
'help' => $text[18], 'help' => $text['core_theme_view']['menu'][18],
'label' => $text[19], 'label' => $text['core_theme_view']['menu'][19],
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
]); ?> ]); ?>
@ -252,29 +149,29 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[20]; ?></h4> <h4><?php echo $text['core_theme_view']['menu'][20]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('themeMenuTextColor', [ <?php echo template::text('themeMenuTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[21], 'help' => $text['core_theme_view']['menu'][21],
'label' => $text[22], 'label' => $text['core_theme_view']['menu'][22],
'value' => $this->getData(['theme', 'menu', 'textColor']) 'value' => $this->getData(['theme', 'menu', 'textColor'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('themeMenuBackgroundColor', [ <?php echo template::text('themeMenuBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[23], 'help' => $text['core_theme_view']['menu'][23],
'label' => $text[24], 'label' => $text['core_theme_view']['menu'][24],
'value' => $this->getData(['theme', 'menu', 'backgroundColor']) 'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('themeMenuBackgroundColorSub', [ <?php echo template::text('themeMenuBackgroundColorSub', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[23], 'help' => $text['core_theme_view']['menu'][23],
'label' => $text[25], 'label' => $text['core_theme_view']['menu'][25],
'value' => $this->getData(['theme', 'menu', 'backgroundColorSub']) 'value' => $this->getData(['theme', 'menu', 'backgroundColorSub'])
]); ?> ]); ?>
</div> </div>
@ -283,23 +180,23 @@ switch ($val) {
<div class="col4"> <div class="col4">
<?php echo template::text('themeMenuActiveTextColor', [ <?php echo template::text('themeMenuActiveTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[23], 'help' => $text['core_theme_view']['menu'][23],
'label' => $text[26], 'label' => $text['core_theme_view']['menu'][26],
'value' => $this->getData(['theme', 'menu', 'activeTextColor']) 'value' => $this->getData(['theme', 'menu', 'activeTextColor'])
]); ?> ]); ?>
</div> </div>
<div class="col4 verticalAlignBottom"> <div class="col4 verticalAlignBottom">
<?php <?php
echo template::checkbox('themeMenuActiveColorAuto', true, $text[36], [ echo template::checkbox('themeMenuActiveColorAuto', true, $text['core_theme_view']['menu'][36], [
'checked' => $this->getData(['theme', 'menu', 'activeColorAuto']), 'checked' => $this->getData(['theme', 'menu', 'activeColorAuto']),
'help' => $text[27] 'help' => $text['core_theme_view']['menu'][27]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('themeMenuActiveColor', [ <?php echo template::text('themeMenuActiveColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[28], 'help' => $text['core_theme_view']['menu'][28],
'label' => $text[29], 'label' => $text['core_theme_view']['menu'][29],
'value' => $this->getData(['theme', 'menu', 'activeColor']) 'value' => $this->getData(['theme', 'menu', 'activeColor'])
]); ?> ]); ?>
</div> </div>
@ -310,19 +207,19 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[30]; ?></h4> <h4><?php echo $text['core_theme_view']['menu'][30]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeMenuFont', $module::$fonts, [ <?php echo template::select('themeMenuFont', $module::$fonts, [
'label' => $text[31], 'label' => $text['core_theme_view']['menu'][31],
'selected' => $this->getData(['theme', 'menu', 'font']), 'selected' => $this->getData(['theme', 'menu', 'font']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeMenuFontSize', $menuFontSizes, [ <?php echo template::select('themeMenuFontSize', $menuFontSizes, [
'label' => $text[32], 'label' => $text['core_theme_view']['menu'][32],
'help' => $text[33], 'help' => $text['core_theme_view']['menu'][33],
'selected' => $this->getData(['theme', 'menu', 'fontSize']) 'selected' => $this->getData(['theme', 'menu', 'fontSize'])
]); ?> ]); ?>
</div> </div>
@ -330,13 +227,13 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeMenuFontWeight', $fontWeights, [ <?php echo template::select('themeMenuFontWeight', $fontWeights, [
'label' => $text[34], 'label' => $text['core_theme_view']['menu'][34],
'selected' => $this->getData(['theme', 'menu', 'fontWeight']) 'selected' => $this->getData(['theme', 'menu', 'fontWeight'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeMenuTextTransform', $textTransforms, [ <?php echo template::select('themeMenuTextTransform', $textTransforms, [
'label' => $text[35], 'label' => $text['core_theme_view']['menu'][35],
'selected' => $this->getData(['theme', 'menu', 'textTransform']) 'selected' => $this->getData(['theme', 'menu', 'textTransform'])
]); ?> ]); ?>
</div> </div>

View File

@ -1,98 +1,27 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']); // Passage de la langue d'administration à Tinymce
switch ($val) { /*
case 'fr' : ?>
$text[0] = 'Retour'; <script>
$text[1] = 'Aide'; var lang_admin = "<?php echo $lang_admin ?>";
$text[2] = 'Enregistrer'; </script>
$text[3] = 'Paramètres'; <?php
$text[4] = 'Largeur du site'; // Inclusion de tinymce
$text[5] = 'Arrondi des angles'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/tinymce.min.js' . '"></script>';
$text[6] = 'Ombre sur les bords du site'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.js' . '"></script>';
$text[7] = 'Pas de marge au-dessus et en-dessous du site'; echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.css' . '">';
$text[8] = 'Couleurs'; */
$text[9] = 'Le curseur horizontal règle le niveau de transparence.'; echo template::formOpen('themeFooterForm');
$text[10] = 'Arrière-plan'; echo template::formOpen('themeSiteForm'); ?>
$text[11] = 'Texte';
$text[12] = 'Titres';
$text[13] = 'Liens';
$text[14] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text[15] = 'Arrière-plan des blocs';
$text[16] = 'Bordure des blocs';
$text[17] = 'Arrondi des angles du bloc';
$text[18] = 'Ombre sur les bords du bloc';
$text[19] = 'Arrière-plan du titre des blocs';
$text[20] = 'Boutons';
$text[21] = 'Titre';
$text[22] = 'Sous-titre';
$text[23] = 'Bouton';
$text[24] = 'Bloc';
$text[25] = 'Mise en forme du texte';
$text[26] = 'Police';
$text[27] = 'Style';
$text[28] = 'Casse';
$text[29] = 'Taille';
$text[30] = 'Taille de référence pour le site. Les tailles des polices de la bannière, de menu et de pied de page sont proportionnelles à cette taille.';
$text[31] = 'Mise en forme des titres';
$siteWidths = $module::$siteWidths;
$radius = $module::$radius;
$shadows = $module::$shadows;
$blockShadows = $module::$blockShadows;
$fontWeights = $module::$fontWeights;
$textTransforms = $module::$textTransforms;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'Settings';
$text[4] = 'Site width';
$text[5] = 'Rounding of corners';
$text[6] = 'Shadow on site edges';
$text[7] = 'No margin above and below site';
$text[8] = 'Colors';
$text[9] = 'Horizontal slider sets transparency level';
$text[10] = 'Background';
$text[11] = 'Text';
$text[12] = 'Title';
$text[13] = 'Links';
$text[14] = 'Color visible in the absence of an image';
$text[15] = 'Background of blocks';
$text[16] = 'Block border';
$text[17] = 'Block corner rounding';
$text[18] = 'Shadow on block edges';
$text[19] = 'Block title background';
$text[20] = 'Buttons';
$text[21] = 'Title';
$text[22] = 'Subtitle';
$text[23] = 'Button';
$text[24] = 'Block';
$text[25] = 'Text formatting';
$text[26] = 'Font';
$text[27] = 'Style';
$text[28] = 'Character case';
$text[29] = 'Size';
$text[30] = 'Reference size for the site. The font sizes of the banner, menu and footer are proportional to this size';
$text[31] = 'Title formatting';
$siteWidths = $module::$siteWidths_en;
$radius = $module::$radius_en;
$shadows = $module::$shadows_en;
$blockShadows = $module::$blockShadows_en;
$fontWeights = $module::$fontWeights_en;
$textTransforms = $module::$textTransforms_en;
break;
}
?>
<?php echo template::formOpen('themeSiteForm'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeSiteBack', [ <?php echo template::button('themeSiteBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme', 'href' => helper::baseUrl() . 'theme',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_theme_view']['site'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -100,43 +29,43 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/personnalisation-du-site', 'href' => 'https://doc.deltacms.fr/personnalisation-du-site',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_theme_view']['site'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('themeSiteSubmit',[ <?php echo template::submit('themeSiteSubmit',[
'value' => $text[2] 'value' => $text['core_theme_view']['site'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_theme_view']['site'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeSiteWidth', $siteWidths, [ <?php echo template::select('themeSiteWidth', $siteWidths, [
'label' => $text[4], 'label' => $text['core_theme_view']['site'][4],
'selected' => $this->getData(['theme', 'site', 'width']) 'selected' => $this->getData(['theme', 'site', 'width'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeSiteRadius', $radius, [ <?php echo template::select('themeSiteRadius', $radius, [
'label' => $text[5], 'label' => $text['core_theme_view']['site'][5],
'selected' => $this->getData(['theme', 'site', 'radius']) 'selected' => $this->getData(['theme', 'site', 'radius'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeSiteShadow', $shadows, [ <?php echo template::select('themeSiteShadow', $shadows, [
'label' => $text[6], 'label' => $text['core_theme_view']['site'][6],
'selected' => $this->getData(['theme', 'site', 'shadow']) 'selected' => $this->getData(['theme', 'site', 'shadow'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('themeSiteMargin',true, $text[7], [ <?php echo template::checkbox('themeSiteMargin',true, $text['core_theme_view']['site'][7], [
'checked' => $this->getData(['theme', 'site', 'margin']) 'checked' => $this->getData(['theme', 'site', 'margin'])
]); ?> ]); ?>
</div> </div>
@ -147,23 +76,23 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[8]; ?></h4> <h4><?php echo $text['core_theme_view']['site'][8]; ?></h4>
<div class="row"> <div class="row">
<div class="col8"> <div class="col8">
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('themeSiteBackgroundColor', [ <?php echo template::text('themeSiteBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[9], 'help' => $text['core_theme_view']['site'][9],
'label' => $text[10], 'label' => $text['core_theme_view']['site'][10],
'value' => $this->getData(['theme', 'site', 'backgroundColor']) 'value' => $this->getData(['theme', 'site', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('themeTextTextColor', [ <?php echo template::text('themeTextTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[9], 'help' => $text['core_theme_view']['site'][9],
'label' => $text[11], 'label' => $text['core_theme_view']['site'][11],
'value' => $this->getData(['theme', 'text', 'textColor']) 'value' => $this->getData(['theme', 'text', 'textColor'])
]); ?> ]); ?>
</div> </div>
@ -172,16 +101,16 @@ switch ($val) {
<div class="col6"> <div class="col6">
<?php echo template::text('themeTitleTextColor', [ <?php echo template::text('themeTitleTextColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[9], 'help' => $text['core_theme_view']['site'][9],
'label' => $text[12], 'label' => $text['core_theme_view']['site'][12],
'value' => $this->getData(['theme', 'title', 'textColor']) 'value' => $this->getData(['theme', 'title', 'textColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('themeTextLinkColor', [ <?php echo template::text('themeTextLinkColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[9], 'help' => $text['core_theme_view']['site'][9],
'label' => $text[13], 'label' => $text['core_theme_view']['site'][13],
'value' => $this->getData(['theme', 'text', 'linkColor']) 'value' => $this->getData(['theme', 'text', 'linkColor'])
]); ?> ]); ?>
</div> </div>
@ -190,16 +119,16 @@ switch ($val) {
<div class="col6"> <div class="col6">
<?php echo template::text('themeBlockBackgroundColor', [ <?php echo template::text('themeBlockBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[14], 'help' => $text['core_theme_view']['site'][14],
'label' => $text[15], 'label' => $text['core_theme_view']['site'][15],
'value' => $this->getData(['theme', 'block', 'backgroundColor']) 'value' => $this->getData(['theme', 'block', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('themeBlockBorderColor', [ <?php echo template::text('themeBlockBorderColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[14], 'help' => $text['core_theme_view']['site'][14],
'label' => $text[16], 'label' => $text['core_theme_view']['site'][16],
'value' => $this->getData(['theme', 'block', 'borderColor']) 'value' => $this->getData(['theme', 'block', 'borderColor'])
]); ?> ]); ?>
</div> </div>
@ -208,13 +137,13 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeBlockBorderRadius', $radius, [ <?php echo template::select('themeBlockBorderRadius', $radius, [
'label' => $text[17], 'label' => $text['core_theme_view']['site'][17],
'selected' => $this->getData(['theme', 'block', 'blockBorderRadius']) 'selected' => $this->getData(['theme', 'block', 'blockBorderRadius'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeBlockBorderShadow', $blockShadows, [ <?php echo template::select('themeBlockBorderShadow', $blockShadows, [
'label' => $text[18], 'label' => $text['core_theme_view']['site'][18],
'selected' => $this->getData(['theme', 'block', 'blockBorderShadow']) 'selected' => $this->getData(['theme', 'block', 'blockBorderShadow'])
]); ?> ]); ?>
</div> </div>
@ -223,16 +152,16 @@ switch ($val) {
<div class="col6"> <div class="col6">
<?php echo template::text('themeBlockBackgroundTitleColor', [ <?php echo template::text('themeBlockBackgroundTitleColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[14], 'help' => $text['core_theme_view']['site'][14],
'label' => $text[19], 'label' => $text['core_theme_view']['site'][19],
'value' => $this->getData(['theme', 'block', 'backgroundTitleColor']) 'value' => $this->getData(['theme', 'block', 'backgroundTitleColor'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('themeButtonBackgroundColor', [ <?php echo template::text('themeButtonBackgroundColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[9], 'help' => $text['core_theme_view']['site'][9],
'label' => $text[20], 'label' => $text['core_theme_view']['site'][20],
'value' => $this->getData(['theme', 'button', 'backgroundColor']) 'value' => $this->getData(['theme', 'button', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
@ -243,20 +172,20 @@ switch ($val) {
<div class="bgPreview"> <div class="bgPreview">
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<h1 class="headerPreview"><?php echo $text[21]; ?></h1> <h1 class="headerPreview"><?php echo $text['core_theme_view']['site'][21]; ?></h1>
<h2 class="headerPreview"><?php echo $text[22]; ?></h2> <h2 class="headerPreview"><?php echo $text['core_theme_view']['site'][22]; ?></h2>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::button('themeSiteSubmitButtonPreview', [ <?php echo template::button('themeSiteSubmitButtonPreview', [
'class' => 'buttonSubmitPreview', 'class' => 'buttonSubmitPreview',
'value' => $text[23] 'value' => $text['core_theme_view']['site'][23]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block preview"> <div class="block preview">
<h4 class="preview"><?php echo $text[24]; ?></h4> <p class="textPreview">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> <h4 class="preview"><?php echo $text['core_theme_view']['site'][24]; ?></h4> <p class="textPreview">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p><a href="#" class="urlPreview">Lorem ipsum dolor sit amet.</a></p> <p><a href="#" class="urlPreview">Lorem ipsum dolor sit amet.</a></p>
</div> </div>
</div> </div>
@ -270,19 +199,19 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[25]; ?></h4> <h4><?php echo $text['core_theme_view']['site'][25]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('themeTextFont', $module::$fonts, [ <?php echo template::select('themeTextFont', $module::$fonts, [
'label' => $text[26], 'label' => $text['core_theme_view']['site'][26],
'selected' => $this->getData(['theme', 'text', 'font']), 'selected' => $this->getData(['theme', 'text', 'font']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('themeTextFontSize', $module::$siteFontSizes, [ <?php echo template::select('themeTextFontSize', $module::$siteFontSizes, [
'label' => $text[29], 'label' => $text['core_theme_view']['site'][29],
'help' => $text[30], 'help' => $text['core_theme_view']['site'][30],
'selected' => $this->getData(['theme', 'text', 'fontSize']) 'selected' => $this->getData(['theme', 'text', 'fontSize'])
]); ?> ]); ?>
</div> </div>
@ -291,24 +220,24 @@ switch ($val) {
</div> </div>
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[31]; ?></h4> <h4><?php echo $text['core_theme_view']['site'][31]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeTitleFont', $module::$fonts, [ <?php echo template::select('themeTitleFont', $module::$fonts, [
'label' => $text[26], 'label' => $text['core_theme_view']['site'][26],
'selected' => $this->getData(['theme', 'title', 'font']), 'selected' => $this->getData(['theme', 'title', 'font']),
'fonts' => true 'fonts' => true
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeTitleFontWeight', $fontWeights, [ <?php echo template::select('themeTitleFontWeight', $fontWeights, [
'label' => $text[27], 'label' => $text['core_theme_view']['site'][27],
'selected' => $this->getData(['theme', 'title', 'fontWeight']) 'selected' => $this->getData(['theme', 'title', 'fontWeight'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeTitleTextTransform', $textTransforms, [ <?php echo template::select('themeTitleTextTransform', $textTransforms, [
'label' => $text[28], 'label' => $text['core_theme_view']['site'][28],
'selected' => $this->getData(['theme', 'title', 'textTransform']) 'selected' => $this->getData(['theme', 'title', 'textTransform'])
]); ?> ]); ?>
</div> </div>

View File

@ -0,0 +1,42 @@
<?php
// Lexique du module du coeur Translate en anglais
$text['core_translate_view']['copy'][0] = 'Back';
$text['core_translate_view']['copy'][1] = 'Help';
$text['core_translate_view']['copy'][2] = 'Submit';
$text['core_translate_view']['copy'][3] = 'Site copy (written translations)';
$text['core_translate_view']['copy'][4] = 'Pages and modules of';
$text['core_translate_view']['copy'][5] = 'to';
$text['core_translate_view']['index'][0] = 'Back';
$text['core_translate_view']['index'][1] = 'Help';
$text['core_translate_view']['index'][2] = 'Copy utility';
$text['core_translate_view']['index'][3] = 'Submit';
$text['core_translate_view']['index'][4] = 'Language of administration';
$text['core_translate_view']['index'][5] = 'Original language of the site';
$text['core_translate_view']['index'][6] = 'Languages of origin and administration';
$text['core_translate_view']['index'][7] = 'Automatic website translation';
$text['core_translate_view']['index'][8] = 'Activate the automatic translation script';
$text['core_translate_view']['index'][9] = 'The Google Translate script automatically translates the site. Save the page to take advantage of translation options.';
$text['core_translate_view']['index'][10] = 'Automatic detection of the browser language';
$text['core_translate_view']['index'][11] = 'Detects the language of the browser, in this mode it is not necessary to display the flags.';
$text['core_translate_view']['index'][12] = 'Show Google script credits';
$text['core_translate_view']['index'][13] = 'Recommended option for copyright compliance';
$text['core_translate_view']['index'][14] = 'Site translation mode and flag display';
$text['core_translate_view']['index'][15] = 'ISO code for Other language option';
$text['core_translate_view']['index'][16] = 'Enter the ISO language code consisting of 2 lower case letters';
$text['core_translate_view']['index'][17] = 'The original language of the site is not supported by the machine translation script.';
$text['core_translate']['copy'][0] = 'Something went wrong, check the permissions.';
$text['core_translate']['copy'][1] = 'The languages must be different.';
$text['core_translate']['copy'][2] = 'Copy utility';
$text['core_translate']['copy'][3] = 'Data ';
$text['core_translate']['copy'][4] = ' copied to ';
$text['core_translate']['copy'][5] = 'Language of origin';
$text['core_translate']['index'][0] = 'Registered changes';
$text['core_translate']['index'][1] = 'Masked flag';
$text['core_translate']['index'][2] = 'Google translation';
$text['core_translate']['index'][3] = 'Written translation';
$text['core_translate']['index'][4] = 'Delete translation';
$text['core_translate']['index'][5] = 'Flag displayed';
$text['core_translate']['index'][6] = 'Language management';
// Select
$i18nList = self::$i18nList_en;
?>

View File

@ -0,0 +1,42 @@
<?php
// Lexique du module du coeur Translate en français
$text['core_translate_view']['copy'][0] = 'Retour';
$text['core_translate_view']['copy'][1] = 'Aide';
$text['core_translate_view']['copy'][2] = 'Enregistrer';
$text['core_translate_view']['copy'][3] = 'Copie de site (traductions rédigées)';
$text['core_translate_view']['copy'][4] = 'Pages et les modules de';
$text['core_translate_view']['copy'][5] = 'Vers';
$text['core_translate_view']['index'][0] = 'Retour';
$text['core_translate_view']['index'][1] = 'Aide';
$text['core_translate_view']['index'][2] = 'Utilitaire de copie';
$text['core_translate_view']['index'][3] = 'Enregistrer';
$text['core_translate_view']['index'][4] = 'Langue d\'administration';
$text['core_translate_view']['index'][5] = 'Langue originale de rédaction du site';
$text['core_translate_view']['index'][6] = 'Langages d\'origine et d\'administration';
$text['core_translate_view']['index'][7] = 'Traduction automatique du site';
$text['core_translate_view']['index'][8] = 'Active le script de traduction automatique';
$text['core_translate_view']['index'][9] = 'Le script Google Translate assure la traduction automatique du site. Enregistrez la page pour pouvoir bénéficier des options de traduction.';
$text['core_translate_view']['index'][10] = 'Détection automatique de la langue du navigateur';
$text['core_translate_view']['index'][11] = 'Détecte la langue du navigateur, dans ce mode il n\'est pas nécessaire d\'afficher les drapeaux.';
$text['core_translate_view']['index'][12] = 'Afficher les crédits du script Google';
$text['core_translate_view']['index'][13] = 'Option recommandée pour le respect du droit d\'auteur';
$text['core_translate_view']['index'][14] = 'Mode de traduction du site et affichage des drapeaux';
$text['core_translate_view']['index'][15] = 'Code ISO de l\'option Autre langue';
$text['core_translate_view']['index'][16] = 'Saisir le code ISO de la langue constitué de 2 lettres minuscules';
$text['core_translate_view']['index'][17] = 'La langue originale de rédaction du site n\'est pas prise en charge par le script de traduction automatique.';
$text['core_translate']['copy'][0] = 'Quelque chose n\'a pas fonctionné, vérifiez les permissions.';
$text['core_translate']['copy'][1] = 'Les langues doivent être différentes.';
$text['core_translate']['copy'][2] = 'Utilitaire de copie';
$text['core_translate']['copy'][3] = 'Données ';
$text['core_translate']['copy'][4] = ' copiées vers ';
$text['core_translate']['copy'][5] = 'Langue d\'origine';
$text['core_translate']['index'][0] = 'Modifications enregistrées';
$text['core_translate']['index'][1] = 'Drapeau masqué';
$text['core_translate']['index'][2] = 'Traduction automatique';
$text['core_translate']['index'][3] = 'Traduction rédigée';
$text['core_translate']['index'][4] = 'Supprimer la traduction';
$text['core_translate']['index'][5] = 'Drapeau affiché';
$text['core_translate']['index'][6] = 'Gestion des langues';
// Select
$i18nList = self::$i18nList;
?>

View File

@ -19,7 +19,6 @@
class translate extends common { class translate extends common {
public static $actions = [ public static $actions = [
/*'config' => self::GROUP_MODERATOR,*/
'index' => self::GROUP_ADMIN, 'index' => self::GROUP_ADMIN,
'copy' => self::GROUP_ADMIN, 'copy' => self::GROUP_ADMIN,
'i18n' => self::GROUP_VISITOR 'i18n' => self::GROUP_VISITOR
@ -39,26 +38,7 @@ class translate extends common {
*/ */
public function copy() { public function copy() {
// Lexique // Lexique
$text = []; include('./core/module/translate/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_translate.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Quelque chose n\'a pas fonctionné, vérifiez les permissions.';
$text[1] = 'Les langues doivent être différentes.';
$text[2] = 'Utilitaire de copie';
$text[3] = 'Données ';
$text[4] = ' copiées vers ';
$text[5] = 'Langue d\'origine';
break;
case 'en' :
$text[0] = 'Something went wrong, check the permissions.';
$text[1] = 'The languages must be different.';
$text[2] = 'Copy utility';
$text[3] = 'Data ';
$text[4] = ' copied to ';
$text[5] = 'Language of origin';
break;
}
// Soumission du formulaire // Soumission du formulaire
if ($this->isPost()) { if ($this->isPost()) {
@ -82,26 +62,24 @@ class translate extends common {
// Enregistrer la langue // Enregistrer la langue
if ($success) { if ($success) {
$this->setData(['config', 'i18n', $toCreate, 'site' ]); $this->setData(['config', 'i18n', $toCreate, 'site' ]);
$i18nListBase = array_merge(['base' => $text[5] ],self::$i18nList); $i18nListBase = array_merge(['base' => $text['core_translate']['copy'][5] ],self::$i18nList);
$notification = $text[3] . $i18nListBase[$copyFrom] . $text[4] . self::$i18nList[$toCreate]; $notification = $text['core_translate']['copy'][3] . $i18nListBase[$copyFrom] . $text['core_translate']['copy'][4] . self::$i18nList[$toCreate];
} else { } else {
$notification = $text[0]; $notification = $text['core_translate']['copy'][0];
} }
} else { } else {
$success = false; $success = false;
$notification = $text[1]; $notification = $text['core_translate']['copy'][1];
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $notification, 'notification' => $notification,
'title' => $text[2], 'title' => $text['core_translate']['copy'][2],
'view' => 'index', 'view' => 'index',
'state' => $success 'state' => $success
]); ]);
} }
// Tableau des langues installées // Tableau des langues installées
$i18nList = self::$i18nList;
if( $this->getData(['config', 'i18n', 'langAdmin']) === 'en' ) $i18nList = self::$i18nList_en;
foreach ($i18nList as $key => $value) { foreach ($i18nList as $key => $value) {
if ($this->getData(['config','i18n', $key]) === 'site') { if ($this->getData(['config','i18n', $key]) === 'site') {
self::$languagesTarget[$key] = $value; self::$languagesTarget[$key] = $value;
@ -109,11 +87,11 @@ class translate extends common {
} }
// Langues cibles base en plus // Langues cibles base en plus
self::$languagesInstalled = array_merge(['base' => $text[5] ],self::$languagesTarget); self::$languagesInstalled = array_merge(['base' => $text['core_translate']['copy'][5] ],self::$languagesTarget);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[2], 'title' => $text['core_translate']['copy'][2],
'view' => 'copy' 'view' => 'copy'
]); ]);
} }
@ -123,28 +101,7 @@ class translate extends common {
*/ */
public function index() { public function index() {
// Lexique // Lexique
$text = []; include('./core/module/translate/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_translate.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Modifications enregistrées';
$text[1] = 'Drapeau masqué';
$text[2] = 'Traduction automatique';
$text[3] = 'Traduction rédigée';
$text[4] = 'Supprimer la traduction';
$text[5] = 'Drapeau affiché';
$text[6] = 'Gestion des langues';
break;
case 'en' :
$text[0] = 'Registered changes';
$text[1] = 'Masked flag';
$text[2] = 'Google translation';
$text[3] = 'Written translation';
$text[4] = 'Delete translation';
$text[5] = 'Flag displayed';
$text[6] = 'Language management';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
@ -214,7 +171,7 @@ class translate extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(), 'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => $text[0], 'notification' => $text['core_translate']['index'][0],
'state' => true 'state' => true
]); ]);
} }
@ -222,43 +179,43 @@ class translate extends common {
foreach (self::$i18nList as $key => $value) { foreach (self::$i18nList as $key => $value) {
if ($this->getData(['config','i18n',$key]) === 'site') { if ($this->getData(['config','i18n',$key]) === 'site') {
self::$translateOptions [$key] = [ self::$translateOptions [$key] = [
'none' => $text[1], 'none' => $text['core_translate']['index'][1],
'site' => $text[3], 'site' => $text['core_translate']['index'][3],
'delete' => $text[4] 'delete' => $text['core_translate']['index'][4]
]; ];
if( ! array_key_exists( $key, self::$i18nListSiteOnly) && $this->getData(['config','i18n','scriptGoogle'])){ if( ! array_key_exists( $key, self::$i18nListSiteOnly) && $this->getData(['config','i18n','scriptGoogle'])){
self::$translateOptions [$key] = [ self::$translateOptions [$key] = [
'none' => $text[1], 'none' => $text['core_translate']['index'][1],
'script' => $text[2], 'script' => $text['core_translate']['index'][2],
'site' => $text[3], 'site' => $text['core_translate']['index'][3],
'delete' => $text[4] 'delete' => $text['core_translate']['index'][4]
]; ];
} }
self::$siteTranslate = $key !== $this->getData(['config', 'i18n', 'langBase']) ? false : true; self::$siteTranslate = $key !== $this->getData(['config', 'i18n', 'langBase']) ? false : true;
} else { } else {
self::$translateOptions [$key] = [ self::$translateOptions [$key] = [
'none' => $text[1], 'none' => $text['core_translate']['index'][1],
'site' => $text[3] 'site' => $text['core_translate']['index'][3]
]; ];
if( ! array_key_exists( $key, self::$i18nListSiteOnly) && $this->getData(['config','i18n','scriptGoogle'])){ if( ! array_key_exists( $key, self::$i18nListSiteOnly) && $this->getData(['config','i18n','scriptGoogle'])){
self::$translateOptions [$key] = [ self::$translateOptions [$key] = [
'none' => $text[1], 'none' => $text['core_translate']['index'][1],
'script' => $text[2], 'script' => $text['core_translate']['index'][2],
'site' => $text[3] 'site' => $text['core_translate']['index'][3]
]; ];
} }
} }
// Limitation du choix pour la langue d'origine // Limitation du choix pour la langue d'origine
if ( $key === $this->getData(['config', 'i18n', 'langBase'])){ if ( $key === $this->getData(['config', 'i18n', 'langBase'])){
self::$translateOptions [$key] = [ self::$translateOptions [$key] = [
'none' => $text[1], 'none' => $text['core_translate']['index'][1],
'site' => $text[5] 'site' => $text['core_translate']['index'][5]
]; ];
} }
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[6], 'title' => $text['core_translate']['index'][6],
'view' => 'index' 'view' => 'index'
]); ]);
} }

View File

@ -1,25 +1,6 @@
<?php echo template::formOpen('translateFormCopy'); <?php echo template::formOpen('translateFormCopy');
// Lexique // Lexique
$text = []; include('./core/module/translate/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_translate.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Enregistrer';
$text[3] = 'Copie de site (traductions rédigées)';
$text[4] = 'Pages et les modules de';
$text[5] = 'Vers';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Submit';
$text[3] = 'Site copy (written translations)';
$text[4] = 'Pages and modules of';
$text[5] = 'to';
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -27,7 +8,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'translate', 'href' => helper::baseUrl() . 'translate',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_translate_view']['copy'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -35,29 +16,29 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/utilitaire-de-copie', 'href' => 'https://doc.deltacms.fr/utilitaire-de-copie',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_translate_view']['copy'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('translateFormCopySubmit', [ <?php echo template::submit('translateFormCopySubmit', [
'value'=> $text[2] 'value'=> $text['core_translate_view']['copy'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_translate_view']['copy'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('translateFormCopySource', $module::$languagesInstalled, [ <?php echo template::select('translateFormCopySource', $module::$languagesInstalled, [
'label' => $text[4] 'label' => $text['core_translate_view']['copy'][4]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::select('translateFormCopyTarget', $module::$languagesTarget, [ <?php echo template::select('translateFormCopyTarget', $module::$languagesTarget, [
'label' => $text[5] 'label' => $text['core_translate_view']['copy'][5]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,51 +1,6 @@
<?php echo template::formOpen('translateForm'); <?php echo template::formOpen('translateForm');
// Lexique // Lexique
$text = []; include('./core/module/translate/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_translate.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Utilitaire de copie';
$text[3] = 'Enregistrer';
$text[4] = 'Langue d\'administration';
$text[5] = 'Langue originale de rédaction du site';
$text[6] = 'Langages d\'origine et d\'administration';
$text[7] = 'Traduction automatique du site';
$text[8] = 'Active le script de traduction automatique';
$text[9] = 'Le script Google Translate assure la traduction automatique du site. Enregistrez la page pour pouvoir bénéficier des options de traduction.';
$text[10] = 'Détection automatique de la langue du navigateur';
$text[11] = 'Détecte la langue du navigateur, dans ce mode il n\'est pas nécessaire d\'afficher les drapeaux.';
$text[12] = 'Afficher les crédits du script Google';
$text[13] = 'Option recommandée pour le respect du droit d\'auteur';
$text[14] = 'Mode de traduction du site et affichage des drapeaux';
$text[15] = 'Code ISO de l\'option Autre langue';
$text[16] = 'Saisir le code ISO de la langue constitué de 2 lettres minuscules';
$text[17] = 'La langue originale de rédaction du site n\'est pas prise en charge par le script de traduction automatique.';
$i18nList = core::$i18nList;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Copy utility';
$text[3] = 'Submit';
$text[4] = 'Language of administration';
$text[5] = 'Original language of the site';
$text[6] = 'Languages of origin and administration';
$text[7] = 'Automatic website translation';
$text[8] = 'Activate the automatic translation script';
$text[9] = 'The Google Translate script automatically translates the site. Save the page to take advantage of translation options.';
$text[10] = 'Automatic detection of the browser language';
$text[11] = 'Detects the language of the browser, in this mode it is not necessary to display the flags.';
$text[12] = 'Show Google script credits';
$text[13] = 'Recommended option for copyright compliance';
$text[14] = 'Site translation mode and flag display';
$text[15] = 'ISO code for Other language option';
$text[16] = 'Enter the ISO language code consisting of 2 lower case letters';
$text[17] = 'The original language of the site is not supported by the machine translation script.';
$i18nList = core::$i18nList_en;
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -53,7 +8,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl(), 'href' => helper::baseUrl(),
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_translate_view']['index'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -61,32 +16,32 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/gestion-des-langues', 'href' => 'https://doc.deltacms.fr/gestion-des-langues',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_translate_view']['index'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col3 offset3"> <div class="col3 offset3">
<?php echo template::button('translateButton', [ <?php echo template::button('translateButton', [
'href' => helper::baseUrl() . 'translate/copy', 'href' => helper::baseUrl() . 'translate/copy',
'value' => $text[2], 'value' => $text['core_translate_view']['index'][2],
'ico' => 'cog-alt', 'ico' => 'cog-alt',
'disabled' => $module::$siteTranslate 'disabled' => $module::$siteTranslate
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::submit('translateFormSubmit', [ <?php echo template::submit('translateFormSubmit', [
'value'=> $text[3] 'value'=> $text['core_translate_view']['index'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[6]; ?></h4> <h4><?php echo $text['core_translate_view']['index'][6]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('translateLangAdmin', ['fr'=>'Français (fr)','en'=>'English (en)'], [ <?php echo template::select('translateLangAdmin', self::$i18nList_admin, [
'label' => $text[4], 'label' => $text['core_translate_view']['index'][4],
'selected' => $this->getData(['config', 'i18n' , 'langAdmin']) 'selected' => $this->getData(['config', 'i18n' , 'langAdmin'])
]); ?> ]); ?>
</div> </div>
@ -96,7 +51,7 @@ switch ($val) {
if( !isset ($i18nList[$select]) ) $select = 'none'; if( !isset ($i18nList[$select]) ) $select = 'none';
?> ?>
<?php echo template::select('translateLangBase', $i18nList, [ <?php echo template::select('translateLangBase', $i18nList, [
'label' => $text[5], 'label' => $text['core_translate_view']['index'][5],
'selected' => $select 'selected' => $select
]); ?> ]); ?>
</div> </div>
@ -111,8 +66,8 @@ switch ($val) {
} }
?> ?>
<?php echo template::text('translateOtherBase', [ <?php echo template::text('translateOtherBase', [
'label' => $text[15], 'label' => $text['core_translate_view']['index'][15],
'help' => $text[16], 'help' => $text['core_translate_view']['index'][16],
'value' => $this->getData(['config', 'i18n' , 'otherLangBase']) 'value' => $this->getData(['config', 'i18n' , 'otherLangBase'])
]); ?> ]); ?>
</div> </div>
@ -123,35 +78,35 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[7]; ?></h4> <h4><?php echo $text['core_translate_view']['index'][7]; ?></h4>
<?php if( ! array_key_exists( $this->getData(['config', 'i18n' , 'langBase']), self::$i18nListSiteOnly)) { ?> <?php if( ! array_key_exists( $this->getData(['config', 'i18n' , 'langBase']), self::$i18nListSiteOnly)) { ?>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('translateScriptGoogle', true, $text[8], [ <?php echo template::checkbox('translateScriptGoogle', true, $text['core_translate_view']['index'][8], [
'checked' => $this->getData(['config','i18n', 'scriptGoogle']), 'checked' => $this->getData(['config','i18n', 'scriptGoogle']),
'help' => $text[9] 'help' => $text['core_translate_view']['index'][9]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('translateAutoDetect', true, $text[10], [ <?php echo template::checkbox('translateAutoDetect', true, $text['core_translate_view']['index'][10], [
'checked' => $this->getData(['config','i18n', 'autoDetect']), 'checked' => $this->getData(['config','i18n', 'autoDetect']),
'class' => 'translateGoogleScriptOption', 'class' => 'translateGoogleScriptOption',
'help' => $text[11] 'help' => $text['core_translate_view']['index'][11]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('translateCredits', true, $text[12], [ <?php echo template::checkbox('translateCredits', true, $text['core_translate_view']['index'][12], [
'checked' => $this->getData(['config','i18n', 'showCredits']), 'checked' => $this->getData(['config','i18n', 'showCredits']),
'class' => 'translateGoogleScriptOption', 'class' => 'translateGoogleScriptOption',
'help' => $text[13] 'help' => $text['core_translate_view']['index'][13]
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php }else { ?> <?php }else { ?>
<div class="row"><div class="col6"> <div class="row"><div class="col6">
<?php echo $text[17]; ?> <?php echo $text['core_translate_view']['index'][17]; ?>
</div></div> </div></div>
<?php } ?> <?php } ?>
</div> </div>
@ -160,7 +115,7 @@ switch ($val) {
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block" id="flagsWrapper"> <div class="block" id="flagsWrapper">
<h4><?php echo $text[14]; ?></h4> <h4><?php echo $text['core_translate_view']['index'][14]; ?></h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::select('translateFR', $module::$translateOptions['fr'], [ <?php echo template::select('translateFR', $module::$translateOptions['fr'], [

View File

@ -0,0 +1,182 @@
<?php
// Lexique du module du coeur User en anglais
$text['core_user_view']['add'][0] = 'Back';
$text['core_user_view']['add'][1] = 'Help';
$text['core_user_view']['add'][2] = 'First name';
$text['core_user_view']['add'][3] = 'Name';
$text['core_user_view']['add'][4] = 'Pseudo';
$text['core_user_view']['add'][5] = 'Signature';
$text['core_user_view']['add'][6] = 'Email address';
$text['core_user_view']['add'][7] = 'Group';
$text['core_user_view']['add'][8] = 'File sharing allowed';
$text['core_user_view']['add'][9] = 'This member will be able to upload or download files to the \'partage\' folder and its subfolders';
$text['core_user_view']['add'][10] = 'Authorisations :';
$text['core_user_view']['add'][11] = 'Access to private member pages';
$text['core_user_view']['add'][12] = 'Access to members\' and editors\' private pages';
$text['core_user_view']['add'][13] = 'General information';
$text['core_user_view']['add'][14] = 'Add / Edit / Delete pages';
$text['core_user_view']['add'][15] = 'Add / Edit / Delete files';
$text['core_user_view']['add'][16] = 'Access to all private pages';
$text['core_user_view']['add'][17] = 'Add / Edit / Delete folders';
$text['core_user_view']['add'][18] = 'Add / Edit / Delete users';
$text['core_user_view']['add'][19] = 'Site configuration';
$text['core_user_view']['add'][20] = 'Theme customisation';
$text['core_user_view']['add'][21] = 'Authentification';
$text['core_user_view']['add'][22] = 'Identifier';
$text['core_user_view']['add'][23] = 'Password';
$text['core_user_view']['add'][24] = 'Confirmation';
$text['core_user_view']['add'][25] = 'Notify the user by email';
$text['core_user_view']['add'][26] = 'Redirection';
$text['core_user_view']['add'][27] = 'Redirection after login';
$text['core_user_view']['add'][28] = 'Select \'Aucune\' if you do not want a redirection.';
$text['core_user_view']['add'][29] = 'Register';
$text['core_user_view']['edit'][0] = 'Back';
$text['core_user_view']['edit'][1] = 'Help';
$text['core_user_view']['edit'][2] = 'First name';
$text['core_user_view']['edit'][3] = 'Name';
$text['core_user_view']['edit'][4] = 'Pseudo';
$text['core_user_view']['edit'][5] = 'Signature';
$text['core_user_view']['edit'][6] = 'Email address';
$text['core_user_view']['edit'][7] = 'Group';
$text['core_user_view']['edit'][8] = 'File sharing allowed';
$text['core_user_view']['edit'][9] = 'This member will be able to upload or download files to the \'partage\' folder and its subfolders';
$text['core_user_view']['edit'][10] = 'Authorisations :';
$text['core_user_view']['edit'][11] = 'Access to private member pages';
$text['core_user_view']['edit'][12] = 'Access to members\' and editors\' private pages';
$text['core_user_view']['edit'][13] = 'General information';
$text['core_user_view']['edit'][14] = 'Add / Edit / Delete pages';
$text['core_user_view']['edit'][15] = 'Add / Edit / Delete files';
$text['core_user_view']['edit'][16] = 'Access to all private pages';
$text['core_user_view']['edit'][17] = 'Add / Edit / Delete folders';
$text['core_user_view']['edit'][18] = 'Add / Edit / Delete users';
$text['core_user_view']['edit'][19] = 'Site configuration';
$text['core_user_view']['edit'][20] = 'Theme customisation';
$text['core_user_view']['edit'][21] = 'Authentification';
$text['core_user_view']['edit'][22] = 'Identifier';
$text['core_user_view']['edit'][23] = 'Old Password';
$text['core_user_view']['edit'][24] = 'Confirmation';
$text['core_user_view']['edit'][25] = 'Notify the user by email';
$text['core_user_view']['edit'][26] = 'Redirection';
$text['core_user_view']['edit'][27] = 'Redirection after login';
$text['core_user_view']['edit'][28] = 'Select \'Aucune\' if you do not want a redirection.';
$text['core_user_view']['edit'][29] = 'Register';
$text['core_user_view']['edit'][30] = 'You cannot change your own group.';
$text['core_user_view']['edit'][31] = 'The username is defined when the account is created and cannot be changed.';
$text['core_user_view']['edit'][32] = 'New password';
$text['core_user_view']['forgot'][0] = 'Identifier';
$text['core_user_view']['forgot'][1] = 'Back';
$text['core_user_view']['forgot'][2] = 'Validate';
$text['core_user_view']['import'][0] = 'Back';
$text['core_user_view']['import'][1] = 'Help';
$text['core_user_view']['import'][2] = 'Import';
$text['core_user_view']['import'][3] = 'CSV flat file import';
$text['core_user_view']['import'][4] = 'List of users :';
$text['core_user_view']['import'][5] = 'Separator';
$text['core_user_view']['import'][6] = 'Send a confirmation message';
$text['core_user_view']['import'][7] = 'Id';
$text['core_user_view']['import'][8] = 'Name';
$text['core_user_view']['import'][9] = 'First name';
$text['core_user_view']['import'][10] = 'Group';
$text['core_user_view']['import'][11] = 'Pseudo';
$text['core_user_view']['import'][12] = 'Email';
$text['core_user_view']['import'][13] = ' Account created | ';
$text['core_user_view']['import'][14] = ' Account created and notified | ';
$text['core_user_view']['import'][15] = ' Error in the file, account not created.';
$text['core_user_view']['index'][0] = 'Home';
$text['core_user_view']['index'][1] = 'Help';
$text['core_user_view']['index'][2] = 'Import';
$text['core_user_view']['index'][3] = 'User';
$text['core_user_view']['index'][4] = 'Identifier';
$text['core_user_view']['index'][5] = 'Name';
$text['core_user_view']['index'][6] = 'Group';
$text['core_user_view']['index'][7] = "Are you sure you want to delete this user";
$text['core_user_view']['login'][0] = 'Identifier';
$text['core_user_view']['login'][1] = 'Password';
$text['core_user_view']['login'][2] = 'Cancel';
$text['core_user_view']['login'][3] = 'Connection';
$text['core_user_view']['login'][4] = 'Remember my ID';
$text['core_user_view']['login'][5] = 'Lost password';
$text['core_user_view']['reset'][0] = 'New password';
$text['core_user_view']['reset'][1] = 'Confirmation';
$text['core_user_view']['reset'][2] = 'Validate';
$text['core_user']['add'][0] = 'Identifier already in use';
$text['core_user']['add'][1] = 'Incorrect';
$text['core_user']['add'][2] = 'Account created on ';
$text['core_user']['add'][3] = 'Hello ';
$text['core_user']['add'][4] = 'An administrator has created an account for you on the site. ';
$text['core_user']['add'][5] = 'Below you will find your account details.';
$text['core_user']['add'][6] = 'Account ID :';
$text['core_user']['add'][7] = 'We do not store passwords, therefore we advise you to keep this message until you have logged in. You can change your password after your first login.';
$text['core_user']['add'][8] = 'User created';
$text['core_user']['add'][9] = 'New user';
$text['core_user']['add'][10] = 'None';
$text['core_user']['delete'][0] = 'Unauthorised action';
$text['core_user']['delete'][1] = 'Unable to delete your own account';
$text['core_user']['delete'][2] = 'Deleted user';
$text['core_user']['edit'][0] = 'Unauthorised action';
$text['core_user']['edit'][1] = 'Incorrect';
$text['core_user']['edit'][2] = 'Registered changes';
$text['core_user']['edit'][3] = 'None';
$text['core_user']['forgot'][0] = 'Reset your password';
$text['core_user']['forgot'][1] = 'Hello ';
$text['core_user']['forgot'][2] = 'You have requested to change the password linked to your account. Below you will find a link to change your password.';
$text['core_user']['forgot'][3] = 'If you have not asked us to reset your password, please ignore this email.';
$text['core_user']['forgot'][4] = 'An email has been sent to you to continue the reset';
$text['core_user']['forgot'][5] = 'This user does not exist';
$text['core_user']['forgot'][6] = 'Forgot your password ?';
$text['core_user']['index'][0] = 'List of users';
$text['core_user']['login'][0] = 'unknown account';
$text['core_user']['login'][1] = 'Unknown account locked';
$text['core_user']['login'][2] = 'Account locked';
$text['core_user']['login'][3] = 'Incorrect captcha, username or password';
$text['core_user']['login'][4] = 'Only an administrator can log in during maintenance';
$text['core_user']['login'][5] = 'Successful connection';
$text['core_user']['login'][6] = 'Welcome ';
$text['core_user']['login'][7] = 'Incorrect captcha, username or password';
$text['core_user']['login'][8] = 'Password error';
$text['core_user']['login'][9] = 'Captcha error';
$text['core_user']['login'][10] = 'Account locked ';
$text['core_user']['login'][11] = 'Connection';
$text['core_user']['login'][12] = '';
$text['core_user']['logout'][0] = 'Successfully disconnected';
$text['core_user']['reset'][0] = 'Incorrect';
$text['core_user']['reset'][1] = 'New password registered';
$text['core_user']['reset'][2] = 'Resetting the password';
$text['core_user']['import'][0] = 'Account created on ';
$text['core_user']['import'][1] = 'Hello ';
$text['core_user']['import'][2] = 'An administrator has created an account for you on the site';
$text['core_user']['import'][3] = '. You will find your account details below.';
$text['core_user']['import'][4] = 'Account ID :';
$text['core_user']['import'][5] = 'A temporary password has been assigned to you, the first time you log in click on Forgot password.';
$text['core_user']['import'][6] = 'Nothing to import, format error or incorrect file';
$text['core_user']['import'][7] = 'Importation done';
$text['core_user']['import'][8] = 'Read error, check permissions';
$text['core_user']['import'][9] = 'Importation';
// Selects
//Paramètres pour choix de la signature
$signature = [
self::SIGNATURE_ID => 'Identifier',
self::SIGNATURE_PSEUDO => 'Username',
self::SIGNATURE_FIRSTLASTNAME => 'First name Name',
self::SIGNATURE_LASTFIRSTNAME => 'Name First name'
];
$groups = [
self::GROUP_BANNED => 'Banned',
self::GROUP_VISITOR => 'Visitor',
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Éditor',
self::GROUP_ADMIN => 'Administrator'
];
$groupNews = [
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
$groupEdits = [
self::GROUP_BANNED => 'Banned',
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
?>

View File

@ -0,0 +1,182 @@
<?php
// Lexique du module du coeur User en français
$text['core_user_view']['add'][0] = 'Retour';
$text['core_user_view']['add'][1] = 'Aide';
$text['core_user_view']['add'][2] = 'Prénom';
$text['core_user_view']['add'][3] = 'Nom';
$text['core_user_view']['add'][4] = 'Pseudo';
$text['core_user_view']['add'][5] = 'Signature';
$text['core_user_view']['add'][6] = 'Adresse mail';
$text['core_user_view']['add'][7] = 'Groupe';
$text['core_user_view']['add'][8] = 'Partage de fichiers autorisé';
$text['core_user_view']['add'][9] = 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers';
$text['core_user_view']['add'][10] = 'Autorisations :';
$text['core_user_view']['add'][11] = 'Accès aux pages privées membres';
$text['core_user_view']['add'][12] = 'Accès aux pages privées membres et éditeurs';
$text['core_user_view']['add'][13] = 'Informations générales';
$text['core_user_view']['add'][14] = 'Ajout / Édition / Suppression de pages';
$text['core_user_view']['add'][15] = 'Ajout / Édition / Suppression de fichiers';
$text['core_user_view']['add'][16] = 'Accès à toutes les pages privées';
$text['core_user_view']['add'][17] = 'Ajout / Édition / Suppression de dossiers';
$text['core_user_view']['add'][18] = 'Ajout / Édition / Suppression d\'utilisateurs';
$text['core_user_view']['add'][19] = 'Configuration du site';
$text['core_user_view']['add'][20] = 'Personnalisation du thème';
$text['core_user_view']['add'][21] = 'Authentification';
$text['core_user_view']['add'][22] = 'Identifiant';
$text['core_user_view']['add'][23] = 'Mot de passe';
$text['core_user_view']['add'][24] = 'Confirmation';
$text['core_user_view']['add'][25] = 'Prévenir l\'utilisateur par mail';
$text['core_user_view']['add'][26] = 'Redirection';
$text['core_user_view']['add'][27] = 'Redirection après connexion';
$text['core_user_view']['add'][28] = 'Choisir Aucune si vous ne souhaitez pas de redirection.';
$text['core_user_view']['add'][29] = 'Enregistrer';
$text['core_user_view']['edit'][0] = 'Retour';
$text['core_user_view']['edit'][1] = 'Aide';
$text['core_user_view']['edit'][2] = 'Prénom';
$text['core_user_view']['edit'][3] = 'Nom';
$text['core_user_view']['edit'][4] = 'Pseudo';
$text['core_user_view']['edit'][5] = 'Signature';
$text['core_user_view']['edit'][6] = 'Adresse mail';
$text['core_user_view']['edit'][7] = 'Groupe';
$text['core_user_view']['edit'][8] = 'Partage de fichiers autorisé';
$text['core_user_view']['edit'][9] = 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers';
$text['core_user_view']['edit'][10] = 'Autorisations :';
$text['core_user_view']['edit'][11] = 'Accès aux pages privées membres';
$text['core_user_view']['edit'][12] = 'Accès aux pages privées membres et éditeurs';
$text['core_user_view']['edit'][13] = 'Informations générales';
$text['core_user_view']['edit'][14] = 'Ajout / Édition / Suppression de pages';
$text['core_user_view']['edit'][15] = 'Ajout / Édition / Suppression de fichiers';
$text['core_user_view']['edit'][16] = 'Accès à toutes les pages privées';
$text['core_user_view']['edit'][17] = 'Ajout / Édition / Suppression de dossiers';
$text['core_user_view']['edit'][18] = 'Ajout / Édition / Suppression d\'utilisateurs';
$text['core_user_view']['edit'][19] = 'Configuration du site';
$text['core_user_view']['edit'][20] = 'Personnalisation du thème';
$text['core_user_view']['edit'][21] = 'Authentification';
$text['core_user_view']['edit'][22] = 'Identifiant';
$text['core_user_view']['edit'][23] = 'Ancien mot de passe';
$text['core_user_view']['edit'][24] = 'Confirmation';
$text['core_user_view']['edit'][25] = 'Prévenir l\'utilisateur par mail';
$text['core_user_view']['edit'][26] = 'Redirection';
$text['core_user_view']['edit'][27] = 'Redirection après connexion';
$text['core_user_view']['edit'][28] = 'Choisir Aucune si vous ne souhaitez pas de redirection.';
$text['core_user_view']['edit'][29] = 'Enregistrer';
$text['core_user_view']['edit'][30] = 'Impossible de modifier votre propre groupe.';
$text['core_user_view']['edit'][31] = 'L\'identifiant est défini lors de la création du compte, il ne peut pas être modifié.';
$text['core_user_view']['edit'][32] = 'Nouveau mot de passe';
$text['core_user_view']['forgot'][0] = 'Identifiant';
$text['core_user_view']['forgot'][1] = 'Retour';
$text['core_user_view']['forgot'][2] = 'Valider';
$text['core_user_view']['import'][0] = 'Retour';
$text['core_user_view']['import'][1] = 'Aide';
$text['core_user_view']['import'][2] = 'Importer';
$text['core_user_view']['import'][3] = 'Importation de fichier plat CSV';
$text['core_user_view']['import'][4] = 'Liste d\'utilisateurs :';
$text['core_user_view']['import'][5] = 'Séparateur';
$text['core_user_view']['import'][6] = 'Envoyer un message de confirmation';
$text['core_user_view']['import'][7] = 'Id';
$text['core_user_view']['import'][8] = 'Nom';
$text['core_user_view']['import'][9] = 'Prénom';
$text['core_user_view']['import'][10] = 'Groupe';
$text['core_user_view']['import'][11] = 'Pseudo';
$text['core_user_view']['import'][12] = 'Email';
$text['core_user_view']['import'][13] = ' Compte créé | ';
$text['core_user_view']['import'][14] = ' Compte créé et notifié | ';
$text['core_user_view']['import'][15] = ' Erreur dans le fichier, compte non créé.';
$text['core_user_view']['index'][0] = 'Accueil';
$text['core_user_view']['index'][1] = 'Aide';
$text['core_user_view']['index'][2] = 'Importation';
$text['core_user_view']['index'][3] = 'Utilisateur';
$text['core_user_view']['index'][4] = 'Identifiant';
$text['core_user_view']['index'][5] = 'Nom';
$text['core_user_view']['index'][6] = 'Groupe';
$text['core_user_view']['index'][7] = "Êtes-vous sûr de vouloir supprimer cet utilisateur ?";
$text['core_user_view']['login'][0] = 'Identifiant';
$text['core_user_view']['login'][1] = 'Mot de passe';
$text['core_user_view']['login'][2] = 'Annuler';
$text['core_user_view']['login'][3] = 'Connexion';
$text['core_user_view']['login'][4] = 'Se souvenir de mon identifiant';
$text['core_user_view']['login'][5] = 'Mot de passe perdu';
$text['core_user_view']['reset'][0] = 'Nouveau mot de passe';
$text['core_user_view']['reset'][1] = 'Confirmation';
$text['core_user_view']['reset'][2] = 'Valider';
$text['core_user']['add'][0] = 'Identifiant déjà utilisé';
$text['core_user']['add'][1] = 'Incorrect';
$text['core_user']['add'][2] = 'Compte créé sur ';
$text['core_user']['add'][3] = 'Bonjour ';
$text['core_user']['add'][4] = 'Un administrateur vous a créé un compte sur le site. ';
$text['core_user']['add'][5] = 'Vous trouverez ci-dessous les détails de votre compte.';
$text['core_user']['add'][6] = 'Identifiant du compte :';
$text['core_user']['add'][7] = 'Nous ne conservons pas les mots de passe, en conséquence nous vous conseillons de conserver ce message tant que vous ne vous êtes pas connecté. Vous pourrez modifier votre mot de passe après votre première connexion.';
$text['core_user']['add'][8] = 'Utilisateur créé';
$text['core_user']['add'][9] = 'Nouvel utilisateur';
$text['core_user']['add'][10] = 'Aucune';
$text['core_user']['delete'][0] = 'Action non autorisée';
$text['core_user']['delete'][1] = 'Impossible de supprimer votre propre compte';
$text['core_user']['delete'][2] = 'Utilisateur supprimé';
$text['core_user']['edit'][0] = 'Action non autorisée';
$text['core_user']['edit'][1] = 'Incorrect';
$text['core_user']['edit'][2] = 'Modifications enregistrées';
$text['core_user']['edit'][3] = 'Aucune';
$text['core_user']['forgot'][0] = 'Réinitialisation de votre mot de passe';
$text['core_user']['forgot'][1] = 'Bonjour ';
$text['core_user']['forgot'][2] = 'Vous avez demandé à changer le mot de passe lié à votre compte. Vous trouverez ci-dessous un lien vous permettant de modifier celui-ci.';
$text['core_user']['forgot'][3] = 'Si nous n\'avez pas demandé à réinitialiser votre mot de passe, veuillez ignorer ce mail.';
$text['core_user']['forgot'][4] = 'Un mail vous a été envoyé afin de continuer la réinitialisation';
$text['core_user']['forgot'][5] = 'Cet utilisateur n\'existe pas';
$text['core_user']['forgot'][6] = 'Mot de passe oublié ?';
$text['core_user']['index'][0] = 'Liste des utilisateurs';
$text['core_user']['login'][0] = 'Compte inconnu';
$text['core_user']['login'][1] = 'Compte inconnu verrouillé';
$text['core_user']['login'][2] = 'Compte verrouillé';
$text['core_user']['login'][3] = 'Captcha, identifiant ou mot de passe incorrects';
$text['core_user']['login'][4] = 'Seul un administrateur peut se connecter lors d\'une maintenance';
$text['core_user']['login'][5] = 'Connexion réussie';
$text['core_user']['login'][6] = 'Bienvenue ';
$text['core_user']['login'][7] = 'Captcha, identifiant ou mot de passe incorrects';
$text['core_user']['login'][8] = 'Erreur de mot de passe';
$text['core_user']['login'][9] = 'Erreur de captcha';
$text['core_user']['login'][10] = 'Accès bloqué ';
$text['core_user']['login'][11] = 'Connexion';
$text['core_user']['login'][12] = '';
$text['core_user']['logout'][0] = 'Déconnexion réussie';
$text['core_user']['reset'][0] = 'Incorrect';
$text['core_user']['reset'][1] = 'Nouveau mot de passe enregistré';
$text['core_user']['reset'][2] = 'Réinitialisation du mot de passe';
$text['core_user']['import'][0] = 'Compte créé sur ';
$text['core_user']['import'][1] = 'Bonjour ';
$text['core_user']['import'][2] = 'Un administrateur vous a créé un compte sur le site';
$text['core_user']['import'][3] = '. Vous trouverez ci-dessous les détails de votre compte.';
$text['core_user']['import'][4] = 'Identifiant du compte :';
$text['core_user']['import'][5] = 'Un mot de passe provisoire vous été attribué, à la première connexion cliquez sur Mot de passe Oublié.';
$text['core_user']['import'][6] = 'Rien à importer, erreur de format ou fichier incorrect';
$text['core_user']['import'][7] = 'Importation effectuée';
$text['core_user']['import'][8] = 'Erreur de lecture, vérifiez les permissions';
$text['core_user']['import'][9] = 'Importation';
// Selects
//Paramètres pour choix de la signature
$signature = [
core::SIGNATURE_ID => 'Identifiant',
core::SIGNATURE_PSEUDO => 'Pseudo',
core::SIGNATURE_FIRSTLASTNAME => 'Prénom Nom',
core::SIGNATURE_LASTFIRSTNAME => 'Nom Prénom'
];
$groups = [
self::GROUP_BANNED => 'Banni',
self::GROUP_VISITOR => 'Visiteur',
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
$groupNews = [
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
$groupEdits = [
self::GROUP_BANNED => 'Banni',
self::GROUP_MEMBER => 'Membre',
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
?>

View File

@ -31,24 +31,8 @@ class user extends common {
]; ];
public static $users = []; public static $users = [];
//Paramètres pour choix de la signature
public static $signature = [
self::SIGNATURE_ID => 'Identifiant',
self::SIGNATURE_PSEUDO => 'Pseudo',
self::SIGNATURE_FIRSTLASTNAME => 'Prénom Nom',
self::SIGNATURE_LASTFIRSTNAME => 'Nom Prénom'
];
public static $signature_en = [
self::SIGNATURE_ID => 'Identifier',
self::SIGNATURE_PSEUDO => 'Username',
self::SIGNATURE_FIRSTLASTNAME => 'First name Name',
self::SIGNATURE_LASTFIRSTNAME => 'Name First name'
];
public static $userId = ''; public static $userId = '';
public static $userLongtime = false; public static $userLongtime = false;
public static $separators = [ public static $separators = [
';' => ';', ';' => ';',
',' => ',', ',' => ',',
@ -64,48 +48,19 @@ class user extends common {
*/ */
public function add() { public function add() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Identifiant déjà utilisé';
$text[1] = 'Incorrect';
$text[2] = 'Compte créé sur ';
$text[3] = 'Bonjour ';
$text[4] = 'Un administrateur vous a créé un compte sur le site. ';
$text[5] = 'Vous trouverez ci-dessous les détails de votre compte.';
$text[6] = 'Identifiant du compte :';
$text[7] = 'Nous ne conservons pas les mots de passe, en conséquence nous vous conseillons de conserver ce message tant que vous ne vous êtes pas connecté. Vous pourrez modifier votre mot de passe après votre première connexion.';
$text[8] = 'Utilisateur créé';
$text[9] = 'Nouvel utilisateur';
$text[10] = 'Aucune';
break;
case 'en' :
$text[0] = 'Identifier already in use';
$text[1] = 'Incorrect';
$text[2] = 'Account created on ';
$text[3] = 'Hello ';
$text[4] = 'An administrator has created an account for you on the site. ';
$text[5] = 'Below you will find your account details.';
$text[6] = 'Account ID :';
$text[7] = 'We do not store passwords, therefore we advise you to keep this message until you have logged in. You can change your password after your first login.';
$text[8] = 'User created';
$text[9] = 'New user';
$text[10] = 'None';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
$check=true; $check=true;
// L'identifiant d'utilisateur est indisponible // L'identifiant d'utilisateur est indisponible
$userId = $this->getInput('userAddId', helper::FILTER_ID, true); $userId = $this->getInput('userAddId', helper::FILTER_ID, true);
if($this->getData(['user', $userId])) { if($this->getData(['user', $userId])) {
self::$inputNotices['userAddId'] = $text[0]; self::$inputNotices['userAddId'] = $text['core_user']['add'][0];
$check=false; $check=false;
} }
// Double vérification pour le mot de passe // Double vérification pour le mot de passe
if($this->getInput('userAddPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('userAddConfirmPassword', helper::FILTER_STRING_SHORT, true)) { if($this->getInput('userAddPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('userAddConfirmPassword', helper::FILTER_STRING_SHORT, true)) {
self::$inputNotices['userAddConfirmPassword'] = $text[1]; self::$inputNotices['userAddConfirmPassword'] = $text['core_user']['add'][1];
$check = false; $check = false;
} }
// Crée l'utilisateur // Crée l'utilisateur
@ -141,23 +96,23 @@ class user extends common {
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) { if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) {
$sent = $this->sendMail( $sent = $this->sendMail(
$userMail, $userMail,
$text[2] . $this->getData(['locale', 'title']), $text['core_user']['add'][2] . $this->getData(['locale', 'title']),
$text[3].'<strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' . $text['core_user']['add'][3].'<strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' .
$text[4] . $this->getData(['locale', 'title']) . $text[5].'<br><br>' . $text['core_user']['add'][4] . $this->getData(['locale', 'title']) . $text['core_user']['add'][5].'<br><br>' .
'<strong>'.$text[6].'</strong> ' . $this->getInput('userAddId') . '<br>' . '<strong>'.$text['core_user']['add'][6].'</strong> ' . $this->getInput('userAddId') . '<br>' .
'<small>'.$text[7].'</small>', '<small>'.$text['core_user']['add'][7].'</small>',
null null
); );
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'user', 'redirect' => helper::baseUrl() . 'user',
'notification' => $sent === true ? $text[8] : $sent, 'notification' => $sent === true ? $text['core_user']['add'][8] : $sent,
'state' => $sent === true ? true : null 'state' => $sent === true ? true : null
]); ]);
} }
// Générer la liste des pages disponibles // Générer la liste des pages disponibles
$redirectPage = array( 'noRedirect'=> array( 'title'=>$text[10])); $redirectPage = array( 'noRedirect'=> array( 'title'=>$text['core_user']['add'][10]));
self::$pagesList = $this->getData(['page']); self::$pagesList = $this->getData(['page']);
foreach(self::$pagesList as $page => $pageId) { foreach(self::$pagesList as $page => $pageId) {
if ($this->getData(['page',$page,'block']) === 'bar' || if ($this->getData(['page',$page,'block']) === 'bar' ||
@ -168,7 +123,7 @@ class user extends common {
self::$pagesList = array_merge( $redirectPage, self::$pagesList); self::$pagesList = array_merge( $redirectPage, self::$pagesList);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[9], 'title' => $text['core_user']['add'][9],
'view' => 'add' 'view' => 'add'
]); ]);
} }
@ -178,20 +133,7 @@ class user extends common {
*/ */
public function delete() { public function delete() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Action non autorisée';
$text[1] = 'Impossible de supprimer votre propre compte';
$text[2] = 'Utilisateur supprimé';
break;
case 'en' :
$text[0] = 'Unauthorised action';
$text[1] = 'Unable to delete your own account';
$text[2] = 'Deleted user';
break;
}
// Accès refusé // Accès refusé
if( if(
// L'utilisateur n'existe pas // L'utilisateur n'existe pas
@ -209,7 +151,7 @@ class user extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'user', 'redirect' => helper::baseUrl() . 'user',
'notification' => $text[0] 'notification' => $text['core_user']['delete'][0]
]); ]);
} }
// Bloque la suppression de son propre compte // Bloque la suppression de son propre compte
@ -217,7 +159,7 @@ class user extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'user', 'redirect' => helper::baseUrl() . 'user',
'notification' => $text[1] 'notification' => $text['core_user']['delete'][1]
]); ]);
} }
// Suppression // Suppression
@ -226,7 +168,7 @@ class user extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'user', 'redirect' => helper::baseUrl() . 'user',
'notification' => $text[2], 'notification' => $text['core_user']['delete'][2],
'state' => true 'state' => true
]); ]);
} }
@ -237,28 +179,14 @@ class user extends common {
*/ */
public function edit() { public function edit() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Action non autorisée';
$text[1] = 'Incorrect';
$text[2] = 'Modifications enregistrées';
$text[3] = 'Aucune';
break;
case 'en' :
$text[0] = 'Unauthorised action';
$text[1] = 'Incorrect';
$text[2] = 'Registered changes';
$text[3] = 'None';
break;
}
if ($this->getUrl(3) !== $_SESSION['csrf'] && if ($this->getUrl(3) !== $_SESSION['csrf'] &&
$this->getUrl(4) !== $_SESSION['csrf']) { $this->getUrl(4) !== $_SESSION['csrf']) {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . 'user', 'redirect' => helper::baseUrl() . 'user',
'notification' => $text[0] 'notification' => $text['core_user']['edit'][0]
]); ]);
} }
// Accès refusé // Accès refusé
@ -300,11 +228,11 @@ class user extends common {
} }
} }
else { else {
self::$inputNotices['userEditConfirmPassword'] = $text[1]; self::$inputNotices['userEditConfirmPassword'] = $text['core_user']['edit'][1];
} }
} }
else { else {
self::$inputNotices['userEditOldPassword'] = $text[1]; self::$inputNotices['userEditOldPassword'] = $text['core_user']['edit'][1];
} }
} }
// Modification du groupe // Modification du groupe
@ -363,12 +291,12 @@ class user extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => $redirect, 'redirect' => $redirect,
'notification' => $text[2], 'notification' => $text['core_user']['edit'][2],
'state' => true 'state' => true
]); ]);
} }
// Générer la liste des pages disponibles // Générer la liste des pages disponibles
$redirectPage = array( 'noRedirect'=> array( 'title'=> $text[3]) ); $redirectPage = array( 'noRedirect'=> array( 'title'=> $text['core_user']['edit'][3]) );
self::$pagesList = $this->getData(['page']); self::$pagesList = $this->getData(['page']);
foreach(self::$pagesList as $page => $pageId) { foreach(self::$pagesList as $page => $pageId) {
if ($this->getData(['page',$page,'block']) === 'bar' || if ($this->getData(['page',$page,'block']) === 'bar' ||
@ -389,29 +317,8 @@ class user extends common {
* Mot de passe perdu * Mot de passe perdu
*/ */
public function forgot() { public function forgot() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Réinitialisation de votre mot de passe';
$text[1] = 'Bonjour ';
$text[2] = 'Vous avez demandé à changer le mot de passe lié à votre compte. Vous trouverez ci-dessous un lien vous permettant de modifier celui-ci.';
$text[3] = 'Si nous n\'avez pas demandé à réinitialiser votre mot de passe, veuillez ignorer ce mail.';
$text[4] = 'Un mail vous a été envoyé afin de continuer la réinitialisation';
$text[5] = 'Cet utilisateur n\'existe pas';
$text[6] = 'Mot de passe oublié ?';
break;
case 'en' :
$text[0] = 'Reset your password';
$text[1] = 'Hello ';
$text[2] = 'You have requested to change the password linked to your account. Below you will find a link to change your password.';
$text[3] = 'If you have not asked us to reset your password, please ignore this email.';
$text[4] = 'An email has been sent to you to continue the reset';
$text[5] = 'This user does not exist';
$text[6] = 'Forgot your password ?';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
$userId = $this->getInput('userForgotId', helper::FILTER_ID, true); $userId = $this->getInput('userForgotId', helper::FILTER_ID, true);
@ -423,16 +330,16 @@ class user extends common {
// Envoi le mail // Envoi le mail
$sent = $this->sendMail( $sent = $this->sendMail(
$this->getData(['user', $userId, 'mail']), $this->getData(['user', $userId, 'mail']),
$text[0], $text['core_user']['forgot'][0],
$text[1] .'<strong>' . $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']) . '</strong>,<br><br>' . $text['core_user']['forgot'][1] .'<strong>' . $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']) . '</strong>,<br><br>' .
$text[2].'<br><br>' . $text['core_user']['forgot'][2].'<br><br>' .
'<a href="' . helper::baseUrl() . 'user/reset/' . $userId . '/' . $uniqId . '" target="_blank">' . helper::baseUrl() . 'user/reset/' . $userId . '/' . $uniqId . '</a><br><br>' . '<a href="' . helper::baseUrl() . 'user/reset/' . $userId . '/' . $uniqId . '" target="_blank">' . helper::baseUrl() . 'user/reset/' . $userId . '/' . $uniqId . '</a><br><br>' .
$text[3].'</small>', $text['core_user']['forgot'][3].'</small>',
null null
); );
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => ($sent === true ? $text[4] : $sent), 'notification' => ($sent === true ? $text['core_user']['forgot'][4] : $sent),
'state' => ($sent === true ? true : null) 'state' => ($sent === true ? true : null)
]); ]);
} }
@ -440,14 +347,14 @@ class user extends common {
else { else {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[5] 'notification' => $text['core_user']['forgot'][5]
]); ]);
} }
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT, 'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => $text[6], 'title' => $text['core_user']['forgot'][6],
'view' => 'forgot' 'view' => 'forgot'
]); ]);
} }
@ -457,16 +364,8 @@ class user extends common {
*/ */
public function index() { public function index() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Liste des utilisateurs';
break;
case 'en' :
$text[0] = 'List of users';
break;
}
$userIdsFirstnames = helper::arrayCollumn($this->getData(['user']), 'firstname'); $userIdsFirstnames = helper::arrayCollumn($this->getData(['user']), 'firstname');
ksort($userIdsFirstnames); ksort($userIdsFirstnames);
foreach($userIdsFirstnames as $userId => $userFirstname) { foreach($userIdsFirstnames as $userId => $userFirstname) {
@ -474,7 +373,7 @@ class user extends common {
self::$users[] = [ self::$users[] = [
$userId, $userId,
$userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']), $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']),
self::$groups[$this->getData(['user', $userId, 'group'])], $groups[$this->getData(['user', $userId, 'group'])],
template::button('userEdit' . $userId, [ template::button('userEdit' . $userId, [
'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'], 'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'],
'value' => template::ico('pencil') 'value' => template::ico('pencil')
@ -489,7 +388,7 @@ class user extends common {
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[0], 'title' => $text['core_user']['index'][0],
'view' => 'index' 'view' => 'index'
]); ]);
} }
@ -500,40 +399,7 @@ class user extends common {
public function login() { public function login() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Compte inconnu';
$text[1] = 'Compte inconnu verrouillé';
$text[2] = 'Compte verrouillé';
$text[3] = 'Captcha, identifiant ou mot de passe incorrects';
$text[4] = 'Seul un administrateur peut se connecter lors d\'une maintenance';
$text[5] = 'Connexion réussie';
$text[6] = 'Bienvenue ';
$text[7] = 'Captcha, identifiant ou mot de passe incorrects';
$text[8] = 'Erreur de mot de passe';
$text[9] = 'Erreur de captcha';
$text[10] = 'Accès bloqué ';
$text[11] = 'Connexion';
$text[12] = '';
break;
case 'en' :
$text[0] = 'unknown account';
$text[1] = 'Unknown account locked';
$text[2] = 'Account locked';
$text[3] = 'Incorrect captcha, username or password';
$text[4] = 'Only an administrator can log in during maintenance';
$text[5] = 'Successful connection';
$text[6] = 'Welcome ';
$text[7] = 'Incorrect captcha, username or password';
$text[8] = 'Password error';
$text[9] = 'Captcha error';
$text[10] = 'Account locked ';
$text[11] = 'Connection';
$text[12] = '';
break;
}
// Soumission du formulaire // Soumission du formulaire
$logStatus = ''; $logStatus = '';
if($this->isPost()) { if($this->isPost()) {
@ -552,7 +418,7 @@ class user extends common {
* Aucun compte existant * Aucun compte existant
*/ */
if ( !$this->getData(['user', $userId])) { if ( !$this->getData(['user', $userId])) {
$logStatus = $text[0]; $logStatus = $text['core_user']['login'][0];
//Stockage de l'IP //Stockage de l'IP
$this->setData([ $this->setData([
'blacklist', 'blacklist',
@ -567,17 +433,17 @@ class user extends common {
$ipBlackList = helper::arrayCollumn($this->getData(['blacklist']), 'ip'); $ipBlackList = helper::arrayCollumn($this->getData(['blacklist']), 'ip');
if ( $this->getData(['blacklist',$userId,'connectFail']) >= $this->getData(['config', 'connect', 'attempt']) if ( $this->getData(['blacklist',$userId,'connectFail']) >= $this->getData(['config', 'connect', 'attempt'])
AND in_array($this->getData(['blacklist',$userId,'ip']),$ipBlackList) ) { AND in_array($this->getData(['blacklist',$userId,'ip']),$ipBlackList) ) {
$logStatus = $text[1]; $logStatus = $text['core_user']['login'][1];
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[2], 'notification' => $text['core_user']['login'][2],
'redirect' => helper::baseUrl(), 'redirect' => helper::baseUrl(),
'state' => false 'state' => false
]); ]);
} else { } else {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[3] 'notification' => $text['core_user']['login'][3]
]); ]);
} }
/** /**
@ -616,26 +482,26 @@ class user extends common {
AND $this->getData(['user', $userId, 'group']) < self::GROUP_ADMIN AND $this->getData(['user', $userId, 'group']) < self::GROUP_ADMIN
) { ) {
$this->addOutput([ $this->addOutput([
'notification' => $text[4], 'notification' => $text['core_user']['login'][4],
'redirect' => helper::baseUrl(), 'redirect' => helper::baseUrl(),
'state' => false 'state' => false
]); ]);
} else { } else {
$logStatus = $text[5]; $logStatus = $text['core_user']['login'][5];
// Page de redirection par défaut // Page de redirection par défaut
$redirectPage = helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))); $redirectPage = helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2)));
if( null !==($this->getData(['user',$userId,'redirectPageId'])) AND $this->getData(['user',$userId,'redirectPageId']) !== 'noRedirect') $redirectPage = helper::baseUrl() . $this->getData(['user',$userId,'redirectPageId']); if( null !==($this->getData(['user',$userId,'redirectPageId'])) AND $this->getData(['user',$userId,'redirectPageId']) !== 'noRedirect') $redirectPage = helper::baseUrl() . $this->getData(['user',$userId,'redirectPageId']);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[6] . $this->getData(['user',$userId,'firstname']) . ' ' . $this->getData(['user',$userId,'lastname']) , 'notification' => $text['core_user']['login'][6] . $this->getData(['user',$userId,'firstname']) . ' ' . $this->getData(['user',$userId,'lastname']) ,
'redirect' => $redirectPage, 'redirect' => $redirectPage,
'state' => true 'state' => true
]); ]);
} }
// Sinon notification d'échec // Sinon notification d'échec
} else { } else {
$notification = $text[7]; $notification = $text['core_user']['login'][7];
$logStatus = $captcha === true ? $text[8] : $text[9]; $logStatus = $captcha === true ? $text['core_user']['login'][8] : $text['core_user']['login'][9];
// Cas 1 le nombre de connexions est inférieur aux tentatives autorisées : incrément compteur d'échec // Cas 1 le nombre de connexions est inférieur aux tentatives autorisées : incrément compteur d'échec
if ($this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])) { if ($this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])) {
$this->setData(['user',$userId,'connectFail',$this->getdata(['user',$userId,'connectFail']) + 1 ]); $this->setData(['user',$userId,'connectFail',$this->getdata(['user',$userId,'connectFail']) + 1 ]);
@ -646,7 +512,7 @@ class user extends common {
} }
// Cas 3 le délai de bloquage court // Cas 3 le délai de bloquage court
if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) > time() ) { if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) > time() ) {
$notification = $text[10] . ($this->getData(['config', 'connect', 'timeout']) / 60) . ' minutes.'; $notification = $text['core_user']['login'][10] . ($this->getData(['config', 'connect', 'timeout']) / 60) . ' minutes.';
} }
// Valeurs en sortie // Valeurs en sortie
@ -678,7 +544,7 @@ class user extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT, 'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => $text[11], 'title' => $text['core_user']['login'][11],
'view' => 'login' 'view' => 'login'
]); ]);
} }
@ -688,16 +554,7 @@ class user extends common {
*/ */
public function logout() { public function logout() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Déconnexion réussie';
break;
case 'en' :
$text[0] = 'Successfully disconnected';
break;
}
// Ne pas effacer l'identifiant mais seulement le mot de passe // Ne pas effacer l'identifiant mais seulement le mot de passe
if (array_key_exists('DELTA_USER_LONGTIME',$_COOKIE) if (array_key_exists('DELTA_USER_LONGTIME',$_COOKIE)
AND $_COOKIE['DELTA_USER_LONGTIME'] !== 'true' ) { AND $_COOKIE['DELTA_USER_LONGTIME'] !== 'true' ) {
@ -708,7 +565,7 @@ class user extends common {
session_destroy(); session_destroy();
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[0], 'notification' => $text['core_user']['logout'][0],
'redirect' => helper::baseUrl(false), 'redirect' => helper::baseUrl(false),
'state' => true 'state' => true
]); ]);
@ -719,20 +576,7 @@ class user extends common {
*/ */
public function reset() { public function reset() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Incorrect';
$text[1] = 'Nouveau mot de passe enregistré';
$text[2] = 'Réinitialisation du mot de passe';
break;
case 'en' :
$text[0] = 'Incorrect';
$text[1] = 'New password registered';
$text[2] = 'Resetting the password';
break;
}
// Accès refusé // Accès refusé
if( if(
// L'utilisateur n'existe pas // L'utilisateur n'existe pas
@ -756,7 +600,7 @@ class user extends common {
// La confirmation ne correspond pas au mot de passe // La confirmation ne correspond pas au mot de passe
if($this->getInput('userResetNewPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('userResetConfirmPassword', helper::FILTER_STRING_SHORT, true)) { if($this->getInput('userResetNewPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('userResetConfirmPassword', helper::FILTER_STRING_SHORT, true)) {
$newPassword = $this->getData(['user', $this->getUrl(2), 'password']); $newPassword = $this->getData(['user', $this->getUrl(2), 'password']);
self::$inputNotices['userResetConfirmPassword'] = $text[0]; self::$inputNotices['userResetConfirmPassword'] = $text['core_user']['reset'][0];
} }
else { else {
$newPassword = $this->getInput('userResetNewPassword', helper::FILTER_PASSWORD, true); $newPassword = $this->getInput('userResetNewPassword', helper::FILTER_PASSWORD, true);
@ -770,7 +614,7 @@ class user extends common {
$this->setData(['user', $this->getUrl(2),'connectTimeout',0 ]); $this->setData(['user', $this->getUrl(2),'connectTimeout',0 ]);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[1], 'notification' => $text['core_user']['reset'][1],
//'redirect' => helper::baseUrl() . 'user/login/' . str_replace('/', '_', $this->getUrl()), //'redirect' => helper::baseUrl() . 'user/login/' . str_replace('/', '_', $this->getUrl()),
'redirect' => helper::baseUrl(), 'redirect' => helper::baseUrl(),
'state' => true 'state' => true
@ -780,7 +624,7 @@ class user extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT, 'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => $text[2], 'title' => $text['core_user']['reset'][2],
'view' => 'reset' 'view' => 'reset'
]); ]);
} }
@ -791,34 +635,7 @@ class user extends common {
*/ */
public function import() { public function import() {
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Compte créé sur ';
$text[1] = 'Bonjour ';
$text[2] = 'Un administrateur vous a créé un compte sur le site';
$text[3] = '. Vous trouverez ci-dessous les détails de votre compte.';
$text[4] = 'Identifiant du compte :';
$text[5] = 'Un mot de passe provisoire vous été attribué, à la première connexion cliquez sur Mot de passe Oublié.';
$text[6] = 'Rien à importer, erreur de format ou fichier incorrect';
$text[7] = 'Importation effectuée';
$text[8] = 'Erreur de lecture, vérifiez les permissions';
$text[9] = 'Importation';
break;
case 'en' :
$text[0] = 'Account created on ';
$text[1] = 'Hello ';
$text[2] = 'An administrator has created an account for you on the site';
$text[3] = '. You will find your account details below.';
$text[4] = 'Account ID :';
$text[5] = 'A temporary password has been assigned to you, the first time you log in click on Forgot password.';
$text[6] = 'Nothing to import, format error or incorrect file';
$text[7] = 'Importation done';
$text[8] = 'Read error, check permissions';
$text[9] = 'Importation';
break;
}
// Soumission du formulaire // Soumission du formulaire
$notification = ''; $notification = '';
$success = true; $success = true;
@ -862,7 +679,7 @@ class user extends common {
helper::filter($item['id'] , helper::FILTER_ID), helper::filter($item['id'] , helper::FILTER_ID),
$item['nom'], $item['nom'],
$item['prenom'], $item['prenom'],
self::$groups[$item['groupe']], $groups[$item['groupe']],
$item['prenom'], $item['prenom'],
helper::filter($item['email'] , helper::FILTER_MAIL), helper::filter($item['email'] , helper::FILTER_MAIL),
$item['notification'] $item['notification']
@ -896,11 +713,11 @@ class user extends common {
AND $this->getInput('userImportNotification',helper::FILTER_BOOLEAN) === true) { AND $this->getInput('userImportNotification',helper::FILTER_BOOLEAN) === true) {
$sent = $this->sendMail( $sent = $this->sendMail(
$item['email'], $item['email'],
$text[0] . $this->getData(['locale', 'title']), $text['core_user']['import'][0] . $this->getData(['locale', 'title']),
$text[0].' <strong>' . $item['prenom'] . ' ' . $item['nom'] . '</strong>,<br><br>' . $text['core_user']['import'][0].' <strong>' . $item['prenom'] . ' ' . $item['nom'] . '</strong>,<br><br>' .
$text[2]. $this->getData(['locale', 'title']) . $text[3].'<br><br>' . $text['core_user']['import'][2]. $this->getData(['locale', 'title']) . $text['core_user']['import'][3].'<br><br>' .
'<strong>'.$text[4].'</strong> ' . $userId . '<br>' . '<strong>'.$text['core_user']['import'][4].'</strong> ' . $userId . '<br>' .
'<small>'.$text[5].'</small>' '<small>'.$text['core_user']['import'][5].'</small>'
); );
if ($sent === true) { if ($sent === true) {
// Mail envoyé changement de l'icône // Mail envoyé changement de l'icône
@ -912,7 +729,7 @@ class user extends common {
$userId, $userId,
$item['nom'], $item['nom'],
$item['prenom'], $item['prenom'],
self::$groups[$item['groupe']], $groups[$item['groupe']],
$item['prenom'], $item['prenom'],
$item['email'], $item['email'],
$item['notification'] $item['notification']
@ -921,20 +738,20 @@ class user extends common {
} }
} }
if (empty(self::$users)) { if (empty(self::$users)) {
$notification = $text[6] ; $notification = $text['core_user']['import'][6] ;
$success = false; $success = false;
} else { } else {
$notification = $text[7] ; $notification = $text['core_user']['import'][7] ;
$success = true; $success = true;
} }
} else { } else {
$notification = $text[8]; $notification = $text['core_user']['import'][8];
$success = false; $success = false;
} }
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $text[9], 'title' => $text['core_user']['import'][9],
'view' => 'import', 'view' => 'import',
'notification' => $notification, 'notification' => $notification,
'state' => $success 'state' => $success

View File

@ -1,77 +1,6 @@
<?php echo template::formOpen('userAddForm'); <?php echo template::formOpen('userAddForm');
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Prénom';
$text[3] = 'Nom';
$text[4] = 'Pseudo';
$text[5] = 'Signature';
$text[6] = 'Adresse mail';
$text[7] = 'Groupe';
$text[8] = 'Partage de fichiers autorisé';
$text[9] = 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers';
$text[10] = 'Autorisations :';
$text[11] = 'Accès aux pages privées membres';
$text[12] = 'Accès aux pages privées membres et éditeurs';
$text[13] = 'Informations générales';
$text[14] = 'Ajout / Édition / Suppression de pages';
$text[15] = 'Ajout / Édition / Suppression de fichiers';
$text[16] = 'Accès à toutes les pages privées';
$text[17] = 'Ajout / Édition / Suppression de dossiers';
$text[18] = 'Ajout / Édition / Suppression d\'utilisateurs';
$text[19] = 'Configuration du site';
$text[20] = 'Personnalisation du thème';
$text[21] = 'Authentification';
$text[22] = 'Identifiant';
$text[23] = 'Mot de passe';
$text[24] = 'Confirmation';
$text[25] = 'Prévenir l\'utilisateur par mail';
$text[26] = 'Redirection';
$text[27] = 'Redirection après connexion';
$text[28] = 'Choisir Aucune si vous ne souhaitez pas de redirection.';
$text[29] = 'Enregistrer';
$groupNews = self::$groupNews;
$signature = $module::$signature;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'First name';
$text[3] = 'Name';
$text[4] = 'Pseudo';
$text[5] = 'Signature';
$text[6] = 'Email address';
$text[7] = 'Group';
$text[8] = 'File sharing allowed';
$text[9] = 'This member will be able to upload or download files to the \'partage\' folder and its subfolders';
$text[10] = 'Authorisations :';
$text[11] = 'Access to private member pages';
$text[12] = 'Access to members\' and editors\' private pages';
$text[13] = 'General information';
$text[14] = 'Add / Edit / Delete pages';
$text[15] = 'Add / Edit / Delete files';
$text[16] = 'Access to all private pages';
$text[17] = 'Add / Edit / Delete folders';
$text[18] = 'Add / Edit / Delete users';
$text[19] = 'Site configuration';
$text[20] = 'Theme customisation';
$text[21] = 'Authentification';
$text[22] = 'Identifier';
$text[23] = 'Password';
$text[24] = 'Confirmation';
$text[25] = 'Notify the user by email';
$text[26] = 'Redirection';
$text[27] = 'Redirection after login';
$text[28] = 'Select \'Aucune\' if you do not want a redirection.';
$text[29] = 'Register';
$groupNews = self::$groupNews_en;
$signature = $module::$signature_en;
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -79,7 +8,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user', 'href' => helper::baseUrl() . 'user',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_user_view']['add'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -87,101 +16,101 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/nouvel-utilisateur', 'href' => 'https://doc.deltacms.fr/nouvel-utilisateur',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_user_view']['add'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('userAddSubmit', [ <?php echo template::submit('userAddSubmit', [
'value'=> $text[29] 'value'=> $text['core_user_view']['add'][29]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[13]; ?></h4> <h4><?php echo $text['core_user_view']['add'][13]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('userAddFirstname', [ <?php echo template::text('userAddFirstname', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[2] 'label' => $text['core_user_view']['add'][2]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::text('userAddLastname', [ <?php echo template::text('userAddLastname', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[3] 'label' => $text['core_user_view']['add'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php echo template::text('userAddPseudo', [ <?php echo template::text('userAddPseudo', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[4] 'label' => $text['core_user_view']['add'][4]
]); ?> ]); ?>
<?php echo template::select('userAddSignature', $signature, [ <?php echo template::select('userAddSignature', $signature, [
'label' => $text[5], 'label' => $text['core_user_view']['add'][5],
'selected' => 1 'selected' => 1
]); ?> ]); ?>
<?php echo template::mail('userAddMail', [ <?php echo template::mail('userAddMail', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[6] 'label' => $text['core_user_view']['add'][6]
]); ?> ]); ?>
<?php echo template::select('userAddGroup', $groupNews, [ <?php echo template::select('userAddGroup', $groupNews, [
'label' => $text[7], 'label' => $text['core_user_view']['add'][7],
'selected' => self::GROUP_MEMBER 'selected' => self::GROUP_MEMBER
]); ?> ]); ?>
<div id="userAddMemberFiles" class="displayNone"> <div id="userAddMemberFiles" class="displayNone">
<?php echo template::checkbox('userAddFiles', true, $text[8] , [ <?php echo template::checkbox('userAddFiles', true, $text['core_user_view']['add'][8] , [
'checked' => false, 'checked' => false,
'help' => $text[9] 'help' => $text['core_user_view']['add'][9]
]); ?> ]); ?>
</div> </div>
<?php echo $text[10]; ?> <?php echo $text['core_user_view']['add'][10]; ?>
<ul id="userAddGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userAddGroupDescription displayNone"> <ul id="userAddGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userAddGroupDescription displayNone">
<li><?php echo $text[11]; ?></li> <li><?php echo $text['core_user_view']['add'][11]; ?></li>
</ul> </ul>
<ul id="userAddGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userAddGroupDescription displayNone"> <ul id="userAddGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userAddGroupDescription displayNone">
<li><?php echo $text[12]; ?></li> <li><?php echo $text['core_user_view']['add'][12]; ?></li>
<li><?php echo $text[14]; ?></li> <li><?php echo $text['core_user_view']['add'][14]; ?></li>
<li><?php echo $text[15]; ?></li> <li><?php echo $text['core_user_view']['add'][15]; ?></li>
</ul> </ul>
<ul id="userAddGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userAddGroupDescription displayNone"> <ul id="userAddGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userAddGroupDescription displayNone">
<li><?php echo $text[16]; ?></li> <li><?php echo $text['core_user_view']['add'][16]; ?></li>
<li><?php echo $text[14]; ?></li> <li><?php echo $text['core_user_view']['add'][14]; ?></li>
<li><?php echo $text[15]; ?></li> <li><?php echo $text['core_user_view']['add'][15]; ?></li>
<li><?php echo $text[17]; ?></li> <li><?php echo $text['core_user_view']['add'][17]; ?></li>
<li><?php echo $text[18]; ?></li> <li><?php echo $text['core_user_view']['add'][18]; ?></li>
<li><?php echo $text[19]; ?></li> <li><?php echo $text['core_user_view']['add'][19]; ?></li>
<li><?php echo $text[20]; ?></li> <li><?php echo $text['core_user_view']['add'][20]; ?></li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[21]; ?></h4> <h4><?php echo $text['core_user_view']['add'][21]; ?></h4>
<?php echo template::text('userAddId', [ <?php echo template::text('userAddId', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[22] 'label' => $text['core_user_view']['add'][22]
]); ?> ]); ?>
<?php echo template::password('userAddPassword', [ <?php echo template::password('userAddPassword', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[23] 'label' => $text['core_user_view']['add'][23]
]); ?> ]); ?>
<?php echo template::password('userAddConfirmPassword', [ <?php echo template::password('userAddConfirmPassword', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[24] 'label' => $text['core_user_view']['add'][24]
]); ?> ]); ?>
<?php echo template::checkbox('userAddSendMail', true, <?php echo template::checkbox('userAddSendMail', true,
$text[25]); $text['core_user_view']['add'][25]);
?> ?>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[26]; ?></h4> <h4><?php echo $text['core_user_view']['add'][26]; ?></h4>
<?php echo template::select('userRedirectPageId', helper::arrayCollumn($module::$pagesList, 'title'), [ <?php echo template::select('userRedirectPageId', helper::arrayCollumn($module::$pagesList, 'title'), [
'label' => $text[27], 'label' => $text['core_user_view']['add'][27],
'selected' =>$this->getData(['user', $this->getUrl(2),'redirectPageId']), 'selected' =>$this->getData(['user', $this->getUrl(2),'redirectPageId']),
'help' => $text[28] 'help' => $text['core_user_view']['add'][28]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,83 +1,6 @@
<?php echo template::formOpen('userEditForm'); <?php echo template::formOpen('userEditForm');
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Prénom';
$text[3] = 'Nom';
$text[4] = 'Pseudo';
$text[5] = 'Signature';
$text[6] = 'Adresse mail';
$text[7] = 'Groupe';
$text[8] = 'Partage de fichiers autorisé';
$text[9] = 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers';
$text[10] = 'Autorisations :';
$text[11] = 'Accès aux pages privées membres';
$text[12] = 'Accès aux pages privées membres et éditeurs';
$text[13] = 'Informations générales';
$text[14] = 'Ajout / Édition / Suppression de pages';
$text[15] = 'Ajout / Édition / Suppression de fichiers';
$text[16] = 'Accès à toutes les pages privées';
$text[17] = 'Ajout / Édition / Suppression de dossiers';
$text[18] = 'Ajout / Édition / Suppression d\'utilisateurs';
$text[19] = 'Configuration du site';
$text[20] = 'Personnalisation du thème';
$text[21] = 'Authentification';
$text[22] = 'Identifiant';
$text[23] = 'Ancien mot de passe';
$text[24] = 'Confirmation';
$text[25] = 'Prévenir l\'utilisateur par mail';
$text[26] = 'Redirection';
$text[27] = 'Redirection après connexion';
$text[28] = 'Choisir Aucune si vous ne souhaitez pas de redirection.';
$text[29] = 'Enregistrer';
$text[30] = 'Impossible de modifier votre propre groupe.';
$text[31] = 'L\'identifiant est défini lors de la création du compte, il ne peut pas être modifié.';
$text[32] = 'Nouveau mot de passe';
$signature = $module::$signature;
$groupEdits = self::$groupEdits;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'First name';
$text[3] = 'Name';
$text[4] = 'Pseudo';
$text[5] = 'Signature';
$text[6] = 'Email address';
$text[7] = 'Group';
$text[8] = 'File sharing allowed';
$text[9] = 'This member will be able to upload or download files to the \'partage\' folder and its subfolders';
$text[10] = 'Authorisations :';
$text[11] = 'Access to private member pages';
$text[12] = 'Access to members\' and editors\' private pages';
$text[13] = 'General information';
$text[14] = 'Add / Edit / Delete pages';
$text[15] = 'Add / Edit / Delete files';
$text[16] = 'Access to all private pages';
$text[17] = 'Add / Edit / Delete folders';
$text[18] = 'Add / Edit / Delete users';
$text[19] = 'Site configuration';
$text[20] = 'Theme customisation';
$text[21] = 'Authentification';
$text[22] = 'Identifier';
$text[23] = 'Old Password';
$text[24] = 'Confirmation';
$text[25] = 'Notify the user by email';
$text[26] = 'Redirection';
$text[27] = 'Redirection after login';
$text[28] = 'Select \'Aucune\' if you do not want a redirection.';
$text[29] = 'Register';
$text[30] = 'You cannot change your own group.';
$text[31] = 'The username is defined when the account is created and cannot be changed.';
$text[32] = 'New password';
$signature = $module::$signature_en;
$groupEdits = self::$groupEdits_en;
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -86,33 +9,33 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user', 'href' => helper::baseUrl() . 'user',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_user_view']['edit'][0]
]); ?> ]); ?>
<?php else: ?> <?php else: ?>
<?php echo template::button('userEditBack', [ <?php echo template::button('userEditBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl(false), 'href' => helper::baseUrl(false),
'ico' => 'home', 'ico' => 'home',
'value' => $text[0] 'value' => $text['core_user_view']['edit'][0]
]); ?> ]); ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('userEditSubmit', [ <?php echo template::submit('userEditSubmit', [
'value'=> $text[29] 'value'=> $text['core_user_view']['edit'][29]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[13]; ?></h4> <h4><?php echo $text['core_user_view']['edit'][13]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('userEditFirstname', [ <?php echo template::text('userEditFirstname', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'disabled' => $this->getUser('group') > 2 ? false : true, 'disabled' => $this->getUser('group') > 2 ? false : true,
'label' => $text[2], 'label' => $text['core_user_view']['edit'][2],
'value' => $this->getData(['user', $this->getUrl(2), 'firstname']) 'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
]); ?> ]); ?>
</div> </div>
@ -120,88 +43,88 @@ switch ($val) {
<?php echo template::text('userEditLastname', [ <?php echo template::text('userEditLastname', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'disabled' => $this->getUser('group') > 2 ? false : true, 'disabled' => $this->getUser('group') > 2 ? false : true,
'label' => $text[3], 'label' => $text['core_user_view']['edit'][3],
'value' => $this->getData(['user', $this->getUrl(2), 'lastname']) 'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php echo template::text('userEditPseudo', [ <?php echo template::text('userEditPseudo', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[4], 'label' => $text['core_user_view']['edit'][4],
'value' => $this->getData(['user', $this->getUrl(2), 'pseudo']) 'value' => $this->getData(['user', $this->getUrl(2), 'pseudo'])
]); ?> ]); ?>
<?php echo template::select('userEditSignature', $signature, [ <?php echo template::select('userEditSignature', $signature, [
'label' => $text[5], 'label' => $text['core_user_view']['edit'][5],
'selected' => $this->getData(['user', $this->getUrl(2), 'signature']) 'selected' => $this->getData(['user', $this->getUrl(2), 'signature'])
]); ?> ]); ?>
<?php echo template::mail('userEditMail', [ <?php echo template::mail('userEditMail', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[6], 'label' => $text['core_user_view']['edit'][6],
'value' => $this->getData(['user', $this->getUrl(2), 'mail']) 'value' => $this->getData(['user', $this->getUrl(2), 'mail'])
]); ?> ]); ?>
<?php if($this->getUser('group') === self::GROUP_ADMIN): ?> <?php if($this->getUser('group') === self::GROUP_ADMIN): ?>
<?php echo template::select('userEditGroup', $groupEdits, [ <?php echo template::select('userEditGroup', $groupEdits, [
'disabled' => ($this->getUrl(2) === $this->getUser('id')), 'disabled' => ($this->getUrl(2) === $this->getUser('id')),
'help' => ($this->getUrl(2) === $this->getUser('id') ? $text[30] : ''), 'help' => ($this->getUrl(2) === $this->getUser('id') ? $text['core_user_view']['edit'][30] : ''),
'label' => $text[7], 'label' => $text['core_user_view']['edit'][7],
'selected' => $this->getData(['user', $this->getUrl(2), 'group']) 'selected' => $this->getData(['user', $this->getUrl(2), 'group'])
]); ?> ]); ?>
<div id="userEditMemberFiles" class="displayNone"> <div id="userEditMemberFiles" class="displayNone">
<?php echo template::checkbox('userEditFiles', true, $text[8], [ <?php echo template::checkbox('userEditFiles', true, $text['core_user_view']['edit'][8], [
'checked' => $this->getData(['user', $this->getUrl(2), 'files']), 'checked' => $this->getData(['user', $this->getUrl(2), 'files']),
'help' => $text[9] 'help' => $text['core_user_view']['edit'][9]
]); ?> ]); ?>
</div> </div>
<div id="userEditLabelAuth"><?php echo $text[10]; ?></div> <div id="userEditLabelAuth"><?php echo $text['core_user_view']['edit'][10]; ?></div>
<ul id="userEditGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userEditGroupDescription displayNone"> <ul id="userEditGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userEditGroupDescription displayNone">
<li><?php echo $text[11]; ?></li> <li><?php echo $text['core_user_view']['edit'][11]; ?></li>
</ul> </ul>
<ul id="userEditGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userEditGroupDescription displayNone"> <ul id="userEditGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userEditGroupDescription displayNone">
<li><?php echo $text[12]; ?></li> <li><?php echo $text['core_user_view']['edit'][12]; ?></li>
<li><?php echo $text[14]; ?></li> <li><?php echo $text['core_user_view']['edit'][14]; ?></li>
<li><?php echo $text[15]; ?></li> <li><?php echo $text['core_user_view']['edit'][15]; ?></li>
</ul> </ul>
<ul id="userEditGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userEditGroupDescription displayNone"> <ul id="userEditGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userEditGroupDescription displayNone">
<li><?php echo $text[16]; ?></li> <li><?php echo $text['core_user_view']['edit'][16]; ?></li>
<li><?php echo $text[14]; ?></li> <li><?php echo $text['core_user_view']['edit'][14]; ?></li>
<li><?php echo $text[15]; ?></li> <li><?php echo $text['core_user_view']['edit'][15]; ?></li>
<li><?php echo $text[17]; ?></li> <li><?php echo $text['core_user_view']['edit'][17]; ?></li>
<li><?php echo $text[18]; ?></li> <li><?php echo $text['core_user_view']['edit'][18]; ?></li>
<li><?php echo $text[19]; ?></li> <li><?php echo $text['core_user_view']['edit'][19]; ?></li>
<li><?php echo $text[20]; ?></li> <li><?php echo $text['core_user_view']['edit'][20]; ?></li>
</ul> </ul>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo $text[21]; ?></h4> <h4><?php echo $text['core_user_view']['edit'][21]; ?></h4>
<?php echo template::text('userEditId', [ <?php echo template::text('userEditId', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'help' => $text[31], 'help' => $text['core_user_view']['edit'][31],
'label' => $text[22], 'label' => $text['core_user_view']['edit'][22],
'readonly' => true, 'readonly' => true,
'value' => $this->getUrl(2) 'value' => $this->getUrl(2)
]); ?> ]); ?>
<?php echo template::password('userEditOldPassword', [ <?php echo template::password('userEditOldPassword', [
'autocomplete' => 'new-password', // remplace 'off' pour éviter le pré remplissage auto 'autocomplete' => 'new-password', // remplace 'off' pour éviter le pré remplissage auto
'label' => $text[23] 'label' => $text['core_user_view']['edit'][23]
]); ?> ]); ?>
<?php echo template::password('userEditNewPassword', [ <?php echo template::password('userEditNewPassword', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[32] 'label' => $text['core_user_view']['edit'][32]
]); ?> ]); ?>
<?php echo template::password('userEditConfirmPassword', [ <?php echo template::password('userEditConfirmPassword', [
'autocomplete' => 'off', 'autocomplete' => 'off',
'label' => $text[24] 'label' => $text['core_user_view']['edit'][24]
]); ?> ]); ?>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[26]; ?></h4> <h4><?php echo $text['core_user_view']['edit'][26]; ?></h4>
<?php echo template::select('userRedirectPageId', helper::arrayCollumn($module::$pagesList, 'title'), [ <?php echo template::select('userRedirectPageId', helper::arrayCollumn($module::$pagesList, 'title'), [
'label' => $text[27], 'label' => $text['core_user_view']['edit'][27],
'selected' =>$this->getData(['user', $this->getUrl(2),'redirectPageId']), 'selected' =>$this->getData(['user', $this->getUrl(2),'redirectPageId']),
'help' => $text[28] 'help' => $text['core_user_view']['edit'][28]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,34 +1,21 @@
<?php echo template::formOpen('userForgotForm'); <?php echo template::formOpen('userForgotForm');
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::text('userForgotId', [
case 'fr' : 'label' => $text['core_user_view']['forgot'][0]
$text[0] = 'Identifiant';
$text[1] = 'Retour';
$text[2] = 'Valider';
break;
case 'en' :
$text[0] = 'Identifier';
$text[1] = 'Back';
$text[2] = 'Validate';
break;
}
?>
<?php echo template::text('userForgotId', [
'label' => $text[0]
]); ?> ]); ?>
<div class="row"> <div class="row">
<div class="col3 offset6"> <div class="col3 offset6">
<?php echo template::button('userForgotBack', [ <?php echo template::button('userForgotBack', [
'href' => helper::baseUrl() . 'user/login/' . $this->getUrl(2), 'href' => helper::baseUrl() . 'user/login/' . $this->getUrl(2),
'ico' => 'left', 'ico' => 'left',
'value' => $text[1] 'value' => $text['core_user_view']['forgot'][1]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::submit('userForgotSubmit', [ <?php echo template::submit('userForgotSubmit', [
'value' => $text[2] 'value' => $text['core_user_view']['forgot'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,46 +1,6 @@
<?php echo template::formOpen('userImportForm'); <?php echo template::formOpen('userImportForm');
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Importer';
$text[3] = 'Importation de fichier plat CSV';
$text[4] = 'Liste d\'utilisateurs :';
$text[5] = 'Séparateur';
$text[6] = 'Envoyer un message de confirmation';
$text[7] = 'Id';
$text[8] = 'Nom';
$text[9] = 'Prénom';
$text[10] = 'Groupe';
$text[11] = 'Pseudo';
$text[12] = 'Email';
$text[13] = ' Compte créé | ';
$text[14] = ' Compte créé et notifié | ';
$text[15] = ' Erreur dans le fichier, compte non créé.';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Import';
$text[3] = 'CSV flat file import';
$text[4] = 'List of users :';
$text[5] = 'Separator';
$text[6] = 'Send a confirmation message';
$text[7] = 'Id';
$text[8] = 'Name';
$text[9] = 'First name';
$text[10] = 'Group';
$text[11] = 'Pseudo';
$text[12] = 'Email';
$text[13] = ' Account created | ';
$text[14] = ' Account created and notified | ';
$text[15] = ' Error in the file, account not created.';
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -48,7 +8,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user', 'href' => helper::baseUrl() . 'user',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['core_user_view']['import'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -56,35 +16,35 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/importation', 'href' => 'https://doc.deltacms.fr/importation',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_user_view']['import'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset6">
<?php echo template::submit('userImportSubmit', [ <?php echo template::submit('userImportSubmit', [
'value' => $text[2] 'value' => $text['core_user_view']['import'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['core_user_view']['import'][3]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::file('userImportCSVFile', [ <?php echo template::file('userImportCSVFile', [
'label' => $text[4] 'label' => $text['core_user_view']['import'][4]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::select('userImportSeparator', $module::$separators, [ <?php echo template::select('userImportSeparator', $module::$separators, [
'label' => $text[5] 'label' => $text['core_user_view']['import'][5]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::checkbox('userImportNotification', true, $text[6], [ <?php echo template::checkbox('userImportNotification', true, $text['core_user_view']['import'][6], [
'checked' => false 'checked' => false
]); ?> ]); ?>
</div> </div>
@ -96,8 +56,8 @@ switch ($val) {
<?php if ($module::$users): ?> <?php if ($module::$users): ?>
<div class="row"> <div class="row">
<div class="col12 textAlignCenter"> <div class="col12 textAlignCenter">
<?php echo template::table([1, 3, 3, 1, 1, 2, 1], $module::$users, [$text[7], $text[8], $text[9],$text[10], $text[11], $text[12], '']); ?> <?php echo template::table([1, 3, 3, 1, 1, 2, 1], $module::$users, [$text['core_user_view']['import'][7], $text['core_user_view']['import'][8], $text['core_user_view']['import'][9],$text['core_user_view']['import'][10], $text['core_user_view']['import'][11], $text['core_user_view']['import'][12], '']); ?>
<?php echo template::ico('check'). $text[13]; echo template::ico('mail'). $text[14]; echo template::ico('cancel'). $text[15];?> <?php echo template::ico('check'). $text['core_user_view']['import'][13]; echo template::ico('mail'). $text['core_user_view']['import'][14]; echo template::ico('cancel'). $text['core_user_view']['import'][15];?>
</div> </div>
</div> </div>
<?php endif;?> <?php endif;?>

View File

@ -19,14 +19,7 @@
*/ */
$(".userDelete").on("click", function() { $(".userDelete").on("click", function() {
var _this = $(this); var _this = $(this);
var text = ""; return core.confirm( textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir supprimer cet utilisateur ?";' ;
}
else{
echo 'text = "Are you sure you want to delete this user";' ;
} ?>
return core.confirm( text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,27 +1,6 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Accueil';
$text[1] = 'Aide';
$text[2] = 'Importation';
$text[3] = 'Utilisateur';
$text[4] = 'Identifiant';
$text[5] = 'Nom';
$text[6] = 'Groupe';
break;
case 'en' :
$text[0] = 'Home';
$text[1] = 'Help';
$text[2] = 'Import';
$text[3] = 'User';
$text[4] = 'Identifier';
$text[5] = 'Name';
$text[6] = 'Group';
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -29,7 +8,7 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl(false), 'href' => helper::baseUrl(false),
'ico' => 'home', 'ico' => 'home',
'value' => $text[0] 'value' => $text['core_user_view']['index'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -37,7 +16,7 @@ switch ($val) {
'href' => 'https://doc.deltacms.fr/liste-des-utilisateurs', 'href' => 'https://doc.deltacms.fr/liste-des-utilisateurs',
'target' => '_blank', 'target' => '_blank',
'ico' => 'help', 'ico' => 'help',
'value' => $text[1], 'value' => $text['core_user_view']['index'][1],
'class' => 'buttonHelp' 'class' => 'buttonHelp'
]); ?> ]); ?>
</div> </div>
@ -45,15 +24,18 @@ switch ($val) {
<?php echo template::button('userImport', [ <?php echo template::button('userImport', [
'href' => helper::baseUrl() . 'user/import', 'href' => helper::baseUrl() . 'user/import',
'ico' => 'plus', 'ico' => 'plus',
'value' => $text[2] 'value' => $text['core_user_view']['index'][2]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::button('userAdd', [ <?php echo template::button('userAdd', [
'href' => helper::baseUrl() . 'user/add', 'href' => helper::baseUrl() . 'user/add',
'ico' => 'plus', 'ico' => 'plus',
'value' => $text[3] 'value' => $text['core_user_view']['index'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
<?php echo template::table([3, 4, 3, 1, 1], $module::$users, [$text[4], $text[5], $text[6], '', '']); ?> <?php echo template::table([3, 4, 3, 1, 1], $module::$users, [$text['core_user_view']['index'][4], $text['core_user_view']['index'][5], $text['core_user_view']['index'][6], '', '']); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_user_view']['index'][7].'"'; ?>;
</script>

View File

@ -1,45 +1,17 @@
<?php echo template::formOpen('userLoginForm'); <?php echo template::formOpen('userLoginForm');
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Identifiant';
$text[1] = 'Mot de passe';
$text[2] = 'Annuler';
$text[3] = 'Connexion';
$text[4] = 'Se souvenir de mon identifiant';
$text[5] = 'Mot de passe perdu';
break;
case 'en' :
$text[0] = 'Identifier';
$text[1] = 'Password';
$text[2] = 'Cancel';
$text[3] = 'Connection';
$text[4] = 'Remember my ID';
$text[5] = 'Lost password';
break;
default:
$text[0] = 'Identifiant';
$text[1] = 'Mot de passe';
$text[2] = 'Annuler';
$text[3] = 'Connexion';
$text[4] = 'Se souvenir de mon identifiant';
$text[5] = 'Mot de passe perdu';
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('userLoginId', [ <?php echo template::text('userLoginId', [
'label' => $text[0], 'label' => $text['core_user_view']['login'][0],
'value' => $module::$userId 'value' => $module::$userId
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::password('userLoginPassword', [ <?php echo template::password('userLoginPassword', [
'label' => $text[1] 'label' => $text['core_user_view']['login'][1]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -55,12 +27,12 @@ switch ($val) {
<?php endif;?> <?php endif;?>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('userLoginLongTime', true, $text[4], [ <?php echo template::checkbox('userLoginLongTime', true, $text['core_user_view']['login'][4], [
'checked' => $module::$userLongtime 'checked' => $module::$userLongtime
]); ?> ]); ?>
</div> </div>
<div class="col6 textAlignRight"> <div class="col6 textAlignRight">
<a href="<?php echo helper::baseUrl(); ?>user/forgot/<?php echo $this->getUrl(2); ?>"><?php echo $text[5]; ?> ?</a> <a href="<?php echo helper::baseUrl(); ?>user/forgot/<?php echo $this->getUrl(2); ?>"><?php echo $text['core_user_view']['login'][5]; ?> ?</a>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -68,12 +40,12 @@ switch ($val) {
<?php echo template::button('userLoginBack', [ <?php echo template::button('userLoginBack', [
'href' => helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))), 'href' => helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))),
'ico' => 'left', 'ico' => 'left',
'value' => $text[2] 'value' => $text['core_user_view']['login'][2]
]); ?> ]); ?>
</div> </div>
<div class="col3"> <div class="col3">
<?php echo template::submit('userLoginSubmit', [ <?php echo template::submit('userLoginSubmit', [
'value' => $text[3], 'value' => $text['core_user_view']['login'][3],
'ico' => 'lock' 'ico' => 'lock'
]); ?> ]); ?>
</div> </div>

View File

@ -1,36 +1,23 @@
<?php echo template::formOpen('userResetForm'); <?php echo template::formOpen('userResetForm');
// Lexique // Lexique
$text = []; include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Nouveau mot de passe';
$text[1] = 'Confirmation';
$text[2] = 'Valider';
break;
case 'en' :
$text[0] = 'New password';
$text[1] = 'Confirmation';
$text[2] = 'Validate';
break;
}
?> ?>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::password('userResetNewPassword', [ <?php echo template::password('userResetNewPassword', [
'label' => $text[0] 'label' => $text['core_user_view']['reset'][0]
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::password('userResetConfirmPassword', [ <?php echo template::password('userResetConfirmPassword', [
'label' => $text[1] 'label' => $text['core_user_view']['reset'][1]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col2 offset10"> <div class="col2 offset10">
<?php echo template::submit('userResetSubmit', [ <?php echo template::submit('userResetSubmit', [
'value' => $text[2] 'value' => $text['core_user_view']['reset'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -4,7 +4,7 @@
$data = $_POST['image'] ; $data = $_POST['image'] ;
$data = str_replace(' ','+',$data); $data = str_replace(' ','+',$data);
$data = str_replace('data:image/png;base64,', '', $data); $data = str_replace('data:image/jpeg;base64,', '', $data);
$img = base64_decode($data); $img = base64_decode($data);
// Effacer l'image et la miniature jpg // Effacer l'image et la miniature jpg
@ -17,18 +17,8 @@
unlink ('../../../site/file/source/screenshot.jpg'); unlink ('../../../site/file/source/screenshot.jpg');
} }
file_put_contents('screenshot.png',$img) ; file_put_contents('../../../site/file/source/screenshot.jpg',$img) ;
$image = imagecreatefrompng('screenshot.png');
$quality = 75;
imagejpeg($image, '../../../site/file/source/screenshot.jpg', $quality);
if (file_exists('screenshot.png')) {
chmod('screenshot.png', 0777);
unlink ('screenshot.png');
}
imagedestroy($image);
} }
?> ?>

View File

@ -36,7 +36,7 @@ class agenda extends common {
'index' => self::GROUP_VISITOR 'index' => self::GROUP_VISITOR
]; ];
const VERSION = '5.2'; const VERSION = '5.3';
const REALNAME = 'Agenda'; const REALNAME = 'Agenda';
const DELETE = true; const DELETE = true;
const UPDATE = '4.1'; const UPDATE = '4.1';
@ -50,40 +50,6 @@ class agenda extends common {
public static $tabCategories = []; public static $tabCategories = [];
public static $categorie = []; public static $categorie = [];
//Couleur du bandeau et du texte
public static $couleur = [
'black' => 'noir',
'grey' => 'gris',
'blue' => 'bleu',
'red' => 'rouge',
'yellow' => 'jaune',
'orange' => 'orange',
'green' => 'vert',
'white' => 'blanc'
];
public static $couleur_en = [
'black' => 'black',
'grey' => 'grey',
'blue' => 'blue',
'red' => 'red',
'yellow' => 'yellow',
'orange' => 'orange',
'green' => 'green',
'white' => 'white'
];
public static $groupe = [
'0' => 'Visiteur',
'1' => 'Membre',
'2' => 'Editeur',
'3' => 'Administrateur'
];
public static $groupe_en = [
'0' => 'Visitor',
'1' => 'Member',
'2' => 'Editor',
'3' => 'Administrator'
];
//Evenement //Evenement
public static $evenement = [ public static $evenement = [
'id' => 0, 'id' => 0,
@ -96,18 +62,6 @@ class agenda extends common {
'groupe_mod' => 2 'groupe_mod' => 2
]; ];
//Largeur maximale de l'agenda
public static $maxwidth = [
'400' => '400 pixels',
'500' => '500 pixels',
'600' => '600 pixels',
'710' => '710 pixels',
'800' => '800 pixels',
'920' => '920 pixels',
'1130' => '1130 pixels',
'10000' => '100%'
];
// Gestion des dates // Gestion des dates
public static $datecreation = ''; public static $datecreation = '';
public static $time_unix_deb = ''; public static $time_unix_deb = '';
@ -131,7 +85,7 @@ class agenda extends common {
'dayGridWeek' => 'Vue par semaine' 'dayGridWeek' => 'Vue par semaine'
]; ];
/** /**
* Mise à jour du module * Mise à jour du module
* Appelée par les fonctions index et config * Appelée par les fonctions index et config
*/ */
@ -162,6 +116,10 @@ class agenda extends common {
copy( './module/agenda/ressource/file/source/agenda/adresses/.htaccess', './site/file/source/agenda/adresses/.htaccess'); copy( './module/agenda/ressource/file/source/agenda/adresses/.htaccess', './site/file/source/agenda/adresses/.htaccess');
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.2']); $this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.2']);
} }
// Mise à jour vers la version 5.3
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '5.3', '<') ) {
$this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.3']);
}
} }
/** /**
@ -169,38 +127,13 @@ class agenda extends common {
*/ */
public function config() { public function config() {
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Votre choix...';
$text[1] = 'Pas de fichier dans le dossier ';
$text[2] = 'Dossier ';
$text[3] = ' data inexistant';
$text[4] = ' ics non existant';
$text[5] = ' adresses non existant';
$text[6] = 'Opérations enregistrées';
$text[7] = 'Agenda chargé';
$text[8] = 'Le contenu du carnet d\'adresses est incorrect';
break;
case 'en' :
$text[0] = 'Your choice...';
$text[1] = 'No file in folder ';
$text[2] = 'File';
$text[3] = ' data non-existent';
$text[4] = ' ics non-existent';
$text[5] = ' addresses non-existent';
$text[6] = 'Recorded transactions';
$text[7] = 'Agenda loaded';
$text[8] = 'Address book contents are incorrect';
break;
}
// Mise à jour des données de module // Mise à jour des données de module
$this->update(); $this->update();
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
$notification = $text[6]; $notification = $text['agenda']['config'][6];
$state = true; $state = true;
$fichier_restaure = $this->getInput('config_restaure'); $fichier_restaure = $this->getInput('config_restaure');
$fichier_sauve = $this->getInput('config_sauve'); $fichier_sauve = $this->getInput('config_sauve');
@ -228,7 +161,7 @@ class agenda extends common {
//Valeurs en sortie après prise en compte du formulaire //Valeurs en sortie après prise en compte du formulaire
$this->addOutput([ $this->addOutput([
'notification' => $text[7], 'notification' => $text['agenda']['config'][7],
'redirect' => helper::baseUrl() . $this->getUrl(0), 'redirect' => helper::baseUrl() . $this->getUrl(0),
'state' => true 'state' => true
]); ]);
@ -288,7 +221,7 @@ class agenda extends common {
copy(self::DATAFILE.'adresses/'.$fichier_csv_txt, self::DATAMODULE.'adresses/'.$fichier_csv_txt); copy(self::DATAFILE.'adresses/'.$fichier_csv_txt, self::DATAMODULE.'adresses/'.$fichier_csv_txt);
} }
else{ else{
$notification = $text[8]; $notification = $text['agenda']['config'][8];
$state = false; $state = false;
} }
} }
@ -320,10 +253,10 @@ class agenda extends common {
$dir=self::DATAMODULE.'data/'.$this->getUrl(0).'_sauve'; $dir=self::DATAMODULE.'data/'.$this->getUrl(0).'_sauve';
$values = scandir($dir); $values = scandir($dir);
self::$savedFiles=[]; self::$savedFiles=[];
$values[0] = $text[0]; $values[0] = $text['agenda']['config'][0];
unset($values[array_search('..', $values)]); unset($values[array_search('..', $values)]);
if (count($values) <= 1){ if (count($values) <= 1){
self::$savedFiles = array(0 => $text[1]. self::DATAMODULE.'/data'); self::$savedFiles = array(0 => $text['agenda']['config'][1]. self::DATAMODULE.'/data');
} }
else{ else{
//Modifier les clefs (qui sont les valeurs de retour du formulaire avec 'config_restaure') avec clef = valeur //Modifier les clefs (qui sont les valeurs de retour du formulaire avec 'config_restaure') avec clef = valeur
@ -331,16 +264,16 @@ class agenda extends common {
} }
} }
else { else {
self::$savedFiles = array(0 => $text[2].self::DATAMODULE.$text[3]); self::$savedFiles = array(0 => $text['agenda']['config'][2].self::DATAMODULE.$text['agenda']['config'][3]);
} }
// Fichiers ics // Fichiers ics
if(is_dir(self::DATAFILE.'ics')) { if(is_dir(self::DATAFILE.'ics')) {
$dir=self::DATAFILE.'ics'; $dir=self::DATAFILE.'ics';
$values = scandir($dir); $values = scandir($dir);
$values[0] = $text[0]; $values[0] = $text['agenda']['config'][0];
unset($values[array_search('..', $values)]); unset($values[array_search('..', $values)]);
if (count($values) <= 1){ if (count($values) <= 1){
self::$icsFiles = array(0 => $text[1].self::DATAFILE.'ics'); self::$icsFiles = array(0 => $text['agenda']['config'][1].self::DATAFILE.'ics');
} }
else{ else{
//Modifier les clefs (qui sont les valeurs de retour du formulaire avec 'config_fichier_ics') avec clef = valeur //Modifier les clefs (qui sont les valeurs de retour du formulaire avec 'config_fichier_ics') avec clef = valeur
@ -348,20 +281,20 @@ class agenda extends common {
} }
} }
else { else {
self::$icsFiles = array(0 => $text[2].self::DATAFILE.$text[4]); self::$icsFiles = array(0 => $text['agenda']['config'][2].self::DATAFILE.$text['agenda']['config'][4]);
} }
// Fichiers csv ou txt // Fichiers csv ou txt
if(is_dir(self::DATAFILE.'adresses')) { if(is_dir(self::DATAFILE.'adresses')) {
$dir=self::DATAFILE.'adresses'; $dir=self::DATAFILE.'adresses';
$values = scandir($dir); $values = scandir($dir);
$values[0] = $text[0]; $values[0] = $text['agenda']['config'][0];
unset($values[array_search('..', $values)]); unset($values[array_search('..', $values)]);
// Supprimer les $values qui ne sont pas csv ou txt // Supprimer les $values qui ne sont pas csv ou txt
for($i=2; $i <= count($values); $i++){ for($i=2; $i <= count($values); $i++){
if ( pathinfo($dir.'/'.$values[$i],PATHINFO_EXTENSION) !== 'txt' && pathinfo($dir.'/'.$values[$i],PATHINFO_EXTENSION) !== 'csv') unset($values[$i]); if ( pathinfo($dir.'/'.$values[$i],PATHINFO_EXTENSION) !== 'txt' && pathinfo($dir.'/'.$values[$i],PATHINFO_EXTENSION) !== 'csv') unset($values[$i]);
} }
if (count($values) <= 1){ if (count($values) <= 1){
self::$csvFiles = array(0 => $text[1].self::DATAFILE.'adresses'); self::$csvFiles = array(0 => $text['agenda']['config'][1].self::DATAFILE.'adresses');
} }
else{ else{
//Modifier les clefs (qui sont les valeurs de retour du formulaire avec 'config_fichier_csv_txt') avec clef = valeur //Modifier les clefs (qui sont les valeurs de retour du formulaire avec 'config_fichier_csv_txt') avec clef = valeur
@ -369,7 +302,7 @@ class agenda extends common {
} }
} }
else { else {
self::$csvFiles = array(0 => $text[2].self::DATAFILE.$text[5]); self::$csvFiles = array(0 => $text['agenda']['config'][2].self::DATAFILE.$text['agenda']['config'][5]);
} }
// Copie des fichiers ics entre les dossiers self::DATAFILE.ics et self::DATAMODULE.ics pour export // Copie des fichiers ics entre les dossiers self::DATAFILE.ics et self::DATAMODULE.ics pour export
@ -400,22 +333,7 @@ class agenda extends common {
*/ */
public function delete($lid, $sauve, $json) { public function delete($lid, $sauve, $json) {
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Votre choix...';
$text[1] = 'Agenda - Suppression d\'un évènement';
$text[2] = 'SUPPRIME';
$text[3] = 'Evénement supprimé';
break;
case 'en' :
$text[0] = 'Your choice...';
$text[1] = 'Agenda - Delete an event';
$text[2] = 'DELETE';
$text[3] = 'Event deleted';
break;
}
$json_initial = $json; $json_initial = $json;
//$pos1 et $pos2 sont les délimiteurs de la partie à supprimer //$pos1 et $pos2 sont les délimiteurs de la partie à supprimer
$pos1 = strpos($json, '{"id":'.$lid); $pos1 = strpos($json, '{"id":'.$lid);
@ -447,20 +365,20 @@ class agenda extends common {
// Emission d'un mailing éventuel en récupérant les valeurs dans le $json initial // Emission d'un mailing éventuel en récupérant les valeurs dans le $json initial
$tableau = json_decode($json_initial, true); $tableau = json_decode($json_initial, true);
$mailing_val = '0'; $mailing_val = '0';
$mailing_adresses = $text[0]; $mailing_adresses = $text['agenda']['delete'][0];
// Si la clef 'mailing_val' existe dans events.json (version >=3.0) lire mailing_val et mailing_adresses // Si la clef 'mailing_val' existe dans events.json (version >=3.0) lire mailing_val et mailing_adresses
if( isset( $tableau[$lid]['mailing_val'] )){ if( isset( $tableau[$lid]['mailing_val'] )){
$mailing_val = $tableau[$lid]['mailing_val']; $mailing_val = $tableau[$lid]['mailing_val'];
$mailing_adresses = $tableau[$lid]['mailing_adresses']; $mailing_adresses = $tableau[$lid]['mailing_adresses'];
self::$sujet_mailing = $text[1]; self::$sujet_mailing = $text['agenda']['delete'][1];
} }
$evenement_texte = $text[2].$tableau[$lid]['title']; $evenement_texte = $text['agenda']['delete'][2].$tableau[$lid]['title'];
$date_debut = $tableau[$lid]['start']; $date_debut = $tableau[$lid]['start'];
$date_fin = $tableau[$lid]['end']; $date_fin = $tableau[$lid]['end'];
if( $mailing_val === '1') $this->mailing($evenement_texte, $date_debut, $date_fin, $mailing_val, $mailing_adresses); if( $mailing_val === '1') $this->mailing($evenement_texte, $date_debut, $date_fin, $mailing_val, $mailing_adresses);
//Valeurs en sortie si suppression demandée et réalisée //Valeurs en sortie si suppression demandée et réalisée
$this->addOutput([ $this->addOutput([
'notification' => $text[3], 'notification' => $text['agenda']['delete'][3],
'redirect' => helper::baseUrl() . $this->getUrl(0), 'redirect' => helper::baseUrl() . $this->getUrl(0),
'state' => true 'state' => true
]); ]);
@ -481,16 +399,7 @@ class agenda extends common {
*/ */
public function deleteall() { public function deleteall() {
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Suppression de tous les évènements';
break;
case 'en' :
$text[0] = 'Delete all events';
break;
}
//Sauvegarde dans data de l'agenda actuel bien qu'il soit déjà sauvegardé dans data_sauve //Sauvegarde dans data de l'agenda actuel bien qu'il soit déjà sauvegardé dans data_sauve
$json = file_get_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events.json'); $json = file_get_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events.json');
file_put_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events_'.date('YmdHis').'.json', $json); file_put_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events_'.date('YmdHis').'.json', $json);
@ -501,7 +410,7 @@ class agenda extends common {
//Valeurs en sortie //Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[0], 'notification' => $text['agenda']['deleteall'][0],
'redirect' => helper::baseUrl() . $this->getUrl(0), 'redirect' => helper::baseUrl() . $this->getUrl(0),
'state' => true 'state' => true
]); ]);
@ -513,16 +422,7 @@ class agenda extends common {
*/ */
public function categories(){ public function categories(){
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Modifications des catégories enregistrées';
break;
case 'en' :
$text[0] = 'Changes to registered categories';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
@ -557,7 +457,7 @@ class agenda extends common {
//Valeurs en sortie //Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[0], 'notification' => $text['agenda']['categories'][0],
'redirect' => helper::baseUrl() . $this->getUrl(), 'redirect' => helper::baseUrl() . $this->getUrl(),
'state' => true 'state' => true
]); ]);
@ -595,18 +495,7 @@ class agenda extends common {
*/ */
public function categorieDelete(){ public function categorieDelete(){
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Catégorie ';
$text[1] = ' supprimée';
break;
case 'en' :
$text[0] = 'Category ';
$text[1] = ' deleted';
break;
}
$json = file_get_contents(self::DATAMODULE.'categories/categories.json'); $json = file_get_contents(self::DATAMODULE.'categories/categories.json');
$tabcat = json_decode($json,true); $tabcat = json_decode($json,true);
$name = $tabcat[$this->getUrl(2)]['name']; $name = $tabcat[$this->getUrl(2)]['name'];
@ -621,7 +510,7 @@ class agenda extends common {
file_put_contents(self::DATAMODULE.'categories/categories.json', $tabcatjson); file_put_contents(self::DATAMODULE.'categories/categories.json', $tabcatjson);
//Valeurs en sortie //Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => $text[0].$name.$text[1], 'notification' => $text['agenda']['categorieDelete'][0].$name.$text['agenda']['categorieDelete'][1],
'redirect' => helper::baseUrl() . $this->getUrl(0).'/categories/', 'redirect' => helper::baseUrl() . $this->getUrl(0).'/categories/',
'state' => true 'state' => true
]); ]);
@ -632,24 +521,7 @@ class agenda extends common {
*/ */
public function creation() { public function creation() {
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Agenda - Création d\'un évènement';
$text[1] = 'Evènement enregistré';
$text[2] = 'La date de fin précède la date de début !';
$text[3] = 'Votre choix...';
$text[4] = 'Pas de fichier dans le dossier ';
break;
case 'en' :
$text[0] = 'Agenda - Creating an event';
$text[1] = 'Registered event';
$text[2] = 'End date is earlier than start date!';
$text[3] = 'Your choice...';
$text[4] = 'No file in folder ';
break;
}
// Soumission du formulaire // Soumission du formulaire
if($this->isPost()) { if($this->isPost()) {
$categorie = ''; $categorie = '';
@ -685,14 +557,14 @@ class agenda extends common {
//Vérification que date fin > date debut //Vérification que date fin > date debut
if ($this->verif_date($date_debut,$date_fin)){ if ($this->verif_date($date_debut,$date_fin)){
self::$sujet_mailing = $text[0]; self::$sujet_mailing = $text['agenda']['creation'][0];
//Ajout et enregistrement de l'évènement //Ajout et enregistrement de l'évènement
$json = file_get_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events.json'); $json = file_get_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events.json');
$this->nouvel_evenement($evenement_texte,$date_debut,$date_fin,$couleur_fond,$couleur_texte,$groupe_visible,$groupe_mod,$mailing_val,$mailing_adresses,$categorie,$json); $this->nouvel_evenement($evenement_texte,$date_debut,$date_fin,$couleur_fond,$couleur_texte,$groupe_visible,$groupe_mod,$mailing_val,$mailing_adresses,$categorie,$json);
//Valeurs en sortie après prise en compte du formulaire //Valeurs en sortie après prise en compte du formulaire
$this->addOutput([ $this->addOutput([
'notification' => $text[1], 'notification' => $text['agenda']['creation'][1],
'state' => true, 'state' => true,
'redirect' => helper::baseUrl() . $this->getUrl(0) 'redirect' => helper::baseUrl() . $this->getUrl(0)
]); ]);
@ -700,7 +572,7 @@ class agenda extends common {
//Valeurs saisies non correctes //Valeurs saisies non correctes
else{ else{
$this->addOutput([ $this->addOutput([
'notification' => $text[2], 'notification' => $text['agenda']['creation'][2],
'view' => 'creation', 'view' => 'creation',
'state' => false 'state' => false
]); ]);
@ -747,11 +619,11 @@ class agenda extends common {
// Sélection du fichier destinataires // Sélection du fichier destinataires
$dir=self::DATAMODULE.'adresses'; $dir=self::DATAMODULE.'adresses';
self::$liste_adresses = scandir($dir); self::$liste_adresses = scandir($dir);
self::$liste_adresses[0] = $text[3]; self::$liste_adresses[0] = $text['agenda']['creation'][3];
unset(self::$liste_adresses[array_search('..', self::$liste_adresses)]); unset(self::$liste_adresses[array_search('..', self::$liste_adresses)]);
unset(self::$liste_adresses[array_search('.htaccess', self::$liste_adresses)]); unset(self::$liste_adresses[array_search('.htaccess', self::$liste_adresses)]);
if (count(self::$liste_adresses) <= 1){ if (count(self::$liste_adresses) <= 1){
self::$liste_adresses = array(0 => $text[4].self::DATAMODULE.'adresses'); self::$liste_adresses = array(0 => $text['agenda']['creation'][4].self::DATAMODULE.'adresses');
} }
else{ else{
self::$liste_adresses= array_combine(self::$liste_adresses,self::$liste_adresses); self::$liste_adresses= array_combine(self::$liste_adresses,self::$liste_adresses);
@ -796,22 +668,7 @@ class agenda extends common {
*/ */
public function edition($lid) { public function edition($lid) {
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Agenda - Modification d\'un évènement';
$text[1] = 'Votre choix...';
$text[2] = 'Modification de l\'évènement enregistrée';
$text[3] = 'La date de fin précède la date de début !';
break;
case 'en' :
$text[0] = 'Agenda - Modification of an event';
$text[1] = 'Your choice...';
$text[2] = 'Modification of the registered event';
$text[3] = 'End date is earlier than start date!';
break;
}
//Préparation avant l'édition de l'évènement //Préparation avant l'édition de l'évènement
self::$evenement['id'] = $lid; self::$evenement['id'] = $lid;
$json = file_get_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events.json'); $json = file_get_contents(self::DATAMODULE.'data/'.$this->getUrl(0).'/events.json');
@ -852,11 +709,11 @@ class agenda extends common {
if( isset( $tableau[$lid]['mailing_val'] )){ if( isset( $tableau[$lid]['mailing_val'] )){
$mailing_val = $tableau[$lid]['mailing_val']; $mailing_val = $tableau[$lid]['mailing_val'];
$mailing_adresses = $tableau[$lid]['mailing_adresses']; $mailing_adresses = $tableau[$lid]['mailing_adresses'];
self::$sujet_mailing = $text[0]; self::$sujet_mailing = $text['agenda']['edition'][0];
} }
else{ else{
$mailing_val = '0'; $mailing_val = '0';
$mailing_adresses = $text[1]; $mailing_adresses = $text['agenda']['edition'][1];
} }
//Modification de CR LF " { } dans le texte de l'évènement //Modification de CR LF " { } dans le texte de l'évènement
@ -874,7 +731,7 @@ class agenda extends common {
//Valeurs en sortie après prise en compte du formulaire //Valeurs en sortie après prise en compte du formulaire
$this->addOutput([ $this->addOutput([
'notification' => $text[2], 'notification' => $text['agenda']['edition'][2],
'state' => true, 'state' => true,
'redirect' => helper::baseUrl() . $this->getUrl(0) 'redirect' => helper::baseUrl() . $this->getUrl(0)
]); ]);
@ -883,7 +740,7 @@ class agenda extends common {
//Valeurs saisies non correctes //Valeurs saisies non correctes
else{ else{
$this->addOutput([ $this->addOutput([
'notification' => $text[3], 'notification' => $text['agenda']['edition'][3],
'view' => 'edition', 'view' => 'edition',
'state' => false 'state' => false
]); ]);
@ -936,19 +793,7 @@ class agenda extends common {
*/ */
public function index() { public function index() {
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Initialisations effectuées, vous devez valider une configuration.';
$text[1] = 'Modification des dossiers de sauvegarde';
break;
case 'en' :
$text[0] = 'Initializations done, you need to validate a configuration';
$text[1] = 'Modification of backup folders';
break;
}
// Mise à jour des données de module // Mise à jour des données de module
if (null !== $this->getData(['module', $this->getUrl(0), 'config', 'versionData']) if (null !== $this->getData(['module', $this->getUrl(0), 'config', 'versionData'])
&& version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '5.2', '<')){ && version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '5.2', '<')){
@ -1002,7 +847,7 @@ class agenda extends common {
if(! is_dir(self::DATAFILE.'categories')) mkdir(self::DATAFILE.'categories'); if(! is_dir(self::DATAFILE.'categories')) mkdir(self::DATAFILE.'categories');
$this->addOutput([ $this->addOutput([
'notification' => $text[0], 'notification' => $text['agenda']['index'][0],
'redirect' => helper::baseUrl() . $this->getUrl(0).'/config/', 'redirect' => helper::baseUrl() . $this->getUrl(0).'/config/',
'state' => true 'state' => true
]); ]);
@ -1016,7 +861,7 @@ class agenda extends common {
rename( self::DATAMODULE.'data/'.$oldname.'_visible' , self::DATAMODULE.'data/'.$newname.'_visible'); rename( self::DATAMODULE.'data/'.$oldname.'_visible' , self::DATAMODULE.'data/'.$newname.'_visible');
rename( self::DATAMODULE.'data/'.$oldname.'_sauve' , self::DATAMODULE.'data/'.$newname.'_sauve'); rename( self::DATAMODULE.'data/'.$oldname.'_sauve' , self::DATAMODULE.'data/'.$newname.'_sauve');
$this->addOutput([ $this->addOutput([
'notification' => $text[1], 'notification' => $text['agenda']['index'][1],
'state' => true 'state' => true
]); ]);
$this->newname(); $this->newname();
@ -1263,16 +1108,7 @@ class agenda extends common {
*/ */
private function vue_debut($url,$idda) { private function vue_debut($url,$idda) {
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Modification de vue enregistrée';
break;
case 'en' :
$text[0] = 'Change of registered view';;
break;
}
$pos1 = strpos($url,$idda); $pos1 = strpos($url,$idda);
$pos2 = strpos($url,'vue:'); $pos2 = strpos($url,'vue:');
$pos3 = strpos($url,'deb:'); $pos3 = strpos($url,'deb:');
@ -1287,7 +1123,7 @@ class agenda extends common {
'debagenda' => $deb 'debagenda' => $deb
]]); ]]);
$this->addOutput([ $this->addOutput([
'notification' => $text[0], 'notification' => $text['agenda']['vue_debut'][0],
'state' => true 'state' => true
]); ]);
} }
@ -1334,20 +1170,7 @@ class agenda extends common {
*/ */
private function mailing($evenement_texte, $date_debut, $date_fin, $mailing_val, $mailing_adresses){ private function mailing($evenement_texte, $date_debut, $date_fin, $mailing_val, $mailing_adresses){
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Evènement ';
$text[1] = 'Début';
$text[2] = 'Fin';
break;
case 'en' :
$text[0] = 'Event ';
$text[1] = 'Start';
$text[2] = 'End';
break;
}
$adresses = file_get_contents(self::DATAMODULE.'adresses/'.$mailing_adresses); $adresses = file_get_contents(self::DATAMODULE.'adresses/'.$mailing_adresses);
if( strpos( $adresses, '@' ) !== false){ if( strpos( $adresses, '@' ) !== false){
// Conversion $adresses en tableau // Conversion $adresses en tableau
@ -1364,7 +1187,7 @@ class agenda extends common {
$date_debut = $this->change_date($date_debut); $date_debut = $this->change_date($date_debut);
$date_fin = $this->change_date($date_fin); $date_fin = $this->change_date($date_fin);
$subject = self::$sujet_mailing; $subject = self::$sujet_mailing;
$content = $text[0].$evenement_texte.'<br/>'.$text[1].' -> '.$date_debut.'<br/><br/>'.$text[2].' -> '.$date_fin; $content = $text['agenda']['mailing'][0].$evenement_texte.'<br/>'.$text['agenda']['mailing'][1].' -> '.$date_debut.'<br/><br/>'.$text['agenda']['mailing'][2].' -> '.$date_fin;
$mode = 'bcc'; $mode = 'bcc';
$this->envoyerMail($to, $subject, $content, $mode); $this->envoyerMail($to, $subject, $content, $mode);
} }

View File

@ -0,0 +1,163 @@
<?php
// Lexique du module Agenda en anglais
$text['agenda_view']['categorie'][0] = 'Back';
$text['agenda_view']['categorie'][1] = 'Save';
$text['agenda_view']['categorie'][2] = 'Choice of colours by category';
$text['agenda_view']['categorie'][3] = 'If you check this box, the colours of the events in the diary will be chosen by category';
$text['agenda_view']['categorie'][4] = 'Choice of event colours by category';
$text['agenda_view']['categorie'][5] = 'Create or modify a category';
$text['agenda_view']['categorie'][6] = 'Enter a category name, upper case, accented, spaces allowed';
$text['agenda_view']['categorie'][7] = 'Category name';
$text['agenda_view']['categorie'][8] = 'Horizontal slider sets transparency level';
$text['agenda_view']['categorie'][9] = 'Background';
$text['agenda_view']['categorie'][10] = 'Text';
$text['agenda_view']['categorie'][11] = 'Name';
$text['agenda_view']['categorie'][12] = 'Background colour';
$text['agenda_view']['categorie'][13] = 'Text colour';
$text['agenda_view']['categorie'][14] = 'Version No';
$text['agenda_view']['config'][0] = 'Back';
$text['agenda_view']['config'][1] = 'Categories';
$text['agenda_view']['config'][2] = 'Validate';
$text['agenda_view']['config'][3] = 'Manage rights';
$text['agenda_view']['config'][4] = 'Display agenda';
$text['agenda_view']['config'][5] = 'Save, restore a schedule';
$text['agenda_view']['config'][6] = 'Here you select the group from which it will be possible to create an event in the schedule';
$text['agenda_view']['config'][7] = 'Minimum group to create an event';
$text['agenda_view']['config'][8] = 'Limiting the choice of groups linked to events';
$text['agenda_view']['config'][9] = 'If you check this box in create or edit mode, the group choices associated with read or edit rights to an event will be based on the user\'s group';
$text['agenda_view']['config'][10] = 'Maximum width of the schedule in pixels. The 100% selection corresponds to the width of the site defined in configuration - 40 pixels';
$text['agenda_view']['config'][11] = 'Maximum width of the agenda';
$text['agenda_view']['config'][12] = 'Enter a file name without extension, e.g. agenda_20200113 or mybelagenda';
$text['agenda_view']['config'][13] = 'Save the current agenda';
$text['agenda_view']['config'][14] = 'Here you can select a file to restore a calendar. The events_YYYYMMDDHHMMSS.json files are automatic backup files';
$text['agenda_view']['config'][15] = 'Select a file for agenda restoration';
$text['agenda_view']['config'][16] = 'Warning! Delete all events from the schedule';
$text['agenda_view']['config'][17] = 'Add events to the current schedule from an ics file';
$text['agenda_view']['config'][18] = 'Add an address book';
$text['agenda_view']['config'][19] = 'Version No.';
$text['agenda_view']['config'][20] = 'In case of an error you can retrieve the agenda via the Previous Agenda button';
$text['agenda_view']['config'][21] = 'Delete all';
$text['agenda_view']['config'][22] = 'Here you can select an ics file'.'<br/>'.'Files should be placed in the site/file/source/agenda/ics folder using the Deltacms file manager';
$text['agenda_view']['config'][23] = 'Selecting an ics file to add events';
$text['agenda_view']['config'][24] = 'Here you can select an address book in csv or txt format with comma separator'.'<br/>'.'The notebooks should be placed in the site/file/source/agenda/addresses folder using the Deltacms file manager';
$text['agenda_view']['config'][25] = 'Selecting a csv or txt file to add an address book';
$text['agenda_view']['config'][26] = 'Texts for visitor\'s view of events';
$text['agenda_view']['config'][27] = 'Enter text for back button';
$text['agenda_view']['config'][28] = 'Back button text';
$text['agenda_view']['config'][29] = 'Enter the text before the start date';
$text['agenda_view']['config'][30] = 'Text start date';
$text['agenda_view']['config'][31] = 'Enter the text before the end date';
$text['agenda_view']['config'][32] = 'Text end date';
$text['agenda_view']['config'][33] = 'Start : ';
$text['agenda_view']['config'][34] = 'End : ';
$text['agenda_view']['config'][35] = "Are you sure you want to delete all the events from your calendar ?";
$text['agenda_view']['creation'][0] = 'Back';
$text['agenda_view']['creation'][1] = 'Save';
$text['agenda_view']['creation'][2] = 'Create event';
$text['agenda_view']['creation'][3] = 'Event';
$text['agenda_view']['creation'][4] = 'Your event of ';
$text['agenda_view']['creation'][5] = 'Choose the date and time of the event';
$text['agenda_view']['creation'][6] = 'Start date';
$text['agenda_view']['creation'][7] = 'Choice of end date and time for the event';
$text['agenda_view']['creation'][8] = 'End date';
$text['agenda_view']['creation'][9] = 'Choice of event category';
$text['agenda_view']['creation'][10] = 'Event category';
$text['agenda_view']['creation'][11] = 'Choice of colour for the banner in which the text appears';
$text['agenda_view']['creation'][12] = 'Background colour';
$text['agenda_view']['creation'][13] = 'Choice of text colour';
$text['agenda_view']['creation'][14] = 'Text colour';
$text['agenda_view']['creation'][15] = 'Choice of minimum group that can see and read this event';
$text['agenda_view']['creation'][16] = 'Read access';
$text['agenda_view']['creation'][17] = 'Choice of minimal group that will be able to modify or delete this event';
$text['agenda_view']['creation'][18] = 'Modify access';
$text['agenda_view']['creation'][19] = 'Sending an email';
$text['agenda_view']['creation'][20] = 'Checked box will send email to recipients';
$text['agenda_view']['creation'][21] = 'Here you can select a txt or csv file that contains a comma-separated sequence of e-mail addresses.'.'<br/>'.'3 files are generated automatically from the registered users and you can, in configuration, add your own address files';
$text['agenda_view']['creation'][22] = 'Select a recipient file';
$text['agenda_view']['creation'][23] = 'You do not have access to event creation, please login';
$text['agenda_view']['creation'][24] = 'Version No.';
$text['agenda_view']['edition'][0] = 'Return';
$text['agenda_view']['edition'][1] = 'Delete';
$text['agenda_view']['edition'][2] = 'Save';
$text['agenda_view']['edition'][3] = 'Read event';
$text['agenda_view']['edition'][4] = 'Read, modify, delete event';
$text['agenda_view']['edition'][5] = 'Event';
$text['agenda_view']['edition'][6] = 'Start date';
$text['agenda_view']['edition'][7] = 'Start date';
$text['agenda_view']['edition'][8] = 'End date';
$text['agenda_view']['edition'][9] = 'End date';
$text['agenda_view']['edition'][10] = 'Choice of event category';
$text['agenda_view']['edition'][11] = 'Event category';
$text['agenda_view']['edition'][12] = 'Choice of colour for the banner in which the text appears';
$text['agenda_view']['edition'][13] = 'Background colour';
$text['agenda_view']['edition'][14] = 'Choice of text colour';
$text['agenda_view']['edition'][15] = 'Text colour';
$text['agenda_view']['edition'][16] = 'Choice of minimum group that can see and read this event';
$text['agenda_view']['edition'][17] = 'Read access';
$text['agenda_view']['edition'][18] = 'Choice of minimal group that can modify or delete this event';
$text['agenda_view']['edition'][19] = 'Edit access';
$text['agenda_view']['edition'][20] = 'Version No.';
$text['agenda']['config'][0] = 'Your choice...';
$text['agenda']['config'][1] = 'No file in folder ';
$text['agenda']['config'][2] = 'File';
$text['agenda']['config'][3] = ' data non-existent';
$text['agenda']['config'][4] = ' ics non-existent';
$text['agenda']['config'][5] = ' addresses non-existent';
$text['agenda']['config'][6] = 'Recorded transactions';
$text['agenda']['config'][7] = 'Agenda loaded';
$text['agenda']['config'][8] = 'Address book contents are incorrect';
$text['agenda']['delete'][0] = 'Your choice...';
$text['agenda']['delete'][1] = 'Agenda - Delete an event';
$text['agenda']['delete'][2] = 'DELETE';
$text['agenda']['delete'][3] = 'Event deleted';
$text['agenda']['deleteall'][0] = 'Delete all events';
$text['agenda']['categories'][0] = 'Changes to registered categories';
$text['agenda']['categorieDelete'][0] = 'Category ';
$text['agenda']['categorieDelete'][1] = ' deleted';
$text['agenda']['creation'][0] = 'Agenda - Creating an event';
$text['agenda']['creation'][1] = 'Registered event';
$text['agenda']['creation'][2] = 'End date is earlier than start date!';
$text['agenda']['creation'][3] = 'Your choice...';
$text['agenda']['creation'][4] = 'No file in folder ';
$text['agenda']['edition'][0] = 'Agenda - Modification of an event';
$text['agenda']['edition'][1] = 'Your choice...';
$text['agenda']['edition'][2] = 'Modification of the registered event';
$text['agenda']['edition'][3] = 'End date is earlier than start date!';
$text['agenda']['index'][0] = 'Initializations done, you need to validate a configuration';
$text['agenda']['index'][1] = 'Modification of backup folders';
$text['agenda']['vue_debut'][0] = 'Change of registered view';
$text['agenda']['mailing'][0] = 'Event ';
$text['agenda']['mailing'][1] = 'Start';
$text['agenda']['mailing'][2] = 'End';
// Tinymce et Flatpickr
$lang_admin = 'en_GB';
$lang_flatpickr = 'default';
// Selects
$groupe = [
'0' => 'Visitor',
'1' => 'Member',
'2' => 'Editor',
'3' => 'Administrator'
];
$couleur = [
'black' => 'black',
'grey' => 'grey',
'blue' => 'blue',
'red' => 'red',
'yellow' => 'yellow',
'orange' => 'orange',
'green' => 'green',
'white' => 'white'
];
$maxwidth = [
'400' => '400 pixels',
'500' => '500 pixels',
'600' => '600 pixels',
'710' => '710 pixels',
'800' => '800 pixels',
'920' => '920 pixels',
'1130' => '1130 pixels',
'10000' => '100%'
];
?>

View File

@ -0,0 +1,163 @@
<?php
// Lexique du module Agenda en français
$text['agenda_view']['categorie'][0] = 'Retour';
$text['agenda_view']['categorie'][1] = 'Enregistrer';
$text['agenda_view']['categorie'][2] = 'Choix des couleurs par catégorie';
$text['agenda_view']['categorie'][3] = 'Si vous cochez cette case le choix des couleurs des évènements de l\'agenda se fera par catégorie.';
$text['agenda_view']['categorie'][4] = 'Choix des couleurs des évènements par catégorie';
$text['agenda_view']['categorie'][5] = 'Création ou modification d\'une catégorie';
$text['agenda_view']['categorie'][6] = 'Saisir un nom de catégorie, majuscules, accentuées, espaces autorisés';
$text['agenda_view']['categorie'][7] = 'Nom de la catégorie';
$text['agenda_view']['categorie'][8] = 'Le curseur horizontal règle le niveau de transparence.';
$text['agenda_view']['categorie'][9] = 'Fond';
$text['agenda_view']['categorie'][10] = 'Texte';
$text['agenda_view']['categorie'][11] = 'Nom';
$text['agenda_view']['categorie'][12] = 'Couleur du fond';
$text['agenda_view']['categorie'][13] = 'Couleur du texte';
$text['agenda_view']['categorie'][14] = 'Version n°';
$text['agenda_view']['config'][0] = 'Retour';
$text['agenda_view']['config'][1] = 'Catégories';
$text['agenda_view']['config'][2] = 'Valider';
$text['agenda_view']['config'][3] = 'Gérer les droits';
$text['agenda_view']['config'][4] = 'Affichage de l\'agenda';
$text['agenda_view']['config'][5] = 'Sauvegarder, restaurer un agenda';
$text['agenda_view']['config'][6] = 'Vous sélectionner ici le groupe à partir duquel il sera possible de créer un évènement dans l\'agenda';
$text['agenda_view']['config'][7] = 'Groupe minimum pour créer un évènement';
$text['agenda_view']['config'][8] = 'Limitation du choix des groupes liés aux évènements';
$text['agenda_view']['config'][9] = 'Si vous cochez cette case en mode création ou édition les choix de groupe, associés aux droits de lecture ou de modification d\'un évènement, seront fonction du groupe de l\'utilisateur.';
$text['agenda_view']['config'][10] = 'Largeur maximale de l\'agenda en pixels. La sélection 100% correspond à la largeur du site définie en configuration - 40 pixels';
$text['agenda_view']['config'][11] = 'Largeur maxi de l\'agenda';
$text['agenda_view']['config'][12] = 'Saisir un nom de fichier sans extension , exemples agenda_20200113 ou monbelagenda';
$text['agenda_view']['config'][13] = 'Sauvegarde de l\'agenda actuel';
$text['agenda_view']['config'][14] = 'Vous pouvez sélectionner ici un fichier de restauration d\'un agenda. les fichiers events_YYYYMMDDHHMMSS.json sont des fichiers de sauvegarde automatique.';
$text['agenda_view']['config'][15] = 'Sélection d\'un fichier pour restauration d\'un agenda';
$text['agenda_view']['config'][16] = 'Attention ! supprime tous les évènements de l\'agenda';
$text['agenda_view']['config'][17] = 'Ajouter des évènements à l\'agenda actuel depuis un fichier ics';
$text['agenda_view']['config'][18] = 'Ajouter un carnet d\'adresses';
$text['agenda_view']['config'][19] = 'Version n°';
$text['agenda_view']['config'][20] = 'En cas d\'erreur vous pouvez récupérer l\agenda par le bouton Agenda précédent';
$text['agenda_view']['config'][21] = 'Supprimer tout';
$text['agenda_view']['config'][22] = 'Vous pouvez sélectionner ici un fichier ics'.'<br/>'.'Les fichiers doivent être placés dans le dossier site/file/source/agenda/ics en utilisant le gestionnaire de fichiers de Deltacms';
$text['agenda_view']['config'][23] = 'Sélection d\'un fichier ics pour ajouter des évènements';
$text['agenda_view']['config'][24] = 'Vous pouvez sélectionner ici un carnet d\'adresses au format csv ou txt avec séparateur virgule'.'<br/>'.'Les carnets doivent être placés dans le dossier site/file/source/agenda/adresses en utilisant le gestionnaire de fichiers de Deltacms';
$text['agenda_view']['config'][25] = 'Sélection d\'un fichier csv ou txt pour ajouter un carnet d\'adresses';
$text['agenda_view']['config'][26] = 'Textes pour la vue des évènements par un visiteur';
$text['agenda_view']['config'][27] = 'Saisissez le texte du bouton retour';
$text['agenda_view']['config'][28] = 'Texte du bouton retour';
$text['agenda_view']['config'][29] = 'Saisissez le texte qui précède la date de début';
$text['agenda_view']['config'][30] = 'Texte date de début';
$text['agenda_view']['config'][31] = 'Saisissez le texte qui précède la date de fin';
$text['agenda_view']['config'][32] = 'Texte date de fin';
$text['agenda_view']['config'][33] = 'Début : ';
$text['agenda_view']['config'][34] = 'Fin : ';
$text['agenda_view']['config'][35] = "Êtes-vous sûr de vouloir supprimer tous les évènements de votre agenda ?";
$text['agenda_view']['creation'][0] = 'Retour';
$text['agenda_view']['creation'][1] = 'Enregistrer';
$text['agenda_view']['creation'][2] = 'Créer un évènement';
$text['agenda_view']['creation'][3] = 'Evènement';
$text['agenda_view']['creation'][4] = 'Votre évènement du ';
$text['agenda_view']['creation'][5] = 'Choix de la date et de l\'heure de début de l\'évènement';
$text['agenda_view']['creation'][6] = 'Date de début';
$text['agenda_view']['creation'][7] = 'Choix de la date et de l\'heure de fin de l\'évènement';
$text['agenda_view']['creation'][8] = 'Date de fin';
$text['agenda_view']['creation'][9] = 'Choix de la catégorie d\'évènement.';
$text['agenda_view']['creation'][10] = 'Catégorie d\'évènement';
$text['agenda_view']['creation'][11] = 'Choix de la couleur du bandeau dans lequel le texte apparaît.';
$text['agenda_view']['creation'][12] = 'Couleur de fond';
$text['agenda_view']['creation'][13] = 'Choix de la couleur du texte.';
$text['agenda_view']['creation'][14] = 'Coleur du texte';
$text['agenda_view']['creation'][15] = 'Choix du groupe minimal qui pourra voir et lire cet évènement';
$text['agenda_view']['creation'][16] = 'Accès en lecture';
$text['agenda_view']['creation'][17] = 'Choix du groupe minimal qui pourra modifier ou supprimer cet évènement';
$text['agenda_view']['creation'][18] = 'Accès en modification';
$text['agenda_view']['creation'][19] = 'Envoi d\'un courriel';
$text['agenda_view']['creation'][20] = 'Case cochée un courriel sera adressé aux destinataires.';
$text['agenda_view']['creation'][21] = 'Vous pouvez sélectionner ici un fichier txt ou csv qui contient une suite d\'adresses courielles séparées par une virgule.'.'<br/>'.'3 fichiers sont générés automatiquement à partir des utilisateurs inscrits et vous pouvez, en configuration, ajouter vos propres fichiers d\'adresses';
$text['agenda_view']['creation'][22] = 'Sélection d\'un fichier destinataires';
$text['agenda_view']['creation'][23] = 'Vous n\'avez pas accès à la création d\'évènements, connectez-vous.';
$text['agenda_view']['creation'][24] = 'Version n°';
$text['agenda_view']['edition'][0] = 'Retour';
$text['agenda_view']['edition'][1] = 'Supprimer';
$text['agenda_view']['edition'][2] = 'Enregistrer';
$text['agenda_view']['edition'][3] = 'Lire un évènement';
$text['agenda_view']['edition'][4] = 'Lire, modifier, supprimer un évènement';
$text['agenda_view']['edition'][5] = 'Evénement';
$text['agenda_view']['edition'][6] = 'Date de début';
$text['agenda_view']['edition'][7] = 'Date de début';
$text['agenda_view']['edition'][8] = 'Date de fin';
$text['agenda_view']['edition'][9] = 'Date de fin';
$text['agenda_view']['edition'][10] = 'Choix de la catégorie d\'évènement.';
$text['agenda_view']['edition'][11] = 'Catégorie d\'évènement';
$text['agenda_view']['edition'][12] = 'Choix de la couleur du bandeau dans lequel le texte apparaît.';
$text['agenda_view']['edition'][13] = 'Couleur de fond';
$text['agenda_view']['edition'][14] = 'Choix de la couleur du texte.';
$text['agenda_view']['edition'][15] = 'Couleur du texte';
$text['agenda_view']['edition'][16] = 'Choix du groupe minimal qui pourra voir et lire cet évènement';
$text['agenda_view']['edition'][17] = 'Accès en lecture';
$text['agenda_view']['edition'][18] = 'Choix du groupe minimal qui pourra modifier ou supprimer cet évènement';
$text['agenda_view']['edition'][19] = 'Accès en modification';
$text['agenda_view']['edition'][20] ='Version n°';
$text['agenda']['config'][0] = 'Votre choix...';
$text['agenda']['config'][1] = 'Pas de fichier dans le dossier ';
$text['agenda']['config'][2] = 'Dossier ';
$text['agenda']['config'][3] = ' data inexistant';
$text['agenda']['config'][4] = ' ics non existant';
$text['agenda']['config'][5] = ' adresses non existant';
$text['agenda']['config'][6] = 'Opérations enregistrées';
$text['agenda']['config'][7] = 'Agenda chargé';
$text['agenda']['config'][8] = 'Le contenu du carnet d\'adresses est incorrect';
$text['agenda']['delete'][0] = 'Votre choix...';
$text['agenda']['delete'][1] = 'Agenda - Suppression d\'un évènement';
$text['agenda']['delete'][2] = 'SUPPRIME';
$text['agenda']['delete'][3] = 'Evénement supprimé';
$text['agenda']['deleteall'][0] = 'Suppression de tous les évènements';
$text['agenda']['categories'][0] = 'Modifications des catégories enregistrées';
$text['agenda']['categorieDelete'][0] = 'Catégorie ';
$text['agenda']['categorieDelete'][1] = ' supprimée';
$text['agenda']['creation'][0] = 'Agenda - Création d\'un évènement';
$text['agenda']['creation'][1] = 'Evènement enregistré';
$text['agenda']['creation'][2] = 'La date de fin précède la date de début !';
$text['agenda']['creation'][3] = 'Votre choix...';
$text['agenda']['creation'][4] = 'Pas de fichier dans le dossier ';
$text['agenda']['edition'][0] = 'Agenda - Modification d\'un évènement';
$text['agenda']['edition'][1] = 'Votre choix...';
$text['agenda']['edition'][2] = 'Modification de l\'évènement enregistrée';
$text['agenda']['edition'][3] = 'La date de fin précède la date de début !';
$text['agenda']['index'][0] = 'Initialisations effectuées, vous devez valider une configuration.';
$text['agenda']['index'][1] = 'Modification des dossiers de sauvegarde';
$text['agenda']['vue_debut'][0] = 'Modification de vue enregistrée';
$text['agenda']['mailing'][0] = 'Evènement ';
$text['agenda']['mailing'][1] = 'Début';
$text['agenda']['mailing'][2] = 'Fin';
// Tinymce et Flatpickr
$lang_admin = 'fr_FR';
$lang_flatpickr = 'fr';
// Selects
$groupe = [
'0' => 'Visiteur',
'1' => 'Membre',
'2' => 'Editeur',
'3' => 'Administrateur'
];
$couleur = [
'black' => 'noir',
'grey' => 'gris',
'blue' => 'bleu',
'red' => 'rouge',
'yellow' => 'jaune',
'orange' => 'orange',
'green' => 'vert',
'white' => 'blanc'
];
$maxwidth = [
'400' => '400 pixels',
'500' => '500 pixels',
'600' => '600 pixels',
'710' => '710 pixels',
'800' => '800 pixels',
'920' => '920 pixels',
'1130' => '1130 pixels',
'10000' => '100%'
];
?>

View File

@ -1,45 +1,8 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) { echo template::formOpen('gestion_categorie'); ?>
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Enregistrer';
$text[2] = 'Choix des couleurs par catégorie';
$text[3] = 'Si vous cochez cette case le choix des couleurs des évènements de l\'agenda se fera par catégorie.';
$text[4] = 'Choix des couleurs des évènements par catégorie';
$text[5] = 'Création ou modification d\'une catégorie';
$text[6] = 'Saisir un nom de catégorie, majuscules, accentuées, espaces autorisés';
$text[7] = 'Nom de la catégorie';
$text[8] = 'Le curseur horizontal règle le niveau de transparence.';
$text[9] = 'Fond';
$text[10] = 'Texte';
$text[11] = 'Nom';
$text[12] = 'Couleur du fond';
$text[13] = 'Couleur du texte';
$text[14] = 'Version n°';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Save';
$text[2] = 'Choice of colours by category';
$text[3] = 'If you check this box, the colours of the events in the diary will be chosen by category';
$text[4] = 'Choice of event colours by category';
$text[5] = 'Create or modify a category';
$text[6] = 'Enter a category name, upper case, accented, spaces allowed';
$text[7] = 'Category name';
$text[8] = 'Horizontal slider sets transparency level';
$text[9] = 'Background';
$text[10] = 'Text';
$text[11] = 'Name';
$text[12] = 'Background colour';
$text[13] = 'Text colour';
$text[14] = 'Version No';
break;
}
?>
<?php echo template::formOpen('gestion_categorie'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -47,54 +10,54 @@ switch ($val) {
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0).'/config', 'href' => helper::baseUrl() . $this->getUrl(0).'/config',
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['agenda_view']['categorie'][0]
]); ?> ]); ?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('edition_enregistrer',[ <?php echo template::submit('edition_enregistrer',[
'value' => $text[1], 'value' => $text['agenda_view']['categorie'][1],
'ico' => 'check' 'ico' => 'check'
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[4]; ?></h4> <h4><?php echo $text['agenda_view']['categorie'][4]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::checkbox('val_categories', true, $text[2], [ <?php echo template::checkbox('val_categories', true, $text['agenda_view']['categorie'][2], [
'checked' => $this->getData(['module', $this->getUrl(0), 'categories', 'valCategories']), 'checked' => $this->getData(['module', $this->getUrl(0), 'categories', 'valCategories']),
'help' => $text[3] 'help' => $text['agenda_view']['categorie'][3]
]); ?> ]); ?>
</div> </div>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[5]; ?></h4> <h4><?php echo $text['agenda_view']['categorie'][5]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php <?php
echo template::text('categorie_name', [ echo template::text('categorie_name', [
'help' => $text[6], 'help' => $text['agenda_view']['categorie'][6],
'label' => $text[7] 'label' => $text['agenda_view']['categorie'][7]
]); ]);
?> ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('categorie_couleur_fond', [ <?php echo template::text('categorie_couleur_fond', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[8], 'help' => $text['agenda_view']['categorie'][8],
'label' => $text[9], 'label' => $text['agenda_view']['categorie'][9],
'value' => 'rgba(0,0,0,1)' 'value' => 'rgba(0,0,0,1)'
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('categorie_couleur_texte', [ <?php echo template::text('categorie_couleur_texte', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => $text[8], 'help' => $text['agenda_view']['categorie'][8],
'label' => $text[10], 'label' => $text['agenda_view']['categorie'][10],
'value' => 'rgba(255,255,255,1)' 'value' => 'rgba(255,255,255,1)'
]); ?> ]); ?>
</div> </div>
@ -103,8 +66,8 @@ switch ($val) {
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<?php echo template::table([5,3,3,1], $module::$tabCategories, [$text[11], $text[12],$text[13],'']); ?> <?php echo template::table([5,3,3,1], $module::$tabCategories, [$text['agenda_view']['categorie'][11], $text['agenda_view']['categorie'][12],$text['agenda_view']['categorie'][13],'']); ?>
<div class="moduleVersion"> <div class="moduleVersion">
<?php echo $text[14]; echo $module::VERSION; ?> <?php echo $text['agenda_view']['categorie'][14]; echo $module::VERSION; ?>
</div> </div>

View File

@ -14,15 +14,7 @@
*/ */
$(".configSup").on("click", function() { $(".configSup").on("click", function() {
var _this = $(this); var _this = $(this);
var text=""; return core.confirm( textConfirm, function() {
<?php if( $this->getData(['config', 'i18n', 'langAdmin' ]) === 'fr'){
echo 'text = "Êtes-vous sûr de vouloir supprimer tous les évènements de votre agenda ?";' ;
}
else{
echo 'text = "Are you sure you want to delete all the events from your calendar ?";' ;
} ?>
return core.confirm( text, function() {
$(location).attr("href", _this.attr("href")); $(location).attr("href", _this.attr("href"));
}); });
}); });

View File

@ -1,91 +1,10 @@
<!-- Configuration du module agenda --> <!-- Configuration du module agenda -->
<?php <?php
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Catégories';
$text[2] = 'Valider';
$text[3] = 'Gérer les droits';
$text[4] = 'Affichage de l\'agenda';
$text[5] = 'Sauvegarder, restaurer un agenda';
$text[6] = 'Vous sélectionner ici le groupe à partir duquel il sera possible de créer un évènement dans l\'agenda';
$text[7] = 'Groupe minimum pour créer un évènement';
$text[8] = 'Limitation du choix des groupes liés aux évènements';
$text[9] = 'Si vous cochez cette case en mode création ou édition les choix de groupe, associés aux droits de lecture ou de modification d\'un évènement, seront fonction du groupe de l\'utilisateur.';
$text[10] = 'Largeur maximale de l\'agenda en pixels. La sélection 100% correspond à la largeur du site définie en configuration - 40 pixels';
$text[11] = 'Largeur maxi de l\'agenda';
$text[12] = 'Saisir un nom de fichier sans extension , exemples agenda_20200113 ou monbelagenda';
$text[13] = 'Sauvegarde de l\'agenda actuel';
$text[14] = 'Vous pouvez sélectionner ici un fichier de restauration d\'un agenda. les fichiers events_YYYYMMDDHHMMSS.json sont des fichiers de sauvegarde automatique.';
$text[15] = 'Sélection d\'un fichier pour restauration d\'un agenda';
$text[16] = 'Attention ! supprime tous les évènements de l\'agenda';
$text[17] = 'Ajouter des évènements à l\'agenda actuel depuis un fichier ics';
$text[18] = 'Ajouter un carnet d\'adresses';
$text[19] = 'Version n°';
$text[20] = 'En cas d\'erreur vous pouvez récupérer l\agenda par le bouton Agenda précédent';
$text[21] = 'Supprimer tout';
$text[22] = 'Vous pouvez sélectionner ici un fichier ics'.'<br/>'.'Les fichiers doivent être placés dans le dossier site/file/source/agenda/ics en utilisant le gestionnaire de fichiers de Deltacms';
$text[23] = 'Sélection d\'un fichier ics pour ajouter des évènements';
$text[24] = 'Vous pouvez sélectionner ici un carnet d\'adresses au format csv ou txt avec séparateur virgule'.'<br/>'.'Les carnets doivent être placés dans le dossier site/file/source/agenda/adresses en utilisant le gestionnaire de fichiers de Deltacms';
$text[25] = 'Sélection d\'un fichier csv ou txt pour ajouter un carnet d\'adresses';
$text[26] = 'Textes pour la vue des évènements par un visiteur';
$text[27] = 'Saisissez le texte du bouton retour';
$text[28] = 'Texte du bouton retour';
$text[29] = 'Saisissez le texte qui précède la date de début';
$text[30] = 'Texte date de début';
$text[31] = 'Saisissez le texte qui précède la date de fin';
$text[32] = 'Texte date de fin';
$text[33] = 'Début : ';
$text[34] = 'Fin : ';
$groupe = $module::$groupe;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Categories';
$text[2] = 'Validate';
$text[3] = 'Manage rights';
$text[4] = 'Display agenda';
$text[5] = 'Save, restore a schedule';
$text[6] = 'Here you select the group from which it will be possible to create an event in the schedule';
$text[7] = 'Minimum group to create an event';
$text[8] = 'Limiting the choice of groups linked to events';
$text[9] = 'If you check this box in create or edit mode, the group choices associated with read or edit rights to an event will be based on the user\'s group';
$text[10] = 'Maximum width of the schedule in pixels. The 100% selection corresponds to the width of the site defined in configuration - 40 pixels';
$text[11] = 'Maximum width of the agenda';
$text[12] = 'Enter a file name without extension, e.g. agenda_20200113 or mybelagenda';
$text[13] = 'Save the current agenda';
$text[14] = 'Here you can select a file to restore a calendar. The events_YYYYMMDDHHMMSS.json files are automatic backup files';
$text[15] = 'Select a file for agenda restoration';
$text[16] = 'Warning! Delete all events from the schedule';
$text[17] = 'Add events to the current schedule from an ics file';
$text[18] = 'Add an address book';
$text[19] = 'Version No.';
$text[20] = 'In case of an error you can retrieve the agenda via the Previous Agenda button';
$text[21] = 'Delete all';
$text[22] = 'Here you can select an ics file'.'<br/>'.'Files should be placed in the site/file/source/agenda/ics folder using the Deltacms file manager';
$text[23] = 'Selecting an ics file to add events';
$text[24] = 'Here you can select an address book in csv or txt format with comma separator'.'<br/>'.'The notebooks should be placed in the site/file/source/agenda/addresses folder using the Deltacms file manager';
$text[25] = 'Selecting a csv or txt file to add an address book';
$text[26] = 'Texts for visitor\'s view of events';
$text[27] = 'Enter text for back button';
$text[28] = 'Back button text';
$text[29] = 'Enter the text before the start date';
$text[30] = 'Text start date';
$text[31] = 'Enter the text before the end date';
$text[32] = 'Text end date';
$text[33] = 'Start : ';
$text[34] = 'End : ';
$groupe = $module::$groupe_en;
break;
}
?>
<?php
if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}else{ $readonly = false;} if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}else{ $readonly = false;}
?> echo template::formOpen('configuration'); ?>
<?php echo template::formOpen('configuration'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
@ -93,7 +12,7 @@ if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}el
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0), 'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['agenda_view']['config'][0]
]); ?> ]); ?>
</div> </div>
@ -102,59 +21,59 @@ if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}el
'class' => 'buttonBlue', 'class' => 'buttonBlue',
'href' => helper::baseUrl() . $this->getUrl(0).'/categories/', 'href' => helper::baseUrl() . $this->getUrl(0).'/categories/',
'ico' => 'cogs', 'ico' => 'cogs',
'value' => $text[1] 'value' => $text['agenda_view']['config'][1]
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::submit('config_enregistrer',[ <?php echo template::submit('config_enregistrer',[
'value' => $text[2] 'value' => $text['agenda_view']['config'][2]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[3]; ?></h4> <h4><?php echo $text['agenda_view']['config'][3]; ?></h4>
<div class="col6"> <div class="col6">
<?php echo template::select('config_droit_creation', $groupe, [ <?php echo template::select('config_droit_creation', $groupe, [
'help' => $text[6], 'help' => $text['agenda_view']['config'][6],
'id' => 'config_droit_creation', 'id' => 'config_droit_creation',
'disabled' => $readonly, 'disabled' => $readonly,
'label' => $text[7], 'label' => $text['agenda_view']['config'][7],
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'droit_creation']) 'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'droit_creation'])
]); ?> ]); ?>
</div> </div>
<div class="col6"> <div class="col6">
<?php echo template::checkbox('config_droit_limite', true, $text[8], [ <?php echo template::checkbox('config_droit_limite', true, $text['agenda_view']['config'][8], [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'droit_limite']), 'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'droit_limite']),
'disabled' => $readonly, 'disabled' => $readonly,
'help' => $text[9] 'help' => $text['agenda_view']['config'][9]
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[4]; ?></h4> <h4><?php echo $text['agenda_view']['config'][4]; ?></h4>
<div class="col4"> <div class="col4">
<?php echo template::select('config_MaxiWidth', $module::$maxwidth,[ <?php echo template::select('config_MaxiWidth', $maxwidth,[
'help' => $text[10], 'help' => $text['agenda_view']['config'][10],
'label' => $text[11], 'label' => $text['agenda_view']['config'][11],
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'maxiWidth']) 'selected' => $this->getData(['module', $this->getUrl(0),'config', 'maxiWidth'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[5]; ?></h4> <h4><?php echo $text['agenda_view']['config'][5]; ?></h4>
<div class="row"> <div class="row">
<!--Sauvegarder l'agenda actuel--> <!--Sauvegarder l'agenda actuel-->
<div class="col6"> <div class="col6">
<?php <?php
echo template::text('config_sauve', [ echo template::text('config_sauve', [
'help' => $text[12], 'help' => $text['agenda_view']['config'][12],
'disabled' => $readonly, 'disabled' => $readonly,
'id' => 'config_sauvegarde', 'id' => 'config_sauvegarde',
'label' => $text[13] 'label' => $text['agenda_view']['config'][13]
]); ]);
?> ?>
</div> </div>
@ -163,10 +82,10 @@ if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}el
<!--Sélection d'un fichier de sauvegarde--> <!--Sélection d'un fichier de sauvegarde-->
<div class="col6"> <div class="col6">
<?php echo template::select('config_restaure', $module::$savedFiles, [ <?php echo template::select('config_restaure', $module::$savedFiles, [
'help' => $text[14], 'help' => $text['agenda_view']['config'][14],
'id' => 'config_restauration', 'id' => 'config_restauration',
'disabled' => $readonly, 'disabled' => $readonly,
'label' => $text[15] 'label' => $text['agenda_view']['config'][15]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -178,29 +97,29 @@ if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}el
<!--Tout supprimer--> <!--Tout supprimer-->
<div class="block"> <div class="block">
<h4><?php echo $text[16]; ?></h4> <h4><?php echo $text['agenda_view']['config'][16]; ?></h4>
<div class="col4"> <div class="col4">
<?php echo template::button('config_suptout', [ <?php echo template::button('config_suptout', [
'class' => 'configSup buttonRed', 'class' => 'configSup buttonRed',
'disabled' => $readonly, 'disabled' => $readonly,
'help' => $text[20], 'help' => $text['agenda_view']['config'][20],
'href' => helper::baseUrl() . $this->getUrl(0).'/deleteall', 'href' => helper::baseUrl() . $this->getUrl(0).'/deleteall',
'ico' => 'cancel', 'ico' => 'cancel',
'value' => $text[21] 'value' => $text['agenda_view']['config'][21]
]); ?> ]); ?>
</div> </div>
</div> </div>
<!-- Sélection d'un fichier ics depuis le dossier site/file/source/agenda/ics --> <!-- Sélection d'un fichier ics depuis le dossier site/file/source/agenda/ics -->
<div class="block"> <div class="block">
<h4><?php echo $text[17]; ?></h4> <h4><?php echo $text['agenda_view']['config'][17]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<!-- Sélection d'un fichier ics --> <!-- Sélection d'un fichier ics -->
<?php echo template::select('config_fichier_ics', $module::$icsFiles, [ <?php echo template::select('config_fichier_ics', $module::$icsFiles, [
'help' => $text[22], 'help' => $text['agenda_view']['config'][22],
'id' => 'config_fichier_ics', 'id' => 'config_fichier_ics',
'label' => $text[23] 'label' => $text['agenda_view']['config'][23]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -208,14 +127,14 @@ if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}el
<!-- Sélection d'un carnet d'adresses au format txt ou csv avec séparateur virgule --> <!-- Sélection d'un carnet d'adresses au format txt ou csv avec séparateur virgule -->
<div class="block"> <div class="block">
<h4><?php echo $text[18]; ?></h4> <h4><?php echo $text['agenda_view']['config'][18]; ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<!-- Sélection d'un fichier csv ou txt --> <!-- Sélection d'un fichier csv ou txt -->
<?php echo template::select('config_fichier_csv_txt', $module::$csvFiles, [ <?php echo template::select('config_fichier_csv_txt', $module::$csvFiles, [
'help' => $text[24], 'help' => $text['agenda_view']['config'][24],
'id' => 'config_fichier_csv_txt', 'id' => 'config_fichier_csv_txt',
'label' => $text[25] 'label' => $text['agenda_view']['config'][25]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -223,36 +142,36 @@ if(! is_dir($module::DATAMODULE.'data/'.$this->getUrl(0))){ $readonly = true;}el
<!-- Textes pour la vue des évènements par un visiteur --> <!-- Textes pour la vue des évènements par un visiteur -->
<?php <?php
if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack', $text[0]]); if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack', $text['agenda_view']['config'][0]]);
if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateStart'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextDateStart', $text[33]]); if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateStart'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextDateStart', $text['agenda_view']['config'][33]]);
if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd', $text[34]]); if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd'])) $this->setData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd', $text['agenda_view']['config'][34]]);
?> ?>
<div class="block"> <div class="block">
<h4><?php echo $text[26]; ?></h4> <h4><?php echo $text['agenda_view']['config'][26]; ?></h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('configTextButtonBack', [ <?php echo template::text('configTextButtonBack', [
'help' => $text[27], 'help' => $text['agenda_view']['config'][27],
'disabled' => $readonly, 'disabled' => $readonly,
'label' => $text[28], 'label' => $text['agenda_view']['config'][28],
'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack']) 'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextButtonBack'])
]); ]);
?> ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('configTextDateStart', [ <?php echo template::text('configTextDateStart', [
'help' => $text[29], 'help' => $text['agenda_view']['config'][29],
'disabled' => $readonly, 'disabled' => $readonly,
'label' => $text[30], 'label' => $text['agenda_view']['config'][30],
'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateStart']) 'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateStart'])
]); ]);
?> ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('configTextDateEnd', [ <?php echo template::text('configTextDateEnd', [
'help' => $text[31], 'help' => $text['agenda_view']['config'][31],
'disabled' => $readonly, 'disabled' => $readonly,
'label' => $text[32], 'label' => $text['agenda_view']['config'][32],
'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd']) 'value' => $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDateEnd'])
]); ]);
?> ?>
@ -266,7 +185,10 @@ if( null === $this->getData(['module', $this->getUrl(0), 'texts', 'configTextDat
<div class="moduleVersion"> <div class="moduleVersion">
<?php echo $text[19]; echo $module::VERSION; ?> <?php echo $text['agenda_view']['config'][19]; echo $module::VERSION; ?>
</div> </div>
<script>
var textConfirm = <?php echo '"'.$text['agenda_view']['config'][35].'"'; ?>;
</script>

View File

@ -1,98 +1,25 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Enregistrer';
$text[2] = 'Créer un évènement';
$text[3] = 'Evènement';
$text[4] = 'Votre évènement du ';
$text[5] = 'Choix de la date et de l\'heure de début de l\'évènement';
$text[6] = 'Date de début';
$text[7] = 'Choix de la date et de l\'heure de fin de l\'évènement';
$text[8] = 'Date de fin';
$text[9] = 'Choix de la catégorie d\'évènement.';
$text[10] = 'Catégorie d\'évènement';
$text[11] = 'Choix de la couleur du bandeau dans lequel le texte apparaît.';
$text[12] = 'Couleur de fond';
$text[13] = 'Choix de la couleur du texte.';
$text[14] = 'Coleur du texte';
$text[15] = 'Choix du groupe minimal qui pourra voir et lire cet évènement';
$text[16] = 'Accès en lecture';
$text[17] = 'Choix du groupe minimal qui pourra modifier ou supprimer cet évènement';
$text[18] = 'Accès en modification';
$text[19] = 'Envoi d\'un courriel';
$text[20] = 'Case cochée un courriel sera adressé aux destinataires.';
$text[21] = 'Vous pouvez sélectionner ici un fichier txt ou csv qui contient une suite d\'adresses courielles séparées par une virgule.'.'<br/>'.'3 fichiers sont générés automatiquement à partir des utilisateurs inscrits et vous pouvez, en configuration, ajouter vos propres fichiers d\'adresses';
$text[22] = 'Sélection d\'un fichier destinataires';
$text[23] = 'Vous n\'avez pas accès à la création d\'évènements, connectez-vous.';
$text[24] = 'Version n°';
$couleur = $module::$couleur;
$groupe = $module::$groupe;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Save';
$text[2] = 'Create event';
$text[3] = 'Event';
$text[4] = 'Your event of ';
$text[5] = 'Choose the date and time of the event';
$text[6] = 'Start date';
$text[7] = 'Choice of end date and time for the event';
$text[8] = 'End date';
$text[9] = 'Choice of event category';
$text[10] = 'Event category';
$text[11] = 'Choice of colour for the banner in which the text appears';
$text[12] = 'Background colour';
$text[13] = 'Choice of text colour';
$text[14] = 'Text colour';
$text[15] = 'Choice of minimum group that can see and read this event';
$text[16] = 'Read access';
$text[17] = 'Choice of minimal group that will be able to modify or delete this event';
$text[18] = 'Modify access';
$text[19] = 'Sending an email';
$text[20] = 'Checked box will send email to recipients';
$text[21] = 'Here you can select a txt or csv file that contains a comma-separated sequence of e-mail addresses.'.'<br/>'.'3 files are generated automatically from the registered users and you can, in configuration, add your own address files';
$text[22] = 'Select a recipient file';
$text[23] = 'You do not have access to event creation, please login';
$text[24] = 'Version No.';
$couleur = $module::$couleur_en;
$groupe = $module::$groupe_en;
break;
}
?>
<?php
// Passage de la langue d'administration à Tinymce et à flatpickr
$lang_admin = 'fr_FR';
$lang_flatpickr = 'fr';
if( $this->getData(['config', 'i18n', 'langAdmin']) ==='en'){
$lang_admin = 'en_GB';
$lang_flatpickr = 'default';
}
?> ?>
<script> <script>
var lang_admin = "<?php echo $lang_admin; ?>"; var lang_admin = "<?php echo $lang_admin; ?>";
var lang_flatpickr = "<?php echo $lang_flatpickr; ?>"; var lang_flatpickr = "<?php echo $lang_flatpickr; ?>";
</script> </script>
<?php <?php
// Inclusion de tinymce // Inclusion de tinymce
echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/tinymce.min.js' . '"></script>'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/tinymce.min.js' . '"></script>';
echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.js' . '"></script>'; echo '<script src="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.js' . '"></script>';
echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.css' . '">'; echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tinymce/init.css' . '">';
?>
<?php echo template::formOpen('creation_events'); ?> echo template::formOpen('creation_events'); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('creation_retour', [ <?php echo template::button('creation_retour', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0), 'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['agenda_view']['creation'][0]
]); ?> ]); ?>
</div> </div>
@ -107,20 +34,20 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<!--Suite de la <div class="row"> --> <!--Suite de la <div class="row"> -->
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('creation_enregistrer',[ <?php echo template::submit('creation_enregistrer',[
'value' => $text[1] 'value' => $text['agenda_view']['creation'][1]
]); ?> ]); ?>
</div> </div>
<!-- Fermeture de la <div class="row"> si test true --> <!-- Fermeture de la <div class="row"> si test true -->
</div> </div>
<div class="block"> <div class="block">
<h4><?php echo $text[2]; ?></h4> <h4><?php echo $text['agenda_view']['creation'][2]; ?></h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::textarea('creation_text', [ <?php echo template::textarea('creation_text', [
'label' => $text[3], 'label' => $text['agenda_view']['creation'][3],
'class' => $class_tinymce, 'class' => $class_tinymce,
'value' => $text[4].$module::$jour.'/'.$module::$mois.'/'.$module::$annee 'value' => $text['agenda_view']['creation'][4].$module::$jour.'/'.$module::$mois.'/'.$module::$annee
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -128,8 +55,8 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::date('creation_date_debut', [ <?php echo template::date('creation_date_debut', [
'help' => $text[5], 'help' => $text['agenda_view']['creation'][5],
'label' => $text[6], 'label' => $text['agenda_view']['creation'][6],
'value' => $module::$time_unix_deb, 'value' => $module::$time_unix_deb,
'vendor' => 'flatpickr' 'vendor' => 'flatpickr'
]); ?> ]); ?>
@ -137,8 +64,8 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<div class="col4"> <div class="col4">
<?php echo template::date('creation_date_fin', [ <?php echo template::date('creation_date_fin', [
'help' => $text[7], 'help' => $text['agenda_view']['creation'][7],
'label' => $text[8], 'label' => $text['agenda_view']['creation'][8],
'value' => $module::$time_unix_fin, 'value' => $module::$time_unix_fin,
'vendor' => 'flatpickr' 'vendor' => 'flatpickr'
]); ?> ]); ?>
@ -149,8 +76,8 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<?php if( is_file($module::DATAMODULE.'categories/categories.json') && $this->getData(['module', $this->getUrl(0), 'categories', 'valCategories' ]) ){ ?> <?php if( is_file($module::DATAMODULE.'categories/categories.json') && $this->getData(['module', $this->getUrl(0), 'categories', 'valCategories' ]) ){ ?>
<div class="col8"> <div class="col8">
<?php echo template::select('creation_categorie', $module::$categorie,[ <?php echo template::select('creation_categorie', $module::$categorie,[
'help' => $text[9], 'help' => $text['agenda_view']['creation'][9],
'label' => $text[10] 'label' => $text['agenda_view']['creation'][10]
]); ?> ]); ?>
</div> </div>
@ -159,15 +86,15 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
else{ ?> else{ ?>
<div class="col4"> <div class="col4">
<?php echo template::select('creation_couleur_fond', $couleur,[ <?php echo template::select('creation_couleur_fond', $couleur,[
'help' => $text[11], 'help' => $text['agenda_view']['creation'][11],
'label' => $text[12], 'label' => $text['agenda_view']['creation'][12],
'selected' => 'black' 'selected' => 'black'
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('creation_couleur_texte', $couleur,[ <?php echo template::select('creation_couleur_texte', $couleur,[
'help' => $text[13], 'help' => $text['agenda_view']['creation'][13],
'label' => $text[14], 'label' => $text['agenda_view']['creation'][14],
'selected' => 'white' 'selected' => 'white'
]); ?> ]); ?>
</div> </div>
@ -177,8 +104,8 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('creation_groupe_lire', $groupe,[ <?php echo template::select('creation_groupe_lire', $groupe,[
'help' => $text[15], 'help' => $text['agenda_view']['creation'][15],
'label' => $text[16], 'label' => $text['agenda_view']['creation'][16],
'selected' => '0' 'selected' => '0'
]); ?> ]); ?>
</div> </div>
@ -188,24 +115,24 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
if ($groupe_mini == 3){ $groupe_mini = 2;} if ($groupe_mini == 3){ $groupe_mini = 2;}
?> ?>
<?php echo template::select('creation_groupe_mod', $groupe,[ <?php echo template::select('creation_groupe_mod', $groupe,[
'help' => $text[17], 'help' => $text['agenda_view']['creation'][17],
'label' => $text[18], 'label' => $text['agenda_view']['creation'][18],
'selected' => $groupe_mini 'selected' => $groupe_mini
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::checkbox('creation_mailing_validation', true, $text[19], [ <?php echo template::checkbox('creation_mailing_validation', true, $text['agenda_view']['creation'][19], [
'checked' => false, 'checked' => false,
'help' => $text[20] 'help' => $text['agenda_view']['creation'][20]
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<!-- Sélection d'un fichier txt ou csv --> <!-- Sélection d'un fichier txt ou csv -->
<?php echo template::select('creation_mailing_adresses', $module::$liste_adresses, [ <?php echo template::select('creation_mailing_adresses', $module::$liste_adresses, [
'help' => $text[21], 'help' => $text['agenda_view']['creation'][21],
'label' => $text[22] 'label' => $text['agenda_view']['creation'][22]
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -219,12 +146,12 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<!--Fermeture de la <div class="row"> si test false--> <!--Fermeture de la <div class="row"> si test false-->
</div> </div>
<div> <div>
<h4><?php echo $text[23]; ?></h4> <h4><?php echo $text['agenda_view']['creation'][23]; ?></h4>
</div> </div>
<?php ;} ?> <?php ;} ?>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<div class="moduleVersion"> <div class="moduleVersion">
<?php echo $text[24];echo $module::VERSION; ?> <?php echo $text['agenda_view']['creation'][24];echo $module::VERSION; ?>
</div> </div>

View File

@ -1,69 +1,6 @@
<?php <?php
// Lexique // Lexique
$text = []; include('./module/agenda/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_agenda.php');
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Supprimer';
$text[2] = 'Enregistrer';
$text[3] = 'Lire un évènement';
$text[4] = 'Lire, modifier, supprimer un évènement';
$text[5] = 'Evénement';
$text[6] = 'Date de début';
$text[7] = 'Date de début';
$text[8] = 'Date de fin';
$text[9] = 'Date de fin';
$text[10] = 'Choix de la catégorie d\'évènement.';
$text[11] = 'Catégorie d\'évènement';
$text[12] = 'Choix de la couleur du bandeau dans lequel le texte apparaît.';
$text[13] = 'Couleur de fond';
$text[14] = 'Choix de la couleur du texte.';
$text[15] = 'Couleur du texte';
$text[16] = 'Choix du groupe minimal qui pourra voir et lire cet évènement';
$text[17] = 'Accès en lecture';
$text[18] = 'Choix du groupe minimal qui pourra modifier ou supprimer cet évènement';
$text[19] = 'Accès en modification';
$text[20] ='Version n°';
$couleur = $module::$couleur;
$groupe = $module::$groupe;
break;
case 'en' :
$text[0] = 'Return';
$text[1] = 'Delete';
$text[2] = 'Save';
$text[3] = 'Read event';
$text[4] = 'Read, modify, delete event';
$text[5] = 'Event';
$text[6] = 'Start date';
$text[7] = 'Start date';
$text[8] = 'End date';
$text[9] = 'End date';
$text[10] = 'Choice of event category';
$text[11] = 'Event category';
$text[12] = 'Choice of colour for the banner in which the text appears';
$text[13] = 'Background colour';
$text[14] = 'Choice of text colour';
$text[15] = 'Text colour';
$text[16] = 'Choice of minimum group that can see and read this event';
$text[17] = 'Read access';
$text[18] = 'Choice of minimal group that can modify or delete this event';
$text[19] = 'Edit access';
$text[20] = 'Version No.';
$couleur = $module::$couleur_en;
$groupe = $module::$groupe_en;
break;
}
?>
<?php
// Passage de la langue d'administration à Tinymce et à flatpickr
$lang_admin = 'fr_FR';
$lang_flatpickr = 'fr';
if( $this->getData(['config', 'i18n', 'langAdmin']) ==='en'){
$lang_admin = 'en_GB';
$lang_flatpickr = 'default';
}
?> ?>
<script> <script>
var lang_admin = "<?php echo $lang_admin; ?>"; var lang_admin = "<?php echo $lang_admin; ?>";
@ -96,7 +33,7 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0), 'href' => helper::baseUrl() . $this->getUrl(0),
'ico' => 'left', 'ico' => 'left',
'value' => $text[0] 'value' => $text['agenda_view']['edition'][0]
]); ?> ]); ?>
</div> </div>
<?php if( $this->getUser('group') >= $module::$evenement['groupe_mod'] ){?> <?php if( $this->getUser('group') >= $module::$evenement['groupe_mod'] ){?>
@ -104,13 +41,13 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<?php echo template::button('edition_event_delete', [ <?php echo template::button('edition_event_delete', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . $this->getUrl(0) . '/deleteEvent/' .$module::$evenement['id'], 'href' => helper::baseUrl() . $this->getUrl(0) . '/deleteEvent/' .$module::$evenement['id'],
'value' => $text[1], 'value' => $text['agenda_view']['edition'][1],
'ico' => 'cancel' 'ico' => 'cancel'
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::submit('edition_enregistrer',[ <?php echo template::submit('edition_enregistrer',[
'value' => $text[2], 'value' => $text['agenda_view']['edition'][2],
'ico' => 'check' 'ico' => 'check'
]); ?> ]); ?>
</div> </div>
@ -123,15 +60,15 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
</div> </div>
<div class="block"> <div class="block">
<h4><?php if ($readonly){echo $text[3]; }else{echo $text[4];}?></h4> <h4><?php if ($readonly){echo $text['agenda_view']['edition'][3]; }else{echo $text['agenda_view']['edition'][4];}?></h4>
<?php if($readonly){echo $text[5].'<br/><div class="block">'.$module::$evenement['texte'].'</div>';} <?php if($readonly){echo $text['agenda_view']['edition'][5].'<br/><div class="block">'.$module::$evenement['texte'].'</div>';}
else{ else{
?> ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::textarea('edition_text', [ <?php echo template::textarea('edition_text', [
'label' => $text[5], 'label' => $text['agenda_view']['edition'][5],
'class' => $class_tinymce, 'class' => $class_tinymce,
'value' => $module::$evenement['texte'] 'value' => $module::$evenement['texte']
]); ?> ]); ?>
@ -144,8 +81,8 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::date('edition_date_debut', [ <?php echo template::date('edition_date_debut', [
'help' => $text[6], 'help' => $text['agenda_view']['edition'][6],
'label' => $text[7], 'label' => $text['agenda_view']['edition'][7],
'disabled' => $readonly, 'disabled' => $readonly,
'value' => $module::$evenement['datedebut'], 'value' => $module::$evenement['datedebut'],
'vendor' => 'flatpickr' 'vendor' => 'flatpickr'
@ -154,8 +91,8 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<div class="col4"> <div class="col4">
<?php echo template::date('edition_date_fin', [ <?php echo template::date('edition_date_fin', [
'help' => $text[8], 'help' => $text['agenda_view']['edition'][8],
'label' => $text[9], 'label' => $text['agenda_view']['edition'][9],
'disabled' => $readonly, 'disabled' => $readonly,
'value' => $module::$evenement['datefin'], 'value' => $module::$evenement['datefin'],
'vendor' => 'flatpickr' 'vendor' => 'flatpickr'
@ -167,8 +104,8 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<?php if( $module::$evenement['categorie'] != '' ){ ?> <?php if( $module::$evenement['categorie'] != '' ){ ?>
<div class="col8"> <div class="col8">
<?php echo template::select('edition_categorie', $module::$categorie,[ <?php echo template::select('edition_categorie', $module::$categorie,[
'help' => $text[10], 'help' => $text['agenda_view']['edition'][10],
'label' => $text[11], 'label' => $text['agenda_view']['edition'][11],
'selected' => $module::$evenement['categorie'] 'selected' => $module::$evenement['categorie']
]); ?> ]); ?>
</div> </div>
@ -176,16 +113,16 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
else{ ?> else{ ?>
<div class="col4"> <div class="col4">
<?php echo template::select('edition_couleur_fond', $couleur,[ <?php echo template::select('edition_couleur_fond', $couleur,[
'help' => $text[12], 'help' => $text['agenda_view']['edition'][12],
'label' => $text[13], 'label' => $text['agenda_view']['edition'][13],
'disabled' => $readonly, 'disabled' => $readonly,
'selected' => $module::$evenement['couleurfond'] 'selected' => $module::$evenement['couleurfond']
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('edition_couleur_texte', $couleur,[ <?php echo template::select('edition_couleur_texte', $couleur,[
'help' => $text[14], 'help' => $text['agenda_view']['edition'][14],
'label' => $text[15], 'label' => $text['agenda_view']['edition'][15],
'disabled' => $readonly, 'disabled' => $readonly,
'selected' => $module::$evenement['couleurtexte'] 'selected' => $module::$evenement['couleurtexte']
]); ?> ]); ?>
@ -198,16 +135,16 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('edition_groupe_lire', $groupe,[ <?php echo template::select('edition_groupe_lire', $groupe,[
'help' => $text[16], 'help' => $text['agenda_view']['edition'][16],
'label' => $text[17], 'label' => $text['agenda_view']['edition'][17],
'disabled' => $readonly, 'disabled' => $readonly,
'selected' => $module::$evenement['groupe_lire'] 'selected' => $module::$evenement['groupe_lire']
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('edition_groupe_mod', $groupe,[ <?php echo template::select('edition_groupe_mod', $groupe,[
'help' => $text[18], 'help' => $text['agenda_view']['edition'][18],
'label' => $text[19], 'label' => $text['agenda_view']['edition'][19],
'disabled' => $readonly, 'disabled' => $readonly,
'selected' => $module::$evenement['groupe_mod'] 'selected' => $module::$evenement['groupe_mod']
]); ?> ]); ?>
@ -217,5 +154,5 @@ echo '<link rel="stylesheet" href="' . helper::baseUrl(false) . 'core/vendor/tin
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<div class="moduleVersion"> <div class="moduleVersion">
<?php echo $text[20]; echo $module::VERSION; ?> <?php echo $text['agenda_view']['edition'][20]; echo $module::VERSION; ?>
</div> </div>

View File

@ -1,4 +1,3 @@
<!-- Agenda dans une div pour contrôler la taille--> <!-- Agenda dans une div pour contrôler la taille-->
<div id="index_wrapper" style=" margin:0 auto;"> <div id="index_wrapper" style=" margin:0 auto;">
<!--Affiche l'agenda--> <!--Affiche l'agenda-->
@ -10,7 +9,6 @@
<?php echo template::formClose();?> <?php echo template::formClose();?>
</div> </div>
<!--Pour liaison entre variables php et javascript dans index.js.php-->
<script> <script>
// Integer: largeur MAXI du diaporama, en pixels. Par exemple : 800, 920, 500 // Integer: largeur MAXI du diaporama, en pixels. Par exemple : 800, 920, 500
var maxwidth=<?php echo $this->getData(['module', $this->getUrl(0),'config','maxiWidth']); ?>; var maxwidth=<?php echo $this->getData(['module', $this->getUrl(0),'config','maxiWidth']); ?>;

View File

@ -699,7 +699,7 @@ class blog extends common {
if ( $this->getData(['user', $userId, 'group']) < self::GROUP_MODERATOR) { if ( $this->getData(['user', $userId, 'group']) < self::GROUP_MODERATOR) {
unset(self::$users[$userId]); unset(self::$users[$userId]);
} }
$userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . self::$groupEdits[$this->getData(['user', $userId, 'group'])] . ')'; $userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . $groupEdits[$this->getData(['user', $userId, 'group'])] . ')';
} }
unset($userFirstname); unset($userFirstname);
// Passage de la langue d'administration à Tinymce // Passage de la langue d'administration à Tinymce

View File

@ -168,29 +168,23 @@ $commentLength = [
'5000' => '5000', '5000' => '5000',
'10000' => '10000' '10000' => '10000'
]; ];
$groupEdits = [
self::GROUP_BANNED => 'Banned',
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
$groupNews = [
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
// Permissions d'un article // Permissions d'un article
if( $param === 'blog' ){ if( $param === 'blog_view' ) {
$articleConsent = [
self::EDIT_ALL => 'All groups',
self::EDIT_GROUP => 'Owner\'s group',
self::EDIT_OWNER => 'Owner'
];
$groupNews = [
self::GROUP_MEMBER => 'Member',
self::GROUP_MODERATOR => 'Editor',
self::GROUP_ADMIN => 'Administrator'
];
} elseif( $param === 'blog_view' ) {
$articleConsent = [ $articleConsent = [
$module::EDIT_ALL => 'All groups', $module::EDIT_ALL => 'All groups',
$module::EDIT_GROUP => 'Owner\'s group', $module::EDIT_GROUP => 'Owner\'s group',
$module::EDIT_OWNER => 'Owner' $module::EDIT_OWNER => 'Owner'
]; ];
$groupNews = [
$module::GROUP_MEMBER => 'Member',
$module::GROUP_MODERATOR => 'Editor',
$module::GROUP_ADMIN => 'Administrator'
];
} }
?> ?>

Some files were not shown because too many files have changed in this diff Show More