Qui est en ligne dans la langue de rédaction

This commit is contained in:
Deltacms 2023-09-01 09:01:47 +02:00
parent cf4b553ae6
commit d60f1668b8
16 changed files with 117 additions and 35 deletions

View File

@ -11,7 +11,8 @@
- Statislite 4.8 : comptage des liens cliqués pour lesquels la class 'clicked_link_count' a été ajoutée par l'éditeur de liens de Tinymce,
- Agenda 5.9 : la langue de l'agenda s'adapte automatiquement à la traduction rédigée,
- Blog 6.8 et News 4.7 : les dates s'adaptent automatiquement à la traduction rédigée,
- Blog 6.8 et News 4.7 : amélioration de la navigation entre les articles.
- Blog 6.8 et News 4.7 : amélioration de la navigation entre les articles,
- Theme / Footer : amélioration, 'Qui est en ligne ?' s'affiche dans la langue de rédaction du site avec les labels réglables dans Configuration / Localisation.
- Correction :
- Slider 4.8 / Configuration : les liens sur les images étaient modifiés au changement de l'ordre des pages.

View File

@ -1486,20 +1486,20 @@ class common {
$items .= '</span>';
// Enregistrement et affichage des personnes en ligne
if( $this->getData(['theme', 'footer', 'displayWhois']) === true ){
// ajouter 'session' à la liste des descripteurs d'E/S ligne 225
if( ! file_exists(self::DATA_DIR . 'session.json')) file_put_contents(self::DATA_DIR . 'session.json', '{}');
$user_type = $this->getUser('id') ? $this->getData(['user', $this->getUser('id'), 'group']) : 0 ;
$this->setData(['session', session_id(), 'user_type', $user_type ]);
$this->setData(['session', session_id(), 'time', time() ]);
// Lexique
include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
// Tableau $groupWhoIs
$groupWhoIs = [ 0 => $this->getData(['locale', 'visitorLabel']), 1 => $this->getData(['locale', 'memberLabel']),
2 => $this->getData(['locale', 'editorLabel']), 3 => $this->getData(['locale', 'moderatorLabel']), 4 => $this->getData(['locale', 'administratorLabel'])];
$file = file_get_contents('site/data/session.json');
$session_tab = json_decode( $file, true);
$whoIs = [0 => 0,1 => 0,2 => 0, 3 => 0,4=> 0];
foreach( $session_tab as $key1=>$session_id){
foreach($session_id as $key2=>$value){
// Temps d'inactivité réglé ici à 300 secondes
if( time() > $value["time"] + 300){
// Temps d'inactivité réglé à 60 secondes
if( time() > $value["time"] + 60){
$session_tab[$key1]=[];
} else {
$whoIs[$value['user_type']]++;
@ -1512,8 +1512,7 @@ class common {
$textWhoIs ='';
foreach( $whoIs as $key=>$value ){
if( $value !== 0){
$textWhoIs .= ' '. $value.'&nbsp;'. $groupWhoIs[$key];
$textWhoIs .= $value > 1 ? 's ':' ';
$textWhoIs .= ' '.$groupWhoIs[$key].'=>'.$value.' ';
}
}
$items .= ' | '.$textWhoIs;

View File

@ -31,13 +31,6 @@ $text['core']['router'][3] = 'Access denied';
$text['core']['router'][4] = 'You are not authorised to view this page (error 403)';
$text['core']['router'][5] = 'Page unavailable';
$text['core']['router'][6] = 'Oops! The requested page does not exist or cannot be found (error 404)';
$groupWhoIs = [
0 => 'visitor',
1 => 'member',
2 => 'editor',
3 => 'moderator',
4 => 'administrator'
];
// core.js.php
$text['core_js'][0] = "Updating ?";
// Select File

View File

@ -31,13 +31,6 @@ $text['core']['router'][3] = 'Acceso denegado';
$text['core']['router'][4] = 'No está autorizado para ver esta página (error 403)';
$text['core']['router'][5] = 'Página no disponible';
$text['core']['router'][6] = '¡Vaya! La página solicitada no existe o no se encuentra (error 404)';
$groupWhoIs = [
0 => 'visitante',
1 => 'miembro',
2 => 'editor',
3 => 'moderador',
4 => 'administrador'
];
// core.js.php
$text['core_js'][0] = "¿Realizar actualización?";
// Seleccione Archivo

View File

@ -31,13 +31,6 @@ $text['core']['router'][3] = 'Accès interdit';
$text['core']['router'][4] = 'Vous n\'êtes pas autorisé à consulter cette page (erreur 403)';
$text['core']['router'][5] = 'Page indisponible';
$text['core']['router'][6] = 'Oups ! La page demandée n\'existe pas ou est introuvable (erreur 404)';
$groupWhoIs = [
0 => 'visiteur',
1 => 'membre',
2 => 'éditeur',
3 => 'modérateur',
4 => 'administrateur'
];
// core.js.php
$text['core_js'][0] = "Effectuer la mise à jour ?";
// Select File

View File

@ -365,6 +365,11 @@ class config extends common {
'searchPageLabel' => empty($this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT)) ? 'Rechercher' : $this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT),
'legalPageLabel' => empty($this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT)) ? 'Mentions légales' : $this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT),
'sitemapPageLabel' => empty($this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT)) ? 'Plan du site' : $this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT),
'visitorLabel' => $this->getInput('localeVisitorLabel', helper::FILTER_STRING_SHORT),
'memberLabel' => $this->getInput('localeMemberLabel', helper::FILTER_STRING_SHORT),
'editorLabel' => $this->getInput('localeEditorLabel', helper::FILTER_STRING_SHORT),
'moderatorLabel' => $this->getInput('localeModeratorLabel', helper::FILTER_STRING_SHORT),
'administratorLabel' => $this->getInput('localeAdministratorLabel', helper::FILTER_STRING_SHORT),
'metaDescription' => $this->getInput('localeMetaDescription', helper::FILTER_STRING_LONG, true),
'title' => $this->getInput('localeTitle', helper::FILTER_STRING_SHORT, true),
'captchaSimpleText' => $this->getInput('localeCaptchaSimpleText', helper::FILTER_STRING_LONG),

View File

@ -92,6 +92,12 @@ $text['core_config_view']['locale'][43] = 'Text associated with the checkbox';
$text['core_config_view']['locale'][44] = 'I am not a robot';
$text['core_config_view']['locale'][45] = 'Help message';
$text['core_config_view']['locale'][46] = 'Check this box to prove that you are not a robot';
$text['core_config_view']['locale'][47] = 'Who is online ? ';
$text['core_config_view']['locale'][48] = 'Visitor';
$text['core_config_view']['locale'][49] = 'Member';
$text['core_config_view']['locale'][50] = 'Editor';
$text['core_config_view']['locale'][51] = 'Moderator';
$text['core_config_view']['locale'][52] = 'Administrator';
$text['core_config_view']['network'][0] = 'Settings';
$text['core_config_view']['network'][1] = 'Proxy type';
$text['core_config_view']['network'][2] = 'Proxy address';

View File

@ -92,6 +92,12 @@ $text['core_config_view']['locale'][43] = 'Texto asociado con la casilla de veri
$text['core_config_view']['locale'][44] = 'No soy un robot';
$text['core_config_view']['locale'][45] = 'Mensaje de ayuda';
$text['core_config_view']['locale'][46] = 'Marque esta casilla para demostrar que no es un robot';
$text['core_config_view']['locale'][47] = '¿Quién está en línea? ';
$text['core_config_view']['locale'][48] = 'Visitante';
$text['core_config_view']['locale'][49] = 'Miembro';
$text['core_config_view']['locale'][50] = 'Editor';
$text['core_config_view']['locale'][51] = 'Moderador';
$text['core_config_view']['locale'][52] = 'Administrador';
$text['core_config_view']['network'][0] = 'Configuración';
$text['core_config_view']['network'][1] = 'Tipo de proxy';
$text['core_config_view']['network'][2] = 'Dirección de proxy';

View File

@ -92,6 +92,12 @@ $text['core_config_view']['locale'][43] = 'Texte associé à la checkbox';
$text['core_config_view']['locale'][44] = 'Je ne suis pas un robot';
$text['core_config_view']['locale'][45] = 'Message d\'aide';
$text['core_config_view']['locale'][46] = 'Cochez cette case pour prouver que vous n\'êtes pas un robot';
$text['core_config_view']['locale'][47] = 'Qui est en ligne ? ';
$text['core_config_view']['locale'][48] = 'Visiteur';
$text['core_config_view']['locale'][49] = 'Membre';
$text['core_config_view']['locale'][50] = 'Editeur';
$text['core_config_view']['locale'][51] = 'Modérateur';
$text['core_config_view']['locale'][52] = 'Administrateur';
$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';

View File

@ -135,30 +135,28 @@ else{
</span>
</div>
<div class="row">
<div class="col6">
<div class="col3">
<?php echo template::text('localeLegalPageLabel', [
'label' => $text['core_config_view']['locale'][15],
'placeholder' => $text['core_config_view']['locale'][15],
'value' => $this->getData(['locale', 'legalPageLabel'])
]); ?>
</div>
<div class="col6">
<div class="col3">
<?php echo template::text('localeSearchPageLabel', [
'label' => $text['core_config_view']['locale'][23],
'placeholder' => $text['core_config_view']['locale'][23],
'value' => $this->getData(['locale', 'searchPageLabel'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="col3">
<?php echo template::text('localeSitemapPageLabel', [
'label' => $text['core_config_view']['locale'][24],
'placeholder' => $text['core_config_view']['locale'][24],
'value' => $this->getData(['locale', 'sitemapPageLabel']),
]); ?>
</div>
<div class="col6">
<div class="col3">
<?php echo template::text('localeCookiesFooterText', [
'label' => $text['core_config_view']['locale'][25],
'value' => $this->getData(['locale', 'cookies', 'cookiesFooterText']),
@ -169,6 +167,58 @@ else{
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<div class="blockTitle"><?php echo $text['core_config_view']['locale'][47]; echo template::flag($flag, '20px');?>
<span id="labelHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/localisation#etiquettes" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('localeVisitorLabel', [
'label' => $text['core_config_view']['locale'][48],
'placeholder' => $text['core_config_view']['locale'][48],
'value' => $this->getData(['locale', 'visitorLabel'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('localeMemberLabel', [
'label' => $text['core_config_view']['locale'][49],
'placeholder' => $text['core_config_view']['locale'][49],
'value' => $this->getData(['locale', 'memberLabel'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('localeEditorLabel', [
'label' => $text['core_config_view']['locale'][50],
'placeholder' => $text['core_config_view']['locale'][50],
'value' => $this->getData(['locale', 'editorLabel']),
]); ?>
</div>
<div class="col3">
<?php echo template::text('localeModeratorLabel', [
'label' => $text['core_config_view']['locale'][51],
'value' => $this->getData(['locale', 'moderatorLabel']),
'placeHolder' => $text['core_config_view']['locale'][51]
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('localeAdministratorLabel', [
'label' => $text['core_config_view']['locale'][52],
'placeholder' => $text['core_config_view']['locale'][52],
'value' => $this->getData(['locale', 'administratorLabel'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">

View File

@ -9,6 +9,11 @@
"searchPageLabel": "Search",
"legalPageLabel": "Legal notice",
"sitemapPageLabel": "Site map",
"visitorLabel": "Visitor",
"memberLabel": "Member",
"editorLabel": "Editor",
"moderatorLabel": "Moderator",
"administratorLabel": "Administrator",
"metaDescription": "DeltaCMS is a database-less CMS that allows you to easily create and manage a website without any programming knowledge.",
"title": "DeltaCMS",
"captchaSimpleText": "I'am not a robot",

View File

@ -9,6 +9,11 @@
"searchPageLabel": "Buscar",
"legalPageLabel": "Aviso legal",
"sitemapPageLabel": "Mapa del sitio",
"visitorLabel": "Visitante",
"memberLabel": "Miembro",
"editorLabel": "Editor",
"moderatorLabel": "Moderador",
"administratorLabel": "Administrador",
"metaDescription": "DeltaCMS es un CMS sin base de datos que le permite crear y administrar fácilmente un sitio web sin ningún conocimiento de programación.",
"title": "DeltaCMS",
"captchaSimpleText": "Soy un humano",

View File

@ -9,6 +9,11 @@
"searchPageLabel": "Rechercher",
"sitemapPageLabel": "Plan du site",
"legalPageLabel": "Mentions légales",
"visitorLabel": "Visiteur",
"memberLabel": "Membre",
"editorLabel": "Editeur",
"moderatorLabel": "Modérateur",
"administratorLabel": "Administrateur",
"metaDescription": "DeltaCMS est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.",
"title": "DeltaCMS",
"captchaSimpleText": "Je ne suis pas un robot",

View File

@ -9,6 +9,11 @@
"searchPageLabel": "Search",
"sitemapPageLabel": "Sitemap",
"legalPageLabel": "Legal Notices",
"visitorLabel": "Visitor",
"memberLabel": "Member",
"editorLabel": "Editor",
"moderatorLabel": "Moderator",
"administratorLabel": "Administrator",
"metaDescription": "DeltaCMS is a database-less CMS that allows you to easily create and manage a website without any programming knowledge.",
"title": "DeltaCMS",
"captchaSimpleText": "I'am not a robot",

View File

@ -9,6 +9,11 @@
"searchPageLabel": "Buscar",
"legalPageLabel": "Aviso legal",
"sitemapPageLabel": "Mapa del sitio",
"visitorLabel": "Visitante",
"memberLabel": "Miembro",
"editorLabel": "Editor",
"moderatorLabel": "Moderador",
"administratorLabel": "Administrador",
"metaDescription": "DeltaCMS es un CMS sin base de datos que facilita la creación y administración de un sitio web sin ningún conocimiento de programación.",
"title": "Deltacms",
"captchaSimpleText": "No soy un robot",

View File

@ -86,6 +86,11 @@ class init extends common {
'searchPageLabel' => 'Rechercher',
'sitemapPageLabel' => 'Plan du site',
'legalPageLabel' => 'Mentions légales',
'visitorLabel' => 'Visiteur',
'memberLabel' => 'Membre',
'editorLabel' => 'Editeur',
'moderatorLabel' => 'Modérateur',
'administratorLabel' => 'Administrateur',
'metaDescription' => 'DeltaCMS est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
'title' => 'DeltaCMS',
'captchaSimpleText' => 'Je ne suis pas un robot',