From fb8197848b31f066800921281ec381e3f643525f Mon Sep 17 00:00:00 2001
From: jerrywham
Date: Wed, 6 Sep 2017 14:29:55 +0200
Subject: [PATCH 01/15] Add trad indexes for url (new-*)
---
core/lang/ru/admin.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/lang/ru/admin.php b/core/lang/ru/admin.php
index 4cf44e003..79a90d8b4 100644
--- a/core/lang/ru/admin.php
+++ b/core/lang/ru/admin.php
@@ -38,9 +38,9 @@
'L_ERR_INVALID_EMAIL' => 'Неправильный адрес электронной почты',
'L_ERR_INVALID_SITE' => 'Неправильный URL сайта',
'L_ERR_INVALID_ARTICLE_IDENT' => 'Неверный ID статьи',
-'L_DEFAULT_NEW_CATEGORY_URL' => 'new-category',
-'L_DEFAULT_NEW_STATIC_URL' => 'new-page',
-'L_DEFAULT_NEW_ARTICLE_URL' => 'new-article',
+'L_DEFAULT_NEW_CATEGORY_URL' => 'новая-категория',
+'L_DEFAULT_NEW_STATIC_URL' => 'новая-страница',
+'L_DEFAULT_NEW_ARTICLE_URL' => 'новая-статья',
'L_ARTICLE_SAVE_SUCCESSFUL' => 'Статья успешно создана',
'L_ARTICLE_MODIFY_SUCCESSFUL' => 'Статья успешно обновлена',
'L_ARTICLE_DELETE_SUCCESSFUL' => 'Статья было успешно удалена',
@@ -577,4 +577,4 @@
'L_BACK_TO_THEMES' => 'Вернуться к темам страницы',
'L_CONFIG_THEME_UPDATE' => 'Изменить стиль',
);
-?>
\ No newline at end of file
+?>
From c4950caf459aa7a598ee3c7e5e02c13839d8aebc Mon Sep 17 00:00:00 2001
From: jerrywham
Date: Wed, 6 Sep 2017 15:06:28 +0200
Subject: [PATCH 02/15] Edit showMsg for using it with PluCss
See https://github.com/pluxml/PluXml/issues/246
---
core/lib/class.plx.utils.php | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/core/lib/class.plx.utils.php b/core/lib/class.plx.utils.php
index ee40f71bd..a3d3da3a2 100644
--- a/core/lib/class.plx.utils.php
+++ b/core/lib/class.plx.utils.php
@@ -203,17 +203,17 @@ public static function printInput($name, $value='', $type='text', $sizes='50-255
$params[] = $extra;
if($type != 'hidden') {
if($readonly === true)
- $params[] = 'readonly="readonly" class="readonly"';
+ $params[] = 'readonly="readonly" class="readonly"';
if(!empty($className))
$params[] = 'class="'.$className.'"';
if(!empty($placeholder))
$params[] = $placeholder;
- if(!empty($sizes) AND (strpos($sizes, '-') !== false)) {
+ if(!empty($sizes) AND (strpos($sizes, '-') !== false)) {
list($size, $maxlength) = explode('-', $sizes);
if(!empty($size))
$params[] = 'size="'.$size.'"';
if(!empty($maxlength))
- $params[] = 'maxlength="'.$maxlength.'"';
+ $params[] = 'maxlength="'.$maxlength.'"';
}
}
echo ' ';
@@ -596,14 +596,15 @@ public static function makeThumb($src_image, $dest_image, $thumb_width = 48, $th
/**
* Méthode qui affiche un message
*
- * @param msg message à afficher
- * @param class class css à utiliser pour formater l'affichage du message
- * @return stdout
+ * @param string message à afficher
+ * @param string classe css à utiliser pour formater l'affichage du message
+ * @param string format des balises avant le message
+ * @param string format des balises après le message
+ * @return stdout
**/
- public static function showMsg($msg, $class='') {
-
- if($class=='') echo ''.$msg.'
';
- else echo ''.$msg.'
';
+ public static function showMsg($msg, $class='',$format_start='',$format_end='
') {
+ $format_start = str_replace('#CLASS',($class != '' ? $class : 'msg'),$format_start);
+ echo $format_start.$msg.$format_end;
}
/**
@@ -1062,4 +1063,4 @@ public static function debug($obj) {
echo "";
}
}
-?>
\ No newline at end of file
+?>
From 0f6926fb8e1d94a97533970cc52c0f4027ef8d92 Mon Sep 17 00:00:00 2001
From: bazooka07
Date: Sun, 3 Dec 2017 19:42:41 +0100
Subject: [PATCH 03/15] Ajout du tri alpha inverse dans plxGlob::query(..).
La fonction plxMotor::mapTri devient obsolete.
Nouvel idiome : L_SORT_REVERSE_ALPHABETICAL a finir de traduire
---
config.php | 2 +-
core/admin/categories.php | 8 +++++++-
core/admin/parametres_affichage.php | 9 ++++++++-
core/lang/en/admin.php | 5 +++--
core/lang/fr/admin.php | 1 +
core/lib/class.plx.glob.php | 12 ++++++++----
core/lib/class.plx.motor.php | 10 +++++-----
7 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/config.php b/config.php
index 6344ccc6f..d5b5c8192 100644
--- a/config.php
+++ b/config.php
@@ -1,3 +1,3 @@
\ No newline at end of file
diff --git a/core/admin/categories.php b/core/admin/categories.php
index aa17a4825..668d94d6f 100644
--- a/core/admin/categories.php
+++ b/core/admin/categories.php
@@ -26,7 +26,13 @@
}
# Tableau du tri
-$aTri = array('desc'=>L_SORT_DESCENDING_DATE, 'asc'=>L_SORT_ASCENDING_DATE, 'alpha'=>L_SORT_ALPHABETICAL,'random'=>L_SORT_RANDOM);
+$aTri = array(
+ 'desc' => L_SORT_DESCENDING_DATE,
+ 'asc' => L_SORT_ASCENDING_DATE,
+ 'alpha' => L_SORT_ALPHABETICAL,
+ 'ralpha' => L_SORT_REVERSE_ALPHABETICAL,
+ 'random' => L_SORT_RANDOM
+);
# On inclut le header
include(dirname(__FILE__).'/top.php');
diff --git a/core/admin/parametres_affichage.php b/core/admin/parametres_affichage.php
index 34b339ad5..119fa7de8 100644
--- a/core/admin/parametres_affichage.php
+++ b/core/admin/parametres_affichage.php
@@ -38,7 +38,14 @@
if(empty($aTemplates)) $aTemplates[''] = L_NONE1;
# Tableau du tri
-$aTriArts = array('desc'=>L_SORT_DESCENDING_DATE, 'asc'=>L_SORT_ASCENDING_DATE, 'alpha'=>L_SORT_ALPHABETICAL,'random'=>L_SORT_RANDOM);
+$aTriArts = array(
+ 'desc' => L_SORT_DESCENDING_DATE,
+ 'asc' => L_SORT_ASCENDING_DATE,
+ 'alpha' => L_SORT_ALPHABETICAL,
+ 'ralpha' => L_SORT_REVERSE_ALPHABETICAL,
+ 'random' => L_SORT_RANDOM
+);
+
$aTriComs = array('desc'=>L_SORT_DESCENDING_DATE, 'asc'=>L_SORT_ASCENDING_DATE);
# On va tester les variables pour les images et miniatures
diff --git a/core/lang/en/admin.php b/core/lang/en/admin.php
index f0e3f84bb..0064a73ab 100644
--- a/core/lang/en/admin.php
+++ b/core/lang/en/admin.php
@@ -151,6 +151,7 @@
'L_SORT_ASCENDING_DATE' => 'ascending date',
'L_SORT_DESCENDING_DATE' => 'descending date',
'L_SORT_ALPHABETICAL' => 'alphabetical',
+'L_SORT_REVERSE_ALPHABETICAL' => 'reversing alphabetical',
'L_SORT_RANDOM' => 'random',
'L_OK' => 'Ok',
'L_YES' => 'Yes',
@@ -286,7 +287,7 @@
'L_MEDIAS_LINK_COPYCLP' => 'Copy link to clipboard',
'L_MEDIAS_LINK_COPYCLP_ERR' => 'Unable to copy link to clipboard',
'L_MEDIAS_LINK_COPYCLP_DONE' => 'Copied link',
-'L_MEDIAS_NEW_NAME' => 'New name',
+'L_MEDIAS_NEW_NAME' => 'New name',
'L_MEDIAS_RENAME' => 'Rename',
'L_CONFIG_VIEW_FIELD' => 'Display preferences',
'L_CONFIG_VIEW_SKIN_SELECT' => 'Skin',
@@ -493,4 +494,4 @@
'L_ERR_INVALID_DATE_CREATION' => 'Invalid creation date',
'L_ERR_INVALID_DATE_UPDATE' => 'Invalid date updated',
);
-?>
+?>
\ No newline at end of file
diff --git a/core/lang/fr/admin.php b/core/lang/fr/admin.php
index b3269609f..dacd6d42e 100644
--- a/core/lang/fr/admin.php
+++ b/core/lang/fr/admin.php
@@ -159,6 +159,7 @@
'L_SORT_ASCENDING_DATE' => 'date croissante',
'L_SORT_DESCENDING_DATE' => 'date décroissante',
'L_SORT_ALPHABETICAL' => 'alphabétique',
+'L_SORT_REVERSE_ALPHABETICAL' => 'alphabét. inversé',
'L_SORT_RANDOM' => 'aléatoire',
'L_YES' => 'Oui',
'L_NO' => 'Non',
diff --git a/core/lib/class.plx.glob.php b/core/lib/class.plx.glob.php
index 22600708f..dfe107ceb 100644
--- a/core/lib/class.plx.glob.php
+++ b/core/lib/class.plx.glob.php
@@ -100,7 +100,7 @@ private function initCache($type='') {
*
* @param motif motif de recherche des fichiers sous forme d'expression réguliere
* @param type type de recherche: article ('art'), commentaire ('com') ou autre (''))
- * @param tri type de tri (sort, rsort, alpha)
+ * @param tri type de tri (sort, rsort, alpha, ralpha)
* @param publi recherche des fichiers avant ou après la date du jour
* @return array ou false
* @author Anthony GUÉRIN, Florent MONTHEL et Stephane F
@@ -121,7 +121,7 @@ private function search($motif,$type,$tri,$publi) {
# On decoupe le nom du fichier
$index = explode('.',$file);
# On cree un tableau associatif en choisissant bien nos cles et en verifiant la date de publication
- $key = ($tri === 'alpha' ? $index[4].'~'.$index[0] : $index[3].$index[0]);
+ $key = ($tri === 'alpha' OR $tri === 'ralpha') ? $index[4].'~'.$index[0] : $index[3].$index[0];
if($publi === 'before' AND $index[3] <= date('YmdHi'))
$array[$key] = $file;
elseif($publi === 'after' AND $index[3] >= date('YmdHi'))
@@ -187,13 +187,16 @@ public function query($motif,$type='',$tri='',$depart='0',$limite=false,$publi='
shuffle($rs);
break;
case 'alpha':
+ case 'asc':
case 'sort':
ksort($rs);
break;
+ case 'ralpha':
+ case 'desc':
case 'rsort':
- default:
krsort($rs);
break;
+ default:
}
} else {
switch ($tri) {
@@ -204,10 +207,11 @@ public function query($motif,$type='',$tri='',$depart='0',$limite=false,$publi='
case 'sort':
sort($rs);
break;
+ case 'ralpha':
case 'rsort':
- default:
rsort($rs);
break;
+ default:
}
}
diff --git a/core/lib/class.plx.motor.php b/core/lib/class.plx.motor.php
index 391469fd7..674ae120f 100644
--- a/core/lib/class.plx.motor.php
+++ b/core/lib/class.plx.motor.php
@@ -315,7 +315,7 @@ public function demarrage() {
exit;
}
# Rcupration des commentaires
- $this->getCommentaires('/^'.$this->cible.'.[0-9]{10}-[0-9]+.xml$/',$this->mapTri($this->tri_coms));
+ $this->getCommentaires('/^'.$this->cible.'.[0-9]{10}-[0-9]+.xml$/',$this->tri_coms);
$this->template=$this->plxRecord_arts->f('template');
if($this->aConf['capcha']) $this->plxCapcha = new plxCapcha(); # Cration objet captcha
}
@@ -569,7 +569,7 @@ public function getUsers($filename) {
* @return string
* @author Stphane F.
**/
- protected function mapTri($tri) {
+ protected function mapTri($tri) { /* obsolete ! 2017-12-03 */
if($tri=='desc')
return 'rsort';
@@ -577,6 +577,8 @@ protected function mapTri($tri) {
return 'sort';
elseif($tri=='alpha')
return 'alpha';
+ elseif($tri=='ralpha')
+ return 'ralpha';
elseif($tri=='random')
return 'random';
else
@@ -608,12 +610,10 @@ protected function getPage() {
**/
public function getArticles($publi='before') {
- # On fait notre traitement sur notre tri
- $ordre = $this->mapTri($this->tri);
# On calcule la valeur start
$start = $this->bypage*($this->page-1);
# On recupere nos fichiers (tries) selon le motif, la pagination, la date de publication
- if($aFiles = $this->plxGlob_arts->query($this->motif,'art',$ordre,$start,$this->bypage,$publi)) {
+ if($aFiles = $this->plxGlob_arts->query($this->motif,'art',$this->tri,$start,$this->bypage,$publi)) {
# on mmorise le nombre total d'articles trouvs
foreach($aFiles as $k=>$v) # On parcourt tous les fichiers
$array[$k] = $this->parseArticle(PLX_ROOT.$this->aConf['racine_articles'].$v);
From caef7e99951d7a0b1ab46b49e4b9d7fe55814c11 Mon Sep 17 00:00:00 2001
From: Stephane
Date: Mon, 4 Dec 2017 08:32:26 +0000
Subject: [PATCH 04/15] =?UTF-8?q?Tri=20alpha=20invers=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config.php | 2 +-
core/lang/de/admin.php | 1 +
core/lang/en/admin.php | 2 +-
core/lang/es/admin.php | 1 +
core/lang/fr/admin.php | 2 +-
core/lang/it/admin.php | 1 +
core/lang/nl/admin.php | 1 +
core/lang/oc/admin.php | 1 +
core/lang/pl/admin.php | 4 +-
core/lang/pt/admin.php | 1 +
core/lang/ro/admin.php | 1 +
core/lang/ru/admin.php | 1 +
core/lib/class.plx.glob.php | 2 +-
core/lib/class.plx.motor.php | 2234 +++++++++++++++++-----------------
14 files changed, 1131 insertions(+), 1123 deletions(-)
diff --git a/config.php b/config.php
index d5b5c8192..6344ccc6f 100644
--- a/config.php
+++ b/config.php
@@ -1,3 +1,3 @@
\ No newline at end of file
diff --git a/core/lang/de/admin.php b/core/lang/de/admin.php
index 218d4ecd3..6bf652389 100644
--- a/core/lang/de/admin.php
+++ b/core/lang/de/admin.php
@@ -283,6 +283,7 @@
'L_SORT_ASCENDING_DATE' => 'Datum aufsteigend',
'L_SORT_DESCENDING_DATE' => 'Datum absteigend',
'L_SORT_ALPHABETICAL' => 'alphabetisch',
+'L_SORT_REVERSE_ALPHABETICAL' => 'rückwärts alphabetisch',
'L_SORT_RANDOM' => 'aleatorischen',
'L_OK' => 'Ok',
'L_YES' => 'Ja',
diff --git a/core/lang/en/admin.php b/core/lang/en/admin.php
index 0064a73ab..111280ae6 100644
--- a/core/lang/en/admin.php
+++ b/core/lang/en/admin.php
@@ -151,7 +151,7 @@
'L_SORT_ASCENDING_DATE' => 'ascending date',
'L_SORT_DESCENDING_DATE' => 'descending date',
'L_SORT_ALPHABETICAL' => 'alphabetical',
-'L_SORT_REVERSE_ALPHABETICAL' => 'reversing alphabetical',
+'L_SORT_REVERSE_ALPHABETICAL' => 'reverse alphabetical',
'L_SORT_RANDOM' => 'random',
'L_OK' => 'Ok',
'L_YES' => 'Yes',
diff --git a/core/lang/es/admin.php b/core/lang/es/admin.php
index 265439892..bdd4e27f7 100644
--- a/core/lang/es/admin.php
+++ b/core/lang/es/admin.php
@@ -155,6 +155,7 @@
'L_SORT_ASCENDING_DATE' => 'más antiguo a más reciente',
'L_SORT_DESCENDING_DATE' => 'más reciente a más antiguo',
'L_SORT_ALPHABETICAL' => 'alfabético',
+'L_SORT_REVERSE_ALPHABETICAL' => 'reverso alfabético',
'L_SORT_RANDOM' => 'aleatorio',
'L_YES' => 'Si',
'L_NO' => 'No',
diff --git a/core/lang/fr/admin.php b/core/lang/fr/admin.php
index dacd6d42e..8f07f63ee 100644
--- a/core/lang/fr/admin.php
+++ b/core/lang/fr/admin.php
@@ -159,7 +159,7 @@
'L_SORT_ASCENDING_DATE' => 'date croissante',
'L_SORT_DESCENDING_DATE' => 'date décroissante',
'L_SORT_ALPHABETICAL' => 'alphabétique',
-'L_SORT_REVERSE_ALPHABETICAL' => 'alphabét. inversé',
+'L_SORT_REVERSE_ALPHABETICAL' => 'alphabétique inversé',
'L_SORT_RANDOM' => 'aléatoire',
'L_YES' => 'Oui',
'L_NO' => 'Non',
diff --git a/core/lang/it/admin.php b/core/lang/it/admin.php
index 3e51fe941..482243784 100644
--- a/core/lang/it/admin.php
+++ b/core/lang/it/admin.php
@@ -282,6 +282,7 @@
'L_SORT_ASCENDING_DATE' => 'data ascendente',
'L_SORT_DESCENDING_DATE' => 'data discendente',
'L_SORT_ALPHABETICAL' => 'alfabetico',
+'L_SORT_REVERSE_ALPHABETICAL' => 'rovescio alfabetico',
'L_SORT_RANDOM' => 'aleatorio',
'L_OK' => 'Ok',
'L_YES' => 'Si',
diff --git a/core/lang/nl/admin.php b/core/lang/nl/admin.php
index 3ef3cf840..9fc542976 100644
--- a/core/lang/nl/admin.php
+++ b/core/lang/nl/admin.php
@@ -282,6 +282,7 @@
'L_SORT_ASCENDING_DATE' => 'datum oplopend',
'L_SORT_DESCENDING_DATE' => 'datum aflopend',
'L_SORT_ALPHABETICAL' => 'alfabetisch',
+'L_SORT_REVERSE_ALPHABETICAL' => 'alfabetisch omgekeerd',
'L_SORT_RANDOM' => 'onzeker',
'L_OK' => 'Ok',
'L_YES' => 'Ja',
diff --git a/core/lang/oc/admin.php b/core/lang/oc/admin.php
index 5098dbe6f..80c4e6aaa 100644
--- a/core/lang/oc/admin.php
+++ b/core/lang/oc/admin.php
@@ -155,6 +155,7 @@
'L_SORT_ASCENDING_DATE' => 'data creissenta',
'L_SORT_DESCENDING_DATE' => 'data decreissenta',
'L_SORT_ALPHABETICAL' => 'alfabetic',
+'L_SORT_REVERSE_ALPHABETICAL' => 'alfabetic reverse',
'L_SORT_RANDOM' => 'aleatòri',
'L_YES' => 'Òc',
'L_NO' => 'Non',
diff --git a/core/lang/pl/admin.php b/core/lang/pl/admin.php
index d40fde453..db4a60d52 100644
--- a/core/lang/pl/admin.php
+++ b/core/lang/pl/admin.php
@@ -155,8 +155,8 @@
'L_SORT_ASCENDING_DATE' => 'data rosnąca',
'L_SORT_DESCENDING_DATE' => 'data malejąco',
'L_SORT_ALPHABETICAL' => 'alfabetycznie',
-'L_SORT_RANDOM' => '
-przypadkowy',
+'L_SORT_REVERSE_ALPHABETICAL' => 'odwróć alfabetycznie',
+'L_SORT_RANDOM' => 'przypadkowy',
'L_YES' => 'Tak',
'L_NO' => 'Nie',
'L_OK' => 'OK',
diff --git a/core/lang/pt/admin.php b/core/lang/pt/admin.php
index c9d2042f1..97881c15e 100644
--- a/core/lang/pt/admin.php
+++ b/core/lang/pt/admin.php
@@ -282,6 +282,7 @@
'L_SORT_ASCENDING_DATE' => 'data ascendente',
'L_SORT_DESCENDING_DATE' => 'data decrescente',
'L_SORT_ALPHABETICAL' => 'alfabético',
+'L_SORT_REVERSE_ALPHABETICAL' => 'alfabético inverso',
'L_SORT_RANDOM' => 'aleatório',
'L_OK' => 'Ok',
'L_YES' => 'Sim',
diff --git a/core/lang/ro/admin.php b/core/lang/ro/admin.php
index 31893ba7c..94e8504eb 100644
--- a/core/lang/ro/admin.php
+++ b/core/lang/ro/admin.php
@@ -282,6 +282,7 @@
'L_SORT_ASCENDING_DATE' => 'data crescator',
'L_SORT_DESCENDING_DATE' => 'descendentă Data',
'L_SORT_ALPHABETICAL' => 'alfabetic',
+'L_SORT_REVERSE_ALPHABETICAL' => 'inversă alfabetică',
'L_SORT_RANDOM' => 'aleatoriu',
'L_OK' => 'Ok',
'L_YES' => 'Da',
diff --git a/core/lang/ru/admin.php b/core/lang/ru/admin.php
index 79a90d8b4..c1b9c9c4c 100644
--- a/core/lang/ru/admin.php
+++ b/core/lang/ru/admin.php
@@ -155,6 +155,7 @@
'L_SORT_ASCENDING_DATE' => 'Дата по возрастанию',
'L_SORT_DESCENDING_DATE' => 'Дата по убыванию',
'L_SORT_ALPHABETICAL' => 'В алфавитном порядке',
+'L_SORT_REVERSE_ALPHABETICAL' => 'обратный алфавитный',
'L_SORT_RANDOM' => 'алеаторный',
'L_YES' => 'Да',
'L_NO' => 'Нет',
diff --git a/core/lib/class.plx.glob.php b/core/lib/class.plx.glob.php
index dfe107ceb..0a72197bf 100644
--- a/core/lib/class.plx.glob.php
+++ b/core/lib/class.plx.glob.php
@@ -227,5 +227,5 @@ public function query($motif,$type='',$tri='',$depart='0',$limite=false,$publi='
return false;
}
-}
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.motor.php b/core/lib/class.plx.motor.php
index 674ae120f..cd2f4eca6 100644
--- a/core/lib/class.plx.motor.php
+++ b/core/lib/class.plx.motor.php
@@ -1,1118 +1,1118 @@
-getConfiguration($filename);
- # rcupration des paramtres dans l'url
- $this->get = plxUtils::getGets();
- # gestion du timezone
- date_default_timezone_set($this->aConf['timezone']);
- # On vrifie s'il faut faire une mise jour
- if((!isset($this->aConf['version']) OR PLX_VERSION!=$this->aConf['version']) AND !defined('PLX_UPDATER')) {
- header('Location: '.PLX_ROOT.'update/index.php');
- exit;
- }
- # Chargement des variables
- $this->style = $this->aConf['style'];
- $this->racine = $this->aConf['racine'];
- $this->bypage = $this->aConf['bypage'];
- $this->tri = $this->aConf['tri'];
- $this->tri_coms = $this->aConf['tri_coms'];
- # On rcupre le chemin de l'url
- $var = parse_url($this->racine);
- $this->path_url = str_replace(ltrim($var['path'], '\/'), '', ltrim($_SERVER['REQUEST_URI'], '\/'));
- # Traitement des plugins
- # Dtermination du fichier de langue (nb: la langue peut tre modifie par plugins via $_SESSION['lang'])
- $context = defined('PLX_ADMIN') ? 'admin_lang' : 'lang';
- $lang = isset($_SESSION[$context]) ? $_SESSION[$context] : $this->aConf['default_lang'];
- #--
- $this->plxPlugins = new plxPlugins($lang);
- $this->plxPlugins->loadPlugins();
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorConstructLoadPlugins'));
- # Traitement sur les rpertoires des articles et des commentaires
- $this->plxGlob_arts = plxGlob::getInstance(PLX_ROOT.$this->aConf['racine_articles'],false,true,'arts');
- $this->plxGlob_coms = plxGlob::getInstance(PLX_ROOT.$this->aConf['racine_commentaires']);
- # Rcupration des donnes dans les autres fichiers xml
- $this->getCategories(path('XMLFILE_CATEGORIES'));
- $this->getStatiques(path('XMLFILE_STATICS'));
- $this->getTags(path('XMLFILE_TAGS'));
- $this->getUsers(path('XMLFILE_USERS'));
- # Rcuperation des articles appartenant aux catgories actives
- $this->getActiveArts();
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorConstruct'));
- }
-
- /**
- * Mthode qui effectue une analyse de la situation et dtermine
- * le mode appliquer. Cette mthode alimente ensuite les variables
- * de classe adquates
- *
- * @return null
- * @author Anthony GURIN, Florent MONTHEL, Stphane F
- **/
- public function prechauffage() {
-
- # Hook plugins
- if(eval($this->plxPlugins->callHook('plxMotorPreChauffageBegin'))) return;
-
- if(!$this->get AND $this->aConf['homestatic']!='' AND isset($this->aStats[$this->aConf['homestatic']]) AND $this->aStats[$this->aConf['homestatic']]['active']) {
- $this->mode = 'static'; # Mode static
- $this->cible = $this->aConf['homestatic'];
- $this->template = $this->aStats[ $this->cible ]['template'];
- }
- elseif(!$this->get OR preg_match('/^(blog|blog\/page[0-9]*|\/?page[0-9]*)$/',$this->get)) {
- $this->mode = 'home';
- $this->template = $this->aConf['hometemplate'];
- $this->bypage = $this->aConf['bypage']; # Nombre d'article par page
- # On regarde si on a des articles en mode "home"
- if($this->plxGlob_arts->query('/^[0-9]{4}.(home[0-9,]*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/')) {
- $this->motif = '/^[0-9]{4}.(home[0-9,]*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
- } else { # Sinon on recupere tous les articles
- $this->motif = '/^[0-9]{4}.(?:[0-9]|,)*(?:'.$this->homepageCats.')(?:[0-9]|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
- }
- }
- elseif($this->get AND preg_match('/^article([0-9]+)\/?([a-z0-9-]+)?/',$this->get,$capture)) {
- $this->mode = 'article'; # Mode article
- $this->template = 'article.php';
- $this->cible = str_pad($capture[1],4,'0',STR_PAD_LEFT); # On complete sur 4 caracteres
- $this->motif = '/^'.$this->cible.'.((?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/'; # Motif de recherche
- if($this->getArticles()) {
- # Redirection 301
- if(!isset($capture[2]) OR $this->plxRecord_arts->f('url')!=$capture[2]) {
- $this->redir301($this->urlRewrite('?article'.intval($this->cible).'/'.$this->plxRecord_arts->f('url')));
- }
- } else {
- $this->error404(L_UNKNOWN_ARTICLE);
- }
- }
- elseif($this->get AND preg_match('/^static([0-9]+)\/?([a-z0-9-]+)?/',$this->get,$capture)) {
- $this->cible = str_pad($capture[1],3,'0',STR_PAD_LEFT); # On complte sur 3 caractres
- if(!isset($this->aStats[$this->cible]) OR !$this->aStats[$this->cible]['active']) {
- $this->error404(L_UNKNOWN_STATIC);
- } else {
- if(!empty($this->aConf['homestatic']) AND $capture[1]){
- if($this->aConf['homestatic']==$this->cible){
- $this->redir301($this->urlRewrite());
- }
- }
- if($this->aStats[$this->cible]['url']==$capture[2]) {
- $this->mode = 'static'; # Mode static
- $this->template = $this->aStats[$this->cible]['template'];
- } else {
- $this->redir301($this->urlRewrite('?static'.intval($this->cible).'/'.$this->aStats[$this->cible]['url']));
- }
- }
- }
- elseif($this->get AND preg_match('/^categorie([0-9]+)\/?([a-z0-9-]+)?/',$this->get,$capture)) {
- $this->cible = str_pad($capture[1],3,'0',STR_PAD_LEFT); # On complete sur 3 caracteres
- if(!empty($this->aCats[$this->cible]) AND $this->aCats[$this->cible]['active'] AND $this->aCats[$this->cible]['url']==$capture[2]) {
- $this->mode = 'categorie'; # Mode categorie
- $this->motif = '/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->cible.')(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/'; # Motif de recherche
- $this->template = $this->aCats[$this->cible]['template'];
- $this->tri = $this->aCats[$this->cible]['tri']; # Recuperation du tri des articles
- $this->bypage = $this->aCats[$this->cible]['bypage'] > 0 ? $this->aCats[$this->cible]['bypage'] : $this->bypage;
- }
- elseif(isset($this->aCats[$this->cible])) { # Redirection 301
- if($this->aCats[$this->cible]['url']!=$capture[2]) {
- $this->redir301($this->urlRewrite('?categorie'.intval($this->cible).'/'.$this->aCats[$this->cible]['url']));
- }
- } else {
- $this->error404(L_UNKNOWN_CATEGORY);
- }
- }
- elseif($this->get AND preg_match('/^archives\/([0-9]{4})[\/]?([0-9]{2})?[\/]?([0-9]{2})?/',$this->get,$capture)) {
- $this->mode = 'archives';
- $this->template = 'archives.php';
- $this->bypage = $this->aConf['bypage_archives'];
- $this->cible = $search = $capture[1];
- if(!empty($capture[2])) $this->cible = ($search .= $capture[2]);
- else $search .= '[0-9]{2}';
- if(!empty($capture[3])) $search .= $capture[3];
- else $search .= '[0-9]{2}';
- $this->motif = '/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.'.$search.'[0-9]{4}.[a-z0-9-]+.xml$/';
- }
- elseif($this->get AND preg_match('/^tag\/([a-z0-9-]+)/',$this->get,$capture)) {
- $this->cible = $capture[1];
- $ids = array();
- $datetime = date('YmdHi');
- foreach($this->aTags as $idart => $tag) {
- if($tag['date']<=$datetime) {
- $tags = array_map("trim", explode(',', $tag['tags']));
- $tagUrls = array_map(array('plxUtils', 'title2url'), $tags);
- if(in_array($this->cible, $tagUrls)) {
- if(!isset($ids[$idart])) $ids[$idart] = $idart;
- if(!isset($this->cibleName)) {
- $key = array_search($this->cible, $tagUrls);
- $this->cibleName=$tags[$key];
- }
- }
- }
- }
- if(sizeof($ids)>0) {
- $this->mode = 'tags'; # Affichage en mode home
- $this->template = 'tags.php';
- $this->motif = '/('.implode('|', $ids).').(?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
- $this->bypage = $this->aConf['bypage_tags']; # Nombre d'article par page
- } else {
- $this->error404(L_ARTICLE_NO_TAG);
- }
- }
- elseif($this->get AND preg_match('/^preview\/?/',$this->get) AND isset($_SESSION['preview'])) {
- $this->mode = 'preview';
- }
- elseif($this->get AND preg_match('/^(telechargement|download)\/(.+)$/',$this->get,$capture)) {
- if($this->sendTelechargement($capture[2])) {
- $this->mode = 'telechargement'; # Mode telechargement
- $this->cible = $capture[2];
- } else {
- $this->error404(L_DOCUMENT_NOT_FOUND);
- }
- }
- else {
- $this->error404(L_ERR_PAGE_NOT_FOUND);
- }
-
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorPreChauffageEnd'));
- }
-
- /**
- * Mthode qui fait une redirection de type 301
- *
- * @return null
- * @author Stephane F
- **/
- public function redir301($url) {
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorRedir301'));
- # Redirection 301
- header('Status: 301 Moved Permanently', false, 301);
- header('Location: '.$url);
- exit();
- }
-
- /**
- * Mthode qui retourne une erreur 404 Document non trouv
- *
- * @return null
- * @author Stephane F
- **/
- public function error404($msg) {
- header("Status: 404 Not Found");
- header("HTTP/1.0 404 Not Found");
- $this->plxErreur = new plxErreur($msg);
- $this->mode = 'erreur';
- $this->template = 'erreur.php';
- }
-
- /**
- * Mthode qui effectue le traitement selon le mode du moteur
- *
- * @return null
- * @author Florent MONTHEL, Stephane F
- **/
- public function demarrage() {
-
- # Hook plugins
- if(eval($this->plxPlugins->callHook('plxMotorDemarrageBegin'))) return;
-
- if($this->mode == 'home' OR $this->mode == 'categorie' OR $this->mode == 'archives' OR $this->mode == 'tags') {
- $this->getPage(); # Recuperation du numro de la page courante
- if(!$this->getArticles()) { # Si aucun article
- $this->error404(L_NO_ARTICLE_PAGE);
- }
- }
- elseif($this->mode == 'article') {
-
- # On a valid le formulaire commentaire
- if(!empty($_POST) AND $this->plxRecord_arts->f('allow_com') AND $this->aConf['allow_com']) {
- # On rcupre le retour de la cration
- $retour = $this->newCommentaire($this->cible,plxUtils::unSlash($_POST));
- # Url de l'article
- $url = $this->urlRewrite('?article'.intval($this->plxRecord_arts->f('numero')).'/'.$this->plxRecord_arts->f('url'));
- eval($this->plxPlugins->callHook('plxMotorDemarrageNewCommentaire'));
- if($retour[0] == 'c') { # Le commentaire a t publi
- header('Location: '.$url.'#'.$retour);
- } elseif($retour == 'mod') { # Le commentaire est en modration
- $_SESSION['msgcom'] = L_COM_IN_MODERATION;
- header('Location: '.$url.'#form');
- } else {
- $_SESSION['msgcom'] = $retour;
- $_SESSION['msg']['name'] = plxUtils::unSlash($_POST['name']);
- $_SESSION['msg']['site'] = plxUtils::unSlash($_POST['site']);
- $_SESSION['msg']['mail'] = plxUtils::unSlash($_POST['mail']);
- $_SESSION['msg']['content'] = plxUtils::unSlash($_POST['content']);
- $_SESSION['msg']['parent'] = plxUtils::unSlash($_POST['parent']);
- eval($this->plxPlugins->callHook('plxMotorDemarrageCommentSessionMessage'));
- header('Location: '.$url.'#form');
- }
- exit;
- }
- # Rcupration des commentaires
- $this->getCommentaires('/^'.$this->cible.'.[0-9]{10}-[0-9]+.xml$/',$this->tri_coms);
- $this->template=$this->plxRecord_arts->f('template');
- if($this->aConf['capcha']) $this->plxCapcha = new plxCapcha(); # Cration objet captcha
- }
- elseif($this->mode == 'preview') {
- $this->mode='article';
- $this->plxRecord_arts = new plxRecord($_SESSION['preview']);
- $this->template=$this->plxRecord_arts->f('template');
- if($this->aConf['capcha']) $this->plxCapcha = new plxCapcha(); # Cration objet captcha
- }
-
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorDemarrageEnd'));
- }
-
- /**
- * Mthode qui parse le fichier de configuration et alimente
- * le tableau aConf
- *
- * @param filename emplacement du fichier XML de configuration
- * @return null
- * @author Anthony GURIN, Florent MONTHEL, Stphane F
- **/
- public function getConfiguration($filename) {
-
- # Mise en place du parseur XML
- $data = implode('',file($filename));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- # On verifie qu'il existe des tags "parametre"
- if(isset($iTags['parametre'])) {
- # On compte le nombre de tags "parametre"
- $nb = sizeof($iTags['parametre']);
- # On boucle sur $nb
- for($i = 0; $i < $nb; $i++) {
- if(isset($values[ $iTags['parametre'][$i] ]['value'])) # On a une valeur pour ce parametre
- $this->aConf[ $values[ $iTags['parametre'][$i] ]['attributes']['name'] ] = $values[ $iTags['parametre'][$i] ]['value'];
- else # On n'a pas de valeur
- $this->aConf[ $values[ $iTags['parametre'][$i] ]['attributes']['name'] ] = '';
- }
- }
- # dtermination automatique de la racine du site
- $this->aConf['racine'] = plxUtils::getRacine();
- # On gre la non rgression en cas d'ajout de paramtres sur une version de pluxml dj installe
- $this->aConf['bypage_admin'] = plxUtils::getValue($this->aConf['bypage_admin'],10);
- $this->aConf['tri_coms'] = plxUtils::getValue($this->aConf['tri_coms'],$this->aConf['tri']);
- $this->aConf['bypage_admin_coms'] = plxUtils::getValue($this->aConf['bypage_admin_coms'],10);
- $this->aConf['bypage_archives'] = plxUtils::getValue($this->aConf['bypage_archives'],5);
- $this->aConf['bypage_tags'] = plxUtils::getValue($this->aConf['bypage_tags'],5);
- $this->aConf['userfolders'] = plxUtils::getValue($this->aConf['userfolders'],0);
- $this->aConf['meta_description'] = plxUtils::getValue($this->aConf['meta_description']);
- $this->aConf['meta_keywords'] = plxUtils::getValue($this->aConf['meta_keywords']);
- $this->aConf['default_lang'] = plxUtils::getValue($this->aConf['default_lang'],DEFAULT_LANG);
- $this->aConf['racine_plugins'] = plxUtils::getValue($this->aConf['racine_plugins'], 'plugins/');
- $this->aConf['racine_themes'] = plxUtils::getValue($this->aConf['racine_themes'], 'themes/');
- $this->aConf['mod_art'] = plxUtils::getValue($this->aConf['mod_art'],0);
- $this->aConf['display_empty_cat'] = plxUtils::getValue($this->aConf['display_empty_cat'],0);
- $this->aConf['timezone'] = plxUtils::getValue($this->aConf['timezone'],@date_default_timezone_get());
- $this->aConf['thumbs'] = isset($this->aConf['thumbs']) ? $this->aConf['thumbs'] : 1;
- $this->aConf['hometemplate'] = isset($this->aConf['hometemplate']) ? $this->aConf['hometemplate'] : 'home.php';
- $this->aConf['custom_admincss_file'] = plxUtils::getValue($this->aConf['custom_admincss_file']);
- $this->aConf['medias'] = isset($this->aConf['medias']) ? $this->aConf['medias'] : 'data/images/';
- if(!defined('PLX_PLUGINS')) define('PLX_PLUGINS', PLX_ROOT.$this->aConf['racine_plugins']);
-
- }
-
- /**
- * Mthode qui parse le fichier des catgories et alimente
- * le tableau aCats
- *
- * @param filename emplacement du fichier XML des catgories
- * @return null
- * @author Stphane F
- **/
- public function getCategories($filename) {
-
- if(!is_file($filename)) return;
-
- $activeCats = array();
- $homepageCats = array();
-
- # Mise en place du parseur XML
- $data = implode('',file($filename));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- if(isset($iTags['categorie']) AND isset($iTags['name'])) {
- $nb = sizeof($iTags['name']);
- $size=ceil(sizeof($iTags['categorie'])/$nb);
- for($i=0;$i<$nb;$i++) {
- $attributes = $values[$iTags['categorie'][$i*$size]]['attributes'];
- $number = $attributes['number'];
- # Recuperation du nom de la catgorie
- $this->aCats[$number]['name']=plxUtils::getValue($values[$iTags['name'][$i]]['value']);
- # Recuperation du nom de la description
- $this->aCats[$number]['description']=plxUtils::getValue($values[$iTags['description'][$i]]['value']);
- # Recuperation de la balise title
- $title_htmltag = plxUtils::getValue($iTags['title_htmltag'][$i]);
- $this->aCats[$number]['title_htmltag']=plxUtils::getValue($values[$title_htmltag]['value']);
- # Recuperation du meta description
- $meta_description = plxUtils::getValue($iTags['meta_description'][$i]);
- $this->aCats[$number]['meta_description']=plxUtils::getValue($values[$meta_description]['value']);
- # Recuperation du meta keywords
- $meta_keywords = plxUtils::getValue($iTags['meta_keywords'][$i]);
- $this->aCats[$number]['meta_keywords']=plxUtils::getValue($values[$meta_keywords]['value']);
- # Recuperation de l'url de la categorie
- $this->aCats[$number]['url']=strtolower($attributes['url']);
- # Recuperation du tri de la categorie si besoin est
- $this->aCats[$number]['tri']=isset($attributes['tri'])?$attributes['tri']:$this->aConf['tri'];
- # Recuperation du nb d'articles par page de la categorie si besoin est
- $this->aCats[$number]['bypage']=isset($attributes['bypage'])?$attributes['bypage']:$this->bypage;
- # Recuperation du fichier template
- $this->aCats[$number]['template']=isset($attributes['template'])?$attributes['template']:'categorie.php';
- # Rcuperation tat affichage de la catgorie dans le menu
- $this->aCats[$number]['menu']=isset($attributes['menu'])?$attributes['menu']:'oui';
- # Rcuperation tat activation de la catgorie dans le menu
- $this->aCats[$number]['active']=isset($attributes['active'])?$attributes['active']:'1';
- if($this->aCats[$number]['active']) $activeCats[]=$number;
- # Recuperation affichage en page d'accueil
- $this->aCats[$number]['homepage'] = isset($attributes['homepage']) ? $attributes['homepage'] : 1;
- $this->aCats[$number]['homepage'] = in_array($this->aCats[$number]['homepage'],array('0','1')) ? $this->aCats[$number]['homepage'] : 1;
- if($this->aCats[$number]['active'] AND $this->aCats[$number]['homepage']) $homepageCats[]=$number;
- # Recuperation du nombre d'article de la categorie
- $motif = '/^[0-9]{4}.[home,|0-9,]*'.$number.'[0-9,]*.[0-9]{3}.[0-9]{12}.[A-Za-z0-9-]+.xml$/';
- $arts = $this->plxGlob_arts->query($motif,'art','',0,false,'before');
- $this->aCats[$number]['articles'] = ($arts?sizeof($arts):0);
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorGetCategories'));
- }
- }
- $homepageCats [] = '000'; # on rajoute la catgorie 'Non classe'
- $activeCats[] = '000'; # on rajoute la catgorie 'Non classe'
- $this->homepageCats = implode('|', $homepageCats);
- $this->activeCats = implode('|', $activeCats);
- }
-
- /**
- * Mthode qui parse le fichier des pages statiques et alimente
- * le tableau aStats
- *
- * @param filename emplacement du fichier XML des pages statiques
- * @return null
- * @author Stphane F
- **/
- public function getStatiques($filename) {
-
- if(!is_file($filename)) return;
-
- # Mise en place du parseur XML
- $data = implode('',file($filename));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- if(isset($iTags['statique']) AND isset($iTags['name'])) {
- $nb = sizeof($iTags['name']);
- $size=ceil(sizeof($iTags['statique'])/$nb);
- for($i=0;$i<$nb;$i++) {
- $attributes = $values[$iTags['statique'][$i*$size]]['attributes'];
- $number = $attributes['number'];
- # Rcupration du nom de la page statique
- $this->aStats[$number]['name']=plxUtils::getValue($values[$iTags['name'][$i]]['value']);
- # Rcupration de la balise title
- $title_htmltag = plxUtils::getValue($iTags['title_htmltag'][$i]);
- $this->aStats[$number]['title_htmltag']=plxUtils::getValue($values[$title_htmltag]['value']);
- # Rcupration du meta description
- $meta_description = plxUtils::getValue($iTags['meta_description'][$i]);
- $this->aStats[$number]['meta_description']=plxUtils::getValue($values[$meta_description]['value']);
- # Rcupration du meta keywords
- $meta_keywords = plxUtils::getValue($iTags['meta_keywords'][$i]);
- $this->aStats[$number]['meta_keywords']=plxUtils::getValue($values[$meta_keywords]['value']);
- # Rcupration du groupe de la page statique
- $this->aStats[$number]['group']=plxUtils::getValue($values[$iTags['group'][$i]]['value']);
- # Rcupration de l'url de la page statique
- $this->aStats[$number]['url']=strtolower($attributes['url']);
- # Rcupration de l'etat de la page
- $this->aStats[$number]['active']=intval($attributes['active']);
- # On affiche la page statique dans le menu ?
- $this->aStats[$number]['menu']=isset($attributes['menu'])?$attributes['menu']:'oui';
- # Rcupration du fichier template
- $this->aStats[$number]['template']=isset($attributes['template'])?$attributes['template']:'static.php';
- # Rcupration de la date de cration
- $date_creation = plxUtils::getValue($iTags['date_creation'][$i]);
- $this->aStats[$number]['date_creation']=plxUtils::getValue($values[$date_creation]['value']);
- # Rcupration de la date de mise jour
- $date_update = plxUtils::getValue($iTags['date_update'][$i]);
- $this->aStats[$number]['date_update']=plxUtils::getValue($values[$date_update]['value']);
- # On verifie que la page statique existe bien
- $file = PLX_ROOT.$this->aConf['racine_statiques'].$number.'.'.$attributes['url'].'.php';
- # On test si le fichier est lisible
- $this->aStats[$number]['readable'] = (is_readable($file) ? 1 : 0);
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorGetStatiques'));
- }
- }
- }
-
- /**
- * Mthode qui parse le fichier des utilisateurs
- *
- * @param filename emplacement du fichier XML des passwd
- * @return array tableau des utilisateurs
- * @author Stephane F
- **/
- public function getUsers($filename) {
-
- if(!is_file($filename)) return;
-
- # Mise en place du parseur XML
- $data = implode('',file($filename));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- if(isset($iTags['user']) AND isset($iTags['login'])) {
- $nb = sizeof($iTags['login']);
- $size=ceil(sizeof($iTags['user'])/$nb);
- # On boucle sur $nb
- for($i = 0; $i < $nb; $i++) {
- $attributes = $values[$iTags['user'][$i*$size]]['attributes'];
- $number = $attributes['number'];
- $this->aUsers[$number]['active']=$attributes['active'];
- $this->aUsers[$number]['delete']=$attributes['delete'];
- $this->aUsers[$number]['profil']=$attributes['profil'];
- $this->aUsers[$number]['login']=plxUtils::getValue($values[$iTags['login'][$i]]['value']);
- $this->aUsers[$number]['name']=plxUtils::getValue($values[$iTags['name'][$i]]['value']);
- $this->aUsers[$number]['password']=plxUtils::getValue($values[$iTags['password'][$i] ]['value']);
- $salt = plxUtils::getValue($iTags['salt'][$i]);
- $this->aUsers[$number]['salt']=plxUtils::getValue($values[$salt]['value']);
- $this->aUsers[$number]['infos']=plxUtils::getValue($values[$iTags['infos'][$i]]['value']);
- $email = plxUtils::getValue($iTags['email'][$i]);
- $this->aUsers[$number]['email']=plxUtils::getValue($values[$email]['value']);
- $lang = isset($iTags['lang'][$i]) ? $values[$iTags['lang'][$i]]['value']:'';
- $this->aUsers[$number]['lang'] = $lang!='' ? $lang : $this->aConf['default_lang'];
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorGetUsers'));
- }
- }
- }
-
- /**
- * Mthode qui selon le paramtre tri retourne sort ou rsort (tri PHP)
- *
- * @param tri asc ou desc
- * @return string
- * @author Stphane F.
- **/
- protected function mapTri($tri) { /* obsolete ! 2017-12-03 */
-
- if($tri=='desc')
- return 'rsort';
- elseif($tri=='asc')
- return 'sort';
- elseif($tri=='alpha')
- return 'alpha';
- elseif($tri=='ralpha')
- return 'ralpha';
- elseif($tri=='random')
- return 'random';
- else
- return 'rsort';
-
- }
-
- /**
- * Mthode qui rcupre le numro de la page active
- *
- * @return null
- * @author Anthony GURIN, Florent MONTHEL, Stephane F
- **/
- protected function getPage() {
-
- # On check pour avoir le numero de page
- if(preg_match('/page([0-9]*)/',$this->get,$capture))
- $this->page = $capture[1];
- else
- $this->page = 1;
- }
-
- /**
- * Mthode qui rcupere la liste des articles
- *
- * @param publi before, after ou all => on rcupre tous les fichiers (date) ?
- * @return boolean vrai si articles trouvs, sinon faux
- * @author Stphane F
- **/
- public function getArticles($publi='before') {
-
- # On calcule la valeur start
- $start = $this->bypage*($this->page-1);
- # On recupere nos fichiers (tries) selon le motif, la pagination, la date de publication
- if($aFiles = $this->plxGlob_arts->query($this->motif,'art',$this->tri,$start,$this->bypage,$publi)) {
- # on mmorise le nombre total d'articles trouvs
- foreach($aFiles as $k=>$v) # On parcourt tous les fichiers
- $array[$k] = $this->parseArticle(PLX_ROOT.$this->aConf['racine_articles'].$v);
- # On stocke les enregistrements dans un objet plxRecord
- $this->plxRecord_arts = new plxRecord($array);
- return true;
- }
- else return false;
- }
-
- /**
- * Mthode qui retourne les informations $output en analysant
- * le nom du fichier de l'article $filename
- *
- * @param filename fichier de l'article traiter
- * @return array information rcuprer
- * @author Stephane F
- **/
- public function artInfoFromFilename($filename) {
-
- # On effectue notre capture d'informations
- if(preg_match('/(_?[0-9]{4}).([0-9,|home|draft]*).([0-9]{3}).([0-9]{12}).([a-z0-9-]+).xml$/',$filename,$capture)) {
- return array(
- 'artId' => $capture[1],
- 'catId' => $capture[2],
- 'usrId' => $capture[3],
- 'artDate' => $capture[4],
- 'artUrl' => $capture[5]
- );
- }
- }
-
- /**
- * Mthode qui parse l'article du fichier $filename
- *
- * @param filename fichier de l'article parser
- * @return array
- * @author Anthony GURIN, Florent MONTHEL, Stphane F
- **/
- public function parseArticle($filename) {
-
- # Mise en place du parseur XML
- $data = implode('',file($filename));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- # Recuperation des valeurs de nos champs XML
- $art['title'] = plxUtils::getValue($values[$iTags['title'][0]]['value']);
- $art['allow_com'] = plxUtils::getValue($values[$iTags['allow_com'][0]]['value']);
- $art['template'] = plxUtils::getValue($values[$iTags['template'][0]]['value'],'article.php');
- $art['chapo'] = plxUtils::getValue($values[$iTags['chapo'][0]]['value']);
- $art['content'] = plxUtils::getValue($values[$iTags['content'][0]]['value']);
- $art['tags'] = plxUtils::getValue($values[ $iTags['tags'][0] ]['value']);
- $meta_description = plxUtils::getValue($iTags['meta_description'][0]);
- $art['meta_description'] = plxUtils::getValue($values[$meta_description]['value']);
- $meta_keywords = plxUtils::getValue($iTags['meta_keywords'][0]);
- $art['meta_keywords'] = plxUtils::getValue($values[$meta_keywords]['value']);
- $art['title_htmltag'] = isset($iTags['title_htmltag']) ? plxUtils::getValue($values[$iTags['title_htmltag'][0]]['value']) : '';
- $art['thumbnail'] = isset($iTags['thumbnail']) ? plxUtils::getValue($values[$iTags['thumbnail'][0]]['value']) : '';
- $art['thumbnail_title'] = isset($iTags['thumbnail_title']) ? plxUtils::getValue($values[$iTags['thumbnail_title'][0]]['value']) : '';
- $art['thumbnail_alt'] = isset($iTags['thumbnail_alt']) ? plxUtils::getValue($values[$iTags['thumbnail_alt'][0]]['value']) : '';
- # Informations obtenues en analysant le nom du fichier
- $art['filename'] = $filename;
- $tmp = $this->artInfoFromFilename($filename);
- $art['numero'] = $tmp['artId'];
- $art['author'] = $tmp['usrId'];
- $art['categorie'] = $tmp['catId'];
- $art['url'] = $tmp['artUrl'];
- $art['date'] = $tmp['artDate'];
- $art['nb_com'] = $this->getNbCommentaires('/^'.$art['numero'].'.[0-9]{10}.[0-9]+.xml$/');
- $art['date_creation'] = isset($iTags['date_creation']) ? plxUtils::getValue($values[$iTags['date_creation'][0]]['value']) : $art['date'];
- $art['date_update'] = isset($iTags['date_update']) ? plxUtils::getValue($values[$iTags['date_update'][0]]['value']) : $art['date'];
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorParseArticle'));
- # On retourne le tableau
- return $art;
- }
-
- /**
- * Mthode qui retourne le nombre de commentaires respectants le motif $motif et le paramtre $publi
- *
- * @param motif motif de recherche des commentaires
- * @param publi before, after ou all => on rcupre tous les fichiers (date) ?
- * @return integer
- * @author Florent MONTHEL
- **/
- public function getNbCommentaires($motif,$publi='before') {
-
- if($coms = $this->plxGlob_coms->query($motif,'com','sort',0,false,$publi))
- return sizeof($coms);
- else
- return 0;
- }
-
- /**
- * Mthode qui retourne les informations $output en analysant
- * le nom du fichier du commentaire $filename
- *
- * @param filename fichier du commentaire traiter
- * @return array information rcuprer
- * @author Stephane F
- **/
- public function comInfoFromFilename($filename) {
- # On effectue notre capture d'informations
- if(preg_match('/([[:punct:]]?)([0-9]{4}).([0-9]{10})-([0-9]+).xml$/',$filename,$capture)) {
- return array(
- 'comStatus' => $capture[1],
- 'artId' => $capture[2],
- 'comDate' => plxDate::timestamp2Date($capture[3]),
- 'comId' => $capture[3].'-'.$capture[4],
- 'comIdx' => $capture[4],
-
- );
- }
- return false;
- }
-
- /**
- * Mthode qui parse le commentaire du fichier $filename
- *
- * @param filename fichier du commentaire parser
- * @return array
- * @author Florent MONTHEL
- **/
- public function parseCommentaire($filename) {
-
- # Mise en place du parseur XML
- $data = implode('',file($filename));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- # Recuperation des valeurs de nos champs XML
- $com['author'] = plxUtils::getValue($values[ $iTags['author'][0]]['value']);
- if(isset($iTags['type']))
- $com['type'] = plxUtils::getValue($values[ $iTags['type'][0]]['value'],'normal');
- else
- $com['type'] = 'normal';
- $com['ip'] = plxUtils::getValue($values[$iTags['ip'][0]]['value']);
- $com['mail'] = plxUtils::getValue($values[$iTags['mail'][0]]['value']);
- $com['site'] = plxUtils::getValue($values[$iTags['site'][0]]['value']);
- $com['content'] = trim($values[ $iTags['content'][0] ]['value']);
- $com['parent'] = isset($iTags['parent'])?plxUtils::getValue($values[$iTags['parent'][0]]['value']):'';
- # Informations obtenues en analysant le nom du fichier
- $tmp = $this->comInfoFromFilename(basename($filename));
- $com['status'] = $tmp['comStatus'];
- $com['numero'] = $tmp['comId'];
- $com['article'] = $tmp['artId'];
- $com['date'] = $tmp['comDate'];
- $com['index'] = $tmp['comIdx'];
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorParseCommentaire'));
- # On retourne le tableau
- return $com;
- }
-
- /**
- * Mthode qui trie rcursivement les commentaires d'un article en fonction des parents
- *
- * @return array liste des commentaires tris
- * @author Stphane F.
- **/
- public function parentChildSort_r($idField, $parentField, $els, $parentID = 0, &$result = array(), &$level = 0){
- foreach ($els as $key => $value) {
- if ($value[$parentField] == $parentID) {
- $value['level'] = $level;
- array_push($result, $value);
- unset($els[$key]);
- $oldParent = $parentID;
- $parentID = $value[$idField];
- $level++;
- $this->parentChildSort_r($idField,$parentField, $els, $parentID, $result, $level);
- $parentID = $oldParent;
- $level--;
- }
- }
- return $result;
- }
-
- /**
- * Mthode qui enregistre dans un objet plxRecord tous les commentaires
- * respectant le motif $motif et la limite $limite
- *
- * @param motif motif de recherche des commentaires
- * @param ordre ordre du tri : sort ou rsort
- * @param start commencement
- * @param limite nombre de commentaires retourner
- * @param publi before, after ou all => on rcupre tous les fichiers (date) ?
- * @return null
- * @author Florent MONTHEL, Stephane F
- **/
- public function getCommentaires($motif,$ordre='sort',$start=0,$limite=false,$publi='before') {
-
- # On rcupre les fichiers des commentaires
- $aFiles = $this->plxGlob_coms->query($motif,'com',$ordre,$start,$limite,$publi);
- if($aFiles) { # On a des fichiers
- foreach($aFiles as $k=>$v)
- $array[$k] = $this->parseCommentaire(PLX_ROOT.$this->aConf['racine_commentaires'].$v);
-
- # hirarchisation et indentation des commentaires seulement sur les crans requis
- if( !(defined('PLX_ADMIN') OR defined('PLX_FEED')) OR preg_match('/comment_new/',basename($_SERVER['SCRIPT_NAME']))) {
- $array = $this->parentChildSort_r('index', 'parent', $array);
- }
-
- # On stocke les enregistrements dans un objet plxRecord
- $this->plxRecord_coms = new plxRecord($array);
-
- return true;
- }
- else return false;
- }
-
- /**
- * Mthode qui retourne le prochain id d'un commentaire pour un article prcis
- *
- * @param idArt id de l'article
- * @return string id d'un nouveau commentaire
- * @author Stephane F.
- **/
- public function nextIdArtComment($idArt) {
-
- $ret = '0';
- if($dh = opendir(PLX_ROOT.$this->aConf['racine_commentaires'])) {
- $Idxs = array();
- while(false !== ($file = readdir($dh))) {
- if(preg_match("/_?".$idArt.".[0-9]+-([0-9]+).xml/", $file, $capture)) {
- if ($capture[1] > $ret)
- $ret = $capture[1];
- }
- }
- closedir($dh);
- }
- return $ret+1;
- }
-
- /**
- * Mthode qui cre un nouveau commentaire pour l'article $artId
- *
- * @param artId identifiant de l'article en question
- * @param content tableau contenant les valeurs du nouveau commentaire
- * @return string
- * @author Florent MONTHEL, Stphane F
- **/
- public function newCommentaire($artId,$content) {
-
- # Hook plugins
- if(eval($this->plxPlugins->callHook('plxMotorNewCommentaire'))) return;
-
- if(strtolower($_SERVER['REQUEST_METHOD'])!= 'post' OR $this->aConf['capcha'] AND (!isset($_SESSION["capcha_token"]) OR !isset($_POST['capcha_token']) OR ($_SESSION["capcha_token"]!=$_POST['capcha_token']))) {
- return L_NEWCOMMENT_ERR_ANTISPAM;
- }
-
- # On vrifie que le capcha est correct
- if($this->aConf['capcha'] == 0 OR $_SESSION['capcha'] == sha1($content['rep'])) {
- if(!empty($content['name']) AND !empty($content['content'])) { # Les champs obligatoires sont remplis
- $comment=array();
- $comment['type'] = 'normal';
- $comment['author'] = plxUtils::strCheck(trim($content['name']));
- $comment['content'] = plxUtils::strCheck(trim($content['content']));
- # On vrifie le mail
- $comment['mail'] = (plxUtils::checkMail(trim($content['mail'])))?trim($content['mail']):'';
- # On vrifie le site
- $comment['site'] = (plxUtils::checkSite($content['site'])?$content['site']:'');
- # On rcupre l'adresse IP du posteur
- $comment['ip'] = plxUtils::getIp();
- # index du commentaire
- $idx = $this->nextIdArtComment($artId);
- # Commentaire parent en cas de rponse
- if(isset($content['parent']) AND !empty($content['parent'])) {
- $comment['parent'] = intval($content['parent']);
- } else {
- $comment['parent'] = '';
- }
- # On gnre le nom du fichier
- $time = time();
- if($this->aConf['mod_com']) # On modre le commentaire => underscore
- $comment['filename'] = '_'.$artId.'.'.$time.'-'.$idx.'.xml';
- else # On publie le commentaire directement
- $comment['filename'] = $artId.'.'.$time.'-'.$idx.'.xml';
- # On peut crer le commentaire
- if($this->addCommentaire($comment)) { # Commentaire OK
- if($this->aConf['mod_com']) # En cours de modration
- return 'mod';
- else # Commentaire publie directement, on retourne son identifiant
- return 'c'.$artId.'-'.$idx;
- } else { # Erreur lors de la cration du commentaire
- return L_NEWCOMMENT_ERR;
- }
- } else { # Erreur de remplissage des champs obligatoires
- return L_NEWCOMMENT_FIELDS_REQUIRED;
- }
- } else { # Erreur de vrification capcha
- return L_NEWCOMMENT_ERR_ANTISPAM;
- }
- }
-
- /**
- * Mthode qui cre physiquement le fichier XML du commentaire
- *
- * @param comment array avec les donnes du commentaire ajouter
- * @return boolen
- * @author Anthony GURIN, Florent MONTHEL et Stphane F
- **/
- public function addCommentaire($content) {
- # Hook plugins
- if(eval($this->plxPlugins->callHook('plxMotorAddCommentaire'))) return;
- # On genere le contenu de notre fichier XML
- $xml = "\n";
- $xml .= "\n";
- $xml .= "\t \n";
- $xml .= "\t".$content['type']." \n";
- $xml .= "\t".$content['ip']." \n";
- $xml .= "\t \n";
- $xml .= "\t \n";
- $xml .= "\t \n";
- $xml .= "\t \n";
- # Hook plugins
- eval($this->plxPlugins->callHook('plxMotorAddCommentaireXml'));
- $xml .= " \n";
- # On ecrit ce contenu dans notre fichier XML
- return plxUtils::write($xml, PLX_ROOT.$this->aConf['racine_commentaires'].$content['filename']);
- }
-
- /**
- * Mthode qui parse le fichier des tags et alimente
- * le tableau aTags
- *
- * @param filename emplacement du fichier XML contenant les tags
- * @return null
- * @author Stephane F.
- **/
- public function getTags($filename) {
-
- if(!is_file($filename)) return;
-
- # Mise en place du parseur XML
- $data = implode('',file($filename));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- $array = array();
- # On verifie qu'il existe des tags "file"
- if(isset($iTags['article'])) {
- # On compte le nombre de tags "file"
- $nb = sizeof($iTags['article']);
- # On boucle sur $nb
- for($i = 0; $i < $nb; $i++) {
- if(isset($values[ $iTags['article'][$i] ]['value']))
- $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['tags'] = trim($values[ $iTags['article'][$i] ]['value']);
- else
- $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['tags'] = '';
- $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['date'] = $values[ $iTags['article'][$i] ]['attributes']['date'];
- $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['active'] = $values[ $iTags['article'][$i] ]['attributes']['active'];
- }
- }
- # Mmorisation de la liste des tags
- $this->aTags = $array;
- }
-
- /**
- * Mthode qui lance le tlchargement d'un document
- *
- * @param cible cible de tlchargement crypte
- * @return booleen
- * @author Stephane F. et Florent MONTHEL
- **/
- public function sendTelechargement($cible) {
-
- # On dcrypte le nom du fichier
- $file = PLX_ROOT.$this->aConf['medias'].plxEncrypt::decryptId($cible);
- # Hook plugins
- if(eval($this->plxPlugins->callHook('plxMotorSendDownload'))) return;
- # On lance le tlchargement et on check le rpertoire medias
- if(file_exists($file) AND preg_match('#^'.str_replace('\\', '/', realpath(PLX_ROOT.$this->aConf['medias']).'#'), str_replace('\\', '/', realpath($file)))) {
- header('Content-Description: File Transfer');
- header('Content-Type: application/download');
- header('Content-Disposition: attachment; filename='.basename($file));
- header('Content-Transfer-Encoding: binary');
- header('Expires: 0');
- header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
- header('Pragma: no-cache');
- header('Content-Length: '.filesize($file));
- readfile($file);
- exit;
- } else { # On retourne false
- return false;
- }
-
- }
-
- /**
- * Mthode qui rcrit les urls pour supprimer le ?
- *
- * @param url url rcrire
- * @return string url rcrite
- * @author Stphane F
- **/
- public function urlRewrite($url='') {
-
- if($url=='' OR $url=='?') return $this->racine;
-
- preg_match('/^([0-9a-z\_\-\.\/]+)?[\?]?([0-9a-z\_\-\.\/,&=%]+)?[\#]?(.*)$/i', $url, $args);
-
- if($this->aConf['urlrewriting']) {
- $new_url = str_replace('index.php', '', $args[1]);
- $new_url = str_replace('feed.php', 'feed/', $new_url);
- $new_url .= !empty($args[2])?$args[2]:'';
- if(empty($new_url)) $new_url = $this->path_url;
- $new_url .= !empty($args[3])?'#'.$args[3]:'';
- return str_replace('&', '&', $this->racine.$new_url);
- } else {
- if(empty($args[1]) AND !empty($args[2])) $args[1] = 'index.php';
- $new_url = !empty($args[1])?$args[1]:$this->path_url;
- $new_url .= !empty($args[2])?'?'.$args[2]:'';
- $new_url .= !empty($args[3])?'#'.$args[3]:'';
- return str_replace('&', '&', $this->racine.$new_url);
- }
- }
-
- /**
- * Mthode qui comptabilise le nombre d'articles du site.
- *
- * @param select critere de recherche: draft, published, all, n categories spars par un |
- * @param userid filtre sur les articles d'un utilisateur donn
- * @param mod filtre sur les articles en attente de validation
- * @param publi selection en fonciton de la date du jour (all, before, after)
- * @return integer nombre d'articles
- * @scope global
- * @author Stephane F
- **/
- public function nbArticles($select='all', $userId='[0-9]{3}', $mod='_?', $publi='all') {
-
- $nb = 0;
- if($select == 'all')
- $motif = '[home|draft|0-9,]*';
- elseif($select=='published')
- $motif = '[home|0-9,]*';
- elseif($select=='draft')
- $motif = '[\w,]*[draft][\w,]*';
- else
- $motif = $select;
-
- if($arts = $this->plxGlob_arts->query('/^'.$mod.'[0-9]{4}.('.$motif.').'.$userId.'.[0-9]{12}.[a-z0-9-]+.xml$/', 'art', 'sort', 0, false, $publi))
- $nb = sizeof($arts);
-
- return $nb;
- }
-
- /**
- * Mthode qui comptabilise le nombre de commentaires du site
- *
- * @param select critere de recherche des commentaires: all, online, offline
- * @param publi type de slection des commentaires: all, before, after
- * @return integer nombre de commentaires
- * @scope global
- * @author Stephane F
- **/
- public function nbComments($select='online', $publi='all') {
-
- $nb = 0;
- if($select == 'all')
- $motif = '/[^[:punct:]?][0-9]{4}.(.*).xml$/';
- elseif($select=='offline')
- $motif = '/^_[0-9]{4}.(.*).xml$/';
- elseif($select=='online')
- $motif = '/^[0-9]{4}.(.*).xml$/';
- else
- $motif = $select;
-
- if($coms = $this->plxGlob_coms->query($motif,'com','sort',0,false,$publi))
- $nb = sizeof($coms);
-
- return $nb;
- }
-
- /**
- * Mthode qui recherche les articles appartenant aux catgories actives
- *
- * @return null
- * @scope global
- * @author Stphane F.
- **/
- public function getActiveArts() {
- if($this->plxGlob_arts->aFiles) {
- $datetime=date('YmdHi');
- foreach($this->plxGlob_arts->aFiles as $filename) {
- if(preg_match('/^([0-9]{4}).(?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.([0-9]{12}).[a-z0-9-]+.xml$/', $filename, $capture)) {
- if($capture[2]<=$datetime) { # on ne prends que les articles publis
- $this->activeArts[$capture[1]]=1;
- }
- }
- }
- }
- }
-
-}
+getConfiguration($filename);
+ # récupération des paramètres dans l'url
+ $this->get = plxUtils::getGets();
+ # gestion du timezone
+ date_default_timezone_set($this->aConf['timezone']);
+ # On vérifie s'il faut faire une mise à jour
+ if((!isset($this->aConf['version']) OR PLX_VERSION!=$this->aConf['version']) AND !defined('PLX_UPDATER')) {
+ header('Location: '.PLX_ROOT.'update/index.php');
+ exit;
+ }
+ # Chargement des variables
+ $this->style = $this->aConf['style'];
+ $this->racine = $this->aConf['racine'];
+ $this->bypage = $this->aConf['bypage'];
+ $this->tri = $this->aConf['tri'];
+ $this->tri_coms = $this->aConf['tri_coms'];
+ # On récupère le chemin de l'url
+ $var = parse_url($this->racine);
+ $this->path_url = str_replace(ltrim($var['path'], '\/'), '', ltrim($_SERVER['REQUEST_URI'], '\/'));
+ # Traitement des plugins
+ # Détermination du fichier de langue (nb: la langue peut être modifiée par plugins via $_SESSION['lang'])
+ $context = defined('PLX_ADMIN') ? 'admin_lang' : 'lang';
+ $lang = isset($_SESSION[$context]) ? $_SESSION[$context] : $this->aConf['default_lang'];
+ #--
+ $this->plxPlugins = new plxPlugins($lang);
+ $this->plxPlugins->loadPlugins();
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorConstructLoadPlugins'));
+ # Traitement sur les répertoires des articles et des commentaires
+ $this->plxGlob_arts = plxGlob::getInstance(PLX_ROOT.$this->aConf['racine_articles'],false,true,'arts');
+ $this->plxGlob_coms = plxGlob::getInstance(PLX_ROOT.$this->aConf['racine_commentaires']);
+ # Récupération des données dans les autres fichiers xml
+ $this->getCategories(path('XMLFILE_CATEGORIES'));
+ $this->getStatiques(path('XMLFILE_STATICS'));
+ $this->getTags(path('XMLFILE_TAGS'));
+ $this->getUsers(path('XMLFILE_USERS'));
+ # Récuperation des articles appartenant aux catégories actives
+ $this->getActiveArts();
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorConstruct'));
+ }
+
+ /**
+ * Méthode qui effectue une analyse de la situation et détermine
+ * le mode à appliquer. Cette méthode alimente ensuite les variables
+ * de classe adéquates
+ *
+ * @return null
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stéphane F
+ **/
+ public function prechauffage() {
+
+ # Hook plugins
+ if(eval($this->plxPlugins->callHook('plxMotorPreChauffageBegin'))) return;
+
+ if(!$this->get AND $this->aConf['homestatic']!='' AND isset($this->aStats[$this->aConf['homestatic']]) AND $this->aStats[$this->aConf['homestatic']]['active']) {
+ $this->mode = 'static'; # Mode static
+ $this->cible = $this->aConf['homestatic'];
+ $this->template = $this->aStats[ $this->cible ]['template'];
+ }
+ elseif(!$this->get OR preg_match('/^(blog|blog\/page[0-9]*|\/?page[0-9]*)$/',$this->get)) {
+ $this->mode = 'home';
+ $this->template = $this->aConf['hometemplate'];
+ $this->bypage = $this->aConf['bypage']; # Nombre d'article par page
+ # On regarde si on a des articles en mode "home"
+ if($this->plxGlob_arts->query('/^[0-9]{4}.(home[0-9,]*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/')) {
+ $this->motif = '/^[0-9]{4}.(home[0-9,]*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
+ } else { # Sinon on recupere tous les articles
+ $this->motif = '/^[0-9]{4}.(?:[0-9]|,)*(?:'.$this->homepageCats.')(?:[0-9]|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
+ }
+ }
+ elseif($this->get AND preg_match('/^article([0-9]+)\/?([a-z0-9-]+)?/',$this->get,$capture)) {
+ $this->mode = 'article'; # Mode article
+ $this->template = 'article.php';
+ $this->cible = str_pad($capture[1],4,'0',STR_PAD_LEFT); # On complete sur 4 caracteres
+ $this->motif = '/^'.$this->cible.'.((?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/'; # Motif de recherche
+ if($this->getArticles()) {
+ # Redirection 301
+ if(!isset($capture[2]) OR $this->plxRecord_arts->f('url')!=$capture[2]) {
+ $this->redir301($this->urlRewrite('?article'.intval($this->cible).'/'.$this->plxRecord_arts->f('url')));
+ }
+ } else {
+ $this->error404(L_UNKNOWN_ARTICLE);
+ }
+ }
+ elseif($this->get AND preg_match('/^static([0-9]+)\/?([a-z0-9-]+)?/',$this->get,$capture)) {
+ $this->cible = str_pad($capture[1],3,'0',STR_PAD_LEFT); # On complète sur 3 caractères
+ if(!isset($this->aStats[$this->cible]) OR !$this->aStats[$this->cible]['active']) {
+ $this->error404(L_UNKNOWN_STATIC);
+ } else {
+ if(!empty($this->aConf['homestatic']) AND $capture[1]){
+ if($this->aConf['homestatic']==$this->cible){
+ $this->redir301($this->urlRewrite());
+ }
+ }
+ if($this->aStats[$this->cible]['url']==$capture[2]) {
+ $this->mode = 'static'; # Mode static
+ $this->template = $this->aStats[$this->cible]['template'];
+ } else {
+ $this->redir301($this->urlRewrite('?static'.intval($this->cible).'/'.$this->aStats[$this->cible]['url']));
+ }
+ }
+ }
+ elseif($this->get AND preg_match('/^categorie([0-9]+)\/?([a-z0-9-]+)?/',$this->get,$capture)) {
+ $this->cible = str_pad($capture[1],3,'0',STR_PAD_LEFT); # On complete sur 3 caracteres
+ if(!empty($this->aCats[$this->cible]) AND $this->aCats[$this->cible]['active'] AND $this->aCats[$this->cible]['url']==$capture[2]) {
+ $this->mode = 'categorie'; # Mode categorie
+ $this->motif = '/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->cible.')(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/'; # Motif de recherche
+ $this->template = $this->aCats[$this->cible]['template'];
+ $this->tri = $this->aCats[$this->cible]['tri']; # Recuperation du tri des articles
+ $this->bypage = $this->aCats[$this->cible]['bypage'] > 0 ? $this->aCats[$this->cible]['bypage'] : $this->bypage;
+ }
+ elseif(isset($this->aCats[$this->cible])) { # Redirection 301
+ if($this->aCats[$this->cible]['url']!=$capture[2]) {
+ $this->redir301($this->urlRewrite('?categorie'.intval($this->cible).'/'.$this->aCats[$this->cible]['url']));
+ }
+ } else {
+ $this->error404(L_UNKNOWN_CATEGORY);
+ }
+ }
+ elseif($this->get AND preg_match('/^archives\/([0-9]{4})[\/]?([0-9]{2})?[\/]?([0-9]{2})?/',$this->get,$capture)) {
+ $this->mode = 'archives';
+ $this->template = 'archives.php';
+ $this->bypage = $this->aConf['bypage_archives'];
+ $this->cible = $search = $capture[1];
+ if(!empty($capture[2])) $this->cible = ($search .= $capture[2]);
+ else $search .= '[0-9]{2}';
+ if(!empty($capture[3])) $search .= $capture[3];
+ else $search .= '[0-9]{2}';
+ $this->motif = '/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.'.$search.'[0-9]{4}.[a-z0-9-]+.xml$/';
+ }
+ elseif($this->get AND preg_match('/^tag\/([a-z0-9-]+)/',$this->get,$capture)) {
+ $this->cible = $capture[1];
+ $ids = array();
+ $datetime = date('YmdHi');
+ foreach($this->aTags as $idart => $tag) {
+ if($tag['date']<=$datetime) {
+ $tags = array_map("trim", explode(',', $tag['tags']));
+ $tagUrls = array_map(array('plxUtils', 'title2url'), $tags);
+ if(in_array($this->cible, $tagUrls)) {
+ if(!isset($ids[$idart])) $ids[$idart] = $idart;
+ if(!isset($this->cibleName)) {
+ $key = array_search($this->cible, $tagUrls);
+ $this->cibleName=$tags[$key];
+ }
+ }
+ }
+ }
+ if(sizeof($ids)>0) {
+ $this->mode = 'tags'; # Affichage en mode home
+ $this->template = 'tags.php';
+ $this->motif = '/('.implode('|', $ids).').(?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
+ $this->bypage = $this->aConf['bypage_tags']; # Nombre d'article par page
+ } else {
+ $this->error404(L_ARTICLE_NO_TAG);
+ }
+ }
+ elseif($this->get AND preg_match('/^preview\/?/',$this->get) AND isset($_SESSION['preview'])) {
+ $this->mode = 'preview';
+ }
+ elseif($this->get AND preg_match('/^(telechargement|download)\/(.+)$/',$this->get,$capture)) {
+ if($this->sendTelechargement($capture[2])) {
+ $this->mode = 'telechargement'; # Mode telechargement
+ $this->cible = $capture[2];
+ } else {
+ $this->error404(L_DOCUMENT_NOT_FOUND);
+ }
+ }
+ else {
+ $this->error404(L_ERR_PAGE_NOT_FOUND);
+ }
+
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorPreChauffageEnd'));
+ }
+
+ /**
+ * Méthode qui fait une redirection de type 301
+ *
+ * @return null
+ * @author Stephane F
+ **/
+ public function redir301($url) {
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorRedir301'));
+ # Redirection 301
+ header('Status: 301 Moved Permanently', false, 301);
+ header('Location: '.$url);
+ exit();
+ }
+
+ /**
+ * Méthode qui retourne une erreur 404 Document non trouvé
+ *
+ * @return null
+ * @author Stephane F
+ **/
+ public function error404($msg) {
+ header("Status: 404 Not Found");
+ header("HTTP/1.0 404 Not Found");
+ $this->plxErreur = new plxErreur($msg);
+ $this->mode = 'erreur';
+ $this->template = 'erreur.php';
+ }
+
+ /**
+ * Méthode qui effectue le traitement selon le mode du moteur
+ *
+ * @return null
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function demarrage() {
+
+ # Hook plugins
+ if(eval($this->plxPlugins->callHook('plxMotorDemarrageBegin'))) return;
+
+ if($this->mode == 'home' OR $this->mode == 'categorie' OR $this->mode == 'archives' OR $this->mode == 'tags') {
+ $this->getPage(); # Recuperation du numéro de la page courante
+ if(!$this->getArticles()) { # Si aucun article
+ $this->error404(L_NO_ARTICLE_PAGE);
+ }
+ }
+ elseif($this->mode == 'article') {
+
+ # On a validé le formulaire commentaire
+ if(!empty($_POST) AND $this->plxRecord_arts->f('allow_com') AND $this->aConf['allow_com']) {
+ # On récupère le retour de la création
+ $retour = $this->newCommentaire($this->cible,plxUtils::unSlash($_POST));
+ # Url de l'article
+ $url = $this->urlRewrite('?article'.intval($this->plxRecord_arts->f('numero')).'/'.$this->plxRecord_arts->f('url'));
+ eval($this->plxPlugins->callHook('plxMotorDemarrageNewCommentaire'));
+ if($retour[0] == 'c') { # Le commentaire a été publié
+ header('Location: '.$url.'#'.$retour);
+ } elseif($retour == 'mod') { # Le commentaire est en modération
+ $_SESSION['msgcom'] = L_COM_IN_MODERATION;
+ header('Location: '.$url.'#form');
+ } else {
+ $_SESSION['msgcom'] = $retour;
+ $_SESSION['msg']['name'] = plxUtils::unSlash($_POST['name']);
+ $_SESSION['msg']['site'] = plxUtils::unSlash($_POST['site']);
+ $_SESSION['msg']['mail'] = plxUtils::unSlash($_POST['mail']);
+ $_SESSION['msg']['content'] = plxUtils::unSlash($_POST['content']);
+ $_SESSION['msg']['parent'] = plxUtils::unSlash($_POST['parent']);
+ eval($this->plxPlugins->callHook('plxMotorDemarrageCommentSessionMessage'));
+ header('Location: '.$url.'#form');
+ }
+ exit;
+ }
+ # Récupération des commentaires
+ $this->getCommentaires('/^'.$this->cible.'.[0-9]{10}-[0-9]+.xml$/',$this->tri_coms);
+ $this->template=$this->plxRecord_arts->f('template');
+ if($this->aConf['capcha']) $this->plxCapcha = new plxCapcha(); # Création objet captcha
+ }
+ elseif($this->mode == 'preview') {
+ $this->mode='article';
+ $this->plxRecord_arts = new plxRecord($_SESSION['preview']);
+ $this->template=$this->plxRecord_arts->f('template');
+ if($this->aConf['capcha']) $this->plxCapcha = new plxCapcha(); # Création objet captcha
+ }
+
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorDemarrageEnd'));
+ }
+
+ /**
+ * Méthode qui parse le fichier de configuration et alimente
+ * le tableau aConf
+ *
+ * @param filename emplacement du fichier XML de configuration
+ * @return null
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stéphane F
+ **/
+ public function getConfiguration($filename) {
+
+ # Mise en place du parseur XML
+ $data = implode('',file($filename));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ # On verifie qu'il existe des tags "parametre"
+ if(isset($iTags['parametre'])) {
+ # On compte le nombre de tags "parametre"
+ $nb = sizeof($iTags['parametre']);
+ # On boucle sur $nb
+ for($i = 0; $i < $nb; $i++) {
+ if(isset($values[ $iTags['parametre'][$i] ]['value'])) # On a une valeur pour ce parametre
+ $this->aConf[ $values[ $iTags['parametre'][$i] ]['attributes']['name'] ] = $values[ $iTags['parametre'][$i] ]['value'];
+ else # On n'a pas de valeur
+ $this->aConf[ $values[ $iTags['parametre'][$i] ]['attributes']['name'] ] = '';
+ }
+ }
+ # détermination automatique de la racine du site
+ $this->aConf['racine'] = plxUtils::getRacine();
+ # On gère la non régression en cas d'ajout de paramètres sur une version de pluxml déjà installée
+ $this->aConf['bypage_admin'] = plxUtils::getValue($this->aConf['bypage_admin'],10);
+ $this->aConf['tri_coms'] = plxUtils::getValue($this->aConf['tri_coms'],$this->aConf['tri']);
+ $this->aConf['bypage_admin_coms'] = plxUtils::getValue($this->aConf['bypage_admin_coms'],10);
+ $this->aConf['bypage_archives'] = plxUtils::getValue($this->aConf['bypage_archives'],5);
+ $this->aConf['bypage_tags'] = plxUtils::getValue($this->aConf['bypage_tags'],5);
+ $this->aConf['userfolders'] = plxUtils::getValue($this->aConf['userfolders'],0);
+ $this->aConf['meta_description'] = plxUtils::getValue($this->aConf['meta_description']);
+ $this->aConf['meta_keywords'] = plxUtils::getValue($this->aConf['meta_keywords']);
+ $this->aConf['default_lang'] = plxUtils::getValue($this->aConf['default_lang'],DEFAULT_LANG);
+ $this->aConf['racine_plugins'] = plxUtils::getValue($this->aConf['racine_plugins'], 'plugins/');
+ $this->aConf['racine_themes'] = plxUtils::getValue($this->aConf['racine_themes'], 'themes/');
+ $this->aConf['mod_art'] = plxUtils::getValue($this->aConf['mod_art'],0);
+ $this->aConf['display_empty_cat'] = plxUtils::getValue($this->aConf['display_empty_cat'],0);
+ $this->aConf['timezone'] = plxUtils::getValue($this->aConf['timezone'],@date_default_timezone_get());
+ $this->aConf['thumbs'] = isset($this->aConf['thumbs']) ? $this->aConf['thumbs'] : 1;
+ $this->aConf['hometemplate'] = isset($this->aConf['hometemplate']) ? $this->aConf['hometemplate'] : 'home.php';
+ $this->aConf['custom_admincss_file'] = plxUtils::getValue($this->aConf['custom_admincss_file']);
+ $this->aConf['medias'] = isset($this->aConf['medias']) ? $this->aConf['medias'] : 'data/images/';
+ if(!defined('PLX_PLUGINS')) define('PLX_PLUGINS', PLX_ROOT.$this->aConf['racine_plugins']);
+
+ }
+
+ /**
+ * Méthode qui parse le fichier des catégories et alimente
+ * le tableau aCats
+ *
+ * @param filename emplacement du fichier XML des catégories
+ * @return null
+ * @author Stéphane F
+ **/
+ public function getCategories($filename) {
+
+ if(!is_file($filename)) return;
+
+ $activeCats = array();
+ $homepageCats = array();
+
+ # Mise en place du parseur XML
+ $data = implode('',file($filename));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ if(isset($iTags['categorie']) AND isset($iTags['name'])) {
+ $nb = sizeof($iTags['name']);
+ $size=ceil(sizeof($iTags['categorie'])/$nb);
+ for($i=0;$i<$nb;$i++) {
+ $attributes = $values[$iTags['categorie'][$i*$size]]['attributes'];
+ $number = $attributes['number'];
+ # Recuperation du nom de la catégorie
+ $this->aCats[$number]['name']=plxUtils::getValue($values[$iTags['name'][$i]]['value']);
+ # Recuperation du nom de la description
+ $this->aCats[$number]['description']=plxUtils::getValue($values[$iTags['description'][$i]]['value']);
+ # Recuperation de la balise title
+ $title_htmltag = plxUtils::getValue($iTags['title_htmltag'][$i]);
+ $this->aCats[$number]['title_htmltag']=plxUtils::getValue($values[$title_htmltag]['value']);
+ # Recuperation du meta description
+ $meta_description = plxUtils::getValue($iTags['meta_description'][$i]);
+ $this->aCats[$number]['meta_description']=plxUtils::getValue($values[$meta_description]['value']);
+ # Recuperation du meta keywords
+ $meta_keywords = plxUtils::getValue($iTags['meta_keywords'][$i]);
+ $this->aCats[$number]['meta_keywords']=plxUtils::getValue($values[$meta_keywords]['value']);
+ # Recuperation de l'url de la categorie
+ $this->aCats[$number]['url']=strtolower($attributes['url']);
+ # Recuperation du tri de la categorie si besoin est
+ $this->aCats[$number]['tri']=isset($attributes['tri'])?$attributes['tri']:$this->aConf['tri'];
+ # Recuperation du nb d'articles par page de la categorie si besoin est
+ $this->aCats[$number]['bypage']=isset($attributes['bypage'])?$attributes['bypage']:$this->bypage;
+ # Recuperation du fichier template
+ $this->aCats[$number]['template']=isset($attributes['template'])?$attributes['template']:'categorie.php';
+ # Récuperation état affichage de la catégorie dans le menu
+ $this->aCats[$number]['menu']=isset($attributes['menu'])?$attributes['menu']:'oui';
+ # Récuperation état activation de la catégorie dans le menu
+ $this->aCats[$number]['active']=isset($attributes['active'])?$attributes['active']:'1';
+ if($this->aCats[$number]['active']) $activeCats[]=$number;
+ # Recuperation affichage en page d'accueil
+ $this->aCats[$number]['homepage'] = isset($attributes['homepage']) ? $attributes['homepage'] : 1;
+ $this->aCats[$number]['homepage'] = in_array($this->aCats[$number]['homepage'],array('0','1')) ? $this->aCats[$number]['homepage'] : 1;
+ if($this->aCats[$number]['active'] AND $this->aCats[$number]['homepage']) $homepageCats[]=$number;
+ # Recuperation du nombre d'article de la categorie
+ $motif = '/^[0-9]{4}.[home,|0-9,]*'.$number.'[0-9,]*.[0-9]{3}.[0-9]{12}.[A-Za-z0-9-]+.xml$/';
+ $arts = $this->plxGlob_arts->query($motif,'art','',0,false,'before');
+ $this->aCats[$number]['articles'] = ($arts?sizeof($arts):0);
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorGetCategories'));
+ }
+ }
+ $homepageCats [] = '000'; # on rajoute la catégorie 'Non classée'
+ $activeCats[] = '000'; # on rajoute la catégorie 'Non classée'
+ $this->homepageCats = implode('|', $homepageCats);
+ $this->activeCats = implode('|', $activeCats);
+ }
+
+ /**
+ * Méthode qui parse le fichier des pages statiques et alimente
+ * le tableau aStats
+ *
+ * @param filename emplacement du fichier XML des pages statiques
+ * @return null
+ * @author Stéphane F
+ **/
+ public function getStatiques($filename) {
+
+ if(!is_file($filename)) return;
+
+ # Mise en place du parseur XML
+ $data = implode('',file($filename));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ if(isset($iTags['statique']) AND isset($iTags['name'])) {
+ $nb = sizeof($iTags['name']);
+ $size=ceil(sizeof($iTags['statique'])/$nb);
+ for($i=0;$i<$nb;$i++) {
+ $attributes = $values[$iTags['statique'][$i*$size]]['attributes'];
+ $number = $attributes['number'];
+ # Récupération du nom de la page statique
+ $this->aStats[$number]['name']=plxUtils::getValue($values[$iTags['name'][$i]]['value']);
+ # Récupération de la balise title
+ $title_htmltag = plxUtils::getValue($iTags['title_htmltag'][$i]);
+ $this->aStats[$number]['title_htmltag']=plxUtils::getValue($values[$title_htmltag]['value']);
+ # Récupération du meta description
+ $meta_description = plxUtils::getValue($iTags['meta_description'][$i]);
+ $this->aStats[$number]['meta_description']=plxUtils::getValue($values[$meta_description]['value']);
+ # Récupération du meta keywords
+ $meta_keywords = plxUtils::getValue($iTags['meta_keywords'][$i]);
+ $this->aStats[$number]['meta_keywords']=plxUtils::getValue($values[$meta_keywords]['value']);
+ # Récupération du groupe de la page statique
+ $this->aStats[$number]['group']=plxUtils::getValue($values[$iTags['group'][$i]]['value']);
+ # Récupération de l'url de la page statique
+ $this->aStats[$number]['url']=strtolower($attributes['url']);
+ # Récupération de l'etat de la page
+ $this->aStats[$number]['active']=intval($attributes['active']);
+ # On affiche la page statique dans le menu ?
+ $this->aStats[$number]['menu']=isset($attributes['menu'])?$attributes['menu']:'oui';
+ # Récupération du fichier template
+ $this->aStats[$number]['template']=isset($attributes['template'])?$attributes['template']:'static.php';
+ # Récupération de la date de création
+ $date_creation = plxUtils::getValue($iTags['date_creation'][$i]);
+ $this->aStats[$number]['date_creation']=plxUtils::getValue($values[$date_creation]['value']);
+ # Récupération de la date de mise à jour
+ $date_update = plxUtils::getValue($iTags['date_update'][$i]);
+ $this->aStats[$number]['date_update']=plxUtils::getValue($values[$date_update]['value']);
+ # On verifie que la page statique existe bien
+ $file = PLX_ROOT.$this->aConf['racine_statiques'].$number.'.'.$attributes['url'].'.php';
+ # On test si le fichier est lisible
+ $this->aStats[$number]['readable'] = (is_readable($file) ? 1 : 0);
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorGetStatiques'));
+ }
+ }
+ }
+
+ /**
+ * Méthode qui parse le fichier des utilisateurs
+ *
+ * @param filename emplacement du fichier XML des passwd
+ * @return array tableau des utilisateurs
+ * @author Stephane F
+ **/
+ public function getUsers($filename) {
+
+ if(!is_file($filename)) return;
+
+ # Mise en place du parseur XML
+ $data = implode('',file($filename));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ if(isset($iTags['user']) AND isset($iTags['login'])) {
+ $nb = sizeof($iTags['login']);
+ $size=ceil(sizeof($iTags['user'])/$nb);
+ # On boucle sur $nb
+ for($i = 0; $i < $nb; $i++) {
+ $attributes = $values[$iTags['user'][$i*$size]]['attributes'];
+ $number = $attributes['number'];
+ $this->aUsers[$number]['active']=$attributes['active'];
+ $this->aUsers[$number]['delete']=$attributes['delete'];
+ $this->aUsers[$number]['profil']=$attributes['profil'];
+ $this->aUsers[$number]['login']=plxUtils::getValue($values[$iTags['login'][$i]]['value']);
+ $this->aUsers[$number]['name']=plxUtils::getValue($values[$iTags['name'][$i]]['value']);
+ $this->aUsers[$number]['password']=plxUtils::getValue($values[$iTags['password'][$i] ]['value']);
+ $salt = plxUtils::getValue($iTags['salt'][$i]);
+ $this->aUsers[$number]['salt']=plxUtils::getValue($values[$salt]['value']);
+ $this->aUsers[$number]['infos']=plxUtils::getValue($values[$iTags['infos'][$i]]['value']);
+ $email = plxUtils::getValue($iTags['email'][$i]);
+ $this->aUsers[$number]['email']=plxUtils::getValue($values[$email]['value']);
+ $lang = isset($iTags['lang'][$i]) ? $values[$iTags['lang'][$i]]['value']:'';
+ $this->aUsers[$number]['lang'] = $lang!='' ? $lang : $this->aConf['default_lang'];
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorGetUsers'));
+ }
+ }
+ }
+
+ /**
+ * Méthode qui selon le paramètre tri retourne sort ou rsort (tri PHP)
+ *
+ * @param tri asc ou desc
+ * @return string
+ * @author Stéphane F.
+ **/
+ protected function mapTri($tri) { /* obsolete ! 2017-12-03 */
+
+ if($tri=='desc')
+ return 'rsort';
+ elseif($tri=='asc')
+ return 'sort';
+ elseif($tri=='alpha')
+ return 'alpha';
+ elseif($tri=='ralpha')
+ return 'ralpha';
+ elseif($tri=='random')
+ return 'random';
+ else
+ return 'rsort';
+
+ }
+
+ /**
+ * Méthode qui récupère le numéro de la page active
+ *
+ * @return null
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
+ **/
+ protected function getPage() {
+
+ # On check pour avoir le numero de page
+ if(preg_match('/page([0-9]*)/',$this->get,$capture))
+ $this->page = $capture[1];
+ else
+ $this->page = 1;
+ }
+
+ /**
+ * Méthode qui récupere la liste des articles
+ *
+ * @param publi before, after ou all => on récupère tous les fichiers (date) ?
+ * @return boolean vrai si articles trouvés, sinon faux
+ * @author Stéphane F
+ **/
+ public function getArticles($publi='before') {
+
+ # On calcule la valeur start
+ $start = $this->bypage*($this->page-1);
+ # On recupere nos fichiers (tries) selon le motif, la pagination, la date de publication
+ if($aFiles = $this->plxGlob_arts->query($this->motif,'art',$this->tri,$start,$this->bypage,$publi)) {
+ # on mémorise le nombre total d'articles trouvés
+ foreach($aFiles as $k=>$v) # On parcourt tous les fichiers
+ $array[$k] = $this->parseArticle(PLX_ROOT.$this->aConf['racine_articles'].$v);
+ # On stocke les enregistrements dans un objet plxRecord
+ $this->plxRecord_arts = new plxRecord($array);
+ return true;
+ }
+ else return false;
+ }
+
+ /**
+ * Méthode qui retourne les informations $output en analysant
+ * le nom du fichier de l'article $filename
+ *
+ * @param filename fichier de l'article à traiter
+ * @return array information à récupérer
+ * @author Stephane F
+ **/
+ public function artInfoFromFilename($filename) {
+
+ # On effectue notre capture d'informations
+ if(preg_match('/(_?[0-9]{4}).([0-9,|home|draft]*).([0-9]{3}).([0-9]{12}).([a-z0-9-]+).xml$/',$filename,$capture)) {
+ return array(
+ 'artId' => $capture[1],
+ 'catId' => $capture[2],
+ 'usrId' => $capture[3],
+ 'artDate' => $capture[4],
+ 'artUrl' => $capture[5]
+ );
+ }
+ }
+
+ /**
+ * Méthode qui parse l'article du fichier $filename
+ *
+ * @param filename fichier de l'article à parser
+ * @return array
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stéphane F
+ **/
+ public function parseArticle($filename) {
+
+ # Mise en place du parseur XML
+ $data = implode('',file($filename));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ # Recuperation des valeurs de nos champs XML
+ $art['title'] = plxUtils::getValue($values[$iTags['title'][0]]['value']);
+ $art['allow_com'] = plxUtils::getValue($values[$iTags['allow_com'][0]]['value']);
+ $art['template'] = plxUtils::getValue($values[$iTags['template'][0]]['value'],'article.php');
+ $art['chapo'] = plxUtils::getValue($values[$iTags['chapo'][0]]['value']);
+ $art['content'] = plxUtils::getValue($values[$iTags['content'][0]]['value']);
+ $art['tags'] = plxUtils::getValue($values[ $iTags['tags'][0] ]['value']);
+ $meta_description = plxUtils::getValue($iTags['meta_description'][0]);
+ $art['meta_description'] = plxUtils::getValue($values[$meta_description]['value']);
+ $meta_keywords = plxUtils::getValue($iTags['meta_keywords'][0]);
+ $art['meta_keywords'] = plxUtils::getValue($values[$meta_keywords]['value']);
+ $art['title_htmltag'] = isset($iTags['title_htmltag']) ? plxUtils::getValue($values[$iTags['title_htmltag'][0]]['value']) : '';
+ $art['thumbnail'] = isset($iTags['thumbnail']) ? plxUtils::getValue($values[$iTags['thumbnail'][0]]['value']) : '';
+ $art['thumbnail_title'] = isset($iTags['thumbnail_title']) ? plxUtils::getValue($values[$iTags['thumbnail_title'][0]]['value']) : '';
+ $art['thumbnail_alt'] = isset($iTags['thumbnail_alt']) ? plxUtils::getValue($values[$iTags['thumbnail_alt'][0]]['value']) : '';
+ # Informations obtenues en analysant le nom du fichier
+ $art['filename'] = $filename;
+ $tmp = $this->artInfoFromFilename($filename);
+ $art['numero'] = $tmp['artId'];
+ $art['author'] = $tmp['usrId'];
+ $art['categorie'] = $tmp['catId'];
+ $art['url'] = $tmp['artUrl'];
+ $art['date'] = $tmp['artDate'];
+ $art['nb_com'] = $this->getNbCommentaires('/^'.$art['numero'].'.[0-9]{10}.[0-9]+.xml$/');
+ $art['date_creation'] = isset($iTags['date_creation']) ? plxUtils::getValue($values[$iTags['date_creation'][0]]['value']) : $art['date'];
+ $art['date_update'] = isset($iTags['date_update']) ? plxUtils::getValue($values[$iTags['date_update'][0]]['value']) : $art['date'];
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorParseArticle'));
+ # On retourne le tableau
+ return $art;
+ }
+
+ /**
+ * Méthode qui retourne le nombre de commentaires respectants le motif $motif et le paramètre $publi
+ *
+ * @param motif motif de recherche des commentaires
+ * @param publi before, after ou all => on récupère tous les fichiers (date) ?
+ * @return integer
+ * @author Florent MONTHEL
+ **/
+ public function getNbCommentaires($motif,$publi='before') {
+
+ if($coms = $this->plxGlob_coms->query($motif,'com','sort',0,false,$publi))
+ return sizeof($coms);
+ else
+ return 0;
+ }
+
+ /**
+ * Méthode qui retourne les informations $output en analysant
+ * le nom du fichier du commentaire $filename
+ *
+ * @param filename fichier du commentaire à traiter
+ * @return array information à récupérer
+ * @author Stephane F
+ **/
+ public function comInfoFromFilename($filename) {
+ # On effectue notre capture d'informations
+ if(preg_match('/([[:punct:]]?)([0-9]{4}).([0-9]{10})-([0-9]+).xml$/',$filename,$capture)) {
+ return array(
+ 'comStatus' => $capture[1],
+ 'artId' => $capture[2],
+ 'comDate' => plxDate::timestamp2Date($capture[3]),
+ 'comId' => $capture[3].'-'.$capture[4],
+ 'comIdx' => $capture[4],
+
+ );
+ }
+ return false;
+ }
+
+ /**
+ * Méthode qui parse le commentaire du fichier $filename
+ *
+ * @param filename fichier du commentaire à parser
+ * @return array
+ * @author Florent MONTHEL
+ **/
+ public function parseCommentaire($filename) {
+
+ # Mise en place du parseur XML
+ $data = implode('',file($filename));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ # Recuperation des valeurs de nos champs XML
+ $com['author'] = plxUtils::getValue($values[ $iTags['author'][0]]['value']);
+ if(isset($iTags['type']))
+ $com['type'] = plxUtils::getValue($values[ $iTags['type'][0]]['value'],'normal');
+ else
+ $com['type'] = 'normal';
+ $com['ip'] = plxUtils::getValue($values[$iTags['ip'][0]]['value']);
+ $com['mail'] = plxUtils::getValue($values[$iTags['mail'][0]]['value']);
+ $com['site'] = plxUtils::getValue($values[$iTags['site'][0]]['value']);
+ $com['content'] = trim($values[ $iTags['content'][0] ]['value']);
+ $com['parent'] = isset($iTags['parent'])?plxUtils::getValue($values[$iTags['parent'][0]]['value']):'';
+ # Informations obtenues en analysant le nom du fichier
+ $tmp = $this->comInfoFromFilename(basename($filename));
+ $com['status'] = $tmp['comStatus'];
+ $com['numero'] = $tmp['comId'];
+ $com['article'] = $tmp['artId'];
+ $com['date'] = $tmp['comDate'];
+ $com['index'] = $tmp['comIdx'];
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorParseCommentaire'));
+ # On retourne le tableau
+ return $com;
+ }
+
+ /**
+ * Méthode qui trie récursivement les commentaires d'un article en fonction des parents
+ *
+ * @return array liste des commentaires triés
+ * @author Stéphane F.
+ **/
+ public function parentChildSort_r($idField, $parentField, $els, $parentID = 0, &$result = array(), &$level = 0){
+ foreach ($els as $key => $value) {
+ if ($value[$parentField] == $parentID) {
+ $value['level'] = $level;
+ array_push($result, $value);
+ unset($els[$key]);
+ $oldParent = $parentID;
+ $parentID = $value[$idField];
+ $level++;
+ $this->parentChildSort_r($idField,$parentField, $els, $parentID, $result, $level);
+ $parentID = $oldParent;
+ $level--;
+ }
+ }
+ return $result;
+ }
+
+ /**
+ * Méthode qui enregistre dans un objet plxRecord tous les commentaires
+ * respectant le motif $motif et la limite $limite
+ *
+ * @param motif motif de recherche des commentaires
+ * @param ordre ordre du tri : sort ou rsort
+ * @param start commencement
+ * @param limite nombre de commentaires à retourner
+ * @param publi before, after ou all => on récupère tous les fichiers (date) ?
+ * @return null
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function getCommentaires($motif,$ordre='sort',$start=0,$limite=false,$publi='before') {
+
+ # On récupère les fichiers des commentaires
+ $aFiles = $this->plxGlob_coms->query($motif,'com',$ordre,$start,$limite,$publi);
+ if($aFiles) { # On a des fichiers
+ foreach($aFiles as $k=>$v)
+ $array[$k] = $this->parseCommentaire(PLX_ROOT.$this->aConf['racine_commentaires'].$v);
+
+ # hiérarchisation et indentation des commentaires seulement sur les écrans requis
+ if( !(defined('PLX_ADMIN') OR defined('PLX_FEED')) OR preg_match('/comment_new/',basename($_SERVER['SCRIPT_NAME']))) {
+ $array = $this->parentChildSort_r('index', 'parent', $array);
+ }
+
+ # On stocke les enregistrements dans un objet plxRecord
+ $this->plxRecord_coms = new plxRecord($array);
+
+ return true;
+ }
+ else return false;
+ }
+
+ /**
+ * Méthode qui retourne le prochain id d'un commentaire pour un article précis
+ *
+ * @param idArt id de l'article
+ * @return string id d'un nouveau commentaire
+ * @author Stephane F.
+ **/
+ public function nextIdArtComment($idArt) {
+
+ $ret = '0';
+ if($dh = opendir(PLX_ROOT.$this->aConf['racine_commentaires'])) {
+ $Idxs = array();
+ while(false !== ($file = readdir($dh))) {
+ if(preg_match("/_?".$idArt.".[0-9]+-([0-9]+).xml/", $file, $capture)) {
+ if ($capture[1] > $ret)
+ $ret = $capture[1];
+ }
+ }
+ closedir($dh);
+ }
+ return $ret+1;
+ }
+
+ /**
+ * Méthode qui crée un nouveau commentaire pour l'article $artId
+ *
+ * @param artId identifiant de l'article en question
+ * @param content tableau contenant les valeurs du nouveau commentaire
+ * @return string
+ * @author Florent MONTHEL, Stéphane F
+ **/
+ public function newCommentaire($artId,$content) {
+
+ # Hook plugins
+ if(eval($this->plxPlugins->callHook('plxMotorNewCommentaire'))) return;
+
+ if(strtolower($_SERVER['REQUEST_METHOD'])!= 'post' OR $this->aConf['capcha'] AND (!isset($_SESSION["capcha_token"]) OR !isset($_POST['capcha_token']) OR ($_SESSION["capcha_token"]!=$_POST['capcha_token']))) {
+ return L_NEWCOMMENT_ERR_ANTISPAM;
+ }
+
+ # On vérifie que le capcha est correct
+ if($this->aConf['capcha'] == 0 OR $_SESSION['capcha'] == sha1($content['rep'])) {
+ if(!empty($content['name']) AND !empty($content['content'])) { # Les champs obligatoires sont remplis
+ $comment=array();
+ $comment['type'] = 'normal';
+ $comment['author'] = plxUtils::strCheck(trim($content['name']));
+ $comment['content'] = plxUtils::strCheck(trim($content['content']));
+ # On vérifie le mail
+ $comment['mail'] = (plxUtils::checkMail(trim($content['mail'])))?trim($content['mail']):'';
+ # On vérifie le site
+ $comment['site'] = (plxUtils::checkSite($content['site'])?$content['site']:'');
+ # On récupère l'adresse IP du posteur
+ $comment['ip'] = plxUtils::getIp();
+ # index du commentaire
+ $idx = $this->nextIdArtComment($artId);
+ # Commentaire parent en cas de réponse
+ if(isset($content['parent']) AND !empty($content['parent'])) {
+ $comment['parent'] = intval($content['parent']);
+ } else {
+ $comment['parent'] = '';
+ }
+ # On génère le nom du fichier
+ $time = time();
+ if($this->aConf['mod_com']) # On modère le commentaire => underscore
+ $comment['filename'] = '_'.$artId.'.'.$time.'-'.$idx.'.xml';
+ else # On publie le commentaire directement
+ $comment['filename'] = $artId.'.'.$time.'-'.$idx.'.xml';
+ # On peut créer le commentaire
+ if($this->addCommentaire($comment)) { # Commentaire OK
+ if($this->aConf['mod_com']) # En cours de modération
+ return 'mod';
+ else # Commentaire publie directement, on retourne son identifiant
+ return 'c'.$artId.'-'.$idx;
+ } else { # Erreur lors de la création du commentaire
+ return L_NEWCOMMENT_ERR;
+ }
+ } else { # Erreur de remplissage des champs obligatoires
+ return L_NEWCOMMENT_FIELDS_REQUIRED;
+ }
+ } else { # Erreur de vérification capcha
+ return L_NEWCOMMENT_ERR_ANTISPAM;
+ }
+ }
+
+ /**
+ * Méthode qui crée physiquement le fichier XML du commentaire
+ *
+ * @param comment array avec les données du commentaire à ajouter
+ * @return booléen
+ * @author Anthony GUÉRIN, Florent MONTHEL et Stéphane F
+ **/
+ public function addCommentaire($content) {
+ # Hook plugins
+ if(eval($this->plxPlugins->callHook('plxMotorAddCommentaire'))) return;
+ # On genere le contenu de notre fichier XML
+ $xml = "\n";
+ $xml .= "\n";
+ $xml .= "\t \n";
+ $xml .= "\t".$content['type']." \n";
+ $xml .= "\t".$content['ip']." \n";
+ $xml .= "\t \n";
+ $xml .= "\t \n";
+ $xml .= "\t \n";
+ $xml .= "\t \n";
+ # Hook plugins
+ eval($this->plxPlugins->callHook('plxMotorAddCommentaireXml'));
+ $xml .= " \n";
+ # On ecrit ce contenu dans notre fichier XML
+ return plxUtils::write($xml, PLX_ROOT.$this->aConf['racine_commentaires'].$content['filename']);
+ }
+
+ /**
+ * Méthode qui parse le fichier des tags et alimente
+ * le tableau aTags
+ *
+ * @param filename emplacement du fichier XML contenant les tags
+ * @return null
+ * @author Stephane F.
+ **/
+ public function getTags($filename) {
+
+ if(!is_file($filename)) return;
+
+ # Mise en place du parseur XML
+ $data = implode('',file($filename));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ $array = array();
+ # On verifie qu'il existe des tags "file"
+ if(isset($iTags['article'])) {
+ # On compte le nombre de tags "file"
+ $nb = sizeof($iTags['article']);
+ # On boucle sur $nb
+ for($i = 0; $i < $nb; $i++) {
+ if(isset($values[ $iTags['article'][$i] ]['value']))
+ $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['tags'] = trim($values[ $iTags['article'][$i] ]['value']);
+ else
+ $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['tags'] = '';
+ $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['date'] = $values[ $iTags['article'][$i] ]['attributes']['date'];
+ $array[ $values[ $iTags['article'][$i] ]['attributes']['number'] ]['active'] = $values[ $iTags['article'][$i] ]['attributes']['active'];
+ }
+ }
+ # Mémorisation de la liste des tags
+ $this->aTags = $array;
+ }
+
+ /**
+ * Méthode qui lance le téléchargement d'un document
+ *
+ * @param cible cible de téléchargement cryptée
+ * @return booleen
+ * @author Stephane F. et Florent MONTHEL
+ **/
+ public function sendTelechargement($cible) {
+
+ # On décrypte le nom du fichier
+ $file = PLX_ROOT.$this->aConf['medias'].plxEncrypt::decryptId($cible);
+ # Hook plugins
+ if(eval($this->plxPlugins->callHook('plxMotorSendDownload'))) return;
+ # On lance le téléchargement et on check le répertoire medias
+ if(file_exists($file) AND preg_match('#^'.str_replace('\\', '/', realpath(PLX_ROOT.$this->aConf['medias']).'#'), str_replace('\\', '/', realpath($file)))) {
+ header('Content-Description: File Transfer');
+ header('Content-Type: application/download');
+ header('Content-Disposition: attachment; filename='.basename($file));
+ header('Content-Transfer-Encoding: binary');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: no-cache');
+ header('Content-Length: '.filesize($file));
+ readfile($file);
+ exit;
+ } else { # On retourne false
+ return false;
+ }
+
+ }
+
+ /**
+ * Méthode qui réécrit les urls pour supprimer le ?
+ *
+ * @param url url à réécrire
+ * @return string url réécrite
+ * @author Stéphane F
+ **/
+ public function urlRewrite($url='') {
+
+ if($url=='' OR $url=='?') return $this->racine;
+
+ preg_match('/^([0-9a-z\_\-\.\/]+)?[\?]?([0-9a-z\_\-\.\/,&=%]+)?[\#]?(.*)$/i', $url, $args);
+
+ if($this->aConf['urlrewriting']) {
+ $new_url = str_replace('index.php', '', $args[1]);
+ $new_url = str_replace('feed.php', 'feed/', $new_url);
+ $new_url .= !empty($args[2])?$args[2]:'';
+ if(empty($new_url)) $new_url = $this->path_url;
+ $new_url .= !empty($args[3])?'#'.$args[3]:'';
+ return str_replace('&', '&', $this->racine.$new_url);
+ } else {
+ if(empty($args[1]) AND !empty($args[2])) $args[1] = 'index.php';
+ $new_url = !empty($args[1])?$args[1]:$this->path_url;
+ $new_url .= !empty($args[2])?'?'.$args[2]:'';
+ $new_url .= !empty($args[3])?'#'.$args[3]:'';
+ return str_replace('&', '&', $this->racine.$new_url);
+ }
+ }
+
+ /**
+ * Méthode qui comptabilise le nombre d'articles du site.
+ *
+ * @param select critere de recherche: draft, published, all, n° categories séparés par un |
+ * @param userid filtre sur les articles d'un utilisateur donné
+ * @param mod filtre sur les articles en attente de validation
+ * @param publi selection en fonciton de la date du jour (all, before, after)
+ * @return integer nombre d'articles
+ * @scope global
+ * @author Stephane F
+ **/
+ public function nbArticles($select='all', $userId='[0-9]{3}', $mod='_?', $publi='all') {
+
+ $nb = 0;
+ if($select == 'all')
+ $motif = '[home|draft|0-9,]*';
+ elseif($select=='published')
+ $motif = '[home|0-9,]*';
+ elseif($select=='draft')
+ $motif = '[\w,]*[draft][\w,]*';
+ else
+ $motif = $select;
+
+ if($arts = $this->plxGlob_arts->query('/^'.$mod.'[0-9]{4}.('.$motif.').'.$userId.'.[0-9]{12}.[a-z0-9-]+.xml$/', 'art', 'sort', 0, false, $publi))
+ $nb = sizeof($arts);
+
+ return $nb;
+ }
+
+ /**
+ * Méthode qui comptabilise le nombre de commentaires du site
+ *
+ * @param select critere de recherche des commentaires: all, online, offline
+ * @param publi type de sélection des commentaires: all, before, after
+ * @return integer nombre de commentaires
+ * @scope global
+ * @author Stephane F
+ **/
+ public function nbComments($select='online', $publi='all') {
+
+ $nb = 0;
+ if($select == 'all')
+ $motif = '/[^[:punct:]?][0-9]{4}.(.*).xml$/';
+ elseif($select=='offline')
+ $motif = '/^_[0-9]{4}.(.*).xml$/';
+ elseif($select=='online')
+ $motif = '/^[0-9]{4}.(.*).xml$/';
+ else
+ $motif = $select;
+
+ if($coms = $this->plxGlob_coms->query($motif,'com','sort',0,false,$publi))
+ $nb = sizeof($coms);
+
+ return $nb;
+ }
+
+ /**
+ * Méthode qui recherche les articles appartenant aux catégories actives
+ *
+ * @return null
+ * @scope global
+ * @author Stéphane F.
+ **/
+ public function getActiveArts() {
+ if($this->plxGlob_arts->aFiles) {
+ $datetime=date('YmdHi');
+ foreach($this->plxGlob_arts->aFiles as $filename) {
+ if(preg_match('/^([0-9]{4}).(?:[0-9]|home|,)*(?:'.$this->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.([0-9]{12}).[a-z0-9-]+.xml$/', $filename, $capture)) {
+ if($capture[2]<=$datetime) { # on ne prends que les articles publiés
+ $this->activeArts[$capture[1]]=1;
+ }
+ }
+ }
+ }
+ }
+
+}
?>
\ No newline at end of file
From c7220dd1da69cf4df188bbcebef27efa65416ebe Mon Sep 17 00:00:00 2001
From: Stephane
Date: Mon, 4 Dec 2017 08:38:25 +0000
Subject: [PATCH 05/15] Maj changelog
---
readme/CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/readme/CHANGELOG b/readme/CHANGELOG
index 420ad1665..9613c697e 100644
--- a/readme/CHANGELOG
+++ b/readme/CHANGELOG
@@ -6,6 +6,7 @@
[+] Administration : Tri ordre des catégories et des pages statiques par drag&drop
[+] Affichage de l'image d'accroche dans les flux rss
[+] Thème par défaut : entête de page fixe (contribution bazooka07)
+[+] Tri alphabétique inversé des articles et catégories (contribution bazooka07)
FIX Suppression fichier plugin update impossible (droit fichier)
FIX Chevauchement des menus de l'administration avec un facteur de zoom > 100%
FIX Administration : mauvais affichage des caractères spéciaux dans le nom de l'auteur d'un commentaire (contribution bazooka07)
From 5059d931e20d7f082b0a2b49ef2ea85e8e4f1258 Mon Sep 17 00:00:00 2001
From: Stephane
Date: Mon, 4 Dec 2017 08:50:32 +0000
Subject: [PATCH 06/15] =?UTF-8?q?FIX=20#260=20:=20libell=C3=A9=20cat=C3=A9?=
=?UTF-8?q?gorie=20Non=20class=C3=A9=20absent=20lors=20de=20la=20previsual?=
=?UTF-8?q?isation?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/admin/article.php | 2 +-
readme/CHANGELOG | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/admin/article.php b/core/admin/article.php
index 7dede83fe..a7b36a324 100644
--- a/core/admin/article.php
+++ b/core/admin/article.php
@@ -65,7 +65,7 @@
$art['thumbnail'] = $_POST['thumbnail'];
$art['thumbnail_title'] = $_POST['thumbnail_title'];
$art['thumbnail_alt'] = $_POST['thumbnail_alt'];
- $art['categorie'] = '';
+ $art['categorie'] = '000';
if(!empty($_POST['catId'])) {
$array=array();
foreach($_POST['catId'] as $k => $v) {
diff --git a/readme/CHANGELOG b/readme/CHANGELOG
index 9613c697e..6b900c910 100644
--- a/readme/CHANGELOG
+++ b/readme/CHANGELOG
@@ -12,6 +12,7 @@ FIX Chevauchement des menus de l'administration avec un facteur de zoom > 100%
FIX Administration : mauvais affichage des caractères spéciaux dans le nom de l'auteur d'un commentaire (contribution bazooka07)
FIX mediasManager.js : fonction callback inactive avec Firefox Quantum
FIX #256 plxPlugin::setParam : mauvais test su le paramètre $type (contribution bazooka07)
+FIX #260 Libellé de catégorie "Non classé" non affiché lors de la prévisualisation
## PLUXML 5.6 (sortie : 05/04/2017) ##
From d35a937a41bd9d9b8e9b194297a563b8ba8df629 Mon Sep 17 00:00:00 2001
From: Stephane
Date: Mon, 4 Dec 2017 09:22:09 +0000
Subject: [PATCH 07/15] upd PluCSS 1.3
---
core/admin/theme/plucss.css | 582 +++++++++++++++----------------
core/admin/theme/plucss.min.css | 1 +
core/admin/top.php | 2 +-
readme/CHANGELOG | 1 +
themes/defaut/css/plucss.css | 347 +++++++++++++-----
themes/defaut/css/plucss.min.css | 1 +
6 files changed, 545 insertions(+), 389 deletions(-)
create mode 100644 core/admin/theme/plucss.min.css
create mode 100644 themes/defaut/css/plucss.min.css
diff --git a/core/admin/theme/plucss.css b/core/admin/theme/plucss.css
index 03bb41229..2701a7c4e 100644
--- a/core/admin/theme/plucss.css
+++ b/core/admin/theme/plucss.css
@@ -4,9 +4,9 @@
# This file is part of PluXml : http://www.pluxml.org
#
# Package plucss.css
-# Version 1.2
+# Version 1.3
# Copyright (c) 2014-2017 PluXml
-# Authors Jos
+# Authors Jos, Stéphane F
# Licensed under the GPL license.
# See http://www.gnu.org/licenses/gpl.html
#
@@ -20,42 +20,34 @@
*:before {
box-sizing: border-box;
}
-
html {
font-size: 62.5%;
}
-
body {
font-family: sans-serif;
font-size: 1.5rem;
line-height: 1.5;
margin: 0;
}
-
a {
background: transparent;
}
-
a:active,
a:hover {
outline: 0;
}
-
abbr {
border-bottom: none;
cursor: help;
text-decoration: underline dotted;
}
-
b,
strong {
font-weight: bold;
}
-
blockquote {
font-style: italic;
}
-
code,
kbd,
pre,
@@ -63,21 +55,17 @@ samp {
font-family: monospace;
font-size: 1.5rem;
}
-
details,
main,
summary {
display: block;
}
-
dfn {
font-style: italic;
}
-
figure {
margin: 0;
}
-
h1,
h2,
h3,
@@ -86,65 +74,55 @@ h5,
h6 {
line-height: 1;
margin: 3rem 0 1.5rem 0;
+ font-weight: 500;
}
-
hr {
height: 0;
}
-
img {
border: 0;
height: auto;
max-width: 100%;
}
-
pre {
overflow: auto;
}
-
progress {
- vertical-align: baseline;
+ vertical-align: baseline;
}
-
small {
font-size: 1.17rem;
}
-
sub,
-sup {
+sup,
+.sup {
font-size: 1.17rem;
line-height: 0;
position: relative;
vertical-align: baseline;
}
-
-sup {
- top: -0.5rem;
+sup,
+.sup {
+ top: -0.75rem;
}
-
sub {
- bottom: -0.5rem;
+ bottom: -0.75rem;
}
-
svg:not(:root) {
overflow: hidden;
}
-
fieldset {
border: none;
padding: 0;
}
-
legend {
margin-bottom: 1.5rem;
padding: 0;
}
-
label {
display: block;
padding-bottom: .3rem;
}
-
button,
input,
select,
@@ -157,18 +135,15 @@ textarea {
padding-right: .4rem;
width: 100%;
}
-
button,
input {
overflow: visible;
}
-
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
-
button,
[type="button"],
[type="reset"],
@@ -179,52 +154,42 @@ button,
padding-right: .7rem;
width: auto;
}
-
textarea {
height: auto;
overflow: auto;
}
-
select {
padding-left: .2rem;
padding-right: 0;
}
-
optgroup {
font-weight: bold;
font-style: normal;
}
-
[type="checkbox"],
[type="radio"] {
height: auto;
padding: 0;
width: auto;
}
-
[type="file"] {
height: auto;
padding: 0;
}
-
[disabled]:hover {
cursor: not-allowed;
}
-
table {
border-collapse: collapse;
border-spacing: 0;
}
-
caption,
th {
text-align: left;
}
-
tr {
border-bottom: 1px solid;
}
-
td,
th {
height: 3.5rem;
@@ -237,122 +202,113 @@ th {
body {
color: #444;
}
-
a {
color: #258fd6;
text-decoration: none;
}
-
a:active,
a:hover {
color: #444;
text-decoration: underline;
}
-
cite:before {
content: "— ";
}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-weight: 500;
-}
-
-.h1,
-.h2,
-.h3,
-.h4,
-.h5,
-.h6 {
+.h1,.s1,
+.h2,.s2,
+.h3,.s3,
+.h4,.s4,
+.h5,.s5,
+.h6,.s6 {
height: auto;
}
-
h1,
-.h1 {
- font-size: 4rem;
+.h1,
+.s1 {
+ font-size: 2.5rem;
}
-
h2,
-.h2 {
- font-size: 3.5rem;
+.h2,
+.s2 {
+ font-size: 2rem;
}
-
h3,
-.h3 {
- font-size: 3rem;
+.h3,
+.s3 {
+ font-size: 1.67rem;
}
-
h4,
-.h4 {
- font-size: 2.5rem;
+.h4,
+.s4 {
+ font-size: 1.5rem;
}
-
h5,
-.h5 {
- font-size: 2rem;
+.h5,
+.s5 {
+ font-size: 1.33rem;
}
-
h6,
-.h6 {
- font-size: 1.5rem;
+.h6,
+.s6 {
+ font-size: 1.17rem;
}
-
.heading-large {
font-size: 8rem;
}
-
.heading-medium {
font-size: 6.5rem;
}
-
.heading-small {
- font-size: 5rem;
+ font-size: 4rem;
}
-
.text-blue {
color: #258fd6;
}
-
.text-green {
color: #239c56;
}
-
.text-orange {
color: #da7418;
}
-
.text-red {
color: #e43d29;
}
-
ul.inline-list {
font-size: 0rem;
margin: 1.5rem 0;
padding-left: 0;
}
-
ul.inline-list li {
display: inline-block;
list-style-type: none;
- margin-left: 1.5rem;
+ margin-left: .5rem;
font-size: 1.5rem;
}
-
ul.inline-list li:first-child {
margin-left: 0;
}
-
ul.unstyled-list {
padding-left: 0;
}
-
ul.unstyled-list li {
list-style-type: none;
}
+::-webkit-input-placeholder { /* Chrome/Opera/Safari */
+ font-style: italic;
+ color: #999;
+}
+::-moz-placeholder { /* Firefox 19+ */
+ font-style: italic;
+ color: #999;
+}
+:-ms-input-placeholder { /* IE 10+ */
+ font-style: italic;
+ color: #999;
+}
+:-moz-placeholder { /* Firefox 18- */
+ font-style: italic;
+ color: #999;
+}
/* ---------- TABLE ---------- */
@@ -360,12 +316,10 @@ tr {
border-color: #bbb;
transition-duration: .2s;
}
-
tr:hover {
background-color: #dbedf9;
transition-duration: .2s;
}
-
.scrollable-table {
overflow: auto;
}
@@ -375,7 +329,6 @@ tr:hover {
form .col {
margin-bottom: 1.5rem;
}
-
form.inline-form button,
form.inline-form input,
form.inline-form label,
@@ -384,15 +337,12 @@ form.inline-form textarea {
display: inline-block;
width: auto;
}
-
form .col.label-centered {
margin-bottom: 0;
}
-
form .label-centered label {
padding-top: .3rem;
}
-
button,
input,
select,
@@ -401,18 +351,15 @@ textarea {
border-radius: .3rem;
transition-duration: .2s;
}
-
input:focus,
select:focus,
textarea:focus {
border: 1px solid #258fd6;
transition-duration: .2s;
}
-
[type="file"] {
border: none;
}
-
button,
input[type="button"],
input[type="reset"],
@@ -421,7 +368,6 @@ input[type="submit"] {
color: #fff;
transition-duration: .2s;
}
-
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
@@ -429,7 +375,6 @@ input[type="submit"]:hover {
background-color: #555;
transition-duration: .2s;
}
-
button[disabled],
input[disabled],
select[disabled],
@@ -441,7 +386,6 @@ textarea[disabled]:hover {
background-color: #ddd;
color: #aaa;
}
-
button.blue,
input[type="button"].blue,
input[type="reset"].blue,
@@ -449,14 +393,12 @@ input[type="submit"].blue {
background-color: #258fd6;
color: #eee;
}
-
button.blue:hover,
input[type="button"].blue:hover,
input[type="reset"].blue:hover,
input[type="submit"].blue:hover {
background-color: #1f77b1;
}
-
button.green,
input[type="button"].green,
input[type="reset"].green,
@@ -464,14 +406,12 @@ input[type="submit"].green {
background-color: #239c56;
color: #eee;
}
-
button.green:hover,
input[type="button"].green:hover,
input[type="reset"].green:hover,
input[type="submit"].green:hover {
background-color: #1c7943;
}
-
button.orange,
input[type="button"].orange,
input[type="reset"].orange,
@@ -479,14 +419,12 @@ input[type="submit"].orange {
background-color: #da7418;
color: #eee;
}
-
button.orange:hover,
input[type="button"].orange:hover,
input[type="reset"].orange:hover,
input[type="submit"].orange:hover {
background-color: #b46014;
}
-
button.red,
input[type="button"].red,
input[type="reset"].red,
@@ -494,13 +432,25 @@ input[type="submit"].red {
background-color: #e43d29;
color: #eee;
}
-
button.red:hover,
input[type="button"].red:hover,
input[type="reset"].red:hover,
input[type="submit"].red:hover {
background-color: #bc2818;
}
+button.yellow,
+input[type="button"].yellow,
+input[type="reset"].yellow,
+input[type="submit"].yellow {
+ background-color: #e0a800;
+ color: #eee;
+}
+button.yellow:hover,
+input[type="button"].yellow:hover,
+input[type="reset"].yellow:hover,
+input[type="submit"].yellow:hover {
+ background-color: #d39e00;
+}
/* ---------- NAVIGATION ---------- */
@@ -509,38 +459,31 @@ input[type="submit"].red:hover {
margin: 0;
padding-left: 0;
}
-
.menu li {
display: inline-block;
font-size: 1.5rem;
list-style-type: none;
margin-left: 1.5rem;
}
-
.menu li:first-child {
margin-left: 0;
}
-
.menu li.active a {
color: #444;
}
-
.menu.vertical li {
display: block;
margin-left: 0;
}
-
.menu.expanded li {
margin-left: 0;
transition-duration: .2s;
}
-
.menu.expanded li:hover {
border-radius: .3rem;
background-color: #ddd;
transition-duration: .2s;
}
-
.menu.expanded li a {
border-radius: .3rem;
display: block;
@@ -549,51 +492,42 @@ input[type="submit"].red:hover {
padding-left: .7rem;
padding-right: .7rem;
}
-
.menu.expanded li a:hover {
text-decoration: none;
}
-
-.menu.breadcrumb li+li:before,
-.menu.expanded.breadcrumb>li+li a:before {
+.menu.breadcrumb li + li:before,
+.menu.expanded.breadcrumb > li + li a:before {
content: "/";
}
-
-.menu.breadcrumb li+li:before,
-.menu.expanded.breadcrumb>li+li:before,
-.menu.expanded.breadcrumb>li+li a:before {
+.menu.breadcrumb li + li:before,
+.menu.expanded.breadcrumb > li + li:before,
+.menu.expanded.breadcrumb > li + li a:before {
margin-right: .7rem;
}
-
-.menu.expanded.breadcrumb>li+li:before {
+.menu.expanded.breadcrumb > li + li:before {
content: none;
}
-
.menu.expanded li.active a,
.menu.expanded li.active:hover {
background-color: #258fd6;
color: #fff;
}
-
.responsive-menu label {
background-color: #444;
color: #fff;
cursor: pointer;
text-align: center;
}
-
.responsive-menu label,
.responsive-menu input[type=checkbox] {
display: none;
}
-
.responsive-menu label {
height: 3.5rem;
line-height: 3.5rem;
padding-left: .7rem;
padding-right: .7rem;
}
-
.responsive-menu input[type=checkbox]:checked+ul {
display: block;
}
@@ -620,8 +554,8 @@ input[type="submit"].red:hover {
.responsive-menu ul li a:hover {
text-decoration: none;
}
- .responsive-menu .menu.breadcrumb li+li:before,
- .responsive-menu .menu.expanded.breadcrumb>li+li a:before {
+ .responsive-menu .menu.breadcrumb li + li:before,
+ .responsive-menu .menu.expanded.breadcrumb > li + li a:before {
content: none;
}
.responsive-menu ul li.active a,
@@ -631,8 +565,90 @@ input[type="submit"].red:hover {
}
}
+/* Pagination */
+
+.pagination {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+}
+.pagination ul,
+.pagination ul ul {
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+}
+.pagination li,
+.pagination li li {
+ display: inline-block;
+ font-size: 1.5rem;
+ list-style-type: none;
+ margin: 10px;
+ cursor: pointer;
+}
+.pagination li.active a {
+ color: #ff0000;
+}
+.pagination li.disabled a {
+ color: #999;
+}
+.pagination li.disabled a:hover {
+ text-decoration: none;
+}
+
/* ---------- OTHER COMPONENTS ---------- */
+.modal-mask {
+ position: fixed;
+ z-index: 9998;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, .5);
+ transition: opacity .3s ease;
+}
+.modal-container {
+ width: 450px;
+ margin: 40px auto 0;
+ padding: 20px 30px;
+ background-color: #fff;
+ border-radius: 2px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, .33);
+ transition: all .3s ease;
+ font-family: Helvetica, Arial, sans-serif;
+}
+.modal-header {
+ margin-top: 0;
+}
+.modal-body {
+ margin: 20px 0;
+}
+.modal-footer {
+ margin: 20px 0;
+ text-align: right;
+}
+.modal-container button:hover {
+ color: #333;
+ background-color: transparent;
+}
+.modal-btn-close {
+ background: transparent;
+ border: 0;
+ height: 1rem;
+ line-height: 1rem;
+ margin-left: .2rem;
+ margin-right: -2px;
+ padding: 0 2px;
+ text-decoration: none;
+ width: 1rem;
+ color: #999;
+}
+.modal-btn-close:after {
+ display: inline-block;
+ content: "\00d7"; /* This will render the 'X' */
+}
+
.gallery {
list-style: none;
margin-left: -1.5rem;
@@ -640,43 +656,35 @@ input[type="submit"].red:hover {
overflow: hidden;
padding-left: 0;
}
-
.gallery li {
float: left;
padding: 0 1.5rem 1.5rem 1.5rem;
}
-
.alert {
border-radius: .3rem;
margin-bottom: 1.5rem;
padding: 1.5rem;
}
-
.alert a,
.alert a:hover {
color: inherit;
}
-
.alert.blue {
background-color: #dbedf9;
color: #258fd6;
}
-
.alert.green {
background-color: #d3f5e2;
color: #239c56;
}
-
.alert.orange {
background-color: #fbe8d9;
color: #da7418;
}
-
.alert.red {
background-color: #fce4e2;
color: #e43d29;
}
-
.button {
background-color: #777;
border-radius: .3rem;
@@ -684,50 +692,46 @@ input[type="submit"].red:hover {
padding: .9rem .7rem;
transition-duration: .2s;
}
-
.button:hover {
background-color: #555;
- color: #fff;
text-decoration: none;
transition-duration: .2s;
}
-
.button.blue {
background-color: #258fd6;
color: #eee;
}
-
.button.blue:hover {
background-color: #1f77b1;
}
-
.button.green {
background-color: #239c56;
color: #eee;
}
-
.button.green:hover {
background-color: #1c7943;
}
-
.button.orange {
background-color: #da7418;
color: #eee;
}
-
.button.orange:hover {
background-color: #b46014;
}
-
.button.red {
background-color: #e43d29;
color: #eee;
}
-
.button.red:hover {
background-color: #bc2818;
}
-
+.button.yellow {
+ background-color: #e0a800;
+ color: #eee;
+}
+.button.yellow:hover {
+ background-color: #d39e00;
+}
.progress {
background-color: #fff;
border-radius: .3rem;
@@ -735,7 +739,6 @@ input[type="submit"].red:hover {
position: relative;
width: 100%;
}
-
.progress span {
background-color: #258fd6;
border-radius: .3rem;
@@ -748,12 +751,10 @@ input[type="submit"].red:hover {
position: relative;
text-align: center;
}
-
.progress span[style="width: 0%;"] {
background: none;
color: #444;
}
-
.badge,
.label {
background-color: #258fd6;
@@ -762,35 +763,28 @@ input[type="submit"].red:hover {
display: inline-block;
margin-left: .4rem;
}
-
.badge {
line-height: 1;
padding: .2rem;
}
-
.menu.expanded .active a .badge {
background-color: #fff;
color: #258fd6;
}
-
.menu.vertical .badge {
float: right;
}
-
.menu.vertical.expanded .badge {
margin-top: .8rem;
}
-
.label {
padding: .25rem .4rem;
}
-
.frame {
height: 0;
padding-top: 56.25%;
position: relative;
}
-
.frame embed,
.frame iframe,
.frame object,
@@ -801,74 +795,153 @@ input[type="submit"].red:hover {
top: 0;
width: 100%;
}
-
.img-circle {
border-radius: 50%;
}
-
.img-rounded {
border-radius: .3rem;
}
+/* -- Tooltip -- */
+
+a.tooltip {
+ position: relative;
+ display: inline;
+}
+a.tooltip span {
+ font-size: 1.3rem;
+ line-height: 1.7rem;
+ position: absolute;
+ min-width:140px;
+ color: #fff;
+ background: #555;
+ min-height: 30px;
+ text-align: center;
+ visibility: hidden;
+ border-radius: 4px;
+ opacity: 0;
+ -webkit-transition: opacity 0.3s ease-in-out;
+ -moz-transition: opacity 0.3s ease-in-out;
+ -ms-transition: opacity 0.3s ease-in-out;
+ -o-transition: opacity 0.3s ease-in-out;
+ transition: opacity 0.3s ease-in-out;
+}
+a.tooltip span:after {
+ content: '';
+ position: absolute;
+ width: 0; height: 0;
+}
+a:hover.tooltip span {
+ visibility: visible;
+ opacity:1;
+ z-index: 999;
+}
+a.tooltip.tooltip-top span:after {
+ top: 100%;
+ left: 50%;
+ margin-left: -8px;
+ border-top: 8px solid #555;
+ border-right: 8px solid transparent;
+ border-left: 8px solid transparent;
+}
+a:hover.tooltip-top span {
+ bottom: 30px;
+ left: 50%;
+ margin-left: -76px;
+}
+a.tooltip.tooltip-right span:after {
+ top: 50%;
+ right: 100%;
+ margin-top: -8px;
+ border-right: 8px solid #555;
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+}
+a:hover.tooltip-right span {
+ left: 100%;
+ top: 50%;
+ margin-top: -15px;
+ margin-left: 15px;
+}
+a.tooltip.tooltip-bottom span:after {
+ bottom: 100%;
+ left: 50%;
+ margin-left: -8px;
+ border-bottom: 8px solid #555;
+ border-right: 8px solid transparent;
+ border-left: 8px solid transparent;
+}
+a:hover.tooltip-bottom span {
+ top: 30px;
+ left: 50%;
+ margin-left: -76px;
+}
+a.tooltip.tooltip-left span:after {
+ top: 50%;
+ left: 100%;
+ margin-top: -8px;
+ border-left: 8px solid #555;
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+}
+a:hover.tooltip-left span {
+ right: 100%;
+ top: 50%;
+ margin-top: -15px;
+ margin-right: 15px;
+}
+
/* ---------- HELPER ---------- */
.text-left {
text-align: left;
}
-
.text-center {
text-align: center;
}
-
.text-right {
text-align: right;
}
-
.text-justify {
text-align: justify;
}
-
.float-left {
float: left;
}
-
.float-center {
display: block;
margin-left: auto;
margin-right: auto;
}
-
.float-right {
float: right;
}
-
.float-none {
float: none;
}
-
.show {
display: block;
}
-
.hide {
display: none;
}
-
.full-width {
width: 100%;
}
-
.width-auto {
width: auto;
}
-
.no-margin {
margin: 0;
}
-
.no-padding {
padding: 0;
}
+.sticky {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+}
/* ---------- GRID, GALLERY, AND HELPER ---------- */
@@ -879,13 +952,11 @@ input[type="submit"].red:hover {
padding-right: 1.5rem;
width: 100%;
}
-
.grid {
overflow: hidden;
margin-left: -1.5rem;
margin-right: -1.5rem;
}
-
.col {
float: left;
position: relative;
@@ -894,322 +965,237 @@ input[type="submit"].red:hover {
padding-right: 1.5rem;
width: 100%;
}
-
.col.sml-1,
.gallery.sml-1 li {
width: 8.3333%;
}
-
.col.sml-2,
.gallery.sml-2 li {
width: 16.6666%;
}
-
.col.sml-3,
.gallery.sml-3 li {
width: 25%;
}
-
.col.sml-4,
.gallery.sml-4 li {
width: 33.3333%;
}
-
.col.sml-5,
.gallery.sml-5 li {
width: 41.6666%;
}
-
.col.sml-6,
.gallery.sml-6 li {
width: 50%;
}
-
.col.sml-7,
.gallery.sml-7 li {
width: 58.3333%;
}
-
.col.sml-8,
.gallery.sml-8 li {
width: 66.6666%;
}
-
.col.sml-9,
.gallery.sml-9 li {
width: 75%;
}
-
.col.sml-10,
.gallery.sml-10 li {
width: 83.3333%;
}
-
.col.sml-11,
.gallery.sml-11 li {
width: 91.6666%;
}
-
.col.sml-12,
.gallery.sml-12 li {
width: 100%;
}
-
.col.sml-push-0 {
left: auto;
}
-
.col.sml-push-1 {
left: 8.3333%;
}
-
.col.sml-push-2 {
left: 16.6666%;
}
-
.col.sml-push-3 {
left: 25%;
}
-
.col.sml-push-4 {
left: 33.3333%;
}
-
.col.sml-push-5 {
left: 41.6666%;
}
-
.col.sml-push-6 {
left: 50%;
}
-
.col.sml-push-7 {
left: 58.3333%;
}
-
.col.sml-push-8 {
left: 66.6666%;
}
-
.col.sml-push-9 {
left: 75%;
}
-
.col.sml-push-10 {
left: 83.3333%;
}
-
.col.sml-push-11 {
left: 91.6666%;
}
-
.col.sml-push-12 {
left: 100%;
}
-
.col.sml-pull-0 {
right: auto;
}
-
.col.sml-pull-1 {
right: 8.3333%;
}
-
.col.sml-pull-2 {
right: 16.6666%;
}
-
.col.sml-pull-3 {
right: 25%;
}
-
.col.sml-pull-4 {
right: 33.3333%;
}
-
.col.sml-pull-5 {
right: 41.6666%;
}
-
.col.sml-pull-6 {
right: 50%;
}
-
.col.sml-pull-7 {
right: 58.3333%;
}
-
.col.sml-pull-8 {
right: 66.6666%;
}
-
.col.sml-pull-9 {
right: 75%;
}
-
.col.sml-pull-10 {
right: 83.3333%;
}
-
.col.sml-pull-11 {
right: 91.6666%;
}
-
.col.sml-pull-12 {
right: 100%;
}
-
.col.sml-offset-0 {
margin-left: 0;
}
-
.col.sml-offset-1 {
margin-left: 8.3333%;
}
-
.col.sml-offset-2 {
margin-left: 16.6666%;
}
-
.col.sml-offset-3 {
margin-left: 25%;
}
-
.col.sml-offset-4 {
margin-left: 33.3333%;
}
-
.col.sml-offset-5 {
margin-left: 41.6666%;
}
-
.col.sml-offset-6 {
margin-left: 50%;
}
-
.col.sml-offset-7 {
margin-left: 58.3333%;
}
-
.col.sml-offset-8 {
margin-left: 66.6666%;
}
-
.col.sml-offset-9 {
margin-left: 75%;
}
-
.col.sml-offset-10 {
margin-left: 83.3333%;
}
-
.col.sml-offset-11 {
margin-left: 91.6666%;
}
-
.col.sml-offset-12 {
margin-left: 100%;
}
-
.col.sml-centered {
float: none;
margin-left: auto;
margin-right: auto;
}
-
.col.sml-uncentered {
float: left;
}
-
.sml-h1 {
- font-size: 4rem;
+ font-size: 2.5rem;
}
-
.sml-h2 {
- font-size: 3.5rem;
+ font-size: 2rem;
}
-
.sml-h3 {
- font-size: 3rem;
+ font-size: 1.67rem;
}
-
.sml-h4 {
- font-size: 2.5rem;
+ font-size: 1.5rem;
}
-
.sml-h5 {
- font-size: 2rem;
+ font-size: 1.33rem;
}
-
.sml-h6 {
- font-size: 1.5rem;
-}
-
-.sml-heading-large {
- font-size: 8rem;
-}
-
-.sml-heading-medium {
- font-size: 6.5rem;
-}
-
-.sml-heading-small {
- font-size: 5rem;
+ font-size: 1.17rem;
}
-
.sml-text-left {
text-align: left;
}
-
.sml-text-center {
text-align: center;
}
-
.sml-text-right {
text-align: right;
}
-
.sml-text-justify {
text-align: justify;
}
-
.sml-float-left {
float: left;
}
-
.sml-float-center {
margin-left: auto;
margin-right: auto;
}
-
.sml-float-right {
float: right;
}
-
.sml-float-none {
float: none;
}
-
.sml-show {
display: block;
}
-
.sml-hide {
display: none;
}
-
.sml-full-width {
width: 100%;
}
-
.sml-width-auto {
width: auto;
}
-
.sml-no-margin {
margin: 0;
}
-
.sml-no-padding {
padding: 0;
}
@@ -1276,7 +1262,7 @@ input[type="submit"].red:hover {
}
.col.med-push-2 {
left: 16.6666%
- }
+ }
.col.med-push-3 {
left: 25%;
}
@@ -1394,31 +1380,22 @@ input[type="submit"].red:hover {
float: left;
}
.med-h1 {
- font-size: 4rem;
+ font-size: 2.5rem;
}
.med-h2 {
- font-size: 3.5rem;
+ font-size: 2rem;
}
.med-h3 {
- font-size: 3rem;
+ font-size: 1.67rem;
}
.med-h4 {
- font-size: 2.5rem;
+ font-size: 1.5rem;
}
.med-h5 {
- font-size: 2rem;
+ font-size: 1.33rem;
}
.med-h6 {
- font-size: 1.5rem;
- }
- .med-heading-large {
- font-size: 8rem;
- }
- .med-heading-medium {
- font-size: 6.5rem;
- }
- .med-heading-small {
- font-size: 5rem;
+ font-size: 1.17rem;
}
.med-text-left {
text-align: left;
@@ -1645,31 +1622,22 @@ input[type="submit"].red:hover {
float: left;
}
.lrg-h1 {
- font-size: 4rem;
+ font-size: 2.5rem;
}
.lrg-h2 {
- font-size: 3.5rem;
+ font-size: 2rem;
}
.lrg-h3 {
- font-size: 3rem;
+ font-size: 1.67rem;
}
.lrg-h4 {
- font-size: 2.5rem;
+ font-size: 1.5rem;
}
.lrg-h5 {
- font-size: 2rem;
+ font-size: 1.33rem;
}
.lrg-h6 {
- font-size: 1.5rem;
- }
- .lrg-heading-large {
- font-size: 8rem;
- }
- .lrg-heading-medium {
- font-size: 6.5rem;
- }
- .lrg-heading-small {
- font-size: 5rem;
+ font-size: 1.17rem;
}
.lrg-text-left {
text-align: left;
diff --git a/core/admin/theme/plucss.min.css b/core/admin/theme/plucss.min.css
new file mode 100644
index 000000000..b9da7452c
--- /dev/null
+++ b/core/admin/theme/plucss.min.css
@@ -0,0 +1 @@
+.sup,progress,sub,sup{vertical-align:baseline}details,label,main,summary{display:block}body,figure{margin:0}.menu li,ul.inline-list li,ul.unstyled-list li{list-style-type:none}*,:after,:before{box-sizing:border-box}html{font-size:62.5%}body{font-family:sans-serif;font-size:1.5rem;line-height:1.5;color:#444}a{background:0 0;color:#258fd6;text-decoration:none}a:active,a:hover{outline:0;color:#444;text-decoration:underline}abbr{border-bottom:none;cursor:help;text-decoration:underline dotted}.button:hover,.menu.expanded li a:hover,.modal-btn-close,.pagination li.disabled a:hover{text-decoration:none}b,strong{font-weight:700}blockquote,dfn{font-style:italic}code,kbd,pre,samp{font-family:monospace;font-size:1.5rem}.sup,small,sub,sup{font-size:1.17rem}h1,h2,h3,h4,h5,h6{line-height:1;margin:3rem 0 1.5rem;font-weight:500}hr{height:0}img{border:0;height:auto;max-width:100%}pre{overflow:auto}.sup,sub,sup{line-height:0;position:relative}.sup,sup{top:-.75rem}sub{bottom:-.75rem}svg:not(:root){overflow:hidden}fieldset{border:none;padding:0}legend{margin-bottom:1.5rem;padding:0}label{padding-bottom:.3rem}button,input,select,textarea{font:inherit;height:3rem;margin:0;outline:0;padding-left:.4rem;padding-right:.4rem;width:100%}button,input{overflow:visible}.scrollable-table,textarea{overflow:auto}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=button],[type=reset],[type=submit],button{border-color:transparent;cursor:pointer;padding-left:.7rem;padding-right:.7rem;width:auto}textarea{height:auto}select{padding-left:.2rem;padding-right:0}optgroup{font-weight:700;font-style:normal}[type=checkbox],[type=radio]{height:auto;padding:0;width:auto}[type=file]{height:auto;padding:0}[disabled]:hover{cursor:not-allowed}table{border-collapse:collapse;border-spacing:0}caption,th{text-align:left}tr{border-bottom:1px solid;border-color:#bbb;transition-duration:.2s}td,th{height:3.5rem;padding-left:.7rem;padding-right:.7rem}.menu,ul.inline-list,ul.unstyled-list{padding-left:0}cite:before{content:"— "}.h1,.h2,.h3,.h4,.h5,.h6,.s1,.s2,.s3,.s4,.s5,.s6{height:auto}.h1,.s1,h1{font-size:2.5rem}.h2,.s2,h2{font-size:2rem}.h3,.s3,h3{font-size:1.67rem}.h4,.s4,h4{font-size:1.5rem}.h5,.s5,h5{font-size:1.33rem}.h6,.s6,h6{font-size:1.17rem}.heading-large{font-size:8rem}.heading-medium{font-size:6.5rem}.heading-small{font-size:4rem}.text-blue{color:#258fd6}.text-green{color:#239c56}.text-orange{color:#da7418}.text-red{color:#e43d29}ul.inline-list{font-size:0;margin:1.5rem 0}ul.inline-list li{display:inline-block;margin-left:.5rem;font-size:1.5rem}ul.inline-list li:first-child{margin-left:0}::-webkit-input-placeholder{font-style:italic;color:#999}::-moz-placeholder{font-style:italic;color:#999}:-ms-input-placeholder{font-style:italic;color:#999}:-moz-placeholder{font-style:italic;color:#999}tr:hover{background-color:#dbedf9;transition-duration:.2s}.gallery,.grid,.progress span{overflow:hidden}form .col{margin-bottom:1.5rem}form.inline-form button,form.inline-form input,form.inline-form label,form.inline-form select,form.inline-form textarea{display:inline-block;width:auto}form .col.label-centered{margin-bottom:0}form .label-centered label{padding-top:.3rem}button,input,select,textarea{border:1px solid #bbb;border-radius:.3rem;transition-duration:.2s}input:focus,select:focus,textarea:focus{border:1px solid #258fd6;transition-duration:.2s}[type=file]{border:none}button,input[type=button],input[type=reset],input[type=submit]{background-color:#777;color:#fff;transition-duration:.2s}button:hover,input[type=button]:hover,input[type=reset]:hover,input[type=submit]:hover{background-color:#555;transition-duration:.2s}button[disabled],button[disabled]:hover,input[disabled],input[disabled]:hover,select[disabled],select[disabled]:hover,textarea[disabled],textarea[disabled]:hover{background-color:#ddd;color:#aaa}button.blue,input[type=button].blue,input[type=reset].blue,input[type=submit].blue{background-color:#258fd6;color:#eee}button.blue:hover,input[type=button].blue:hover,input[type=reset].blue:hover,input[type=submit].blue:hover{background-color:#1f77b1}button.green,input[type=button].green,input[type=reset].green,input[type=submit].green{background-color:#239c56;color:#eee}button.green:hover,input[type=button].green:hover,input[type=reset].green:hover,input[type=submit].green:hover{background-color:#1c7943}button.orange,input[type=button].orange,input[type=reset].orange,input[type=submit].orange{background-color:#da7418;color:#eee}button.orange:hover,input[type=button].orange:hover,input[type=reset].orange:hover,input[type=submit].orange:hover{background-color:#b46014}button.red,input[type=button].red,input[type=reset].red,input[type=submit].red{background-color:#e43d29;color:#eee}button.red:hover,input[type=button].red:hover,input[type=reset].red:hover,input[type=submit].red:hover{background-color:#bc2818}button.yellow,input[type=button].yellow,input[type=reset].yellow,input[type=submit].yellow{background-color:#e0a800;color:#eee}button.yellow:hover,input[type=button].yellow:hover,input[type=reset].yellow:hover,input[type=submit].yellow:hover{background-color:#d39e00}.menu{font-size:0;margin:0}.menu.expanded li a,.responsive-menu label{height:3.5rem;line-height:3.5rem;padding-left:.7rem;padding-right:.7rem}.menu li{display:inline-block;font-size:1.5rem;margin-left:1.5rem}.menu li:first-child{margin-left:0}.menu li.active a{color:#444}.menu.vertical li{display:block;margin-left:0}.menu.expanded li{margin-left:0;transition-duration:.2s}.menu.expanded li:hover{border-radius:.3rem;background-color:#ddd;transition-duration:.2s}.menu.expanded li a{border-radius:.3rem;display:block}.menu.breadcrumb li+li:before,.menu.expanded.breadcrumb>li+li a:before{content:"/"}.menu.breadcrumb li+li:before,.menu.expanded.breadcrumb>li+li a:before,.menu.expanded.breadcrumb>li+li:before{margin-right:.7rem}.menu.expanded.breadcrumb>li+li:before{content:none}.menu.expanded li.active a,.menu.expanded li.active:hover{background-color:#258fd6;color:#fff}.responsive-menu label{background-color:#444;color:#fff;cursor:pointer;text-align:center}.responsive-menu input[type=checkbox],.responsive-menu label{display:none}.responsive-menu input[type=checkbox]:checked+ul{display:block}@media (max-width:47.938rem){.responsive-menu ul{display:none}.responsive-menu label,.responsive-menu ul li{display:block;margin-left:0}.responsive-menu ul li:hover{background-color:#ddd}.responsive-menu ul li a{display:block;height:3.5rem;line-height:3.5rem;padding-left:.7rem;padding-right:.7rem}.responsive-menu ul li a:hover{text-decoration:none}.responsive-menu .menu.breadcrumb li+li:before,.responsive-menu .menu.expanded.breadcrumb>li+li a:before{content:none}.responsive-menu ul li.active a,.responsive-menu ul li.active:hover{background-color:#258fd6;color:#fff}}.pagination{margin:0;padding:0;width:100%}.pagination ul,.pagination ul ul{display:inline-block;margin:0;padding:0}.pagination li,.pagination li li{display:inline-block;font-size:1.5rem;list-style-type:none;margin:10px;cursor:pointer}.pagination li.active a{color:red}.pagination li.disabled a{color:#999}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);transition:opacity .3s ease}.frame,.progress,.progress span{position:relative}.modal-container{width:450px;margin:40px auto 0;padding:20px 30px;background-color:#fff;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.33);transition:all .3s ease;font-family:Helvetica,Arial,sans-serif}.button,.button:hover{transition-duration:.2s}.modal-header{margin-top:0}.modal-body,.modal-footer{margin:20px 0}.modal-footer{text-align:right}.modal-container button:hover{color:#333;background-color:transparent}.modal-btn-close{background:0 0;border:0;height:1rem;line-height:1rem;margin-left:.2rem;margin-right:-2px;padding:0 2px;width:1rem;color:#999}.alert,.button,.progress{border-radius:.3rem}.modal-btn-close:after{display:inline-block;content:"\00d7"}.gallery{list-style:none;margin-left:-1.5rem;margin-right:-1.5rem;padding-left:0}.gallery li{float:left;padding:0 1.5rem 1.5rem}.alert{margin-bottom:1.5rem;padding:1.5rem}.alert a,.alert a:hover{color:inherit}.alert.blue{background-color:#dbedf9;color:#258fd6}.alert.green{background-color:#d3f5e2;color:#239c56}.alert.orange{background-color:#fbe8d9;color:#da7418}.alert.red{background-color:#fce4e2;color:#e43d29}.button{background-color:#777;color:#fff;padding:.9rem .7rem}.button:hover{background-color:#555}.button.blue{background-color:#258fd6;color:#eee}.button.blue:hover{background-color:#1f77b1}.button.green{background-color:#239c56;color:#eee}.button.green:hover{background-color:#1c7943}.button.orange{background-color:#da7418;color:#eee}.button.orange:hover{background-color:#b46014}.button.red{background-color:#e43d29;color:#eee}.button.red:hover{background-color:#bc2818}.button.yellow{background-color:#e0a800;color:#eee}.button.yellow:hover{background-color:#d39e00}.progress{background-color:#fff;border:1px solid #bbb;width:100%}.progress span{background-color:#258fd6;border-radius:.3rem;color:#fff;display:block;height:3.5rem;line-height:3.5rem;min-width:2.2rem;text-align:center}.progress span[style="width: 0%;"]{background:0 0;color:#444}.badge,.label{background-color:#258fd6;border-radius:.3rem;color:#fff;display:inline-block;margin-left:.4rem}.badge{line-height:1;padding:.2rem}.menu.expanded .active a .badge{background-color:#fff;color:#258fd6}.menu.vertical .badge{float:right}.menu.vertical.expanded .badge{margin-top:.8rem}.label{padding:.25rem .4rem}.frame{height:0;padding-top:56.25%}.frame embed,.frame iframe,.frame object,.frame video{height:100%;left:0;position:absolute;top:0;width:100%}.img-circle{border-radius:50%}.img-rounded{border-radius:.3rem}a.tooltip{position:relative;display:inline}.float-center,.show{display:block}a.tooltip span{font-size:1.3rem;line-height:1.7rem;position:absolute;min-width:140px;color:#fff;background:#555;min-height:30px;text-align:center;visibility:hidden;border-radius:4px;opacity:0;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}a.tooltip span:after{content:'';position:absolute;width:0;height:0}a:hover.tooltip span{visibility:visible;opacity:1;z-index:999}a.tooltip.tooltip-top span:after{top:100%;left:50%;margin-left:-8px;border-top:8px solid #555;border-right:8px solid transparent;border-left:8px solid transparent}a:hover.tooltip-top span{bottom:30px;left:50%;margin-left:-76px}a.tooltip.tooltip-right span:after{top:50%;right:100%;margin-top:-8px;border-right:8px solid #555;border-top:8px solid transparent;border-bottom:8px solid transparent}a:hover.tooltip-right span{left:100%;top:50%;margin-top:-15px;margin-left:15px}a.tooltip.tooltip-bottom span:after{bottom:100%;left:50%;margin-left:-8px;border-bottom:8px solid #555;border-right:8px solid transparent;border-left:8px solid transparent}a:hover.tooltip-bottom span{top:30px;left:50%;margin-left:-76px}a.tooltip.tooltip-left span:after{top:50%;left:100%;margin-top:-8px;border-left:8px solid #555;border-top:8px solid transparent;border-bottom:8px solid transparent}a:hover.tooltip-left span{right:100%;top:50%;margin-top:-15px;margin-right:15px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.float-left{float:left}.float-center{margin-left:auto;margin-right:auto}.float-right{float:right}.float-none{float:none}.hide{display:none}.full-width{width:100%}.width-auto{width:auto}.no-margin{margin:0}.no-padding{padding:0}.col,.container{padding-left:1.5rem;padding-right:1.5rem;width:100%}.sticky{position:-webkit-sticky;position:sticky;top:0}.container{margin:0 auto;max-width:1280px}.grid{margin-left:-1.5rem;margin-right:-1.5rem}.col{float:left;position:relative;min-height:1px}.col.sml-1,.gallery.sml-1 li{width:8.3333%}.col.sml-2,.gallery.sml-2 li{width:16.6666%}.col.sml-3,.gallery.sml-3 li{width:25%}.col.sml-4,.gallery.sml-4 li{width:33.3333%}.col.sml-5,.gallery.sml-5 li{width:41.6666%}.col.sml-6,.gallery.sml-6 li{width:50%}.col.sml-7,.gallery.sml-7 li{width:58.3333%}.col.sml-8,.gallery.sml-8 li{width:66.6666%}.col.sml-9,.gallery.sml-9 li{width:75%}.col.sml-10,.gallery.sml-10 li{width:83.3333%}.col.sml-11,.gallery.sml-11 li{width:91.6666%}.col.sml-12,.gallery.sml-12 li,.sml-full-width{width:100%}.col.sml-push-0{left:auto}.col.sml-push-1{left:8.3333%}.col.sml-push-2{left:16.6666%}.col.sml-push-3{left:25%}.col.sml-push-4{left:33.3333%}.col.sml-push-5{left:41.6666%}.col.sml-push-6{left:50%}.col.sml-push-7{left:58.3333%}.col.sml-push-8{left:66.6666%}.col.sml-push-9{left:75%}.col.sml-push-10{left:83.3333%}.col.sml-push-11{left:91.6666%}.col.sml-push-12{left:100%}.col.sml-pull-0{right:auto}.col.sml-pull-1{right:8.3333%}.col.sml-pull-2{right:16.6666%}.col.sml-pull-3{right:25%}.col.sml-pull-4{right:33.3333%}.col.sml-pull-5{right:41.6666%}.col.sml-pull-6{right:50%}.col.sml-pull-7{right:58.3333%}.col.sml-pull-8{right:66.6666%}.col.sml-pull-9{right:75%}.col.sml-pull-10{right:83.3333%}.col.sml-pull-11{right:91.6666%}.col.sml-pull-12{right:100%}.col.sml-offset-0{margin-left:0}.col.sml-offset-1{margin-left:8.3333%}.col.sml-offset-2{margin-left:16.6666%}.col.sml-offset-3{margin-left:25%}.col.sml-offset-4{margin-left:33.3333%}.col.sml-offset-5{margin-left:41.6666%}.col.sml-offset-6{margin-left:50%}.col.sml-offset-7{margin-left:58.3333%}.col.sml-offset-8{margin-left:66.6666%}.col.sml-offset-9{margin-left:75%}.col.sml-offset-10{margin-left:83.3333%}.col.sml-offset-11{margin-left:91.6666%}.col.sml-offset-12{margin-left:100%}.col.sml-centered,.sml-float-center{margin-left:auto;margin-right:auto}.col.sml-centered{float:none}.col.sml-uncentered,.sml-float-left{float:left}.sml-h1{font-size:2.5rem}.sml-h2{font-size:2rem}.sml-h3{font-size:1.67rem}.sml-h4{font-size:1.5rem}.sml-h5{font-size:1.33rem}.sml-h6{font-size:1.17rem}.sml-text-left{text-align:left}.sml-text-center{text-align:center}.sml-text-right{text-align:right}.sml-text-justify{text-align:justify}.sml-float-right{float:right}.sml-float-none{float:none}.sml-show{display:block}.sml-hide{display:none}.sml-width-auto{width:auto}.sml-no-margin{margin:0}.sml-no-padding{padding:0}@media (min-width:48rem){.container{padding-left:2rem;padding-right:2rem}.col.med-1,.gallery.med-1 li{width:8.3333%}.col.med-2,.gallery.med-2 li{width:16.6666%}.col.med-3,.gallery.med-3 li{width:25%}.col.med-4,.gallery.med-4 li{width:33.3333%}.col.med-5,.gallery.med-5 li{width:41.6666%}.col.med-6,.gallery.med-6 li{width:50%}.col.med-7,.gallery.med-7 li{width:58.3333%}.col.med-8,.gallery.med-8 li{width:66.6666%}.col.med-9,.gallery.med-9 li{width:75%}.col.med-10,.gallery.med-10 li{width:83.3333%}.col.med-11,.gallery.med-11 li{width:91.6666%}.col.med-12,.gallery.med-12 li,.med-full-width{width:100%}.col.med-push-0{left:auto}.col.med-push-1{left:8.3333%}.col.med-push-2{left:16.6666%}.col.med-push-3{left:25%}.col.med-push-4{left:33.3333%}.col.med-push-5{left:41.6666%}.col.med-push-6{left:50%}.col.med-push-7{left:58.3333%}.col.med-push-8{left:66.6666%}.col.med-push-9{left:75%}.col.med-push-10{left:83.3333%}.col.med-push-11{left:91.6666%}.col.med-push-12{left:100%}.col.med-pull-0{right:auto}.col.med-pull-1{right:8.3333%}.col.med-pull-2{right:16.6666%}.col.med-pull-3{right:25%}.col.med-pull-4{right:33.3333%}.col.med-pull-5{right:41.6666%}.col.med-pull-6{right:50%}.col.med-pull-7{right:58.3333%}.col.med-pull-8{right:66.6666%}.col.med-pull-9{right:75%}.col.med-pull-10{right:83.3333%}.col.med-pull-11{right:91.6666%}.col.med-pull-12{right:100%}.col.med-offset-0{margin-left:0}.col.med-offset-1{margin-left:8.3333%}.col.med-offset-2{margin-left:16.6666%}.col.med-offset-3{margin-left:25%}.col.med-offset-4{margin-left:33.3333%}.col.med-offset-5{margin-left:41.6666%}.col.med-offset-6{margin-left:50%}.col.med-offset-7{margin-left:58.3333%}.col.med-offset-8{margin-left:66.6666%}.col.med-offset-9{margin-left:75%}.col.med-offset-10{margin-left:83.3333%}.col.med-offset-11{margin-left:91.6666%}.col.med-offset-12{margin-left:100%}.col.med-centered,.med-float-center{margin-left:auto;margin-right:auto}.col.med-centered{float:none}.col.med-uncentered,.med-float-left{float:left}.med-h1{font-size:2.5rem}.med-h2{font-size:2rem}.med-h3{font-size:1.67rem}.med-h4{font-size:1.5rem}.med-h5{font-size:1.33rem}.med-h6{font-size:1.17rem}.med-text-left{text-align:left}.med-text-center{text-align:center}.med-text-right{text-align:right}.med-text-justify{text-align:justify}.med-float-right{float:right}.med-float-none{float:none}.med-show{display:block}.med-hide{display:none}.med-width-auto{width:auto}.med-no-margin{margin:0}.med-no-padding{padding:0}}@media (min-width:64rem){.container{padding-left:3rem;padding-right:3rem}.col.lrg-1,.gallery.lrg-1 li{width:8.3333%}.col.lrg-2,.gallery.lrg-2 li{width:16.6666%}.col.lrg-3,.gallery.lrg-3 li{width:25%}.col.lrg-4,.gallery.lrg-4 li{width:33.3333%}.col.lrg-5,.gallery.lrg-5 li{width:41.6666%}.col.lrg-6,.gallery.lrg-6 li{width:50%}.col.lrg-7,.gallery.lrg-7 li{width:58.3333%}.col.lrg-8,.gallery.lrg-8 li{width:66.6666%}.col.lrg-9,.gallery.lrg-9 li{width:75%}.col.lrg-10,.gallery.lrg-10 li{width:83.3333%}.col.lrg-11,.gallery.lrg-11 li{width:91.6666%}.col.lrg-12,.gallery.lrg-12 li,.lrg-full-width{width:100%}.col.lrg-push-0{left:auto}.col.lrg-push-1{left:8.3333%}.col.lrg-push-2{left:16.6666%}.col.lrg-push-3{left:25%}.col.lrg-push-4{left:33.3333%}.col.lrg-push-5{left:41.6666%}.col.lrg-push-6{left:50%}.col.lrg-push-7{left:58.3333%}.col.lrg-push-8{left:66.6666%}.col.lrg-push-9{left:75%}.col.lrg-push-10{left:83.3333%}.col.lrg-push-11{left:91.6666%}.col.lrg-push-12{left:100%}.col.lrg-pull-0{right:auto}.col.lrg-pull-1{right:8.3333%}.col.lrg-pull-2{right:16.6666%}.col.lrg-pull-3{right:25%}.col.lrg-pull-4{right:33.3333%}.col.lrg-pull-5{right:41.6666%}.col.lrg-pull-6{right:50%}.col.lrg-pull-7{right:58.3333%}.col.lrg-pull-8{right:66.6666%}.col.lrg-pull-9{right:75%}.col.lrg-pull-10{right:83.3333%}.col.lrg-pull-11{right:91.6666%}.col.lrg-pull-12{right:100%}.col.lrg-offset-0{margin-left:0}.col.lrg-offset-1{margin-left:8.3333%}.col.lrg-offset-2{margin-left:16.6666%}.col.lrg-offset-3{margin-left:25%}.col.lrg-offset-4{margin-left:33.3333%}.col.lrg-offset-5{margin-left:41.6666%}.col.lrg-offset-6{margin-left:50%}.col.lrg-offset-7{margin-left:58.3333%}.col.lrg-offset-8{margin-left:66.6666%}.col.lrg-offset-9{margin-left:75%}.col.lrg-offset-10{margin-left:83.3333%}.col.lrg-offset-11{margin-left:91.6666%}.col.lrg-offset-12{margin-left:100%}.col.lrg-centered,.lrg-float-center{margin-left:auto;margin-right:auto}.col.lrg-centered{float:none}.col.lrg-uncentered,.lrg-float-left{float:left}.lrg-h1{font-size:2.5rem}.lrg-h2{font-size:2rem}.lrg-h3{font-size:1.67rem}.lrg-h4{font-size:1.5rem}.lrg-h5{font-size:1.33rem}.lrg-h6{font-size:1.17rem}.lrg-text-left{text-align:left}.lrg-text-center{text-align:center}.lrg-text-right{text-align:right}.lrg-text-justify{text-align:justify}.lrg-float-right{float:right}.lrg-float-none{float:none}.lrg-show{display:block}.lrg-hide{display:none}.lrg-width-auto{width:auto}.lrg-no-margin{margin:0}.lrg-no-padding{padding:0}}
\ No newline at end of file
diff --git a/core/admin/top.php b/core/admin/top.php
index 3860e45b8..d31daafe6 100644
--- a/core/admin/top.php
+++ b/core/admin/top.php
@@ -16,7 +16,7 @@
aConf['title']) ?>
-
+
aConf['custom_admincss_file'])) echo ' '."\n" ?>
diff --git a/readme/CHANGELOG b/readme/CHANGELOG
index 6b900c910..5c2c6ac7b 100644
--- a/readme/CHANGELOG
+++ b/readme/CHANGELOG
@@ -7,6 +7,7 @@
[+] Affichage de l'image d'accroche dans les flux rss
[+] Thème par défaut : entête de page fixe (contribution bazooka07)
[+] Tri alphabétique inversé des articles et catégories (contribution bazooka07)
+[+] PluCSS 1.3
FIX Suppression fichier plugin update impossible (droit fichier)
FIX Chevauchement des menus de l'administration avec un facteur de zoom > 100%
FIX Administration : mauvais affichage des caractères spéciaux dans le nom de l'auteur d'un commentaire (contribution bazooka07)
diff --git a/themes/defaut/css/plucss.css b/themes/defaut/css/plucss.css
index 9cf72e4d6..2701a7c4e 100644
--- a/themes/defaut/css/plucss.css
+++ b/themes/defaut/css/plucss.css
@@ -4,9 +4,9 @@
# This file is part of PluXml : http://www.pluxml.org
#
# Package plucss.css
-# Version 1.2
+# Version 1.3
# Copyright (c) 2014-2017 PluXml
-# Authors Jos
+# Authors Jos, Stéphane F
# Licensed under the GPL license.
# See http://www.gnu.org/licenses/gpl.html
#
@@ -74,6 +74,7 @@ h5,
h6 {
line-height: 1;
margin: 3rem 0 1.5rem 0;
+ font-weight: 500;
}
hr {
height: 0;
@@ -93,17 +94,19 @@ small {
font-size: 1.17rem;
}
sub,
-sup {
+sup,
+.sup {
font-size: 1.17rem;
line-height: 0;
position: relative;
vertical-align: baseline;
}
-sup {
- top: -0.5rem;
+sup,
+.sup {
+ top: -0.75rem;
}
sub {
- bottom: -0.5rem;
+ bottom: -0.75rem;
}
svg:not(:root) {
overflow: hidden;
@@ -187,7 +190,7 @@ th {
tr {
border-bottom: 1px solid;
}
-td,
+td,
th {
height: 3.5rem;
padding-left: .7rem;
@@ -211,45 +214,43 @@ a:hover {
cite:before {
content: "— ";
}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-weight: 500;
-}
-.h1,
-.h2,
-.h3,
-.h4,
-.h5,
-.h6 {
+.h1,.s1,
+.h2,.s2,
+.h3,.s3,
+.h4,.s4,
+.h5,.s5,
+.h6,.s6 {
height: auto;
}
h1,
-.h1 {
- font-size: 4rem;
+.h1,
+.s1 {
+ font-size: 2.5rem;
}
h2,
-.h2 {
- font-size: 3.5rem;
+.h2,
+.s2 {
+ font-size: 2rem;
}
h3,
-.h3 {
- font-size: 3rem;
+.h3,
+.s3 {
+ font-size: 1.67rem;
}
h4,
-.h4 {
- font-size: 2.5rem;
+.h4,
+.s4 {
+ font-size: 1.5rem;
}
h5,
-.h5 {
- font-size: 2rem;
+.h5,
+.s5 {
+ font-size: 1.33rem;
}
h6,
-.h6 {
- font-size: 1.5rem;
+.h6,
+.s6 {
+ font-size: 1.17rem;
}
.heading-large {
font-size: 8rem;
@@ -258,7 +259,7 @@ h6,
font-size: 6.5rem;
}
.heading-small {
- font-size: 5rem;
+ font-size: 4rem;
}
.text-blue {
color: #258fd6;
@@ -280,7 +281,7 @@ ul.inline-list {
ul.inline-list li {
display: inline-block;
list-style-type: none;
- margin-left: 1.5rem;
+ margin-left: .5rem;
font-size: 1.5rem;
}
ul.inline-list li:first-child {
@@ -292,6 +293,22 @@ ul.unstyled-list {
ul.unstyled-list li {
list-style-type: none;
}
+::-webkit-input-placeholder { /* Chrome/Opera/Safari */
+ font-style: italic;
+ color: #999;
+}
+::-moz-placeholder { /* Firefox 19+ */
+ font-style: italic;
+ color: #999;
+}
+:-ms-input-placeholder { /* IE 10+ */
+ font-style: italic;
+ color: #999;
+}
+:-moz-placeholder { /* Firefox 18- */
+ font-style: italic;
+ color: #999;
+}
/* ---------- TABLE ---------- */
@@ -421,6 +438,19 @@ input[type="reset"].red:hover,
input[type="submit"].red:hover {
background-color: #bc2818;
}
+button.yellow,
+input[type="button"].yellow,
+input[type="reset"].yellow,
+input[type="submit"].yellow {
+ background-color: #e0a800;
+ color: #eee;
+}
+button.yellow:hover,
+input[type="button"].yellow:hover,
+input[type="reset"].yellow:hover,
+input[type="submit"].yellow:hover {
+ background-color: #d39e00;
+}
/* ---------- NAVIGATION ---------- */
@@ -535,8 +565,90 @@ input[type="submit"].red:hover {
}
}
+/* Pagination */
+
+.pagination {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+}
+.pagination ul,
+.pagination ul ul {
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+}
+.pagination li,
+.pagination li li {
+ display: inline-block;
+ font-size: 1.5rem;
+ list-style-type: none;
+ margin: 10px;
+ cursor: pointer;
+}
+.pagination li.active a {
+ color: #ff0000;
+}
+.pagination li.disabled a {
+ color: #999;
+}
+.pagination li.disabled a:hover {
+ text-decoration: none;
+}
+
/* ---------- OTHER COMPONENTS ---------- */
+.modal-mask {
+ position: fixed;
+ z-index: 9998;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, .5);
+ transition: opacity .3s ease;
+}
+.modal-container {
+ width: 450px;
+ margin: 40px auto 0;
+ padding: 20px 30px;
+ background-color: #fff;
+ border-radius: 2px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, .33);
+ transition: all .3s ease;
+ font-family: Helvetica, Arial, sans-serif;
+}
+.modal-header {
+ margin-top: 0;
+}
+.modal-body {
+ margin: 20px 0;
+}
+.modal-footer {
+ margin: 20px 0;
+ text-align: right;
+}
+.modal-container button:hover {
+ color: #333;
+ background-color: transparent;
+}
+.modal-btn-close {
+ background: transparent;
+ border: 0;
+ height: 1rem;
+ line-height: 1rem;
+ margin-left: .2rem;
+ margin-right: -2px;
+ padding: 0 2px;
+ text-decoration: none;
+ width: 1rem;
+ color: #999;
+}
+.modal-btn-close:after {
+ display: inline-block;
+ content: "\00d7"; /* This will render the 'X' */
+}
+
.gallery {
list-style: none;
margin-left: -1.5rem;
@@ -582,7 +694,6 @@ input[type="submit"].red:hover {
}
.button:hover {
background-color: #555;
- color: #fff;
text-decoration: none;
transition-duration: .2s;
}
@@ -614,6 +725,13 @@ input[type="submit"].red:hover {
.button.red:hover {
background-color: #bc2818;
}
+.button.yellow {
+ background-color: #e0a800;
+ color: #eee;
+}
+.button.yellow:hover {
+ background-color: #d39e00;
+}
.progress {
background-color: #fff;
border-radius: .3rem;
@@ -684,6 +802,95 @@ input[type="submit"].red:hover {
border-radius: .3rem;
}
+/* -- Tooltip -- */
+
+a.tooltip {
+ position: relative;
+ display: inline;
+}
+a.tooltip span {
+ font-size: 1.3rem;
+ line-height: 1.7rem;
+ position: absolute;
+ min-width:140px;
+ color: #fff;
+ background: #555;
+ min-height: 30px;
+ text-align: center;
+ visibility: hidden;
+ border-radius: 4px;
+ opacity: 0;
+ -webkit-transition: opacity 0.3s ease-in-out;
+ -moz-transition: opacity 0.3s ease-in-out;
+ -ms-transition: opacity 0.3s ease-in-out;
+ -o-transition: opacity 0.3s ease-in-out;
+ transition: opacity 0.3s ease-in-out;
+}
+a.tooltip span:after {
+ content: '';
+ position: absolute;
+ width: 0; height: 0;
+}
+a:hover.tooltip span {
+ visibility: visible;
+ opacity:1;
+ z-index: 999;
+}
+a.tooltip.tooltip-top span:after {
+ top: 100%;
+ left: 50%;
+ margin-left: -8px;
+ border-top: 8px solid #555;
+ border-right: 8px solid transparent;
+ border-left: 8px solid transparent;
+}
+a:hover.tooltip-top span {
+ bottom: 30px;
+ left: 50%;
+ margin-left: -76px;
+}
+a.tooltip.tooltip-right span:after {
+ top: 50%;
+ right: 100%;
+ margin-top: -8px;
+ border-right: 8px solid #555;
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+}
+a:hover.tooltip-right span {
+ left: 100%;
+ top: 50%;
+ margin-top: -15px;
+ margin-left: 15px;
+}
+a.tooltip.tooltip-bottom span:after {
+ bottom: 100%;
+ left: 50%;
+ margin-left: -8px;
+ border-bottom: 8px solid #555;
+ border-right: 8px solid transparent;
+ border-left: 8px solid transparent;
+}
+a:hover.tooltip-bottom span {
+ top: 30px;
+ left: 50%;
+ margin-left: -76px;
+}
+a.tooltip.tooltip-left span:after {
+ top: 50%;
+ left: 100%;
+ margin-top: -8px;
+ border-left: 8px solid #555;
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+}
+a:hover.tooltip-left span {
+ right: 100%;
+ top: 50%;
+ margin-top: -15px;
+ margin-right: 15px;
+}
+
/* ---------- HELPER ---------- */
.text-left {
@@ -730,6 +937,11 @@ input[type="submit"].red:hover {
.no-padding {
padding: 0;
}
+.sticky {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+}
/* ---------- GRID, GALLERY, AND HELPER ---------- */
@@ -927,31 +1139,22 @@ input[type="submit"].red:hover {
float: left;
}
.sml-h1 {
- font-size: 4rem;
+ font-size: 2.5rem;
}
.sml-h2 {
- font-size: 3.5rem;
+ font-size: 2rem;
}
.sml-h3 {
- font-size: 3rem;
+ font-size: 1.67rem;
}
.sml-h4 {
- font-size: 2.5rem;
+ font-size: 1.5rem;
}
.sml-h5 {
- font-size: 2rem;
+ font-size: 1.33rem;
}
.sml-h6 {
- font-size: 1.5rem;
-}
-.sml-heading-large {
- font-size: 8rem;
-}
-.sml-heading-medium {
- font-size: 6.5rem;
-}
-.sml-heading-small {
- font-size: 5rem;
+ font-size: 1.17rem;
}
.sml-text-left {
text-align: left;
@@ -1177,31 +1380,22 @@ input[type="submit"].red:hover {
float: left;
}
.med-h1 {
- font-size: 4rem;
+ font-size: 2.5rem;
}
.med-h2 {
- font-size: 3.5rem;
+ font-size: 2rem;
}
.med-h3 {
- font-size: 3rem;
+ font-size: 1.67rem;
}
.med-h4 {
- font-size: 2.5rem;
+ font-size: 1.5rem;
}
.med-h5 {
- font-size: 2rem;
+ font-size: 1.33rem;
}
.med-h6 {
- font-size: 1.5rem;
- }
- .med-heading-large {
- font-size: 8rem;
- }
- .med-heading-medium {
- font-size: 6.5rem;
- }
- .med-heading-small {
- font-size: 5rem;
+ font-size: 1.17rem;
}
.med-text-left {
text-align: left;
@@ -1428,31 +1622,22 @@ input[type="submit"].red:hover {
float: left;
}
.lrg-h1 {
- font-size: 4rem;
+ font-size: 2.5rem;
}
.lrg-h2 {
- font-size: 3.5rem;
+ font-size: 2rem;
}
.lrg-h3 {
- font-size: 3rem;
+ font-size: 1.67rem;
}
.lrg-h4 {
- font-size: 2.5rem;
+ font-size: 1.5rem;
}
.lrg-h5 {
- font-size: 2rem;
+ font-size: 1.33rem;
}
.lrg-h6 {
- font-size: 1.5rem;
- }
- .lrg-heading-large {
- font-size: 8rem;
- }
- .lrg-heading-medium {
- font-size: 6.5rem;
- }
- .lrg-heading-small {
- font-size: 5rem;
+ font-size: 1.17rem;
}
.lrg-text-left {
text-align: left;
diff --git a/themes/defaut/css/plucss.min.css b/themes/defaut/css/plucss.min.css
new file mode 100644
index 000000000..b9da7452c
--- /dev/null
+++ b/themes/defaut/css/plucss.min.css
@@ -0,0 +1 @@
+.sup,progress,sub,sup{vertical-align:baseline}details,label,main,summary{display:block}body,figure{margin:0}.menu li,ul.inline-list li,ul.unstyled-list li{list-style-type:none}*,:after,:before{box-sizing:border-box}html{font-size:62.5%}body{font-family:sans-serif;font-size:1.5rem;line-height:1.5;color:#444}a{background:0 0;color:#258fd6;text-decoration:none}a:active,a:hover{outline:0;color:#444;text-decoration:underline}abbr{border-bottom:none;cursor:help;text-decoration:underline dotted}.button:hover,.menu.expanded li a:hover,.modal-btn-close,.pagination li.disabled a:hover{text-decoration:none}b,strong{font-weight:700}blockquote,dfn{font-style:italic}code,kbd,pre,samp{font-family:monospace;font-size:1.5rem}.sup,small,sub,sup{font-size:1.17rem}h1,h2,h3,h4,h5,h6{line-height:1;margin:3rem 0 1.5rem;font-weight:500}hr{height:0}img{border:0;height:auto;max-width:100%}pre{overflow:auto}.sup,sub,sup{line-height:0;position:relative}.sup,sup{top:-.75rem}sub{bottom:-.75rem}svg:not(:root){overflow:hidden}fieldset{border:none;padding:0}legend{margin-bottom:1.5rem;padding:0}label{padding-bottom:.3rem}button,input,select,textarea{font:inherit;height:3rem;margin:0;outline:0;padding-left:.4rem;padding-right:.4rem;width:100%}button,input{overflow:visible}.scrollable-table,textarea{overflow:auto}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=button],[type=reset],[type=submit],button{border-color:transparent;cursor:pointer;padding-left:.7rem;padding-right:.7rem;width:auto}textarea{height:auto}select{padding-left:.2rem;padding-right:0}optgroup{font-weight:700;font-style:normal}[type=checkbox],[type=radio]{height:auto;padding:0;width:auto}[type=file]{height:auto;padding:0}[disabled]:hover{cursor:not-allowed}table{border-collapse:collapse;border-spacing:0}caption,th{text-align:left}tr{border-bottom:1px solid;border-color:#bbb;transition-duration:.2s}td,th{height:3.5rem;padding-left:.7rem;padding-right:.7rem}.menu,ul.inline-list,ul.unstyled-list{padding-left:0}cite:before{content:"— "}.h1,.h2,.h3,.h4,.h5,.h6,.s1,.s2,.s3,.s4,.s5,.s6{height:auto}.h1,.s1,h1{font-size:2.5rem}.h2,.s2,h2{font-size:2rem}.h3,.s3,h3{font-size:1.67rem}.h4,.s4,h4{font-size:1.5rem}.h5,.s5,h5{font-size:1.33rem}.h6,.s6,h6{font-size:1.17rem}.heading-large{font-size:8rem}.heading-medium{font-size:6.5rem}.heading-small{font-size:4rem}.text-blue{color:#258fd6}.text-green{color:#239c56}.text-orange{color:#da7418}.text-red{color:#e43d29}ul.inline-list{font-size:0;margin:1.5rem 0}ul.inline-list li{display:inline-block;margin-left:.5rem;font-size:1.5rem}ul.inline-list li:first-child{margin-left:0}::-webkit-input-placeholder{font-style:italic;color:#999}::-moz-placeholder{font-style:italic;color:#999}:-ms-input-placeholder{font-style:italic;color:#999}:-moz-placeholder{font-style:italic;color:#999}tr:hover{background-color:#dbedf9;transition-duration:.2s}.gallery,.grid,.progress span{overflow:hidden}form .col{margin-bottom:1.5rem}form.inline-form button,form.inline-form input,form.inline-form label,form.inline-form select,form.inline-form textarea{display:inline-block;width:auto}form .col.label-centered{margin-bottom:0}form .label-centered label{padding-top:.3rem}button,input,select,textarea{border:1px solid #bbb;border-radius:.3rem;transition-duration:.2s}input:focus,select:focus,textarea:focus{border:1px solid #258fd6;transition-duration:.2s}[type=file]{border:none}button,input[type=button],input[type=reset],input[type=submit]{background-color:#777;color:#fff;transition-duration:.2s}button:hover,input[type=button]:hover,input[type=reset]:hover,input[type=submit]:hover{background-color:#555;transition-duration:.2s}button[disabled],button[disabled]:hover,input[disabled],input[disabled]:hover,select[disabled],select[disabled]:hover,textarea[disabled],textarea[disabled]:hover{background-color:#ddd;color:#aaa}button.blue,input[type=button].blue,input[type=reset].blue,input[type=submit].blue{background-color:#258fd6;color:#eee}button.blue:hover,input[type=button].blue:hover,input[type=reset].blue:hover,input[type=submit].blue:hover{background-color:#1f77b1}button.green,input[type=button].green,input[type=reset].green,input[type=submit].green{background-color:#239c56;color:#eee}button.green:hover,input[type=button].green:hover,input[type=reset].green:hover,input[type=submit].green:hover{background-color:#1c7943}button.orange,input[type=button].orange,input[type=reset].orange,input[type=submit].orange{background-color:#da7418;color:#eee}button.orange:hover,input[type=button].orange:hover,input[type=reset].orange:hover,input[type=submit].orange:hover{background-color:#b46014}button.red,input[type=button].red,input[type=reset].red,input[type=submit].red{background-color:#e43d29;color:#eee}button.red:hover,input[type=button].red:hover,input[type=reset].red:hover,input[type=submit].red:hover{background-color:#bc2818}button.yellow,input[type=button].yellow,input[type=reset].yellow,input[type=submit].yellow{background-color:#e0a800;color:#eee}button.yellow:hover,input[type=button].yellow:hover,input[type=reset].yellow:hover,input[type=submit].yellow:hover{background-color:#d39e00}.menu{font-size:0;margin:0}.menu.expanded li a,.responsive-menu label{height:3.5rem;line-height:3.5rem;padding-left:.7rem;padding-right:.7rem}.menu li{display:inline-block;font-size:1.5rem;margin-left:1.5rem}.menu li:first-child{margin-left:0}.menu li.active a{color:#444}.menu.vertical li{display:block;margin-left:0}.menu.expanded li{margin-left:0;transition-duration:.2s}.menu.expanded li:hover{border-radius:.3rem;background-color:#ddd;transition-duration:.2s}.menu.expanded li a{border-radius:.3rem;display:block}.menu.breadcrumb li+li:before,.menu.expanded.breadcrumb>li+li a:before{content:"/"}.menu.breadcrumb li+li:before,.menu.expanded.breadcrumb>li+li a:before,.menu.expanded.breadcrumb>li+li:before{margin-right:.7rem}.menu.expanded.breadcrumb>li+li:before{content:none}.menu.expanded li.active a,.menu.expanded li.active:hover{background-color:#258fd6;color:#fff}.responsive-menu label{background-color:#444;color:#fff;cursor:pointer;text-align:center}.responsive-menu input[type=checkbox],.responsive-menu label{display:none}.responsive-menu input[type=checkbox]:checked+ul{display:block}@media (max-width:47.938rem){.responsive-menu ul{display:none}.responsive-menu label,.responsive-menu ul li{display:block;margin-left:0}.responsive-menu ul li:hover{background-color:#ddd}.responsive-menu ul li a{display:block;height:3.5rem;line-height:3.5rem;padding-left:.7rem;padding-right:.7rem}.responsive-menu ul li a:hover{text-decoration:none}.responsive-menu .menu.breadcrumb li+li:before,.responsive-menu .menu.expanded.breadcrumb>li+li a:before{content:none}.responsive-menu ul li.active a,.responsive-menu ul li.active:hover{background-color:#258fd6;color:#fff}}.pagination{margin:0;padding:0;width:100%}.pagination ul,.pagination ul ul{display:inline-block;margin:0;padding:0}.pagination li,.pagination li li{display:inline-block;font-size:1.5rem;list-style-type:none;margin:10px;cursor:pointer}.pagination li.active a{color:red}.pagination li.disabled a{color:#999}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);transition:opacity .3s ease}.frame,.progress,.progress span{position:relative}.modal-container{width:450px;margin:40px auto 0;padding:20px 30px;background-color:#fff;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.33);transition:all .3s ease;font-family:Helvetica,Arial,sans-serif}.button,.button:hover{transition-duration:.2s}.modal-header{margin-top:0}.modal-body,.modal-footer{margin:20px 0}.modal-footer{text-align:right}.modal-container button:hover{color:#333;background-color:transparent}.modal-btn-close{background:0 0;border:0;height:1rem;line-height:1rem;margin-left:.2rem;margin-right:-2px;padding:0 2px;width:1rem;color:#999}.alert,.button,.progress{border-radius:.3rem}.modal-btn-close:after{display:inline-block;content:"\00d7"}.gallery{list-style:none;margin-left:-1.5rem;margin-right:-1.5rem;padding-left:0}.gallery li{float:left;padding:0 1.5rem 1.5rem}.alert{margin-bottom:1.5rem;padding:1.5rem}.alert a,.alert a:hover{color:inherit}.alert.blue{background-color:#dbedf9;color:#258fd6}.alert.green{background-color:#d3f5e2;color:#239c56}.alert.orange{background-color:#fbe8d9;color:#da7418}.alert.red{background-color:#fce4e2;color:#e43d29}.button{background-color:#777;color:#fff;padding:.9rem .7rem}.button:hover{background-color:#555}.button.blue{background-color:#258fd6;color:#eee}.button.blue:hover{background-color:#1f77b1}.button.green{background-color:#239c56;color:#eee}.button.green:hover{background-color:#1c7943}.button.orange{background-color:#da7418;color:#eee}.button.orange:hover{background-color:#b46014}.button.red{background-color:#e43d29;color:#eee}.button.red:hover{background-color:#bc2818}.button.yellow{background-color:#e0a800;color:#eee}.button.yellow:hover{background-color:#d39e00}.progress{background-color:#fff;border:1px solid #bbb;width:100%}.progress span{background-color:#258fd6;border-radius:.3rem;color:#fff;display:block;height:3.5rem;line-height:3.5rem;min-width:2.2rem;text-align:center}.progress span[style="width: 0%;"]{background:0 0;color:#444}.badge,.label{background-color:#258fd6;border-radius:.3rem;color:#fff;display:inline-block;margin-left:.4rem}.badge{line-height:1;padding:.2rem}.menu.expanded .active a .badge{background-color:#fff;color:#258fd6}.menu.vertical .badge{float:right}.menu.vertical.expanded .badge{margin-top:.8rem}.label{padding:.25rem .4rem}.frame{height:0;padding-top:56.25%}.frame embed,.frame iframe,.frame object,.frame video{height:100%;left:0;position:absolute;top:0;width:100%}.img-circle{border-radius:50%}.img-rounded{border-radius:.3rem}a.tooltip{position:relative;display:inline}.float-center,.show{display:block}a.tooltip span{font-size:1.3rem;line-height:1.7rem;position:absolute;min-width:140px;color:#fff;background:#555;min-height:30px;text-align:center;visibility:hidden;border-radius:4px;opacity:0;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}a.tooltip span:after{content:'';position:absolute;width:0;height:0}a:hover.tooltip span{visibility:visible;opacity:1;z-index:999}a.tooltip.tooltip-top span:after{top:100%;left:50%;margin-left:-8px;border-top:8px solid #555;border-right:8px solid transparent;border-left:8px solid transparent}a:hover.tooltip-top span{bottom:30px;left:50%;margin-left:-76px}a.tooltip.tooltip-right span:after{top:50%;right:100%;margin-top:-8px;border-right:8px solid #555;border-top:8px solid transparent;border-bottom:8px solid transparent}a:hover.tooltip-right span{left:100%;top:50%;margin-top:-15px;margin-left:15px}a.tooltip.tooltip-bottom span:after{bottom:100%;left:50%;margin-left:-8px;border-bottom:8px solid #555;border-right:8px solid transparent;border-left:8px solid transparent}a:hover.tooltip-bottom span{top:30px;left:50%;margin-left:-76px}a.tooltip.tooltip-left span:after{top:50%;left:100%;margin-top:-8px;border-left:8px solid #555;border-top:8px solid transparent;border-bottom:8px solid transparent}a:hover.tooltip-left span{right:100%;top:50%;margin-top:-15px;margin-right:15px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.float-left{float:left}.float-center{margin-left:auto;margin-right:auto}.float-right{float:right}.float-none{float:none}.hide{display:none}.full-width{width:100%}.width-auto{width:auto}.no-margin{margin:0}.no-padding{padding:0}.col,.container{padding-left:1.5rem;padding-right:1.5rem;width:100%}.sticky{position:-webkit-sticky;position:sticky;top:0}.container{margin:0 auto;max-width:1280px}.grid{margin-left:-1.5rem;margin-right:-1.5rem}.col{float:left;position:relative;min-height:1px}.col.sml-1,.gallery.sml-1 li{width:8.3333%}.col.sml-2,.gallery.sml-2 li{width:16.6666%}.col.sml-3,.gallery.sml-3 li{width:25%}.col.sml-4,.gallery.sml-4 li{width:33.3333%}.col.sml-5,.gallery.sml-5 li{width:41.6666%}.col.sml-6,.gallery.sml-6 li{width:50%}.col.sml-7,.gallery.sml-7 li{width:58.3333%}.col.sml-8,.gallery.sml-8 li{width:66.6666%}.col.sml-9,.gallery.sml-9 li{width:75%}.col.sml-10,.gallery.sml-10 li{width:83.3333%}.col.sml-11,.gallery.sml-11 li{width:91.6666%}.col.sml-12,.gallery.sml-12 li,.sml-full-width{width:100%}.col.sml-push-0{left:auto}.col.sml-push-1{left:8.3333%}.col.sml-push-2{left:16.6666%}.col.sml-push-3{left:25%}.col.sml-push-4{left:33.3333%}.col.sml-push-5{left:41.6666%}.col.sml-push-6{left:50%}.col.sml-push-7{left:58.3333%}.col.sml-push-8{left:66.6666%}.col.sml-push-9{left:75%}.col.sml-push-10{left:83.3333%}.col.sml-push-11{left:91.6666%}.col.sml-push-12{left:100%}.col.sml-pull-0{right:auto}.col.sml-pull-1{right:8.3333%}.col.sml-pull-2{right:16.6666%}.col.sml-pull-3{right:25%}.col.sml-pull-4{right:33.3333%}.col.sml-pull-5{right:41.6666%}.col.sml-pull-6{right:50%}.col.sml-pull-7{right:58.3333%}.col.sml-pull-8{right:66.6666%}.col.sml-pull-9{right:75%}.col.sml-pull-10{right:83.3333%}.col.sml-pull-11{right:91.6666%}.col.sml-pull-12{right:100%}.col.sml-offset-0{margin-left:0}.col.sml-offset-1{margin-left:8.3333%}.col.sml-offset-2{margin-left:16.6666%}.col.sml-offset-3{margin-left:25%}.col.sml-offset-4{margin-left:33.3333%}.col.sml-offset-5{margin-left:41.6666%}.col.sml-offset-6{margin-left:50%}.col.sml-offset-7{margin-left:58.3333%}.col.sml-offset-8{margin-left:66.6666%}.col.sml-offset-9{margin-left:75%}.col.sml-offset-10{margin-left:83.3333%}.col.sml-offset-11{margin-left:91.6666%}.col.sml-offset-12{margin-left:100%}.col.sml-centered,.sml-float-center{margin-left:auto;margin-right:auto}.col.sml-centered{float:none}.col.sml-uncentered,.sml-float-left{float:left}.sml-h1{font-size:2.5rem}.sml-h2{font-size:2rem}.sml-h3{font-size:1.67rem}.sml-h4{font-size:1.5rem}.sml-h5{font-size:1.33rem}.sml-h6{font-size:1.17rem}.sml-text-left{text-align:left}.sml-text-center{text-align:center}.sml-text-right{text-align:right}.sml-text-justify{text-align:justify}.sml-float-right{float:right}.sml-float-none{float:none}.sml-show{display:block}.sml-hide{display:none}.sml-width-auto{width:auto}.sml-no-margin{margin:0}.sml-no-padding{padding:0}@media (min-width:48rem){.container{padding-left:2rem;padding-right:2rem}.col.med-1,.gallery.med-1 li{width:8.3333%}.col.med-2,.gallery.med-2 li{width:16.6666%}.col.med-3,.gallery.med-3 li{width:25%}.col.med-4,.gallery.med-4 li{width:33.3333%}.col.med-5,.gallery.med-5 li{width:41.6666%}.col.med-6,.gallery.med-6 li{width:50%}.col.med-7,.gallery.med-7 li{width:58.3333%}.col.med-8,.gallery.med-8 li{width:66.6666%}.col.med-9,.gallery.med-9 li{width:75%}.col.med-10,.gallery.med-10 li{width:83.3333%}.col.med-11,.gallery.med-11 li{width:91.6666%}.col.med-12,.gallery.med-12 li,.med-full-width{width:100%}.col.med-push-0{left:auto}.col.med-push-1{left:8.3333%}.col.med-push-2{left:16.6666%}.col.med-push-3{left:25%}.col.med-push-4{left:33.3333%}.col.med-push-5{left:41.6666%}.col.med-push-6{left:50%}.col.med-push-7{left:58.3333%}.col.med-push-8{left:66.6666%}.col.med-push-9{left:75%}.col.med-push-10{left:83.3333%}.col.med-push-11{left:91.6666%}.col.med-push-12{left:100%}.col.med-pull-0{right:auto}.col.med-pull-1{right:8.3333%}.col.med-pull-2{right:16.6666%}.col.med-pull-3{right:25%}.col.med-pull-4{right:33.3333%}.col.med-pull-5{right:41.6666%}.col.med-pull-6{right:50%}.col.med-pull-7{right:58.3333%}.col.med-pull-8{right:66.6666%}.col.med-pull-9{right:75%}.col.med-pull-10{right:83.3333%}.col.med-pull-11{right:91.6666%}.col.med-pull-12{right:100%}.col.med-offset-0{margin-left:0}.col.med-offset-1{margin-left:8.3333%}.col.med-offset-2{margin-left:16.6666%}.col.med-offset-3{margin-left:25%}.col.med-offset-4{margin-left:33.3333%}.col.med-offset-5{margin-left:41.6666%}.col.med-offset-6{margin-left:50%}.col.med-offset-7{margin-left:58.3333%}.col.med-offset-8{margin-left:66.6666%}.col.med-offset-9{margin-left:75%}.col.med-offset-10{margin-left:83.3333%}.col.med-offset-11{margin-left:91.6666%}.col.med-offset-12{margin-left:100%}.col.med-centered,.med-float-center{margin-left:auto;margin-right:auto}.col.med-centered{float:none}.col.med-uncentered,.med-float-left{float:left}.med-h1{font-size:2.5rem}.med-h2{font-size:2rem}.med-h3{font-size:1.67rem}.med-h4{font-size:1.5rem}.med-h5{font-size:1.33rem}.med-h6{font-size:1.17rem}.med-text-left{text-align:left}.med-text-center{text-align:center}.med-text-right{text-align:right}.med-text-justify{text-align:justify}.med-float-right{float:right}.med-float-none{float:none}.med-show{display:block}.med-hide{display:none}.med-width-auto{width:auto}.med-no-margin{margin:0}.med-no-padding{padding:0}}@media (min-width:64rem){.container{padding-left:3rem;padding-right:3rem}.col.lrg-1,.gallery.lrg-1 li{width:8.3333%}.col.lrg-2,.gallery.lrg-2 li{width:16.6666%}.col.lrg-3,.gallery.lrg-3 li{width:25%}.col.lrg-4,.gallery.lrg-4 li{width:33.3333%}.col.lrg-5,.gallery.lrg-5 li{width:41.6666%}.col.lrg-6,.gallery.lrg-6 li{width:50%}.col.lrg-7,.gallery.lrg-7 li{width:58.3333%}.col.lrg-8,.gallery.lrg-8 li{width:66.6666%}.col.lrg-9,.gallery.lrg-9 li{width:75%}.col.lrg-10,.gallery.lrg-10 li{width:83.3333%}.col.lrg-11,.gallery.lrg-11 li{width:91.6666%}.col.lrg-12,.gallery.lrg-12 li,.lrg-full-width{width:100%}.col.lrg-push-0{left:auto}.col.lrg-push-1{left:8.3333%}.col.lrg-push-2{left:16.6666%}.col.lrg-push-3{left:25%}.col.lrg-push-4{left:33.3333%}.col.lrg-push-5{left:41.6666%}.col.lrg-push-6{left:50%}.col.lrg-push-7{left:58.3333%}.col.lrg-push-8{left:66.6666%}.col.lrg-push-9{left:75%}.col.lrg-push-10{left:83.3333%}.col.lrg-push-11{left:91.6666%}.col.lrg-push-12{left:100%}.col.lrg-pull-0{right:auto}.col.lrg-pull-1{right:8.3333%}.col.lrg-pull-2{right:16.6666%}.col.lrg-pull-3{right:25%}.col.lrg-pull-4{right:33.3333%}.col.lrg-pull-5{right:41.6666%}.col.lrg-pull-6{right:50%}.col.lrg-pull-7{right:58.3333%}.col.lrg-pull-8{right:66.6666%}.col.lrg-pull-9{right:75%}.col.lrg-pull-10{right:83.3333%}.col.lrg-pull-11{right:91.6666%}.col.lrg-pull-12{right:100%}.col.lrg-offset-0{margin-left:0}.col.lrg-offset-1{margin-left:8.3333%}.col.lrg-offset-2{margin-left:16.6666%}.col.lrg-offset-3{margin-left:25%}.col.lrg-offset-4{margin-left:33.3333%}.col.lrg-offset-5{margin-left:41.6666%}.col.lrg-offset-6{margin-left:50%}.col.lrg-offset-7{margin-left:58.3333%}.col.lrg-offset-8{margin-left:66.6666%}.col.lrg-offset-9{margin-left:75%}.col.lrg-offset-10{margin-left:83.3333%}.col.lrg-offset-11{margin-left:91.6666%}.col.lrg-offset-12{margin-left:100%}.col.lrg-centered,.lrg-float-center{margin-left:auto;margin-right:auto}.col.lrg-centered{float:none}.col.lrg-uncentered,.lrg-float-left{float:left}.lrg-h1{font-size:2.5rem}.lrg-h2{font-size:2rem}.lrg-h3{font-size:1.67rem}.lrg-h4{font-size:1.5rem}.lrg-h5{font-size:1.33rem}.lrg-h6{font-size:1.17rem}.lrg-text-left{text-align:left}.lrg-text-center{text-align:center}.lrg-text-right{text-align:right}.lrg-text-justify{text-align:justify}.lrg-float-right{float:right}.lrg-float-none{float:none}.lrg-show{display:block}.lrg-hide{display:none}.lrg-width-auto{width:auto}.lrg-no-margin{margin:0}.lrg-no-padding{padding:0}}
\ No newline at end of file
From b816f1105c2731e733779333cd46215e1d5bdf90 Mon Sep 17 00:00:00 2001
From: Stephane
Date: Mon, 4 Dec 2017 10:34:10 +0000
Subject: [PATCH 08/15] global unix file format conversion
---
.gitignore | 6 +-
config.php | 4 +-
core/lang/de/core.php | 280 +--
core/lang/de/install.php | 70 +-
core/lang/de/update.php | 116 +-
core/lang/en/core.php | 280 +--
core/lang/en/install.php | 70 +-
core/lang/en/update.php | 118 +-
core/lang/es/core.php | 280 +--
core/lang/es/install.php | 70 +-
core/lang/es/update.php | 116 +-
core/lang/fr/core.php | 280 +--
core/lang/fr/install.php | 72 +-
core/lang/fr/update.php | 120 +-
core/lang/nl/core.php | 280 +--
core/lang/nl/install.php | 70 +-
core/lang/nl/update.php | 116 +-
core/lang/pl/core.php | 280 +--
core/lang/pl/install.php | 72 +-
core/lang/pl/update.php | 118 +-
core/lang/pt/core.php | 280 +--
core/lang/pt/install.php | 72 +-
core/lang/pt/update.php | 116 +-
core/lang/ro/core.php | 280 +--
core/lang/ro/install.php | 70 +-
core/lang/ro/update.php | 116 +-
core/lang/ru/core.php | 280 +--
core/lang/ru/install.php | 70 +-
core/lang/ru/update.php | 120 +-
core/lib/class.plx.date.php | 338 +--
core/lib/class.plx.glob.php | 460 ++--
core/lib/class.plx.msg.php | 102 +-
core/lib/class.plx.plugins.php | 1390 +++++------
core/lib/class.plx.record.php | 130 +-
core/lib/class.plx.show.php | 3900 +++++++++++++++---------------
core/lib/class.plx.timezones.php | 278 +--
core/lib/class.plx.token.php | 88 +-
core/lib/class.plx.utils.php | 2132 ++++++++--------
data/articles/.htaccess | 8 +-
data/commentaires/.htaccess | 8 +-
data/statiques/.htaccess | 8 +-
index.php | 192 +-
install.php | 684 +++---
update/class.plx.updater.php | 404 ++--
update/index.php | 270 +--
update/versions.php | 62 +-
46 files changed, 7338 insertions(+), 7338 deletions(-)
diff --git a/.gitignore b/.gitignore
index d23cc236a..effef2432 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-/data/
-/plugins/
-!/themes/defaut/
+/data/
+/plugins/
+!/themes/defaut/
/themes/
\ No newline at end of file
diff --git a/config.php b/config.php
index 6344ccc6f..11b4d603e 100644
--- a/config.php
+++ b/config.php
@@ -1,3 +1,3 @@
-
\ No newline at end of file
diff --git a/core/lang/de/core.php b/core/lang/de/core.php
index f67a10e51..742e22b6e 100644
--- a/core/lang/de/core.php
+++ b/core/lang/de/core.php
@@ -1,140 +1,140 @@
- 'Deutsch',
-
-'L_DATE_CREATION' => 'Erstellungsdatum',
-'L_DATE_UPDATE' => 'Datum der Aktualisierung',
-
-# common
-'L_PLUXML_VERSION' => 'Pluxml Version',
-'L_HOMEPAGE' => 'Homepage',
-'L_UNCLASSIFIED' => 'Nicht kategorisiert',
-'L_INFO_PHP_VERSION' => 'PHP Version',
-'L_INFO_MAGIC_QUOTES' => '"magic quotes" Status',
-'L_INFO_CHARSET' => 'Kodierung',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'Der Haupttheme von PluXml konnte nicht gefunden werden.',
-'L_ERR_FILE_NOTFOUND' => 'Die angeforderte Datei konnte von PluXml nicht gefunden werden.',
-'L_ERR_PAGE_NOT_FOUND' => 'Seite nicht gefunden',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'jan',
-'L_SHORT_FEBRUARY' => 'feb',
-'L_SHORT_MARCH' => 'märz',
-'L_SHORT_APRIL' => 'apr',
-'L_SHORT_MAY' => 'mai',
-'L_SHORT_JUNE' => 'juni',
-'L_SHORT_JULY' => 'juli',
-'L_SHORT_AUGUST' => 'aug',
-'L_SHORT_SEPTEMBER' => 'sept',
-'L_SHORT_OCTOBER' => 'okt',
-'L_SHORT_NOVEMBER' => 'nov',
-'L_SHORT_DECEMBER' => 'dez',
-'L_JANUARY' => 'Januar',
-'L_FEBRUARY' => 'Februar',
-'L_MARCH' => 'März',
-'L_APRIL' => 'April',
-'L_MAY' => 'Mai',
-'L_JUNE' => 'Juni',
-'L_JULY' => 'Juli',
-'L_AUGUST' => 'August',
-'L_SEPTEMBER' => 'September',
-'L_OCTOBER' => 'Oktober',
-'L_NOVEMBER' => 'November',
-'L_DECEMBER' => 'Dezember',
-'L_MONDAY' => 'Montag',
-'L_TUESDAY' => 'Dienstag',
-'L_WEDNESDAY' => 'Mittwoch',
-'L_THURSDAY' => 'Donnerstag',
-'L_FRIDAY' => 'Freitag',
-'L_SATURDAY' => 'Samstag',
-'L_SUNDAY' => 'Sonntag',
-
-# class.plx.capcha.php
-'L_LAST' => 'letzte',
-'L_FIRST' => 'erste',
-'L_SECOND' => 'zweiste',
-'L_THIRD' => 'dritte',
-'L_FOURTH' => 'vierte',
-'L_FIFTH' => 'fünfte',
-'L_SIXTH' => 'sechste',
-'L_SEVENTH' => 'siebte',
-'L_EIGTH' => 'achte',
-'L_NINTH' => 'neunte',
-'L_TENTH' => 'zehnte',
-'L_NTH' => 'te',
-'L_CAPCHA_QUESTION' => 'Was ist der %s Buchstabe des Wortes %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s ist schreibbar',
-'L_WRITE_NOT_ACCESS' => '%s ist nicht schreibbar',
-'L_MODREWRITE_AVAILABLE' => 'mod_rewrite APACHE-modul ist verfügbar',
-'L_MODREWRITE_NOT_AVAILABLE'=> 'mod_rewrite APACHE-Modul ist nicht verfügbar',
-'L_LIBGD_INSTALLED' => 'GD Grafikbibliothek ist verfügbar',
-'L_LIBGD_NOT_INSTALLED' => 'GD Grafikbibliothek ist nicht verfügbar',
-'L_LIBXML_INSTALLED' => 'XML Grafikbibliothek ist verfügbar',
-'L_LIBXML_NOT_INSTALLED' => 'XML Grafikbibliothek ist nicht verfügbar',
-'L_MAIL_AVAILABLE' => 'E-Mail versenden ist möglich',
-'L_MAIL_NOT_AVAILABLE' => 'E-Mail versenden ist nicht möglich',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'Es gibt keinen Artikel für dieses Schlagwort!',
-'L_UNKNOWN_CATEGORY' => 'Diese Kategorie existiert nicht!',
-'L_NO_ARTICLE_PAGE' => 'Es gibt keinen Artikel für diese Seite!',
-'L_UNKNOWN_ARTICLE' => 'Dieser Artikel existiert nicht oder nicht mehr!',
-'L_COM_IN_MODERATION' => 'Der Kommentar muss erst vom Administrator moderiert werden.',
-'L_UNKNOWN_STATIC' => 'Diese Seite existiert nicht oder nicht mehr!',
-'L_DOCUMENT_NOT_FOUND' => 'Das angeforderte Dokument kann nicht gefunden werden.',
-'L_NEWCOMMENT_ERR' => 'Es gab einen Fehler beim Anlegen dieses Kommentars.',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Sie müssen alle Pflichtfelder ausfüllen',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'Anti-SPAM Überprüfung fehlgeschlagen',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Datenkompression %s aktiviert',
-'L_PAGETITLE_ARCHIVES' => 'Archive',
-'L_PAGETITLE_TAG' => 'Tag',
-'L_NO_CATEGORY' => 'keine Kategorie',
-'L_CATEGORY' => 'Kategorie',
-'L_CATEGORIES' => 'Kategorien',
-'L_NO_ARTICLE' => 'keine Artikel',
-'L_ARTICLE' => 'Artikel',
-'L_ARTICLES' => 'Artikel',
-'L_ARTAUTHOR_UNKNOWN' => 'unbekannt',
-'L_ARTTAGS_NONE' => 'kein',
-'L_ARTCHAPO' => 'Den Artikel #art_title lesen',
-'L_ARTFEED_RSS_CATEGORY' => 'Artikel-Feed (RSS) dieser Kategorie',
-'L_ARTFEED_RSS_TAG' => 'Artikel-Feed (RSS) dieser Tag',
-'L_ARTFEED_RSS' => 'Artikel-Feed (RSS)',
-'L_NO_COMMENT' => 'keine Kommentare',
-'L_COMMENT' => 'Kommentar',
-'L_COMMENTS' => 'Kommentare',
-'L_COMFEED_RSS_ARTICLE' => 'Kommentare-Feed (RSS) dieses Artikels',
-'L_COMFEED_RSS' => 'Kommentare-Feed (RSS)',
-'L_STATICCONTENT_INPROCESS' => 'Diese Seite wird gerade bearbeitet',
-'L_SAID' => 'sagte',
-
-'L_PAGINATION_FIRST_TITLE' => 'Zur ersten Seite',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Letzte Seite',
-'L_PAGINATION_PREVIOUS' => 'Letzte',
-'L_PAGINATION_NEXT_TITLE' => 'Nächste Seite',
-'L_PAGINATION_NEXT' => 'Nächste',
-'L_PAGINATION_LAST_TITLE' => 'Zur letzten Seite',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'Seite %s auf %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Private URLs wurden in der Administration nicht konfiguriert!',
-'L_FEED_COMMENTS' => 'Kommentare',
-'L_FEED_ONLINE_COMMENTS' => 'Online Kommentare',
-'L_FEED_OFFLINE_COMMENTS' => 'Offline Kommentaire',
-'L_FEED_WRITTEN_BY' => 'Geschrieben von',
-
-);
-?>
+ 'Deutsch',
+
+'L_DATE_CREATION' => 'Erstellungsdatum',
+'L_DATE_UPDATE' => 'Datum der Aktualisierung',
+
+# common
+'L_PLUXML_VERSION' => 'Pluxml Version',
+'L_HOMEPAGE' => 'Homepage',
+'L_UNCLASSIFIED' => 'Nicht kategorisiert',
+'L_INFO_PHP_VERSION' => 'PHP Version',
+'L_INFO_MAGIC_QUOTES' => '"magic quotes" Status',
+'L_INFO_CHARSET' => 'Kodierung',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'Der Haupttheme von PluXml konnte nicht gefunden werden.',
+'L_ERR_FILE_NOTFOUND' => 'Die angeforderte Datei konnte von PluXml nicht gefunden werden.',
+'L_ERR_PAGE_NOT_FOUND' => 'Seite nicht gefunden',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'jan',
+'L_SHORT_FEBRUARY' => 'feb',
+'L_SHORT_MARCH' => 'märz',
+'L_SHORT_APRIL' => 'apr',
+'L_SHORT_MAY' => 'mai',
+'L_SHORT_JUNE' => 'juni',
+'L_SHORT_JULY' => 'juli',
+'L_SHORT_AUGUST' => 'aug',
+'L_SHORT_SEPTEMBER' => 'sept',
+'L_SHORT_OCTOBER' => 'okt',
+'L_SHORT_NOVEMBER' => 'nov',
+'L_SHORT_DECEMBER' => 'dez',
+'L_JANUARY' => 'Januar',
+'L_FEBRUARY' => 'Februar',
+'L_MARCH' => 'März',
+'L_APRIL' => 'April',
+'L_MAY' => 'Mai',
+'L_JUNE' => 'Juni',
+'L_JULY' => 'Juli',
+'L_AUGUST' => 'August',
+'L_SEPTEMBER' => 'September',
+'L_OCTOBER' => 'Oktober',
+'L_NOVEMBER' => 'November',
+'L_DECEMBER' => 'Dezember',
+'L_MONDAY' => 'Montag',
+'L_TUESDAY' => 'Dienstag',
+'L_WEDNESDAY' => 'Mittwoch',
+'L_THURSDAY' => 'Donnerstag',
+'L_FRIDAY' => 'Freitag',
+'L_SATURDAY' => 'Samstag',
+'L_SUNDAY' => 'Sonntag',
+
+# class.plx.capcha.php
+'L_LAST' => 'letzte',
+'L_FIRST' => 'erste',
+'L_SECOND' => 'zweiste',
+'L_THIRD' => 'dritte',
+'L_FOURTH' => 'vierte',
+'L_FIFTH' => 'fünfte',
+'L_SIXTH' => 'sechste',
+'L_SEVENTH' => 'siebte',
+'L_EIGTH' => 'achte',
+'L_NINTH' => 'neunte',
+'L_TENTH' => 'zehnte',
+'L_NTH' => 'te',
+'L_CAPCHA_QUESTION' => 'Was ist der %s Buchstabe des Wortes %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s ist schreibbar',
+'L_WRITE_NOT_ACCESS' => '%s ist nicht schreibbar',
+'L_MODREWRITE_AVAILABLE' => 'mod_rewrite APACHE-modul ist verfügbar',
+'L_MODREWRITE_NOT_AVAILABLE'=> 'mod_rewrite APACHE-Modul ist nicht verfügbar',
+'L_LIBGD_INSTALLED' => 'GD Grafikbibliothek ist verfügbar',
+'L_LIBGD_NOT_INSTALLED' => 'GD Grafikbibliothek ist nicht verfügbar',
+'L_LIBXML_INSTALLED' => 'XML Grafikbibliothek ist verfügbar',
+'L_LIBXML_NOT_INSTALLED' => 'XML Grafikbibliothek ist nicht verfügbar',
+'L_MAIL_AVAILABLE' => 'E-Mail versenden ist möglich',
+'L_MAIL_NOT_AVAILABLE' => 'E-Mail versenden ist nicht möglich',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'Es gibt keinen Artikel für dieses Schlagwort!',
+'L_UNKNOWN_CATEGORY' => 'Diese Kategorie existiert nicht!',
+'L_NO_ARTICLE_PAGE' => 'Es gibt keinen Artikel für diese Seite!',
+'L_UNKNOWN_ARTICLE' => 'Dieser Artikel existiert nicht oder nicht mehr!',
+'L_COM_IN_MODERATION' => 'Der Kommentar muss erst vom Administrator moderiert werden.',
+'L_UNKNOWN_STATIC' => 'Diese Seite existiert nicht oder nicht mehr!',
+'L_DOCUMENT_NOT_FOUND' => 'Das angeforderte Dokument kann nicht gefunden werden.',
+'L_NEWCOMMENT_ERR' => 'Es gab einen Fehler beim Anlegen dieses Kommentars.',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Sie müssen alle Pflichtfelder ausfüllen',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'Anti-SPAM Überprüfung fehlgeschlagen',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Datenkompression %s aktiviert',
+'L_PAGETITLE_ARCHIVES' => 'Archive',
+'L_PAGETITLE_TAG' => 'Tag',
+'L_NO_CATEGORY' => 'keine Kategorie',
+'L_CATEGORY' => 'Kategorie',
+'L_CATEGORIES' => 'Kategorien',
+'L_NO_ARTICLE' => 'keine Artikel',
+'L_ARTICLE' => 'Artikel',
+'L_ARTICLES' => 'Artikel',
+'L_ARTAUTHOR_UNKNOWN' => 'unbekannt',
+'L_ARTTAGS_NONE' => 'kein',
+'L_ARTCHAPO' => 'Den Artikel #art_title lesen',
+'L_ARTFEED_RSS_CATEGORY' => 'Artikel-Feed (RSS) dieser Kategorie',
+'L_ARTFEED_RSS_TAG' => 'Artikel-Feed (RSS) dieser Tag',
+'L_ARTFEED_RSS' => 'Artikel-Feed (RSS)',
+'L_NO_COMMENT' => 'keine Kommentare',
+'L_COMMENT' => 'Kommentar',
+'L_COMMENTS' => 'Kommentare',
+'L_COMFEED_RSS_ARTICLE' => 'Kommentare-Feed (RSS) dieses Artikels',
+'L_COMFEED_RSS' => 'Kommentare-Feed (RSS)',
+'L_STATICCONTENT_INPROCESS' => 'Diese Seite wird gerade bearbeitet',
+'L_SAID' => 'sagte',
+
+'L_PAGINATION_FIRST_TITLE' => 'Zur ersten Seite',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Letzte Seite',
+'L_PAGINATION_PREVIOUS' => 'Letzte',
+'L_PAGINATION_NEXT_TITLE' => 'Nächste Seite',
+'L_PAGINATION_NEXT' => 'Nächste',
+'L_PAGINATION_LAST_TITLE' => 'Zur letzten Seite',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'Seite %s auf %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Private URLs wurden in der Administration nicht konfiguriert!',
+'L_FEED_COMMENTS' => 'Kommentare',
+'L_FEED_ONLINE_COMMENTS' => 'Online Kommentare',
+'L_FEED_OFFLINE_COMMENTS' => 'Offline Kommentaire',
+'L_FEED_WRITTEN_BY' => 'Geschrieben von',
+
+);
+?>
diff --git a/core/lang/de/install.php b/core/lang/de/install.php
index a12f8e070..044df3a1f 100644
--- a/core/lang/de/install.php
+++ b/core/lang/de/install.php
@@ -1,36 +1,36 @@
- 'Installation',
-'L_WRONG_PHP_VERSION' => 'PluXml benötigt mindestens PHP 5 um zu funktionieren.',
-'L_SELECT_LANG' => 'Wählen Sie Ihre Sprache',
-'L_INPUT_CHANGE' => 'Ändern',
-'L_DEFAULT_CATEGORY_TITLE' => 'Kategorie 1',
-'L_DEFAULT_CATEGORY_URL' => 'kategorie-1',
-'L_DEFAULT_STATIC_TITLE' => 'Statische 1',
-'L_DEFAULT_STATIC_URL' => 'statische-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Erster Artikel',
-'L_DEFAULT_ARTICLE_URL' => 'erster-artikel',
-'L_DEFAULT_COMMENT_CONTENT' => 'Das ist der erste Kommentar!',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml ist bereits installiert!',
-'L_ERR_MISSING_USER' => 'Geben Sie einen Namen für den Administrator ein!',
-'L_ERR_MISSING_LOGIN' => 'Geben Sie einen Benutzername ein!',
-'L_ERR_MISSING_PASSWORD' => 'Geben Sie ein Passwort ein!',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Die Passwörter sind nicht identisch!',
-'L_PLUXML_INSTALLATION' => 'Installation von PluXml',
-'L_SITE_DESCRIPTION' => 'Blog oder CMS basierend auf Xml!',
-'L_VERSION' => 'Version',
-'L_USERNAME' => 'Name des Administrators',
-'L_LOGIN' => 'Benutzername',
-'L_PASSWORD' => 'Passwort',
-'L_PASSWORD_CONFIRMATION' => 'Passwort wiederholen',
-'L_INPUT_INSTALL' => 'Installieren',
-'L_TIMEZONE' => 'Zeitzone',
-'L_PWD_VERY_WEAK' => 'Sehr schwaches Passwort',
-'L_PWD_WEAK' => 'Schwaches Passwort',
-'L_PWD_GOOD' => 'Gutes Passwort',
-'L_PWD_STRONG' => 'Starkes Passwort',
-);
+ 'Installation',
+'L_WRONG_PHP_VERSION' => 'PluXml benötigt mindestens PHP 5 um zu funktionieren.',
+'L_SELECT_LANG' => 'Wählen Sie Ihre Sprache',
+'L_INPUT_CHANGE' => 'Ändern',
+'L_DEFAULT_CATEGORY_TITLE' => 'Kategorie 1',
+'L_DEFAULT_CATEGORY_URL' => 'kategorie-1',
+'L_DEFAULT_STATIC_TITLE' => 'Statische 1',
+'L_DEFAULT_STATIC_URL' => 'statische-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Erster Artikel',
+'L_DEFAULT_ARTICLE_URL' => 'erster-artikel',
+'L_DEFAULT_COMMENT_CONTENT' => 'Das ist der erste Kommentar!',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml ist bereits installiert!',
+'L_ERR_MISSING_USER' => 'Geben Sie einen Namen für den Administrator ein!',
+'L_ERR_MISSING_LOGIN' => 'Geben Sie einen Benutzername ein!',
+'L_ERR_MISSING_PASSWORD' => 'Geben Sie ein Passwort ein!',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Die Passwörter sind nicht identisch!',
+'L_PLUXML_INSTALLATION' => 'Installation von PluXml',
+'L_SITE_DESCRIPTION' => 'Blog oder CMS basierend auf Xml!',
+'L_VERSION' => 'Version',
+'L_USERNAME' => 'Name des Administrators',
+'L_LOGIN' => 'Benutzername',
+'L_PASSWORD' => 'Passwort',
+'L_PASSWORD_CONFIRMATION' => 'Passwort wiederholen',
+'L_INPUT_INSTALL' => 'Installieren',
+'L_TIMEZONE' => 'Zeitzone',
+'L_PWD_VERY_WEAK' => 'Sehr schwaches Passwort',
+'L_PWD_WEAK' => 'Schwaches Passwort',
+'L_PWD_GOOD' => 'Gutes Passwort',
+'L_PWD_STRONG' => 'Starkes Passwort',
+);
?>
\ No newline at end of file
diff --git a/core/lang/de/update.php b/core/lang/de/update.php
index c7484ae61..f54a32e8c 100644
--- a/core/lang/de/update.php
+++ b/core/lang/de/update.php
@@ -1,59 +1,59 @@
- 'Daten erfolgreich gespeichert',
-'L_UPDATE_TITLE' => 'Aktualisierung PluXml',
-'L_WRONG_PHP_VERSION' => 'PluXml benötigt mindestens PHP 5 um zu funktionieren.',
-
-'L_SELECT_LANG' => 'Wählen Sie Ihre Sprache',
-'L_INPUT_CHANGE' => 'Ändern',
-
-'L_UPDATE_UPTODATE' => 'Ihre PluXml ist bereits aktualisiert.',
-'L_UPDATE_NOT_AVAILABLE' => 'Es gibt keine Aktualisierung.',
-'L_UPDATE_BACK' => 'Zurück zur Website',
-'L_UPDATE_WARNING1' => 'Ihr altes PluXml wird aktualisiert.',
-'L_UPDATE_SELECT_VERSION' => 'Wählen Sie Ihre alte PluXml Version.',
-'L_UPDATE_WARNING2' => 'Wenn Ihre alte PluXml Version nicht angezeigt wird, ist sie zu alt. Wir empfehlen Ihnen die neuste Version von PluXml zu laden und neu zu installieren.',
-'L_UPDATE_WARNING3' => 'Warnung: Vergessen Sie nicht, vor der Aktualisierung das Verzeichnis "data" zu sichern.',
-'L_UPDATE_START' => 'Aktualisierung starten',
-
-'L_UPDATE_ENDED' => 'Aktualisierung der Version %s beendet.',
-'L_UPDATE_INPROGRESS' => 'Updating version',
-'L_UPDATE_ERROR' => 'Ein Fehler der Aktualisierung ist aufgetreten.',
-'L_UPDATE_SUCCESSFUL' => 'Alle Aktualisierungen wurden erfolgreich durchgeführt!',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Aktualisierung der Datei parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Dateierstellung tags.xml',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Fehler der Dateierstellung tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Dateierstellung theme',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Fehler der Dateierstellung',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Artikelkonvertierung',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Fehler der Dateiverarbeitung',
-'L_UPDATE_STATICS_MIGRATION' => 'Dateiverarbeitung der statischen Seiten',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Fehler der Dateiverarbeitung der statischen Seiten',
-'L_UPDATE_CREATE_USERS_FILE' => 'Dateierstellung der Benutzer',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Fehler der Dateierstellung der Benutzer',
-'L_UPDATE_USERS_MIGRATION' => 'Dateiverarbeitung der Benutzer',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Fehler der Dateiverarbeitung der Benutzer',
-'L_UPDATE_ERR_NO_USERS' => 'Es gibt keine Benutzer',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Dateierstellung .htaccess',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Fehler der Dateierstellung .htaccess',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Aktualisieren Sie die Datei .htaccess',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Fehler beim Aktualisieren der Datei .htaccess',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Dateiverarbeitung der Kategorien',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Fehler der Dateiverarbeitung der Kategorien',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Dateierstellung plugins.xml',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Fehler beim Löschen von plugins.xml',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Dateilöschung core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE' => 'Fehler beim Löschen von core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Dateilöschung core/plxtoolbar/',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Fehler der Dateilöschung core/plxtoolbar/',
-'L_UPDATE_FILE' => 'Update Datei',
-'L_UPDATE_ERR_FILE' => 'Fehler während des Dateiupdates',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migration Plugin-Einstellungen im Konfigurationverzeichnis',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Aktualisierung der Datei plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Migration Kommentare',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Fehler beim Migrieren der Kommentare',
-);
+ 'Daten erfolgreich gespeichert',
+'L_UPDATE_TITLE' => 'Aktualisierung PluXml',
+'L_WRONG_PHP_VERSION' => 'PluXml benötigt mindestens PHP 5 um zu funktionieren.',
+
+'L_SELECT_LANG' => 'Wählen Sie Ihre Sprache',
+'L_INPUT_CHANGE' => 'Ändern',
+
+'L_UPDATE_UPTODATE' => 'Ihre PluXml ist bereits aktualisiert.',
+'L_UPDATE_NOT_AVAILABLE' => 'Es gibt keine Aktualisierung.',
+'L_UPDATE_BACK' => 'Zurück zur Website',
+'L_UPDATE_WARNING1' => 'Ihr altes PluXml wird aktualisiert.',
+'L_UPDATE_SELECT_VERSION' => 'Wählen Sie Ihre alte PluXml Version.',
+'L_UPDATE_WARNING2' => 'Wenn Ihre alte PluXml Version nicht angezeigt wird, ist sie zu alt. Wir empfehlen Ihnen die neuste Version von PluXml zu laden und neu zu installieren.',
+'L_UPDATE_WARNING3' => 'Warnung: Vergessen Sie nicht, vor der Aktualisierung das Verzeichnis "data" zu sichern.',
+'L_UPDATE_START' => 'Aktualisierung starten',
+
+'L_UPDATE_ENDED' => 'Aktualisierung der Version %s beendet.',
+'L_UPDATE_INPROGRESS' => 'Updating version',
+'L_UPDATE_ERROR' => 'Ein Fehler der Aktualisierung ist aufgetreten.',
+'L_UPDATE_SUCCESSFUL' => 'Alle Aktualisierungen wurden erfolgreich durchgeführt!',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Aktualisierung der Datei parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Dateierstellung tags.xml',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Fehler der Dateierstellung tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Dateierstellung theme',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Fehler der Dateierstellung',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Artikelkonvertierung',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Fehler der Dateiverarbeitung',
+'L_UPDATE_STATICS_MIGRATION' => 'Dateiverarbeitung der statischen Seiten',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Fehler der Dateiverarbeitung der statischen Seiten',
+'L_UPDATE_CREATE_USERS_FILE' => 'Dateierstellung der Benutzer',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Fehler der Dateierstellung der Benutzer',
+'L_UPDATE_USERS_MIGRATION' => 'Dateiverarbeitung der Benutzer',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Fehler der Dateiverarbeitung der Benutzer',
+'L_UPDATE_ERR_NO_USERS' => 'Es gibt keine Benutzer',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Dateierstellung .htaccess',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Fehler der Dateierstellung .htaccess',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Aktualisieren Sie die Datei .htaccess',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Fehler beim Aktualisieren der Datei .htaccess',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Dateiverarbeitung der Kategorien',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Fehler der Dateiverarbeitung der Kategorien',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Dateierstellung plugins.xml',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Fehler beim Löschen von plugins.xml',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Dateilöschung core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE' => 'Fehler beim Löschen von core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Dateilöschung core/plxtoolbar/',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Fehler der Dateilöschung core/plxtoolbar/',
+'L_UPDATE_FILE' => 'Update Datei',
+'L_UPDATE_ERR_FILE' => 'Fehler während des Dateiupdates',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migration Plugin-Einstellungen im Konfigurationverzeichnis',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Aktualisierung der Datei plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Migration Kommentare',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Fehler beim Migrieren der Kommentare',
+);
?>
\ No newline at end of file
diff --git a/core/lang/en/core.php b/core/lang/en/core.php
index 18733cf88..85bc6adc6 100644
--- a/core/lang/en/core.php
+++ b/core/lang/en/core.php
@@ -1,140 +1,140 @@
- 'English',
-
-'L_DATE_CREATION' => 'Creation date',
-'L_DATE_UPDATE' => 'Date updated',
-
-# common
-'L_PLUXML_VERSION' => 'PluXml version',
-'L_HOMEPAGE' => 'Homepage',
-'L_UNCLASSIFIED' => 'Uncategorized',
-'L_INFO_PHP_VERSION' => 'PHP version',
-'L_INFO_MAGIC_QUOTES' => 'State of "magic quotes"',
-'L_INFO_CHARSET' => 'charset',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'Main PluXml theme not found',
-'L_ERR_FILE_NOTFOUND' => 'PluXml target file not found',
-'L_ERR_PAGE_NOT_FOUND' => 'Page not found',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'jan',
-'L_SHORT_FEBRUARY' => 'feb',
-'L_SHORT_MARCH' => 'mar',
-'L_SHORT_APRIL' => 'apr',
-'L_SHORT_MAY' => 'may',
-'L_SHORT_JUNE' => 'june',
-'L_SHORT_JULY' => 'july',
-'L_SHORT_AUGUST' => 'aug',
-'L_SHORT_SEPTEMBER' => 'sept',
-'L_SHORT_OCTOBER' => 'oct',
-'L_SHORT_NOVEMBER' => 'nov',
-'L_SHORT_DECEMBER' => 'dec',
-'L_JANUARY' => 'january',
-'L_FEBRUARY' => 'february',
-'L_MARCH' => 'march',
-'L_APRIL' => 'april',
-'L_MAY' => 'may',
-'L_JUNE' => 'june',
-'L_JULY' => 'july',
-'L_AUGUST' => 'august',
-'L_SEPTEMBER' => 'september',
-'L_OCTOBER' => 'october',
-'L_NOVEMBER' => 'november',
-'L_DECEMBER' => 'december',
-'L_MONDAY' => 'monday',
-'L_TUESDAY' => 'tuesday',
-'L_WEDNESDAY' => 'wednesday',
-'L_THURSDAY' => 'thursday',
-'L_FRIDAY' => 'friday',
-'L_SATURDAY' => 'saturday',
-'L_SUNDAY' => 'sunday',
-
-# class.plx.capcha.php
-'L_LAST' => 'last',
-'L_FIRST' => 'first',
-'L_SECOND' => 'second',
-'L_THIRD' => 'third',
-'L_FOURTH' => 'fourth',
-'L_FIFTH' => 'fifth',
-'L_SIXTH' => 'sixth',
-'L_SEVENTH' => 'seventh',
-'L_EIGTH' => 'eighth',
-'L_NINTH' => 'ninth',
-'L_TENTH' => 'tenth',
-'L_NTH' => 'nth',
-'L_CAPCHA_QUESTION' => 'What is the %s letter of the word %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s has write access',
-'L_WRITE_NOT_ACCESS' => '%s does not have write access or does not exist',
-'L_MODREWRITE_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite available',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite unavailable',
-'L_LIBGD_INSTALLED' => 'GD library installed',
-'L_LIBGD_NOT_INSTALLED' => 'GD library not installed',
-'L_LIBXML_INSTALLED' => 'XML library installed',
-'L_LIBXML_NOT_INSTALLED' => 'XML library not installed',
-'L_MAIL_AVAILABLE' => 'Mail sending function available',
-'L_MAIL_NOT_AVAILABLE' => 'Mail sending function unavailable',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'No article has been found for this tag!',
-'L_UNKNOWN_CATEGORY' => 'This category does not exist!!',
-'L_NO_ARTICLE_PAGE' => 'No article has been found for this page!',
-'L_UNKNOWN_ARTICLE' => 'This article does not exist or does not exist anymore!',
-'L_COM_IN_MODERATION' => 'The comment is being reviewed by this site\'s administrator',
-'L_UNKNOWN_STATIC' => 'This page does not exist or does not exist anymore!',
-'L_DOCUMENT_NOT_FOUND' => 'Document not found',
-'L_NEWCOMMENT_ERR' => 'An error occurred during comment\'s publication',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Please fill all the required fields',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'Antispam verification failed',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Compression %s activated',
-'L_PAGETITLE_ARCHIVES' => 'Archives',
-'L_PAGETITLE_TAG' => 'Tag',
-'L_NO_CATEGORY' => 'no categorie',
-'L_CATEGORY' => 'category',
-'L_CATEGORIES' => 'categories',
-'L_NO_ARTICLE' => 'no article',
-'L_ARTICLE' => 'article',
-'L_ARTICLES' => 'articles',
-'L_ARTAUTHOR_UNKNOWN' => 'unknown',
-'L_ARTTAGS_NONE' => 'none',
-'L_ARTCHAPO' => 'Read more #art_title',
-'L_ARTFEED_RSS_CATEGORY' => 'Rss feed of the category',
-'L_ARTFEED_RSS_TAG' => 'Rss feed of the tag',
-'L_ARTFEED_RSS' => 'Rss feed of the articles',
-'L_NO_COMMENT' => 'no comments',
-'L_COMMENT' => 'comment',
-'L_COMMENTS' => 'comments',
-'L_COMFEED_RSS_ARTICLE' => 'Rss feed of the article\'s comments',
-'L_COMFEED_RSS' => 'Rss feed of comments',
-'L_STATICCONTENT_INPROCESS' => 'This page is currently being edited',
-'L_SAID' => 'said',
-
-'L_PAGINATION_FIRST_TITLE' => 'Go to first page',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Previous page',
-'L_PAGINATION_PREVIOUS' => 'previous',
-'L_PAGINATION_NEXT_TITLE' => 'Next page',
-'L_PAGINATION_NEXT' => 'next',
-'L_PAGINATION_LAST_TITLE' => 'Go to last page',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'page %s of %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Private URLs have not been initialized in your administration settings!',
-'L_FEED_COMMENTS' => 'Comments',
-'L_FEED_ONLINE_COMMENTS' => 'Online comments',
-'L_FEED_OFFLINE_COMMENTS' => 'Offline comments',
-'L_FEED_WRITTEN_BY' => 'Written by',
-
-);
-?>
+ 'English',
+
+'L_DATE_CREATION' => 'Creation date',
+'L_DATE_UPDATE' => 'Date updated',
+
+# common
+'L_PLUXML_VERSION' => 'PluXml version',
+'L_HOMEPAGE' => 'Homepage',
+'L_UNCLASSIFIED' => 'Uncategorized',
+'L_INFO_PHP_VERSION' => 'PHP version',
+'L_INFO_MAGIC_QUOTES' => 'State of "magic quotes"',
+'L_INFO_CHARSET' => 'charset',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'Main PluXml theme not found',
+'L_ERR_FILE_NOTFOUND' => 'PluXml target file not found',
+'L_ERR_PAGE_NOT_FOUND' => 'Page not found',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'jan',
+'L_SHORT_FEBRUARY' => 'feb',
+'L_SHORT_MARCH' => 'mar',
+'L_SHORT_APRIL' => 'apr',
+'L_SHORT_MAY' => 'may',
+'L_SHORT_JUNE' => 'june',
+'L_SHORT_JULY' => 'july',
+'L_SHORT_AUGUST' => 'aug',
+'L_SHORT_SEPTEMBER' => 'sept',
+'L_SHORT_OCTOBER' => 'oct',
+'L_SHORT_NOVEMBER' => 'nov',
+'L_SHORT_DECEMBER' => 'dec',
+'L_JANUARY' => 'january',
+'L_FEBRUARY' => 'february',
+'L_MARCH' => 'march',
+'L_APRIL' => 'april',
+'L_MAY' => 'may',
+'L_JUNE' => 'june',
+'L_JULY' => 'july',
+'L_AUGUST' => 'august',
+'L_SEPTEMBER' => 'september',
+'L_OCTOBER' => 'october',
+'L_NOVEMBER' => 'november',
+'L_DECEMBER' => 'december',
+'L_MONDAY' => 'monday',
+'L_TUESDAY' => 'tuesday',
+'L_WEDNESDAY' => 'wednesday',
+'L_THURSDAY' => 'thursday',
+'L_FRIDAY' => 'friday',
+'L_SATURDAY' => 'saturday',
+'L_SUNDAY' => 'sunday',
+
+# class.plx.capcha.php
+'L_LAST' => 'last',
+'L_FIRST' => 'first',
+'L_SECOND' => 'second',
+'L_THIRD' => 'third',
+'L_FOURTH' => 'fourth',
+'L_FIFTH' => 'fifth',
+'L_SIXTH' => 'sixth',
+'L_SEVENTH' => 'seventh',
+'L_EIGTH' => 'eighth',
+'L_NINTH' => 'ninth',
+'L_TENTH' => 'tenth',
+'L_NTH' => 'nth',
+'L_CAPCHA_QUESTION' => 'What is the %s letter of the word %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s has write access',
+'L_WRITE_NOT_ACCESS' => '%s does not have write access or does not exist',
+'L_MODREWRITE_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite available',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite unavailable',
+'L_LIBGD_INSTALLED' => 'GD library installed',
+'L_LIBGD_NOT_INSTALLED' => 'GD library not installed',
+'L_LIBXML_INSTALLED' => 'XML library installed',
+'L_LIBXML_NOT_INSTALLED' => 'XML library not installed',
+'L_MAIL_AVAILABLE' => 'Mail sending function available',
+'L_MAIL_NOT_AVAILABLE' => 'Mail sending function unavailable',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'No article has been found for this tag!',
+'L_UNKNOWN_CATEGORY' => 'This category does not exist!!',
+'L_NO_ARTICLE_PAGE' => 'No article has been found for this page!',
+'L_UNKNOWN_ARTICLE' => 'This article does not exist or does not exist anymore!',
+'L_COM_IN_MODERATION' => 'The comment is being reviewed by this site\'s administrator',
+'L_UNKNOWN_STATIC' => 'This page does not exist or does not exist anymore!',
+'L_DOCUMENT_NOT_FOUND' => 'Document not found',
+'L_NEWCOMMENT_ERR' => 'An error occurred during comment\'s publication',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Please fill all the required fields',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'Antispam verification failed',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Compression %s activated',
+'L_PAGETITLE_ARCHIVES' => 'Archives',
+'L_PAGETITLE_TAG' => 'Tag',
+'L_NO_CATEGORY' => 'no categorie',
+'L_CATEGORY' => 'category',
+'L_CATEGORIES' => 'categories',
+'L_NO_ARTICLE' => 'no article',
+'L_ARTICLE' => 'article',
+'L_ARTICLES' => 'articles',
+'L_ARTAUTHOR_UNKNOWN' => 'unknown',
+'L_ARTTAGS_NONE' => 'none',
+'L_ARTCHAPO' => 'Read more #art_title',
+'L_ARTFEED_RSS_CATEGORY' => 'Rss feed of the category',
+'L_ARTFEED_RSS_TAG' => 'Rss feed of the tag',
+'L_ARTFEED_RSS' => 'Rss feed of the articles',
+'L_NO_COMMENT' => 'no comments',
+'L_COMMENT' => 'comment',
+'L_COMMENTS' => 'comments',
+'L_COMFEED_RSS_ARTICLE' => 'Rss feed of the article\'s comments',
+'L_COMFEED_RSS' => 'Rss feed of comments',
+'L_STATICCONTENT_INPROCESS' => 'This page is currently being edited',
+'L_SAID' => 'said',
+
+'L_PAGINATION_FIRST_TITLE' => 'Go to first page',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Previous page',
+'L_PAGINATION_PREVIOUS' => 'previous',
+'L_PAGINATION_NEXT_TITLE' => 'Next page',
+'L_PAGINATION_NEXT' => 'next',
+'L_PAGINATION_LAST_TITLE' => 'Go to last page',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'page %s of %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Private URLs have not been initialized in your administration settings!',
+'L_FEED_COMMENTS' => 'Comments',
+'L_FEED_ONLINE_COMMENTS' => 'Online comments',
+'L_FEED_OFFLINE_COMMENTS' => 'Offline comments',
+'L_FEED_WRITTEN_BY' => 'Written by',
+
+);
+?>
diff --git a/core/lang/en/install.php b/core/lang/en/install.php
index f621a3e82..14b1646a8 100644
--- a/core/lang/en/install.php
+++ b/core/lang/en/install.php
@@ -1,36 +1,36 @@
- 'Installation',
-'L_WRONG_PHP_VERSION' => 'PluXml requires PHP 5 or higher',
-'L_SELECT_LANG' => 'Choose your language',
-'L_INPUT_CHANGE' => 'Change',
-'L_DEFAULT_CATEGORY_TITLE' => 'Category 1',
-'L_DEFAULT_CATEGORY_URL' => 'caregory-1',
-'L_DEFAULT_STATIC_TITLE' => 'Static 1',
-'L_DEFAULT_STATIC_URL' => 'static-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'First article',
-'L_DEFAULT_ARTICLE_URL' => 'first-article',
-'L_DEFAULT_COMMENT_CONTENT' => 'This is a first comment !',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml is already set up !',
-'L_ERR_MISSING_USER' => 'Please fill in the contributor\'s field !',
-'L_ERR_MISSING_LOGIN' => 'Please fill the login field !',
-'L_ERR_MISSING_PASSWORD' => 'Please fill the password field !',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Invalid password confirmation !',
-'L_PLUXML_INSTALLATION' => 'PluXml installation',
-'L_SITE_DESCRIPTION' => 'Blog or CMS, XML powered !',
-'L_VERSION' => 'version',
-'L_USERNAME' => 'Admin username',
-'L_LOGIN' => 'Admin login',
-'L_PASSWORD' => 'Password',
-'L_PASSWORD_CONFIRMATION' => 'Confirm password',
-'L_INPUT_INSTALL' => 'Install',
-'L_TIMEZONE' => 'Time Zone',
-'L_PWD_VERY_WEAK' => 'Very weak password',
-'L_PWD_WEAK' => 'Weak password',
-'L_PWD_GOOD' => 'Good password',
-'L_PWD_STRONG' => 'Strong password',
-);
+ 'Installation',
+'L_WRONG_PHP_VERSION' => 'PluXml requires PHP 5 or higher',
+'L_SELECT_LANG' => 'Choose your language',
+'L_INPUT_CHANGE' => 'Change',
+'L_DEFAULT_CATEGORY_TITLE' => 'Category 1',
+'L_DEFAULT_CATEGORY_URL' => 'caregory-1',
+'L_DEFAULT_STATIC_TITLE' => 'Static 1',
+'L_DEFAULT_STATIC_URL' => 'static-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'First article',
+'L_DEFAULT_ARTICLE_URL' => 'first-article',
+'L_DEFAULT_COMMENT_CONTENT' => 'This is a first comment !',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml is already set up !',
+'L_ERR_MISSING_USER' => 'Please fill in the contributor\'s field !',
+'L_ERR_MISSING_LOGIN' => 'Please fill the login field !',
+'L_ERR_MISSING_PASSWORD' => 'Please fill the password field !',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Invalid password confirmation !',
+'L_PLUXML_INSTALLATION' => 'PluXml installation',
+'L_SITE_DESCRIPTION' => 'Blog or CMS, XML powered !',
+'L_VERSION' => 'version',
+'L_USERNAME' => 'Admin username',
+'L_LOGIN' => 'Admin login',
+'L_PASSWORD' => 'Password',
+'L_PASSWORD_CONFIRMATION' => 'Confirm password',
+'L_INPUT_INSTALL' => 'Install',
+'L_TIMEZONE' => 'Time Zone',
+'L_PWD_VERY_WEAK' => 'Very weak password',
+'L_PWD_WEAK' => 'Weak password',
+'L_PWD_GOOD' => 'Good password',
+'L_PWD_STRONG' => 'Strong password',
+);
?>
\ No newline at end of file
diff --git a/core/lang/en/update.php b/core/lang/en/update.php
index 0f79a5896..c832a1ff1 100644
--- a/core/lang/en/update.php
+++ b/core/lang/en/update.php
@@ -1,59 +1,59 @@
- 'Data was successfully saved',
-'L_UPDATE_TITLE' => 'PluXml update',
-'L_WRONG_PHP_VERSION' => 'PluXml requires PHP 5 or higher.',
-
-'L_SELECT_LANG' => 'Choose your language',
-'L_INPUT_CHANGE' => 'Change',
-
-'L_UPDATE_UPTODATE' => 'Your PluXml has already been updated.',
-'L_UPDATE_NOT_AVAILABLE' => 'No update available.',
-'L_UPDATE_BACK' => 'Back to Home page',
-'L_UPDATE_WARNING1' => 'You are about to update your old version of PluXml',
-'L_UPDATE_SELECT_VERSION' => 'Please choose the old PluXml version you wish to update.',
-'L_UPDATE_WARNING2' => 'If you can\'t find the old version of PluXml in the list below, then there is no automatic procedure to update, because your version is too old. We advise you to download the latest version of PluXml and to make a new installation.',
-'L_UPDATE_WARNING3' => 'Warning: before you start updating, don\'t forget to save a copy of your site by copying the "data" folder',
-'L_UPDATE_START' => 'Start the update',
-
-'L_UPDATE_ENDED' => 'Update complete',
-'L_UPDATE_INPROGRESS' => 'Applying version updates',
-'L_UPDATE_ERROR' => 'An error occured during the update.',
-'L_UPDATE_SUCCESSFUL' => 'All the updates were successfully completed !',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Updating parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Creating tags.xml',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'An error occured while creating tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Creating the theme file',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'An error occured while creating the file',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Converting articles to new format',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Error in file processing',
-'L_UPDATE_STATICS_MIGRATION' => 'Static page file migration',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'An error occured while migrating static pages file',
-'L_UPDATE_CREATE_USERS_FILE' => 'Creating users\' file',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'An error occured while creating users file',
-'L_UPDATE_USERS_MIGRATION' => 'Migrating users\' file',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'An error occured while migrating users file',
-'L_UPDATE_ERR_NO_USERS' => 'No user in the file',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Creating .htaccess file',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'An error occured while creating .htaccess file',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Updating .htaccess file',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'An error occured while updating .htaccess file',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Migrating category file',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'An error occured while migrating category file',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Creating plugins.xml',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'An error occured while creating plugins.xml',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Deleting core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'An error occured while deleting core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Deleting core/plxtoolbar/ folder',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'An error occured while deleting core/plxtoolbar/ folder',
-'L_UPDATE_FILE' => 'Updating file',
-'L_UPDATE_ERR_FILE' => 'An error occured while updating file',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migration of plugins parameter file in the configuration folder',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Updating plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Comments migration',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Error while migrating comments',
-);
-?>
+ 'Data was successfully saved',
+'L_UPDATE_TITLE' => 'PluXml update',
+'L_WRONG_PHP_VERSION' => 'PluXml requires PHP 5 or higher.',
+
+'L_SELECT_LANG' => 'Choose your language',
+'L_INPUT_CHANGE' => 'Change',
+
+'L_UPDATE_UPTODATE' => 'Your PluXml has already been updated.',
+'L_UPDATE_NOT_AVAILABLE' => 'No update available.',
+'L_UPDATE_BACK' => 'Back to Home page',
+'L_UPDATE_WARNING1' => 'You are about to update your old version of PluXml',
+'L_UPDATE_SELECT_VERSION' => 'Please choose the old PluXml version you wish to update.',
+'L_UPDATE_WARNING2' => 'If you can\'t find the old version of PluXml in the list below, then there is no automatic procedure to update, because your version is too old. We advise you to download the latest version of PluXml and to make a new installation.',
+'L_UPDATE_WARNING3' => 'Warning: before you start updating, don\'t forget to save a copy of your site by copying the "data" folder',
+'L_UPDATE_START' => 'Start the update',
+
+'L_UPDATE_ENDED' => 'Update complete',
+'L_UPDATE_INPROGRESS' => 'Applying version updates',
+'L_UPDATE_ERROR' => 'An error occured during the update.',
+'L_UPDATE_SUCCESSFUL' => 'All the updates were successfully completed !',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Updating parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Creating tags.xml',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'An error occured while creating tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Creating the theme file',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'An error occured while creating the file',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Converting articles to new format',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Error in file processing',
+'L_UPDATE_STATICS_MIGRATION' => 'Static page file migration',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'An error occured while migrating static pages file',
+'L_UPDATE_CREATE_USERS_FILE' => 'Creating users\' file',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'An error occured while creating users file',
+'L_UPDATE_USERS_MIGRATION' => 'Migrating users\' file',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'An error occured while migrating users file',
+'L_UPDATE_ERR_NO_USERS' => 'No user in the file',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Creating .htaccess file',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'An error occured while creating .htaccess file',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Updating .htaccess file',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'An error occured while updating .htaccess file',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Migrating category file',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'An error occured while migrating category file',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Creating plugins.xml',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'An error occured while creating plugins.xml',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Deleting core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'An error occured while deleting core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Deleting core/plxtoolbar/ folder',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'An error occured while deleting core/plxtoolbar/ folder',
+'L_UPDATE_FILE' => 'Updating file',
+'L_UPDATE_ERR_FILE' => 'An error occured while updating file',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migration of plugins parameter file in the configuration folder',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Updating plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Comments migration',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Error while migrating comments',
+);
+?>
diff --git a/core/lang/es/core.php b/core/lang/es/core.php
index 8680f423d..cd6d806b0 100644
--- a/core/lang/es/core.php
+++ b/core/lang/es/core.php
@@ -1,140 +1,140 @@
- 'Español',
-
-'L_DATE_CREATION' => 'Fecha de creación',
-'L_DATE_UPDATE' => 'Fecha de actualización',
-
-# common
-'L_PLUXML_VERSION' => 'Versión de PluXml',
-'L_HOMEPAGE' => 'Inicio',
-'L_UNCLASSIFIED' => 'Sin categoría',
-'L_INFO_PHP_VERSION' => 'Versión de PHP',
-'L_INFO_MAGIC_QUOTES' => 'Estado de las «comillas mágicas» («magic quotes»)',
-'L_INFO_CHARSET' => 'codificación',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'No se encontró el tema principal de PluXml',
-'L_ERR_FILE_NOTFOUND' => 'No se encontró el archivo destino de PluXml',
-'L_ERR_PAGE_NOT_FOUND' => 'No se encontró la página',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'ene',
-'L_SHORT_FEBRUARY' => 'feb',
-'L_SHORT_MARCH' => 'mar',
-'L_SHORT_APRIL' => 'abr',
-'L_SHORT_MAY' => 'may',
-'L_SHORT_JUNE' => 'jun',
-'L_SHORT_JULY' => 'jul',
-'L_SHORT_AUGUST' => 'ago',
-'L_SHORT_SEPTEMBER' => 'sep',
-'L_SHORT_OCTOBER' => 'oct',
-'L_SHORT_NOVEMBER' => 'nov',
-'L_SHORT_DECEMBER' => 'dic',
-'L_JANUARY' => 'enero',
-'L_FEBRUARY' => 'febrero',
-'L_MARCH' => 'marzo',
-'L_APRIL' => 'abril',
-'L_MAY' => 'mayo',
-'L_JUNE' => 'junio',
-'L_JULY' => 'julio',
-'L_AUGUST' => 'agosto',
-'L_SEPTEMBER' => 'septiembre',
-'L_OCTOBER' => 'octubre',
-'L_NOVEMBER' => 'noviembre',
-'L_DECEMBER' => 'diciembre',
-'L_MONDAY' => 'lunes',
-'L_TUESDAY' => 'martes',
-'L_WEDNESDAY' => 'miércoles',
-'L_THURSDAY' => 'jueves',
-'L_FRIDAY' => 'viernes',
-'L_SATURDAY' => 'sábado',
-'L_SUNDAY' => 'domingo',
-
-# class.plx.capcha.php
-'L_LAST' => 'última',
-'L_FIRST' => 'primera',
-'L_SECOND' => 'segunda',
-'L_THIRD' => 'tercera',
-'L_FOURTH' => 'cuarta',
-'L_FIFTH' => 'quinta',
-'L_SIXTH' => 'sexta',
-'L_SEVENTH' => 'septima',
-'L_EIGTH' => 'octava',
-'L_NINTH' => 'novena',
-'L_TENTH' => 'décima',
-'L_NTH' => 'º',
-'L_CAPCHA_QUESTION' => 'Cuál es la %s letra en la palabra %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => 'Puede editar %s',
-'L_WRITE_NOT_ACCESS' => 'No se puede editar %s o no existe',
-'L_MODREWRITE_AVAILABLE' => 'Módulo de Apache para re-escritura de URLs («mod_rewrite») disponible',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Módulo de Apache para re-escritura de URLs («mod_rewrite») no disponible',
-'L_LIBGD_INSTALLED' => 'Biblioteca GD instalada',
-'L_LIBGD_NOT_INSTALLED' => 'Biblioteca GD no instalada',
-'L_LIBXML_INSTALLED' => 'Biblioteca XML instalada',
-'L_LIBXML_NOT_INSTALLED' => 'Biblioteca XML no instalada',
-'L_MAIL_AVAILABLE' => 'Función de envío de correos disponible',
-'L_MAIL_NOT_AVAILABLE' => 'Función de envío de correos no disponible',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'No existen artículos para esta etiqueta!',
-'L_UNKNOWN_CATEGORY' => 'Esta categoría no existe!',
-'L_NO_ARTICLE_PAGE' => 'No existen artículos para esta página!',
-'L_UNKNOWN_ARTICLE' => 'Este artículo no existe!',
-'L_COM_IN_MODERATION' => 'Comentario en proceso de moderación por el administrador de este sitio',
-'L_UNKNOWN_STATIC' => 'Esta página no existe!',
-'L_DOCUMENT_NOT_FOUND' => 'No se encotró el documento especificado!',
-'L_NEWCOMMENT_ERR' => 'Se ha producido un error al publicar este comentario',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Ingrese todos los campos obligatorios',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'Falló La comprobación anti-spam',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Compresión %s activada',
-'L_PAGETITLE_ARCHIVES' => 'Archivos',
-'L_PAGETITLE_TAG' => 'Etiqueta',
-'L_NO_CATEGORY' => 'ninguna categoría',
-'L_CATEGORY' => 'categoría',
-'L_CATEGORIES' => 'categorías',
-'L_NO_ARTICLE' => 'ningún artículo',
-'L_ARTICLE' => 'artículo',
-'L_ARTICLES' => 'artículos',
-'L_ARTAUTHOR_UNKNOWN' => 'desconocido',
-'L_ARTTAGS_NONE' => 'ninguna',
-'L_ARTCHAPO' => 'Leer más #art_title',
-'L_ARTFEED_RSS_CATEGORY' => 'Sindicación RSS de los artículos de esta categoría',
-'L_ARTFEED_RSS_TAG' => 'Sindicación RSS de los artículos de esta etiqueta',
-'L_ARTFEED_RSS' => 'Sindicación RSS de los artículos',
-'L_NO_COMMENT' => 'sin comentarios',
-'L_COMMENT' => 'comentario',
-'L_COMMENTS' => 'comentarios',
-'L_COMFEED_RSS_ARTICLE' => 'Sindicación RSS de los comentarios de este artículo',
-'L_COMFEED_RSS' => 'Sindicación RSS de los comentarios',
-'L_STATICCONTENT_INPROCESS' => 'Página en proceso de edición',
-'L_SAID' => 'ha dicho',
-
-'L_PAGINATION_FIRST_TITLE' => 'Ir a la primera página',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Página anterior',
-'L_PAGINATION_PREVIOUS' => 'anterior',
-'L_PAGINATION_NEXT_TITLE' => 'Página siguiente',
-'L_PAGINATION_NEXT' => 'siguiente',
-'L_PAGINATION_LAST_TITLE' => 'Ir a la última página',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'página %s de %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Las URLs privadas no han sido inicializadas en sus parámetros de administración!',
-'L_FEED_COMMENTS' => 'Comentarios',
-'L_FEED_ONLINE_COMMENTS' => 'Comentarios de usuarios',
-'L_FEED_OFFLINE_COMMENTS' => 'Comentarios sin conexión',
-'L_FEED_WRITTEN_BY' => 'Escrito por',
-
-);
-?>
+ 'Español',
+
+'L_DATE_CREATION' => 'Fecha de creación',
+'L_DATE_UPDATE' => 'Fecha de actualización',
+
+# common
+'L_PLUXML_VERSION' => 'Versión de PluXml',
+'L_HOMEPAGE' => 'Inicio',
+'L_UNCLASSIFIED' => 'Sin categoría',
+'L_INFO_PHP_VERSION' => 'Versión de PHP',
+'L_INFO_MAGIC_QUOTES' => 'Estado de las «comillas mágicas» («magic quotes»)',
+'L_INFO_CHARSET' => 'codificación',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'No se encontró el tema principal de PluXml',
+'L_ERR_FILE_NOTFOUND' => 'No se encontró el archivo destino de PluXml',
+'L_ERR_PAGE_NOT_FOUND' => 'No se encontró la página',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'ene',
+'L_SHORT_FEBRUARY' => 'feb',
+'L_SHORT_MARCH' => 'mar',
+'L_SHORT_APRIL' => 'abr',
+'L_SHORT_MAY' => 'may',
+'L_SHORT_JUNE' => 'jun',
+'L_SHORT_JULY' => 'jul',
+'L_SHORT_AUGUST' => 'ago',
+'L_SHORT_SEPTEMBER' => 'sep',
+'L_SHORT_OCTOBER' => 'oct',
+'L_SHORT_NOVEMBER' => 'nov',
+'L_SHORT_DECEMBER' => 'dic',
+'L_JANUARY' => 'enero',
+'L_FEBRUARY' => 'febrero',
+'L_MARCH' => 'marzo',
+'L_APRIL' => 'abril',
+'L_MAY' => 'mayo',
+'L_JUNE' => 'junio',
+'L_JULY' => 'julio',
+'L_AUGUST' => 'agosto',
+'L_SEPTEMBER' => 'septiembre',
+'L_OCTOBER' => 'octubre',
+'L_NOVEMBER' => 'noviembre',
+'L_DECEMBER' => 'diciembre',
+'L_MONDAY' => 'lunes',
+'L_TUESDAY' => 'martes',
+'L_WEDNESDAY' => 'miércoles',
+'L_THURSDAY' => 'jueves',
+'L_FRIDAY' => 'viernes',
+'L_SATURDAY' => 'sábado',
+'L_SUNDAY' => 'domingo',
+
+# class.plx.capcha.php
+'L_LAST' => 'última',
+'L_FIRST' => 'primera',
+'L_SECOND' => 'segunda',
+'L_THIRD' => 'tercera',
+'L_FOURTH' => 'cuarta',
+'L_FIFTH' => 'quinta',
+'L_SIXTH' => 'sexta',
+'L_SEVENTH' => 'septima',
+'L_EIGTH' => 'octava',
+'L_NINTH' => 'novena',
+'L_TENTH' => 'décima',
+'L_NTH' => 'º',
+'L_CAPCHA_QUESTION' => 'Cuál es la %s letra en la palabra %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => 'Puede editar %s',
+'L_WRITE_NOT_ACCESS' => 'No se puede editar %s o no existe',
+'L_MODREWRITE_AVAILABLE' => 'Módulo de Apache para re-escritura de URLs («mod_rewrite») disponible',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Módulo de Apache para re-escritura de URLs («mod_rewrite») no disponible',
+'L_LIBGD_INSTALLED' => 'Biblioteca GD instalada',
+'L_LIBGD_NOT_INSTALLED' => 'Biblioteca GD no instalada',
+'L_LIBXML_INSTALLED' => 'Biblioteca XML instalada',
+'L_LIBXML_NOT_INSTALLED' => 'Biblioteca XML no instalada',
+'L_MAIL_AVAILABLE' => 'Función de envío de correos disponible',
+'L_MAIL_NOT_AVAILABLE' => 'Función de envío de correos no disponible',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'No existen artículos para esta etiqueta!',
+'L_UNKNOWN_CATEGORY' => 'Esta categoría no existe!',
+'L_NO_ARTICLE_PAGE' => 'No existen artículos para esta página!',
+'L_UNKNOWN_ARTICLE' => 'Este artículo no existe!',
+'L_COM_IN_MODERATION' => 'Comentario en proceso de moderación por el administrador de este sitio',
+'L_UNKNOWN_STATIC' => 'Esta página no existe!',
+'L_DOCUMENT_NOT_FOUND' => 'No se encotró el documento especificado!',
+'L_NEWCOMMENT_ERR' => 'Se ha producido un error al publicar este comentario',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Ingrese todos los campos obligatorios',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'Falló La comprobación anti-spam',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Compresión %s activada',
+'L_PAGETITLE_ARCHIVES' => 'Archivos',
+'L_PAGETITLE_TAG' => 'Etiqueta',
+'L_NO_CATEGORY' => 'ninguna categoría',
+'L_CATEGORY' => 'categoría',
+'L_CATEGORIES' => 'categorías',
+'L_NO_ARTICLE' => 'ningún artículo',
+'L_ARTICLE' => 'artículo',
+'L_ARTICLES' => 'artículos',
+'L_ARTAUTHOR_UNKNOWN' => 'desconocido',
+'L_ARTTAGS_NONE' => 'ninguna',
+'L_ARTCHAPO' => 'Leer más #art_title',
+'L_ARTFEED_RSS_CATEGORY' => 'Sindicación RSS de los artículos de esta categoría',
+'L_ARTFEED_RSS_TAG' => 'Sindicación RSS de los artículos de esta etiqueta',
+'L_ARTFEED_RSS' => 'Sindicación RSS de los artículos',
+'L_NO_COMMENT' => 'sin comentarios',
+'L_COMMENT' => 'comentario',
+'L_COMMENTS' => 'comentarios',
+'L_COMFEED_RSS_ARTICLE' => 'Sindicación RSS de los comentarios de este artículo',
+'L_COMFEED_RSS' => 'Sindicación RSS de los comentarios',
+'L_STATICCONTENT_INPROCESS' => 'Página en proceso de edición',
+'L_SAID' => 'ha dicho',
+
+'L_PAGINATION_FIRST_TITLE' => 'Ir a la primera página',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Página anterior',
+'L_PAGINATION_PREVIOUS' => 'anterior',
+'L_PAGINATION_NEXT_TITLE' => 'Página siguiente',
+'L_PAGINATION_NEXT' => 'siguiente',
+'L_PAGINATION_LAST_TITLE' => 'Ir a la última página',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'página %s de %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Las URLs privadas no han sido inicializadas en sus parámetros de administración!',
+'L_FEED_COMMENTS' => 'Comentarios',
+'L_FEED_ONLINE_COMMENTS' => 'Comentarios de usuarios',
+'L_FEED_OFFLINE_COMMENTS' => 'Comentarios sin conexión',
+'L_FEED_WRITTEN_BY' => 'Escrito por',
+
+);
+?>
diff --git a/core/lang/es/install.php b/core/lang/es/install.php
index 54e38602d..c118c6b59 100644
--- a/core/lang/es/install.php
+++ b/core/lang/es/install.php
@@ -1,36 +1,36 @@
- 'Instalación',
-'L_WRONG_PHP_VERSION' => 'PluXml necesita PHP 5 o posterior',
-'L_SELECT_LANG' => 'Seleccione su idioma',
-'L_INPUT_CHANGE' => 'Cambiar',
-'L_DEFAULT_CATEGORY_TITLE' => 'Categoría 1',
-'L_DEFAULT_CATEGORY_URL' => 'categoria-1',
-'L_DEFAULT_STATIC_TITLE' => 'Estática 1',
-'L_DEFAULT_STATIC_URL' => 'estatica-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Primer artículo',
-'L_DEFAULT_ARTICLE_URL' => 'primer-articulo',
-'L_DEFAULT_COMMENT_CONTENT' => 'Este es un primer comentario!',
-'L_ERR_PLUXML_ALREADY_INSTALLED'=> 'PluXml ya está configurado!',
-'L_ERR_MISSING_USER' => 'Indique el nombre del editor!',
-'L_ERR_MISSING_LOGIN' => 'Indique el nombre de usuario!',
-'L_ERR_MISSING_PASSWORD' => 'Indique una contraseña!',
-'L_ERR_PASSWORD_CONFIRMATION' => 'La contraseña es incorrecta!',
-'L_PLUXML_INSTALLATION' => 'Instalación de PluXml',
-'L_SITE_DESCRIPTION' => 'Blog o CMS con XML!',
-'L_VERSION' => 'versión',
-'L_USERNAME' => 'Nombre del administrador',
-'L_LOGIN' => 'Nombre de usuario del administrador',
-'L_PASSWORD' => 'Contraseña',
-'L_PASSWORD_CONFIRMATION' => 'Confirmar contraseña',
-'L_INPUT_INSTALL' => 'Instalar',
-'L_TIMEZONE' => 'Huso horario',
-'L_PWD_VERY_WEAK' => 'Contraseña muy débil',
-'L_PWD_WEAK' => 'Contraseña débil',
-'L_PWD_GOOD' => 'Buena contraseña',
-'L_PWD_STRONG' => 'Contraseña segura',
-);
+ 'Instalación',
+'L_WRONG_PHP_VERSION' => 'PluXml necesita PHP 5 o posterior',
+'L_SELECT_LANG' => 'Seleccione su idioma',
+'L_INPUT_CHANGE' => 'Cambiar',
+'L_DEFAULT_CATEGORY_TITLE' => 'Categoría 1',
+'L_DEFAULT_CATEGORY_URL' => 'categoria-1',
+'L_DEFAULT_STATIC_TITLE' => 'Estática 1',
+'L_DEFAULT_STATIC_URL' => 'estatica-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Primer artículo',
+'L_DEFAULT_ARTICLE_URL' => 'primer-articulo',
+'L_DEFAULT_COMMENT_CONTENT' => 'Este es un primer comentario!',
+'L_ERR_PLUXML_ALREADY_INSTALLED'=> 'PluXml ya está configurado!',
+'L_ERR_MISSING_USER' => 'Indique el nombre del editor!',
+'L_ERR_MISSING_LOGIN' => 'Indique el nombre de usuario!',
+'L_ERR_MISSING_PASSWORD' => 'Indique una contraseña!',
+'L_ERR_PASSWORD_CONFIRMATION' => 'La contraseña es incorrecta!',
+'L_PLUXML_INSTALLATION' => 'Instalación de PluXml',
+'L_SITE_DESCRIPTION' => 'Blog o CMS con XML!',
+'L_VERSION' => 'versión',
+'L_USERNAME' => 'Nombre del administrador',
+'L_LOGIN' => 'Nombre de usuario del administrador',
+'L_PASSWORD' => 'Contraseña',
+'L_PASSWORD_CONFIRMATION' => 'Confirmar contraseña',
+'L_INPUT_INSTALL' => 'Instalar',
+'L_TIMEZONE' => 'Huso horario',
+'L_PWD_VERY_WEAK' => 'Contraseña muy débil',
+'L_PWD_WEAK' => 'Contraseña débil',
+'L_PWD_GOOD' => 'Buena contraseña',
+'L_PWD_STRONG' => 'Contraseña segura',
+);
?>
\ No newline at end of file
diff --git a/core/lang/es/update.php b/core/lang/es/update.php
index 218f0df26..7933c891d 100644
--- a/core/lang/es/update.php
+++ b/core/lang/es/update.php
@@ -1,59 +1,59 @@
- 'Se guardaron los datos correctamente',
-'L_UPDATE_TITLE' => 'Actualización de PluXml',
-'L_WRONG_PHP_VERSION' => 'PluXml necesita PHP 5 o posterior.',
-
-'L_SELECT_LANG' => 'Seleccione su idioma',
-'L_INPUT_CHANGE' => 'Cambiar',
-
-'L_UPDATE_UPTODATE' => 'Su PluXml ya está actualizado.',
-'L_UPDATE_NOT_AVAILABLE' => 'No hay ninguna actualización disponible.',
-'L_UPDATE_BACK' => 'Volver al sitio',
-'L_UPDATE_WARNING1' => 'Va a actualizar su versión antigua de PluXml',
-'L_UPDATE_SELECT_VERSION' => 'Selecccione la versión antigua de PluXml para actualizar.',
-'L_UPDATE_WARNING2' => 'Si no encuentra su versión antigua en esta lista, es que no existe un proceso automático de actualización desde dicha versión por ser demasiado anitgua. Le sugerimos que descargue la última versión de PluXml y realice una nueva instalación.',
-'L_UPDATE_WARNING3' => 'Advertencia: antes de iniciar una actualización, no olvide hacer un respaldo de sus datos haciendo una copia de la carpeta «data»',
-'L_UPDATE_START' => 'Inciar la actualización',
-
-'L_UPDATE_ENDED' => 'Actualización finalizada',
-'L_UPDATE_INPROGRESS' => 'Actualizando la versión',
-'L_UPDATE_ERROR' => 'Ocurrió un error durante la actualización.',
-'L_UPDATE_SUCCESSFUL' => 'Se completaron correctamente todas las actualizaciones!',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Actualización del archivo «parametres.xml»',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Creación del archivo «tags.xml»',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Error al crear el archivo «tags.xml»',
-'L_UPDATE_CREATE_THEME_FILE' => 'Creación del archivo de tema',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Error al crear el archivo',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Conversión de los artículos al nuevo formato',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Error al procesar el archivo',
-'L_UPDATE_STATICS_MIGRATION' => 'Actualización del archivo de páginas estáticas',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Error al actualizar el archivo de páginas estáticas',
-'L_UPDATE_CREATE_USERS_FILE' => 'Creación del archivo de usuarios',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Error al crear el archivo de usuarios',
-'L_UPDATE_USERS_MIGRATION' => 'Actualización del archivo de usuarios',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Error al actualizar el archivo de usuarios',
-'L_UPDATE_ERR_NO_USERS' => 'No se encontraron usuarios en el archivo',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Creación del archivo «.htaccess»',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Error al crear el archivo «.htaccess»',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Actualización del archivo «.htaccess»',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Error al actualizar el archivo «.htaccess»',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Actualización del archivo de categorías',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Error al actualizar el archivo de categorías',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Creación del archivo «plugins.xml»',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Error al crear el archivo «plugins.xml»',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Eliminación del archivo «core/admin/fullscreen.php»',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE' => 'Error al eliminar el archivo «core/admin/fullscreen.php»',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Eliminación de la carpeta «core/plxtoolbar/»',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Error al eliminar la carpeta «core/plxtoolbar/»',
-'L_UPDATE_FILE' => 'Actualizando archivo',
-'L_UPDATE_ERR_FILE' => 'Error al actualizar archivo',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Actualización de archivos de parámetros de complementos en la carpeta de configuración',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Actualización del archivo «plugins.xml»',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Comentarios de migración',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Error al migrar comentarios',
-);
+ 'Se guardaron los datos correctamente',
+'L_UPDATE_TITLE' => 'Actualización de PluXml',
+'L_WRONG_PHP_VERSION' => 'PluXml necesita PHP 5 o posterior.',
+
+'L_SELECT_LANG' => 'Seleccione su idioma',
+'L_INPUT_CHANGE' => 'Cambiar',
+
+'L_UPDATE_UPTODATE' => 'Su PluXml ya está actualizado.',
+'L_UPDATE_NOT_AVAILABLE' => 'No hay ninguna actualización disponible.',
+'L_UPDATE_BACK' => 'Volver al sitio',
+'L_UPDATE_WARNING1' => 'Va a actualizar su versión antigua de PluXml',
+'L_UPDATE_SELECT_VERSION' => 'Selecccione la versión antigua de PluXml para actualizar.',
+'L_UPDATE_WARNING2' => 'Si no encuentra su versión antigua en esta lista, es que no existe un proceso automático de actualización desde dicha versión por ser demasiado anitgua. Le sugerimos que descargue la última versión de PluXml y realice una nueva instalación.',
+'L_UPDATE_WARNING3' => 'Advertencia: antes de iniciar una actualización, no olvide hacer un respaldo de sus datos haciendo una copia de la carpeta «data»',
+'L_UPDATE_START' => 'Inciar la actualización',
+
+'L_UPDATE_ENDED' => 'Actualización finalizada',
+'L_UPDATE_INPROGRESS' => 'Actualizando la versión',
+'L_UPDATE_ERROR' => 'Ocurrió un error durante la actualización.',
+'L_UPDATE_SUCCESSFUL' => 'Se completaron correctamente todas las actualizaciones!',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Actualización del archivo «parametres.xml»',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Creación del archivo «tags.xml»',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Error al crear el archivo «tags.xml»',
+'L_UPDATE_CREATE_THEME_FILE' => 'Creación del archivo de tema',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Error al crear el archivo',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Conversión de los artículos al nuevo formato',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Error al procesar el archivo',
+'L_UPDATE_STATICS_MIGRATION' => 'Actualización del archivo de páginas estáticas',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Error al actualizar el archivo de páginas estáticas',
+'L_UPDATE_CREATE_USERS_FILE' => 'Creación del archivo de usuarios',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Error al crear el archivo de usuarios',
+'L_UPDATE_USERS_MIGRATION' => 'Actualización del archivo de usuarios',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Error al actualizar el archivo de usuarios',
+'L_UPDATE_ERR_NO_USERS' => 'No se encontraron usuarios en el archivo',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Creación del archivo «.htaccess»',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Error al crear el archivo «.htaccess»',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Actualización del archivo «.htaccess»',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Error al actualizar el archivo «.htaccess»',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Actualización del archivo de categorías',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Error al actualizar el archivo de categorías',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Creación del archivo «plugins.xml»',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Error al crear el archivo «plugins.xml»',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Eliminación del archivo «core/admin/fullscreen.php»',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE' => 'Error al eliminar el archivo «core/admin/fullscreen.php»',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Eliminación de la carpeta «core/plxtoolbar/»',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Error al eliminar la carpeta «core/plxtoolbar/»',
+'L_UPDATE_FILE' => 'Actualizando archivo',
+'L_UPDATE_ERR_FILE' => 'Error al actualizar archivo',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Actualización de archivos de parámetros de complementos en la carpeta de configuración',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Actualización del archivo «plugins.xml»',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Comentarios de migración',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Error al migrar comentarios',
+);
?>
\ No newline at end of file
diff --git a/core/lang/fr/core.php b/core/lang/fr/core.php
index 396db05df..f1ccb3840 100644
--- a/core/lang/fr/core.php
+++ b/core/lang/fr/core.php
@@ -1,140 +1,140 @@
- 'Français',
-
-'L_DATE_CREATION' => 'Date de création',
-'L_DATE_UPDATE' => 'Date de mise à jour',
-
-# common
-'L_PLUXML_VERSION' => 'PluXml version',
-'L_HOMEPAGE' => 'Accueil',
-'L_UNCLASSIFIED' => 'Non classé',
-'L_INFO_PHP_VERSION' => 'Version de PHP',
-'L_INFO_MAGIC_QUOTES' => 'État des "magic quotes"',
-'L_INFO_CHARSET' => 'encodage',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'Le thème principal de PluXml est introuvable',
-'L_ERR_FILE_NOTFOUND' => 'Le fichier cible de PluXml est introuvable',
-'L_ERR_PAGE_NOT_FOUND' => 'Page non trouvée',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'janv',
-'L_SHORT_FEBRUARY' => 'févr',
-'L_SHORT_MARCH' => 'mars',
-'L_SHORT_APRIL' => 'avril',
-'L_SHORT_MAY' => 'mai',
-'L_SHORT_JUNE' => 'juin',
-'L_SHORT_JULY' => 'juil',
-'L_SHORT_AUGUST' => 'août',
-'L_SHORT_SEPTEMBER' => 'sept',
-'L_SHORT_OCTOBER' => 'oct',
-'L_SHORT_NOVEMBER' => 'nov',
-'L_SHORT_DECEMBER' => 'déc',
-'L_JANUARY' => 'janvier',
-'L_FEBRUARY' => 'février',
-'L_MARCH' => 'mars',
-'L_APRIL' => 'avril',
-'L_MAY' => 'mai',
-'L_JUNE' => 'juin',
-'L_JULY' => 'juillet',
-'L_AUGUST' => 'août',
-'L_SEPTEMBER' => 'septembre',
-'L_OCTOBER' => 'octobre',
-'L_NOVEMBER' => 'novembre',
-'L_DECEMBER' => 'décembre',
-'L_MONDAY' => 'lundi',
-'L_TUESDAY' => 'mardi',
-'L_WEDNESDAY' => 'mercredi',
-'L_THURSDAY' => 'jeudi',
-'L_FRIDAY' => 'vendredi',
-'L_SATURDAY' => 'samedi',
-'L_SUNDAY' => 'dimanche',
-
-# class.plx.capcha.php
-'L_LAST' => 'dernière',
-'L_FIRST' => 'première',
-'L_SECOND' => 'deuxième',
-'L_THIRD' => 'troisième',
-'L_FOURTH' => 'quatrième',
-'L_FIFTH' => 'cinquième',
-'L_SIXTH' => 'sixième',
-'L_SEVENTH' => 'septième',
-'L_EIGTH' => 'huitième',
-'L_NINTH' => 'neuvième',
-'L_TENTH' => 'dixième',
-'L_NTH' => 'ème',
-'L_CAPCHA_QUESTION' => 'Quelle est la %s lettre du mot %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s est accessible en écriture',
-'L_WRITE_NOT_ACCESS' => '%s n\'est pas accessible en écriture ou n\'existe pas',
-'L_MODREWRITE_AVAILABLE' => 'Module apache de réécriture d\'url mod_rewrite disponible',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Module apache de réécriture d\'url mod_rewrite non disponible',
-'L_LIBGD_INSTALLED' => 'Bibliothèque GD installée',
-'L_LIBGD_NOT_INSTALLED' => 'Bibliothèque GD non installée',
-'L_LIBXML_INSTALLED' => 'Bibliothèque XML installée',
-'L_LIBXML_NOT_INSTALLED' => 'Bibliothèque XML non installée',
-'L_MAIL_AVAILABLE' => 'Fonction d\'envoi de mail disponible',
-'L_MAIL_NOT_AVAILABLE' => 'Fonction d\'envoi de mail non disponible',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'Aucun article pour ce mot clé !',
-'L_UNKNOWN_CATEGORY' => 'Cette catégorie est inexistante !',
-'L_NO_ARTICLE_PAGE' => 'Aucun article pour cette page !',
-'L_UNKNOWN_ARTICLE' => 'Cet article n\'existe pas ou n\'existe plus !',
-'L_COM_IN_MODERATION' => 'Le commentaire est en cours de modération par l\'administrateur de ce site',
-'L_UNKNOWN_STATIC' => 'Cette page n\'existe pas ou n\'existe plus !',
-'L_DOCUMENT_NOT_FOUND' => 'Le document spécifié est introuvable',
-'L_NEWCOMMENT_ERR' => 'Une erreur s\'est produite lors de la publication de ce commentaire',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Merci de remplir tous les champs obligatoires requis',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'La vérification anti-spam a échoué',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Compression %s activée',
-'L_PAGETITLE_ARCHIVES' => 'Archives',
-'L_PAGETITLE_TAG' => 'Tag',
-'L_NO_CATEGORY' => 'aucune catégorie',
-'L_CATEGORY' => 'catégorie',
-'L_CATEGORIES' => 'catégories',
-'L_NO_ARTICLE' => 'aucun article',
-'L_ARTICLE' => 'article',
-'L_ARTICLES' => 'articles',
-'L_ARTAUTHOR_UNKNOWN' => 'inconnu',
-'L_ARTTAGS_NONE' => 'aucun',
-'L_ARTCHAPO' => 'Lire la suite de #art_title',
-'L_ARTFEED_RSS_CATEGORY' => 'Fil RSS des articles de cette catégorie',
-'L_ARTFEED_RSS_TAG' => 'Fil RSS des articles de ce mot clé',
-'L_ARTFEED_RSS' => 'Fil RSS des articles',
-'L_NO_COMMENT' => 'Aucun commentaire',
-'L_COMMENT' => 'commentaire',
-'L_COMMENTS' => 'commentaires',
-'L_COMFEED_RSS_ARTICLE' => 'Fil RSS des commentaires de cet article',
-'L_COMFEED_RSS' => 'Fil RSS des commentaires',
-'L_STATICCONTENT_INPROCESS' => 'Cette page est actuellement en cours de rédaction',
-'L_SAID' => 'a dit',
-
-'L_PAGINATION_FIRST_TITLE' => 'Aller à la première page',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Page précédente',
-'L_PAGINATION_PREVIOUS' => 'précédente',
-'L_PAGINATION_NEXT_TITLE' => 'page suivante',
-'L_PAGINATION_NEXT' => 'suivante',
-'L_PAGINATION_LAST_TITLE' => 'Aller à la dernière page',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'page %s sur %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Les URLs privées n\'ont pas été initialisées dans vos paramètres d\'administration !',
-'L_FEED_COMMENTS' => 'Commentaires',
-'L_FEED_ONLINE_COMMENTS' => 'Commentaires en ligne',
-'L_FEED_OFFLINE_COMMENTS' => 'Commentaires hors ligne',
-'L_FEED_WRITTEN_BY' => 'Rédigé par',
-
-);
-?>
+ 'Français',
+
+'L_DATE_CREATION' => 'Date de création',
+'L_DATE_UPDATE' => 'Date de mise à jour',
+
+# common
+'L_PLUXML_VERSION' => 'PluXml version',
+'L_HOMEPAGE' => 'Accueil',
+'L_UNCLASSIFIED' => 'Non classé',
+'L_INFO_PHP_VERSION' => 'Version de PHP',
+'L_INFO_MAGIC_QUOTES' => 'État des "magic quotes"',
+'L_INFO_CHARSET' => 'encodage',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'Le thème principal de PluXml est introuvable',
+'L_ERR_FILE_NOTFOUND' => 'Le fichier cible de PluXml est introuvable',
+'L_ERR_PAGE_NOT_FOUND' => 'Page non trouvée',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'janv',
+'L_SHORT_FEBRUARY' => 'févr',
+'L_SHORT_MARCH' => 'mars',
+'L_SHORT_APRIL' => 'avril',
+'L_SHORT_MAY' => 'mai',
+'L_SHORT_JUNE' => 'juin',
+'L_SHORT_JULY' => 'juil',
+'L_SHORT_AUGUST' => 'août',
+'L_SHORT_SEPTEMBER' => 'sept',
+'L_SHORT_OCTOBER' => 'oct',
+'L_SHORT_NOVEMBER' => 'nov',
+'L_SHORT_DECEMBER' => 'déc',
+'L_JANUARY' => 'janvier',
+'L_FEBRUARY' => 'février',
+'L_MARCH' => 'mars',
+'L_APRIL' => 'avril',
+'L_MAY' => 'mai',
+'L_JUNE' => 'juin',
+'L_JULY' => 'juillet',
+'L_AUGUST' => 'août',
+'L_SEPTEMBER' => 'septembre',
+'L_OCTOBER' => 'octobre',
+'L_NOVEMBER' => 'novembre',
+'L_DECEMBER' => 'décembre',
+'L_MONDAY' => 'lundi',
+'L_TUESDAY' => 'mardi',
+'L_WEDNESDAY' => 'mercredi',
+'L_THURSDAY' => 'jeudi',
+'L_FRIDAY' => 'vendredi',
+'L_SATURDAY' => 'samedi',
+'L_SUNDAY' => 'dimanche',
+
+# class.plx.capcha.php
+'L_LAST' => 'dernière',
+'L_FIRST' => 'première',
+'L_SECOND' => 'deuxième',
+'L_THIRD' => 'troisième',
+'L_FOURTH' => 'quatrième',
+'L_FIFTH' => 'cinquième',
+'L_SIXTH' => 'sixième',
+'L_SEVENTH' => 'septième',
+'L_EIGTH' => 'huitième',
+'L_NINTH' => 'neuvième',
+'L_TENTH' => 'dixième',
+'L_NTH' => 'ème',
+'L_CAPCHA_QUESTION' => 'Quelle est la %s lettre du mot %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s est accessible en écriture',
+'L_WRITE_NOT_ACCESS' => '%s n\'est pas accessible en écriture ou n\'existe pas',
+'L_MODREWRITE_AVAILABLE' => 'Module apache de réécriture d\'url mod_rewrite disponible',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Module apache de réécriture d\'url mod_rewrite non disponible',
+'L_LIBGD_INSTALLED' => 'Bibliothèque GD installée',
+'L_LIBGD_NOT_INSTALLED' => 'Bibliothèque GD non installée',
+'L_LIBXML_INSTALLED' => 'Bibliothèque XML installée',
+'L_LIBXML_NOT_INSTALLED' => 'Bibliothèque XML non installée',
+'L_MAIL_AVAILABLE' => 'Fonction d\'envoi de mail disponible',
+'L_MAIL_NOT_AVAILABLE' => 'Fonction d\'envoi de mail non disponible',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'Aucun article pour ce mot clé !',
+'L_UNKNOWN_CATEGORY' => 'Cette catégorie est inexistante !',
+'L_NO_ARTICLE_PAGE' => 'Aucun article pour cette page !',
+'L_UNKNOWN_ARTICLE' => 'Cet article n\'existe pas ou n\'existe plus !',
+'L_COM_IN_MODERATION' => 'Le commentaire est en cours de modération par l\'administrateur de ce site',
+'L_UNKNOWN_STATIC' => 'Cette page n\'existe pas ou n\'existe plus !',
+'L_DOCUMENT_NOT_FOUND' => 'Le document spécifié est introuvable',
+'L_NEWCOMMENT_ERR' => 'Une erreur s\'est produite lors de la publication de ce commentaire',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Merci de remplir tous les champs obligatoires requis',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'La vérification anti-spam a échoué',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Compression %s activée',
+'L_PAGETITLE_ARCHIVES' => 'Archives',
+'L_PAGETITLE_TAG' => 'Tag',
+'L_NO_CATEGORY' => 'aucune catégorie',
+'L_CATEGORY' => 'catégorie',
+'L_CATEGORIES' => 'catégories',
+'L_NO_ARTICLE' => 'aucun article',
+'L_ARTICLE' => 'article',
+'L_ARTICLES' => 'articles',
+'L_ARTAUTHOR_UNKNOWN' => 'inconnu',
+'L_ARTTAGS_NONE' => 'aucun',
+'L_ARTCHAPO' => 'Lire la suite de #art_title',
+'L_ARTFEED_RSS_CATEGORY' => 'Fil RSS des articles de cette catégorie',
+'L_ARTFEED_RSS_TAG' => 'Fil RSS des articles de ce mot clé',
+'L_ARTFEED_RSS' => 'Fil RSS des articles',
+'L_NO_COMMENT' => 'Aucun commentaire',
+'L_COMMENT' => 'commentaire',
+'L_COMMENTS' => 'commentaires',
+'L_COMFEED_RSS_ARTICLE' => 'Fil RSS des commentaires de cet article',
+'L_COMFEED_RSS' => 'Fil RSS des commentaires',
+'L_STATICCONTENT_INPROCESS' => 'Cette page est actuellement en cours de rédaction',
+'L_SAID' => 'a dit',
+
+'L_PAGINATION_FIRST_TITLE' => 'Aller à la première page',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Page précédente',
+'L_PAGINATION_PREVIOUS' => 'précédente',
+'L_PAGINATION_NEXT_TITLE' => 'page suivante',
+'L_PAGINATION_NEXT' => 'suivante',
+'L_PAGINATION_LAST_TITLE' => 'Aller à la dernière page',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'page %s sur %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Les URLs privées n\'ont pas été initialisées dans vos paramètres d\'administration !',
+'L_FEED_COMMENTS' => 'Commentaires',
+'L_FEED_ONLINE_COMMENTS' => 'Commentaires en ligne',
+'L_FEED_OFFLINE_COMMENTS' => 'Commentaires hors ligne',
+'L_FEED_WRITTEN_BY' => 'Rédigé par',
+
+);
+?>
diff --git a/core/lang/fr/install.php b/core/lang/fr/install.php
index e0a0b94cc..149fc0cd4 100644
--- a/core/lang/fr/install.php
+++ b/core/lang/fr/install.php
@@ -1,36 +1,36 @@
- 'Installation',
-'L_WRONG_PHP_VERSION' => 'PluXml requiert PHP 5 ou supérieur pour fonctionner.',
-'L_SELECT_LANG' => 'Sélectionnez votre langue',
-'L_INPUT_CHANGE' => 'Changer',
-'L_DEFAULT_CATEGORY_TITLE' => 'Rubrique 1',
-'L_DEFAULT_CATEGORY_URL' => 'rubrique-1',
-'L_DEFAULT_STATIC_TITLE' => 'Statique 1',
-'L_DEFAULT_STATIC_URL' => 'statique-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Premier article',
-'L_DEFAULT_ARTICLE_URL' => 'premier-article',
-'L_DEFAULT_COMMENT_CONTENT' => 'Ceci est un premier commentaire !',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml est déjà configuré !',
-'L_ERR_MISSING_USER' => 'Veuillez renseigner le nom du rédacteur !',
-'L_ERR_MISSING_LOGIN' => 'Veuillez renseigner le login de connexion !',
-'L_ERR_MISSING_PASSWORD' => 'Veuillez renseigner un mot de passe !',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Confirmation du mot de passe incorrecte !',
-'L_PLUXML_INSTALLATION' => 'Installation de PluXml',
-'L_SITE_DESCRIPTION' => 'Blog ou Cms à l\'Xml !',
-'L_VERSION' => 'version',
-'L_USERNAME' => 'Nom de l\'administrateur',
-'L_LOGIN' => 'Identifiant de connexion à l\'administration',
-'L_PASSWORD' => 'Mot de passe',
-'L_PASSWORD_CONFIRMATION' => 'Confirmation du mot de passe',
-'L_INPUT_INSTALL' => 'Installer',
-'L_TIMEZONE' => 'Fuseau horaire',
-'L_PWD_VERY_WEAK' => 'Mot de passe très faible',
-'L_PWD_WEAK' => 'Mot de passe faible',
-'L_PWD_GOOD' => 'Mot de passe bon',
-'L_PWD_STRONG' => 'Mot de passe fort',
-);
-?>
+ 'Installation',
+'L_WRONG_PHP_VERSION' => 'PluXml requiert PHP 5 ou supérieur pour fonctionner.',
+'L_SELECT_LANG' => 'Sélectionnez votre langue',
+'L_INPUT_CHANGE' => 'Changer',
+'L_DEFAULT_CATEGORY_TITLE' => 'Rubrique 1',
+'L_DEFAULT_CATEGORY_URL' => 'rubrique-1',
+'L_DEFAULT_STATIC_TITLE' => 'Statique 1',
+'L_DEFAULT_STATIC_URL' => 'statique-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Premier article',
+'L_DEFAULT_ARTICLE_URL' => 'premier-article',
+'L_DEFAULT_COMMENT_CONTENT' => 'Ceci est un premier commentaire !',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml est déjà configuré !',
+'L_ERR_MISSING_USER' => 'Veuillez renseigner le nom du rédacteur !',
+'L_ERR_MISSING_LOGIN' => 'Veuillez renseigner le login de connexion !',
+'L_ERR_MISSING_PASSWORD' => 'Veuillez renseigner un mot de passe !',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Confirmation du mot de passe incorrecte !',
+'L_PLUXML_INSTALLATION' => 'Installation de PluXml',
+'L_SITE_DESCRIPTION' => 'Blog ou Cms à l\'Xml !',
+'L_VERSION' => 'version',
+'L_USERNAME' => 'Nom de l\'administrateur',
+'L_LOGIN' => 'Identifiant de connexion à l\'administration',
+'L_PASSWORD' => 'Mot de passe',
+'L_PASSWORD_CONFIRMATION' => 'Confirmation du mot de passe',
+'L_INPUT_INSTALL' => 'Installer',
+'L_TIMEZONE' => 'Fuseau horaire',
+'L_PWD_VERY_WEAK' => 'Mot de passe très faible',
+'L_PWD_WEAK' => 'Mot de passe faible',
+'L_PWD_GOOD' => 'Mot de passe bon',
+'L_PWD_STRONG' => 'Mot de passe fort',
+);
+?>
diff --git a/core/lang/fr/update.php b/core/lang/fr/update.php
index c2a14753d..cb1b82e64 100644
--- a/core/lang/fr/update.php
+++ b/core/lang/fr/update.php
@@ -1,60 +1,60 @@
- 'Enregistrement des données effectué avec succès',
-'L_UPDATE_TITLE' => 'Mise à jour PluXml',
-'L_WRONG_PHP_VERSION' => 'PluXml requiert PHP 5 ou supérieur pour fonctionner.',
-
-'L_SELECT_LANG' => 'Sélectionnez votre langue',
-'L_INPUT_CHANGE' => 'Changer',
-
-'L_UPDATE_UPTODATE' => 'Votre PluXml est déjà à jour.',
-'L_UPDATE_NOT_AVAILABLE' => 'Aucune mise à jour n\'est disponible.',
-'L_UPDATE_BACK' => 'Revenir au site',
-'L_UPDATE_WARNING1' => 'Vous allez mettre à jour votre ancienne version de PluXml',
-'L_UPDATE_SELECT_VERSION' => 'Veuillez sélectionner dans la liste ci-dessous votre ancienne version de PluXml à mettre à jour.',
-'L_UPDATE_WARNING2' => 'Si votre ancienne version n\'est pas listée ici, c\'est qu\'il n\'existe pas de procédure automatisée de mise à jour car votre version est trop vieille. Nous vous suggérons de télécharger la dernière version de PluXml et de faire une nouvelle installation.',
-'L_UPDATE_WARNING3' => 'Attention, avant de démarrer la mise à jour, n\'oubliez pas de faire une sauvegarde de vos données en faisant une copie du dossier "data"',
-'L_UPDATE_START' => 'Démarrer la mise à jour',
-
-'L_UPDATE_ENDED' => 'Mise à jour de la version %s terminée.',
-'L_UPDATE_INPROGRESS' => 'Applications des mises à jour version',
-'L_UPDATE_ERROR' => 'Une erreur s\'est produite pendant la mise à jour.',
-'L_UPDATE_SUCCESSFUL' => 'Toutes les mises à jour ont été appliquées avec succès !',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Mise à jour du fichier parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Création du fichier tags.xml',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Erreur pendant la création du fichier tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Création du fichier thème',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Erreur pendant la création du fichier',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Conversion des articles au nouveau format',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Erreur pendant le traitement du fichier',
-'L_UPDATE_STATICS_MIGRATION' => 'Migration du fichier des pages statiques',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Erreur pendant la migration du fichier des pages statiques',
-'L_UPDATE_CREATE_USERS_FILE' => 'Création du fichier des utilisateurs',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Erreur pendant la création du fichier des utilisateurs',
-'L_UPDATE_USERS_MIGRATION' => 'Migration du fichier des utilisateurs',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Erreur pendant la migration du fichier des utilisateurs',
-'L_UPDATE_ERR_NO_USERS' => 'Aucun utilisateur présent dans le fichier',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Création du fichier .htaccess',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Erreur pendant la création du fichier .htaccess',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Mise à jour du fichier .htaccess',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Erreur pendant la mise à jour du fichier .htaccess',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Migration du fichier des catégories',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Erreur pendant la migration du fichier des catégories',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Création du fichier plugins.xml',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Erreur pendant la création du fichier plugins.xml',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Suppression du fichier core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Erreur pendant la suppression du fichier core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Suppression du dossier core/plxtoolbar/',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Erreur pendant la suppression du dossier core/plxtoolbar/',
-'L_UPDATE_FILE' => 'Mise à jour du fichier',
-'L_UPDATE_ERR_FILE' => 'Erreur pendant la mise à jour du fichier',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migration des fichiers de paramétrage des plugins dans le dossier de configuration',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Mise à jour du fichier plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Migration des commentaires',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Erreur pendant la migration des commentaires',
-
-);
-?>
+ 'Enregistrement des données effectué avec succès',
+'L_UPDATE_TITLE' => 'Mise à jour PluXml',
+'L_WRONG_PHP_VERSION' => 'PluXml requiert PHP 5 ou supérieur pour fonctionner.',
+
+'L_SELECT_LANG' => 'Sélectionnez votre langue',
+'L_INPUT_CHANGE' => 'Changer',
+
+'L_UPDATE_UPTODATE' => 'Votre PluXml est déjà à jour.',
+'L_UPDATE_NOT_AVAILABLE' => 'Aucune mise à jour n\'est disponible.',
+'L_UPDATE_BACK' => 'Revenir au site',
+'L_UPDATE_WARNING1' => 'Vous allez mettre à jour votre ancienne version de PluXml',
+'L_UPDATE_SELECT_VERSION' => 'Veuillez sélectionner dans la liste ci-dessous votre ancienne version de PluXml à mettre à jour.',
+'L_UPDATE_WARNING2' => 'Si votre ancienne version n\'est pas listée ici, c\'est qu\'il n\'existe pas de procédure automatisée de mise à jour car votre version est trop vieille. Nous vous suggérons de télécharger la dernière version de PluXml et de faire une nouvelle installation.',
+'L_UPDATE_WARNING3' => 'Attention, avant de démarrer la mise à jour, n\'oubliez pas de faire une sauvegarde de vos données en faisant une copie du dossier "data"',
+'L_UPDATE_START' => 'Démarrer la mise à jour',
+
+'L_UPDATE_ENDED' => 'Mise à jour de la version %s terminée.',
+'L_UPDATE_INPROGRESS' => 'Applications des mises à jour version',
+'L_UPDATE_ERROR' => 'Une erreur s\'est produite pendant la mise à jour.',
+'L_UPDATE_SUCCESSFUL' => 'Toutes les mises à jour ont été appliquées avec succès !',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Mise à jour du fichier parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Création du fichier tags.xml',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Erreur pendant la création du fichier tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Création du fichier thème',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Erreur pendant la création du fichier',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Conversion des articles au nouveau format',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Erreur pendant le traitement du fichier',
+'L_UPDATE_STATICS_MIGRATION' => 'Migration du fichier des pages statiques',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Erreur pendant la migration du fichier des pages statiques',
+'L_UPDATE_CREATE_USERS_FILE' => 'Création du fichier des utilisateurs',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Erreur pendant la création du fichier des utilisateurs',
+'L_UPDATE_USERS_MIGRATION' => 'Migration du fichier des utilisateurs',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Erreur pendant la migration du fichier des utilisateurs',
+'L_UPDATE_ERR_NO_USERS' => 'Aucun utilisateur présent dans le fichier',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Création du fichier .htaccess',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Erreur pendant la création du fichier .htaccess',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Mise à jour du fichier .htaccess',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Erreur pendant la mise à jour du fichier .htaccess',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Migration du fichier des catégories',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Erreur pendant la migration du fichier des catégories',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Création du fichier plugins.xml',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Erreur pendant la création du fichier plugins.xml',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Suppression du fichier core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Erreur pendant la suppression du fichier core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Suppression du dossier core/plxtoolbar/',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Erreur pendant la suppression du dossier core/plxtoolbar/',
+'L_UPDATE_FILE' => 'Mise à jour du fichier',
+'L_UPDATE_ERR_FILE' => 'Erreur pendant la mise à jour du fichier',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migration des fichiers de paramétrage des plugins dans le dossier de configuration',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Mise à jour du fichier plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Migration des commentaires',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Erreur pendant la migration des commentaires',
+
+);
+?>
diff --git a/core/lang/nl/core.php b/core/lang/nl/core.php
index bf4bf0d43..8ab419949 100644
--- a/core/lang/nl/core.php
+++ b/core/lang/nl/core.php
@@ -1,140 +1,140 @@
- 'Nederlands',
-
-'L_DATE_CREATION' => 'Aanmaakdatum',
-'L_DATE_UPDATE' => 'Geactualiseerd',
-
-# common
-'L_PLUXML_VERSION' => 'PluXml versie',
-'L_HOMEPAGE' => 'Onthaal',
-'L_UNCLASSIFIED' => 'Niet geclassificeerd',
-'L_INFO_PHP_VERSION' => 'PHP-versie',
-'L_INFO_MAGIC_QUOTES' => '"magic quotes" staan nu',
-'L_INFO_CHARSET' => 'codering',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'De standaardlayout van PluXml werd niet gevonden',
-'L_ERR_FILE_NOTFOUND' => 'Het gevraagde PluXml bestand kan niet gevonden worden',
-'L_ERR_PAGE_NOT_FOUND' => 'Pagina niet gevonden',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'jan',
-'L_SHORT_FEBRUARY' => 'feb',
-'L_SHORT_MARCH' => 'maart',
-'L_SHORT_APRIL' => 'apr',
-'L_SHORT_MAY' => 'mei',
-'L_SHORT_JUNE' => 'juni',
-'L_SHORT_JULY' => 'juli',
-'L_SHORT_AUGUST' => 'aug',
-'L_SHORT_SEPTEMBER' => 'sept',
-'L_SHORT_OCTOBER' => 'okt',
-'L_SHORT_NOVEMBER' => 'nov',
-'L_SHORT_DECEMBER' => 'dec',
-'L_JANUARY' => 'januari',
-'L_FEBRUARY' => 'februari',
-'L_MARCH' => 'maart',
-'L_APRIL' => 'april',
-'L_MAY' => 'mei',
-'L_JUNE' => 'juni',
-'L_JULY' => 'juli',
-'L_AUGUST' => 'augustus',
-'L_SEPTEMBER' => 'september',
-'L_OCTOBER' => 'oktober',
-'L_NOVEMBER' => 'november',
-'L_DECEMBER' => 'december',
-'L_MONDAY' => 'maandag',
-'L_TUESDAY' => 'dinsdag',
-'L_WEDNESDAY' => 'woensdag',
-'L_THURSDAY' => 'donderdag',
-'L_FRIDAY' => 'vrijdag',
-'L_SATURDAY' => 'zaterdag',
-'L_SUNDAY' => 'zondag',
-
-# class.plx.capcha.php
-'L_LAST' => 'laatste',
-'L_FIRST' => 'eerste',
-'L_SECOND' => 'tweede',
-'L_THIRD' => 'derde',
-'L_FOURTH' => 'vierde',
-'L_FIFTH' => 'vijfde',
-'L_SIXTH' => 'zesde',
-'L_SEVENTH' => 'zevende',
-'L_EIGTH' => 'achste',
-'L_NINTH' => 'negende',
-'L_TENTH' => 'tiende',
-'L_NTH' => 'de',
-'L_CAPCHA_QUESTION' => 'Welke is de %s letter van het woord %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s is toegankelijk met schrijfrechten',
-'L_WRITE_NOT_ACCESS' => '%s is niet toegankelijk met schrijfrechten of bestaat niet',
-'L_MODREWRITE_AVAILABLE' => 'Apache module mod_rewrite voor het herschrijven van URLs is beschikbaar',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Apache module mod_rewrite voor het herschrijven van URLs is niet beschikbaar',
-'L_LIBGD_INSTALLED' => 'GD-bibliotheek is geïnstalleerd',
-'L_LIBGD_NOT_INSTALLED' => 'GD-bibliotheek is niet geïnstalleerd of beschikbaar',
-'L_LIBXML_INSTALLED' => 'XML-bibliotheek is geïnstalleerd',
-'L_LIBXML_NOT_INSTALLED' => 'XML-bibliotheek is niet geïnstalleerd of beschikbaar',
-'L_MAIL_AVAILABLE' => 'Email verzendfunctie is beschikbaar',
-'L_MAIL_NOT_AVAILABLE' => 'Email verzendfunctie is niet beschikbaar',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'Geen artikel gevonden voor dit sleutelwoord !',
-'L_UNKNOWN_CATEGORY' => 'Deze categorie bestaat niet !',
-'L_NO_ARTICLE_PAGE' => 'Geen artikel gevonden voor deze pagina !',
-'L_UNKNOWN_ARTICLE' => 'Dit artikel bestaat niet of niet meer !',
-'L_COM_IN_MODERATION' => 'De commentaar wordt momenteel gemodereerd door de beheerder van deze site',
-'L_UNKNOWN_STATIC' => 'Deze pagina bestaat niet of niet meer !',
-'L_DOCUMENT_NOT_FOUND' => 'Het opgevraagde document is onvindbaar',
-'L_NEWCOMMENT_ERR' => 'Er is een fout opgetreden bij het wegschrijven van de commentaar',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Gelieve alle verplichte velden in te vullen a.u.b.',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'La vérification anti-spam a échoué',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => '%s compressie is geactiveerd',
-'L_PAGETITLE_ARCHIVES' => 'Archieven',
-'L_PAGETITLE_TAG' => 'Tag',
-'L_NO_CATEGORY' => 'geen categorie',
-'L_CATEGORY' => 'categorie',
-'L_CATEGORIES' => 'categorieën',
-'L_NO_ARTICLE' => 'geen artikel',
-'L_ARTICLE' => 'artikel',
-'L_ARTICLES' => 'artikels',
-'L_ARTAUTHOR_UNKNOWN' => 'onbekend',
-'L_ARTTAGS_NONE' => 'geen',
-'L_ARTCHAPO' => 'Lees het vervolg #art_title',
-'L_ARTFEED_RSS_CATEGORY' => 'Rss-feed van artikels uit deze categorie',
-'L_ARTFEED_RSS_TAG' => 'Rss-feed van artikels uit deze tag',
-'L_ARTFEED_RSS' => 'Rss-feed van de artikels',
-'L_NO_COMMENT' => 'geen commentaar',
-'L_COMMENT' => 'commentaar',
-'L_COMMENTS' => 'commentaren',
-'L_COMFEED_RSS_ARTICLE' => 'Rss-feed van de commentaren van dit artikel',
-'L_COMFEED_RSS' => 'Rss-feed van de commentaren',
-'L_STATICCONTENT_INPROCESS' => 'Deze pagine wordt momenteel bijgewerkt',
-'L_SAID' => 'zei',
-
-'L_PAGINATION_FIRST_TITLE' => 'Ga naar de eerste pagina',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Vorige pagina',
-'L_PAGINATION_PREVIOUS' => 'vorige',
-'L_PAGINATION_NEXT_TITLE' => 'Volgende pagina',
-'L_PAGINATION_NEXT' => 'volgende',
-'L_PAGINATION_LAST_TITLE' => 'Ga naar de laatste pagina',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'pagina %s in %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Privé URLs zijn niet geïnitialiseerd in uw instellingen !',
-'L_FEED_COMMENTS' => 'Commentaren',
-'L_FEED_ONLINE_COMMENTS' => 'Online commentaren',
-'L_FEED_OFFLINE_COMMENTS' => 'Offline commentaren',
-'L_FEED_WRITTEN_BY' => 'Geschreven door',
-
-);
-?>
+ 'Nederlands',
+
+'L_DATE_CREATION' => 'Aanmaakdatum',
+'L_DATE_UPDATE' => 'Geactualiseerd',
+
+# common
+'L_PLUXML_VERSION' => 'PluXml versie',
+'L_HOMEPAGE' => 'Onthaal',
+'L_UNCLASSIFIED' => 'Niet geclassificeerd',
+'L_INFO_PHP_VERSION' => 'PHP-versie',
+'L_INFO_MAGIC_QUOTES' => '"magic quotes" staan nu',
+'L_INFO_CHARSET' => 'codering',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'De standaardlayout van PluXml werd niet gevonden',
+'L_ERR_FILE_NOTFOUND' => 'Het gevraagde PluXml bestand kan niet gevonden worden',
+'L_ERR_PAGE_NOT_FOUND' => 'Pagina niet gevonden',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'jan',
+'L_SHORT_FEBRUARY' => 'feb',
+'L_SHORT_MARCH' => 'maart',
+'L_SHORT_APRIL' => 'apr',
+'L_SHORT_MAY' => 'mei',
+'L_SHORT_JUNE' => 'juni',
+'L_SHORT_JULY' => 'juli',
+'L_SHORT_AUGUST' => 'aug',
+'L_SHORT_SEPTEMBER' => 'sept',
+'L_SHORT_OCTOBER' => 'okt',
+'L_SHORT_NOVEMBER' => 'nov',
+'L_SHORT_DECEMBER' => 'dec',
+'L_JANUARY' => 'januari',
+'L_FEBRUARY' => 'februari',
+'L_MARCH' => 'maart',
+'L_APRIL' => 'april',
+'L_MAY' => 'mei',
+'L_JUNE' => 'juni',
+'L_JULY' => 'juli',
+'L_AUGUST' => 'augustus',
+'L_SEPTEMBER' => 'september',
+'L_OCTOBER' => 'oktober',
+'L_NOVEMBER' => 'november',
+'L_DECEMBER' => 'december',
+'L_MONDAY' => 'maandag',
+'L_TUESDAY' => 'dinsdag',
+'L_WEDNESDAY' => 'woensdag',
+'L_THURSDAY' => 'donderdag',
+'L_FRIDAY' => 'vrijdag',
+'L_SATURDAY' => 'zaterdag',
+'L_SUNDAY' => 'zondag',
+
+# class.plx.capcha.php
+'L_LAST' => 'laatste',
+'L_FIRST' => 'eerste',
+'L_SECOND' => 'tweede',
+'L_THIRD' => 'derde',
+'L_FOURTH' => 'vierde',
+'L_FIFTH' => 'vijfde',
+'L_SIXTH' => 'zesde',
+'L_SEVENTH' => 'zevende',
+'L_EIGTH' => 'achste',
+'L_NINTH' => 'negende',
+'L_TENTH' => 'tiende',
+'L_NTH' => 'de',
+'L_CAPCHA_QUESTION' => 'Welke is de %s letter van het woord %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s is toegankelijk met schrijfrechten',
+'L_WRITE_NOT_ACCESS' => '%s is niet toegankelijk met schrijfrechten of bestaat niet',
+'L_MODREWRITE_AVAILABLE' => 'Apache module mod_rewrite voor het herschrijven van URLs is beschikbaar',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Apache module mod_rewrite voor het herschrijven van URLs is niet beschikbaar',
+'L_LIBGD_INSTALLED' => 'GD-bibliotheek is geïnstalleerd',
+'L_LIBGD_NOT_INSTALLED' => 'GD-bibliotheek is niet geïnstalleerd of beschikbaar',
+'L_LIBXML_INSTALLED' => 'XML-bibliotheek is geïnstalleerd',
+'L_LIBXML_NOT_INSTALLED' => 'XML-bibliotheek is niet geïnstalleerd of beschikbaar',
+'L_MAIL_AVAILABLE' => 'Email verzendfunctie is beschikbaar',
+'L_MAIL_NOT_AVAILABLE' => 'Email verzendfunctie is niet beschikbaar',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'Geen artikel gevonden voor dit sleutelwoord !',
+'L_UNKNOWN_CATEGORY' => 'Deze categorie bestaat niet !',
+'L_NO_ARTICLE_PAGE' => 'Geen artikel gevonden voor deze pagina !',
+'L_UNKNOWN_ARTICLE' => 'Dit artikel bestaat niet of niet meer !',
+'L_COM_IN_MODERATION' => 'De commentaar wordt momenteel gemodereerd door de beheerder van deze site',
+'L_UNKNOWN_STATIC' => 'Deze pagina bestaat niet of niet meer !',
+'L_DOCUMENT_NOT_FOUND' => 'Het opgevraagde document is onvindbaar',
+'L_NEWCOMMENT_ERR' => 'Er is een fout opgetreden bij het wegschrijven van de commentaar',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Gelieve alle verplichte velden in te vullen a.u.b.',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'La vérification anti-spam a échoué',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => '%s compressie is geactiveerd',
+'L_PAGETITLE_ARCHIVES' => 'Archieven',
+'L_PAGETITLE_TAG' => 'Tag',
+'L_NO_CATEGORY' => 'geen categorie',
+'L_CATEGORY' => 'categorie',
+'L_CATEGORIES' => 'categorieën',
+'L_NO_ARTICLE' => 'geen artikel',
+'L_ARTICLE' => 'artikel',
+'L_ARTICLES' => 'artikels',
+'L_ARTAUTHOR_UNKNOWN' => 'onbekend',
+'L_ARTTAGS_NONE' => 'geen',
+'L_ARTCHAPO' => 'Lees het vervolg #art_title',
+'L_ARTFEED_RSS_CATEGORY' => 'Rss-feed van artikels uit deze categorie',
+'L_ARTFEED_RSS_TAG' => 'Rss-feed van artikels uit deze tag',
+'L_ARTFEED_RSS' => 'Rss-feed van de artikels',
+'L_NO_COMMENT' => 'geen commentaar',
+'L_COMMENT' => 'commentaar',
+'L_COMMENTS' => 'commentaren',
+'L_COMFEED_RSS_ARTICLE' => 'Rss-feed van de commentaren van dit artikel',
+'L_COMFEED_RSS' => 'Rss-feed van de commentaren',
+'L_STATICCONTENT_INPROCESS' => 'Deze pagine wordt momenteel bijgewerkt',
+'L_SAID' => 'zei',
+
+'L_PAGINATION_FIRST_TITLE' => 'Ga naar de eerste pagina',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Vorige pagina',
+'L_PAGINATION_PREVIOUS' => 'vorige',
+'L_PAGINATION_NEXT_TITLE' => 'Volgende pagina',
+'L_PAGINATION_NEXT' => 'volgende',
+'L_PAGINATION_LAST_TITLE' => 'Ga naar de laatste pagina',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'pagina %s in %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Privé URLs zijn niet geïnitialiseerd in uw instellingen !',
+'L_FEED_COMMENTS' => 'Commentaren',
+'L_FEED_ONLINE_COMMENTS' => 'Online commentaren',
+'L_FEED_OFFLINE_COMMENTS' => 'Offline commentaren',
+'L_FEED_WRITTEN_BY' => 'Geschreven door',
+
+);
+?>
diff --git a/core/lang/nl/install.php b/core/lang/nl/install.php
index 4fd19104f..7fa1ca50a 100644
--- a/core/lang/nl/install.php
+++ b/core/lang/nl/install.php
@@ -1,36 +1,36 @@
- 'Installatie',
-'L_WRONG_PHP_VERSION' => 'PluXml heeft PHP-versie 5 of hoger nodig om goed te functioneren.',
-'L_SELECT_LANG' => 'Kies uw taal',
-'L_INPUT_CHANGE' => 'Verander',
-'L_DEFAULT_CATEGORY_TITLE' => 'Rubriek 1',
-'L_DEFAULT_CATEGORY_URL' => 'rubriek-1',
-'L_DEFAULT_STATIC_TITLE' => 'Statisch 1',
-'L_DEFAULT_STATIC_URL' => 'statisch-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Eerste artikel',
-'L_DEFAULT_ARTICLE_URL' => 'eerste-artikel',
-'L_DEFAULT_COMMENT_CONTENT' => 'Dit is een eerste commentaar !',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml is al geconfigureerd !',
-'L_ERR_MISSING_USER' => 'Vul de naam van de redacteur in !',
-'L_ERR_MISSING_LOGIN' => 'Vul een loginnaam in !',
-'L_ERR_MISSING_PASSWORD' => 'Vul een wachtwoord in !',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Bevestiging van wachtwoord mislukt !',
-'L_PLUXML_INSTALLATION' => 'Installatie van PluXml',
-'L_SITE_DESCRIPTION' => 'Blog of Cms in XML !',
-'L_VERSION' => 'versie',
-'L_USERNAME' => 'Naam van de beheerder',
-'L_LOGIN' => 'Login van de beheerder',
-'L_PASSWORD' => 'Wachtwoord',
-'L_PASSWORD_CONFIRMATION' => 'Bevestig het wachtwoord',
-'L_INPUT_INSTALL' => 'Installeer',
-'L_TIMEZONE' => 'Tijdzone',
-'L_PWD_VERY_WEAK' => 'Zeer zwak wachtwoord',
-'L_PWD_WEAK' => 'Zwak wachtwoord',
-'L_PWD_GOOD' => 'Goed wachtwoord',
-'L_PWD_STRONG' => 'Sterk wachtwoord',
-);
+ 'Installatie',
+'L_WRONG_PHP_VERSION' => 'PluXml heeft PHP-versie 5 of hoger nodig om goed te functioneren.',
+'L_SELECT_LANG' => 'Kies uw taal',
+'L_INPUT_CHANGE' => 'Verander',
+'L_DEFAULT_CATEGORY_TITLE' => 'Rubriek 1',
+'L_DEFAULT_CATEGORY_URL' => 'rubriek-1',
+'L_DEFAULT_STATIC_TITLE' => 'Statisch 1',
+'L_DEFAULT_STATIC_URL' => 'statisch-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Eerste artikel',
+'L_DEFAULT_ARTICLE_URL' => 'eerste-artikel',
+'L_DEFAULT_COMMENT_CONTENT' => 'Dit is een eerste commentaar !',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml is al geconfigureerd !',
+'L_ERR_MISSING_USER' => 'Vul de naam van de redacteur in !',
+'L_ERR_MISSING_LOGIN' => 'Vul een loginnaam in !',
+'L_ERR_MISSING_PASSWORD' => 'Vul een wachtwoord in !',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Bevestiging van wachtwoord mislukt !',
+'L_PLUXML_INSTALLATION' => 'Installatie van PluXml',
+'L_SITE_DESCRIPTION' => 'Blog of Cms in XML !',
+'L_VERSION' => 'versie',
+'L_USERNAME' => 'Naam van de beheerder',
+'L_LOGIN' => 'Login van de beheerder',
+'L_PASSWORD' => 'Wachtwoord',
+'L_PASSWORD_CONFIRMATION' => 'Bevestig het wachtwoord',
+'L_INPUT_INSTALL' => 'Installeer',
+'L_TIMEZONE' => 'Tijdzone',
+'L_PWD_VERY_WEAK' => 'Zeer zwak wachtwoord',
+'L_PWD_WEAK' => 'Zwak wachtwoord',
+'L_PWD_GOOD' => 'Goed wachtwoord',
+'L_PWD_STRONG' => 'Sterk wachtwoord',
+);
?>
\ No newline at end of file
diff --git a/core/lang/nl/update.php b/core/lang/nl/update.php
index fee954930..9c39429c0 100644
--- a/core/lang/nl/update.php
+++ b/core/lang/nl/update.php
@@ -1,59 +1,59 @@
- 'Gegevens werden succesvol opgeslagen',
-'L_UPDATE_TITLE' => 'Updates voor PluXml',
-'L_WRONG_PHP_VERSION' => 'PluXml heeft PHP-versie 5 of hoger nodig om te functioneren',
-
-'L_SELECT_LANG' => 'Kies uw taal',
-'L_INPUT_CHANGE' => 'Verander',
-
-'L_UPDATE_UPTODATE' => 'Uw PluXml is al up to date',
-'L_UPDATE_NOT_AVAILABLE' => 'Er zijn momenteel geen updates',
-'L_UPDATE_BACK' => 'Terug naar de site',
-'L_UPDATE_WARNING1' => 'U staat op het punt uw oude versie van PluXml bij te werken',
-'L_UPDATE_SELECT_VERSION' => 'Gelieve in onderstaande lijst de huidige versie van uw PluXml-installatie te kiezen om bij te werken.',
-'L_UPDATE_WARNING2' => 'Indien u uw versie van PluXml niet terug kan vinden in de lijst dan betekent dit dat uw huidige versie van PluXml te oud is om automatisch bij te werken. Wij raden u aan de laatste versie van PluXml te downloaden en een nieuwe installatie uit te voeren.',
-'L_UPDATE_WARNING3' => 'Opgapast, wij raden u aan om vooraleer u een update uitvoert een kopie te maken van uw gegevens in de map "data"',
-'L_UPDATE_START' => 'Start het bijwerken',
-
-'L_UPDATE_ENDED' => 'Het bijwerken van de %s versie is afgerond.',
-'L_UPDATE_INPROGRESS' => 'Bezig met bijwerken van de versie',
-'L_UPDATE_ERROR' => 'Er is een fout opgetreden tijdens het bijwerken.',
-'L_UPDATE_SUCCESSFUL' => 'Alle bijwerkingen zijn succesvol doorgevoerd !',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Bijwerken van het bestand parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'tags.xml wordt aangemaakt',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Er is een fout opgetreden tijdens het maken van het bestand tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Lay-out bestand wordt aangemaakt',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het bestand',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Artikels worden naar nieuw formaat geconverteerd',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Er is een fout opgetreden tijdens het verwerken van het bestand',
-'L_UPDATE_STATICS_MIGRATION' => 'Migratie van het bestand van de statische paginas',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Er is een fout opgetreden tijdens de migratie van het statische paginas bestand',
-'L_UPDATE_CREATE_USERS_FILE' => 'Gebruikersbestand wordt aangemaakt',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het gebruikersbestand',
-'L_UPDATE_USERS_MIGRATION' => 'Migratie van het gebruikersbestand',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Er is een fout opgetreden tijdens de migratie van het gebruikersbestand',
-'L_UPDATE_ERR_NO_USERS' => 'Geen gebruikers in het gebruikersbestand',
-'L_UPDATE_CREATE_HTACCESS_FILE' => '.htaccess-bestand wordt aangemaakt',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het .htaccess-bestand',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Bijwerken van het bestand .htaccess',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Fout bij het bijwerken van het bestand .htaccess',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Migratie van het categorie-bestand',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Er is een fout opgetreden tijdens de migratie van het categorie-bestand',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'plugins.xml wordt aangemaakt',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het plugins.xml bestand',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Verwijderen van het bestand core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Er is een fout opgetreden tijdens het verwijderen van het bestand core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Verwijderen van de map core/plxtoolbar/',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Er is een fout opgetreden tijdens het verwijderen van de map core/plxtoolbar/',
-'L_UPDATE_FILE' => 'Update File',
-'L_UPDATE_ERR_FILE' => 'Fout tijdens het update-bestand',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migratie van bestanden van plug-in parameter instellingen in het configuratiebestand',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Bijwerken van het bestand plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Migratie opmerkingen',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Fout bij het migreren opmerkingen',
-);
+ 'Gegevens werden succesvol opgeslagen',
+'L_UPDATE_TITLE' => 'Updates voor PluXml',
+'L_WRONG_PHP_VERSION' => 'PluXml heeft PHP-versie 5 of hoger nodig om te functioneren',
+
+'L_SELECT_LANG' => 'Kies uw taal',
+'L_INPUT_CHANGE' => 'Verander',
+
+'L_UPDATE_UPTODATE' => 'Uw PluXml is al up to date',
+'L_UPDATE_NOT_AVAILABLE' => 'Er zijn momenteel geen updates',
+'L_UPDATE_BACK' => 'Terug naar de site',
+'L_UPDATE_WARNING1' => 'U staat op het punt uw oude versie van PluXml bij te werken',
+'L_UPDATE_SELECT_VERSION' => 'Gelieve in onderstaande lijst de huidige versie van uw PluXml-installatie te kiezen om bij te werken.',
+'L_UPDATE_WARNING2' => 'Indien u uw versie van PluXml niet terug kan vinden in de lijst dan betekent dit dat uw huidige versie van PluXml te oud is om automatisch bij te werken. Wij raden u aan de laatste versie van PluXml te downloaden en een nieuwe installatie uit te voeren.',
+'L_UPDATE_WARNING3' => 'Opgapast, wij raden u aan om vooraleer u een update uitvoert een kopie te maken van uw gegevens in de map "data"',
+'L_UPDATE_START' => 'Start het bijwerken',
+
+'L_UPDATE_ENDED' => 'Het bijwerken van de %s versie is afgerond.',
+'L_UPDATE_INPROGRESS' => 'Bezig met bijwerken van de versie',
+'L_UPDATE_ERROR' => 'Er is een fout opgetreden tijdens het bijwerken.',
+'L_UPDATE_SUCCESSFUL' => 'Alle bijwerkingen zijn succesvol doorgevoerd !',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Bijwerken van het bestand parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'tags.xml wordt aangemaakt',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Er is een fout opgetreden tijdens het maken van het bestand tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Lay-out bestand wordt aangemaakt',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het bestand',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Artikels worden naar nieuw formaat geconverteerd',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Er is een fout opgetreden tijdens het verwerken van het bestand',
+'L_UPDATE_STATICS_MIGRATION' => 'Migratie van het bestand van de statische paginas',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Er is een fout opgetreden tijdens de migratie van het statische paginas bestand',
+'L_UPDATE_CREATE_USERS_FILE' => 'Gebruikersbestand wordt aangemaakt',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het gebruikersbestand',
+'L_UPDATE_USERS_MIGRATION' => 'Migratie van het gebruikersbestand',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Er is een fout opgetreden tijdens de migratie van het gebruikersbestand',
+'L_UPDATE_ERR_NO_USERS' => 'Geen gebruikers in het gebruikersbestand',
+'L_UPDATE_CREATE_HTACCESS_FILE' => '.htaccess-bestand wordt aangemaakt',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het .htaccess-bestand',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Bijwerken van het bestand .htaccess',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Fout bij het bijwerken van het bestand .htaccess',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Migratie van het categorie-bestand',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Er is een fout opgetreden tijdens de migratie van het categorie-bestand',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'plugins.xml wordt aangemaakt',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Er is een fout opgetreden tijdens het aanmaken van het plugins.xml bestand',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Verwijderen van het bestand core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Er is een fout opgetreden tijdens het verwijderen van het bestand core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Verwijderen van de map core/plxtoolbar/',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Er is een fout opgetreden tijdens het verwijderen van de map core/plxtoolbar/',
+'L_UPDATE_FILE' => 'Update File',
+'L_UPDATE_ERR_FILE' => 'Fout tijdens het update-bestand',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migratie van bestanden van plug-in parameter instellingen in het configuratiebestand',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Bijwerken van het bestand plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Migratie opmerkingen',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Fout bij het migreren opmerkingen',
+);
?>
\ No newline at end of file
diff --git a/core/lang/pl/core.php b/core/lang/pl/core.php
index e33e39dba..b7040e84a 100644
--- a/core/lang/pl/core.php
+++ b/core/lang/pl/core.php
@@ -1,140 +1,140 @@
- 'pl',
-
-'L_DATE_CREATION' => 'Data utworzenia',
-'L_DATE_UPDATE' => 'Data zaktualizowane',
-
-# common
-'L_PLUXML_VERSION' => 'Wersja PluXml',
-'L_HOMEPAGE' => 'Strona startowa',
-'L_UNCLASSIFIED' => 'Bez kategorii',
-'L_INFO_PHP_VERSION' => 'Wersja PHP',
-'L_INFO_MAGIC_QUOTES' => 'Stan "magicznych cudzysłowów"',
-'L_INFO_CHARSET' => 'kodowanie',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'Nie odnaleziono głównego szablonu PluXml',
-'L_ERR_FILE_NOTFOUND' => 'Plik docelowy nie został znaleziony',
-'L_ERR_PAGE_NOT_FOUND' => 'Nie znaleziono strony',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'styczeń',
-'L_SHORT_FEBRUARY' => 'luty',
-'L_SHORT_MARCH' => 'marzec',
-'L_SHORT_APRIL' => 'kwiecień',
-'L_SHORT_MAY' => 'maj',
-'L_SHORT_JUNE' => 'czerwiec',
-'L_SHORT_JULY' => 'lipiec',
-'L_SHORT_AUGUST' => 'sierpień',
-'L_SHORT_SEPTEMBER' => 'wrzesień',
-'L_SHORT_OCTOBER' => 'pażdziernik',
-'L_SHORT_NOVEMBER' => 'listopad',
-'L_SHORT_DECEMBER' => 'grudzień',
-'L_JANUARY' => 'styczeń',
-'L_FEBRUARY' => 'luty',
-'L_MARCH' => 'marzec',
-'L_APRIL' => 'kwiecień',
-'L_MAY' => 'maj',
-'L_JUNE' => 'czerwiec',
-'L_JULY' => 'lipiec',
-'L_AUGUST' => 'sierpień',
-'L_SEPTEMBER' => 'wrzesień',
-'L_OCTOBER' => 'pażdziernik',
-'L_NOVEMBER' => 'listopad',
-'L_DECEMBER' => 'grudzień',
-'L_MONDAY' => 'poniedziałek',
-'L_TUESDAY' => 'wtorek',
-'L_WEDNESDAY' => 'środa',
-'L_THURSDAY' => 'czwartek',
-'L_FRIDAY' => 'piątek',
-'L_SATURDAY' => 'sobota',
-'L_SUNDAY' => 'niedziela',
-
-# class.plx.capcha.php
-'L_LAST' => 'ostatnia',
-'L_FIRST' => 'pierwsza',
-'L_SECOND' => 'druga',
-'L_THIRD' => 'trzecia',
-'L_FOURTH' => 'czwarta',
-'L_FIFTH' => 'piąta',
-'L_SIXTH' => 'szósta',
-'L_SEVENTH' => 'siódma',
-'L_EIGTH' => 'ósma',
-'L_NINTH' => 'dziewiąta',
-'L_TENTH' => 'dziesiąta',
-'L_NTH' => 'n-ta',
-'L_CAPCHA_QUESTION' => 'Jaka jest %s litera w słowie %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s jest zapisywalny',
-'L_WRITE_NOT_ACCESS' => '%s nie posiada prawa do zapisu lub nie istnieje',
-'L_MODREWRITE_AVAILABLE' => 'Moduł apache mod_rewrite jest dostępny',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Moduł apache mod_rewrite nie jest dostępny',
-'L_LIBGD_INSTALLED' => 'Zainstalowane biblioteki GD',
-'L_LIBGD_NOT_INSTALLED' => 'Nie zainstalowane biblioteki GD',
-'L_LIBXML_INSTALLED' => 'Zainstalowane biblioteki XML',
-'L_LIBXML_NOT_INSTALLED' => 'Nie zainstalowane biblioteki XML',
-'L_MAIL_AVAILABLE' => 'Funkcja wysyłania poczty dostępna',
-'L_MAIL_NOT_AVAILABLE' => 'Funkcja wysyłania poczty nie jest dostępna',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'Brak postów dla danego słowa kluczowego !',
-'L_UNKNOWN_CATEGORY' => 'Ta kategoria nie istnieje !',
-'L_NO_ARTICLE_PAGE' => 'Brak postów dla tej strony !',
-'L_UNKNOWN_ARTICLE' => 'Ten post nie istniał lub nie istnieje już !',
-'L_COM_IN_MODERATION' => 'Komentarz jest sprawdzany przez administratora tej strony',
-'L_UNKNOWN_STATIC' => 'Ta strona nie istniała lub nie istnieje już !',
-'L_DOCUMENT_NOT_FOUND' => 'Podany dokument nie został znaleziony',
-'L_NEWCOMMENT_ERR' => 'Wystąpił błąd podczas publikacji tego komentarza',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Proszę wypełnić wszystkie wymagane pola',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'Błędna weryfikacja antyspamowa',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Kompresja %s aktywna',
-'L_PAGETITLE_ARCHIVES' => 'Archiwum',
-'L_PAGETITLE_TAG' => 'Tag',
-'L_NO_CATEGORY' => 'brak kategorii',
-'L_CATEGORY' => 'kategorii',
-'L_CATEGORIES' => 'kategorie',
-'L_NO_ARTICLE' => 'brak posta',
-'L_ARTICLE' => 'post',
-'L_ARTICLES' => 'posty',
-'L_ARTAUTHOR_UNKNOWN' => 'brak danych',
-'L_ARTTAGS_NONE' => 'brak',
-'L_ARTCHAPO' => 'Czytaj więcej',
-'L_ARTFEED_RSS_CATEGORY' => 'Kanał RSS z kategorii',
-'L_ARTFEED_RSS_TAG' => 'Kanał RSS z tagu',
-'L_ARTFEED_RSS' => 'Kanał RSS z posta',
-'L_NO_COMMENT' => 'brak komentarzy',
-'L_COMMENT' => 'komentarz',
-'L_COMMENTS' => 'komentarze',
-'L_COMFEED_RSS_ARTICLE' => 'Kanał RSS z komentarzy dla tego posta',
-'L_COMFEED_RSS' => 'Kanał RSS z komentarzy',
-'L_STATICCONTENT_INPROCESS' => 'Ta strona jest obecnie moderowana',
-'L_SAID' => 'mówi',
-
-'L_PAGINATION_FIRST_TITLE' => 'Przejdź do pierwszej strony',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Poprzednia strona',
-'L_PAGINATION_PREVIOUS' => 'poprzednia',
-'L_PAGINATION_NEXT_TITLE' => 'Następna strona',
-'L_PAGINATION_NEXT' => 'następna',
-'L_PAGINATION_LAST_TITLE' => 'Przejdź do ostatniej strony',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'strona %s z %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Prywatne adresy URL nie zostały zainicjowane w ustawieniach administracji !',
-'L_FEED_COMMENTS' => 'Komentarze',
-'L_FEED_ONLINE_COMMENTS' => 'Aktywne komentarze',
-'L_FEED_OFFLINE_COMMENTS' => 'Nieaktywne komentarze',
-'L_FEED_WRITTEN_BY' => 'Napisane przez',
-
-);
-?>
+ 'pl',
+
+'L_DATE_CREATION' => 'Data utworzenia',
+'L_DATE_UPDATE' => 'Data zaktualizowane',
+
+# common
+'L_PLUXML_VERSION' => 'Wersja PluXml',
+'L_HOMEPAGE' => 'Strona startowa',
+'L_UNCLASSIFIED' => 'Bez kategorii',
+'L_INFO_PHP_VERSION' => 'Wersja PHP',
+'L_INFO_MAGIC_QUOTES' => 'Stan "magicznych cudzysłowów"',
+'L_INFO_CHARSET' => 'kodowanie',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'Nie odnaleziono głównego szablonu PluXml',
+'L_ERR_FILE_NOTFOUND' => 'Plik docelowy nie został znaleziony',
+'L_ERR_PAGE_NOT_FOUND' => 'Nie znaleziono strony',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'styczeń',
+'L_SHORT_FEBRUARY' => 'luty',
+'L_SHORT_MARCH' => 'marzec',
+'L_SHORT_APRIL' => 'kwiecień',
+'L_SHORT_MAY' => 'maj',
+'L_SHORT_JUNE' => 'czerwiec',
+'L_SHORT_JULY' => 'lipiec',
+'L_SHORT_AUGUST' => 'sierpień',
+'L_SHORT_SEPTEMBER' => 'wrzesień',
+'L_SHORT_OCTOBER' => 'pażdziernik',
+'L_SHORT_NOVEMBER' => 'listopad',
+'L_SHORT_DECEMBER' => 'grudzień',
+'L_JANUARY' => 'styczeń',
+'L_FEBRUARY' => 'luty',
+'L_MARCH' => 'marzec',
+'L_APRIL' => 'kwiecień',
+'L_MAY' => 'maj',
+'L_JUNE' => 'czerwiec',
+'L_JULY' => 'lipiec',
+'L_AUGUST' => 'sierpień',
+'L_SEPTEMBER' => 'wrzesień',
+'L_OCTOBER' => 'pażdziernik',
+'L_NOVEMBER' => 'listopad',
+'L_DECEMBER' => 'grudzień',
+'L_MONDAY' => 'poniedziałek',
+'L_TUESDAY' => 'wtorek',
+'L_WEDNESDAY' => 'środa',
+'L_THURSDAY' => 'czwartek',
+'L_FRIDAY' => 'piątek',
+'L_SATURDAY' => 'sobota',
+'L_SUNDAY' => 'niedziela',
+
+# class.plx.capcha.php
+'L_LAST' => 'ostatnia',
+'L_FIRST' => 'pierwsza',
+'L_SECOND' => 'druga',
+'L_THIRD' => 'trzecia',
+'L_FOURTH' => 'czwarta',
+'L_FIFTH' => 'piąta',
+'L_SIXTH' => 'szósta',
+'L_SEVENTH' => 'siódma',
+'L_EIGTH' => 'ósma',
+'L_NINTH' => 'dziewiąta',
+'L_TENTH' => 'dziesiąta',
+'L_NTH' => 'n-ta',
+'L_CAPCHA_QUESTION' => 'Jaka jest %s litera w słowie %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s jest zapisywalny',
+'L_WRITE_NOT_ACCESS' => '%s nie posiada prawa do zapisu lub nie istnieje',
+'L_MODREWRITE_AVAILABLE' => 'Moduł apache mod_rewrite jest dostępny',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Moduł apache mod_rewrite nie jest dostępny',
+'L_LIBGD_INSTALLED' => 'Zainstalowane biblioteki GD',
+'L_LIBGD_NOT_INSTALLED' => 'Nie zainstalowane biblioteki GD',
+'L_LIBXML_INSTALLED' => 'Zainstalowane biblioteki XML',
+'L_LIBXML_NOT_INSTALLED' => 'Nie zainstalowane biblioteki XML',
+'L_MAIL_AVAILABLE' => 'Funkcja wysyłania poczty dostępna',
+'L_MAIL_NOT_AVAILABLE' => 'Funkcja wysyłania poczty nie jest dostępna',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'Brak postów dla danego słowa kluczowego !',
+'L_UNKNOWN_CATEGORY' => 'Ta kategoria nie istnieje !',
+'L_NO_ARTICLE_PAGE' => 'Brak postów dla tej strony !',
+'L_UNKNOWN_ARTICLE' => 'Ten post nie istniał lub nie istnieje już !',
+'L_COM_IN_MODERATION' => 'Komentarz jest sprawdzany przez administratora tej strony',
+'L_UNKNOWN_STATIC' => 'Ta strona nie istniała lub nie istnieje już !',
+'L_DOCUMENT_NOT_FOUND' => 'Podany dokument nie został znaleziony',
+'L_NEWCOMMENT_ERR' => 'Wystąpił błąd podczas publikacji tego komentarza',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Proszę wypełnić wszystkie wymagane pola',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'Błędna weryfikacja antyspamowa',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Kompresja %s aktywna',
+'L_PAGETITLE_ARCHIVES' => 'Archiwum',
+'L_PAGETITLE_TAG' => 'Tag',
+'L_NO_CATEGORY' => 'brak kategorii',
+'L_CATEGORY' => 'kategorii',
+'L_CATEGORIES' => 'kategorie',
+'L_NO_ARTICLE' => 'brak posta',
+'L_ARTICLE' => 'post',
+'L_ARTICLES' => 'posty',
+'L_ARTAUTHOR_UNKNOWN' => 'brak danych',
+'L_ARTTAGS_NONE' => 'brak',
+'L_ARTCHAPO' => 'Czytaj więcej',
+'L_ARTFEED_RSS_CATEGORY' => 'Kanał RSS z kategorii',
+'L_ARTFEED_RSS_TAG' => 'Kanał RSS z tagu',
+'L_ARTFEED_RSS' => 'Kanał RSS z posta',
+'L_NO_COMMENT' => 'brak komentarzy',
+'L_COMMENT' => 'komentarz',
+'L_COMMENTS' => 'komentarze',
+'L_COMFEED_RSS_ARTICLE' => 'Kanał RSS z komentarzy dla tego posta',
+'L_COMFEED_RSS' => 'Kanał RSS z komentarzy',
+'L_STATICCONTENT_INPROCESS' => 'Ta strona jest obecnie moderowana',
+'L_SAID' => 'mówi',
+
+'L_PAGINATION_FIRST_TITLE' => 'Przejdź do pierwszej strony',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Poprzednia strona',
+'L_PAGINATION_PREVIOUS' => 'poprzednia',
+'L_PAGINATION_NEXT_TITLE' => 'Następna strona',
+'L_PAGINATION_NEXT' => 'następna',
+'L_PAGINATION_LAST_TITLE' => 'Przejdź do ostatniej strony',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'strona %s z %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Prywatne adresy URL nie zostały zainicjowane w ustawieniach administracji !',
+'L_FEED_COMMENTS' => 'Komentarze',
+'L_FEED_ONLINE_COMMENTS' => 'Aktywne komentarze',
+'L_FEED_OFFLINE_COMMENTS' => 'Nieaktywne komentarze',
+'L_FEED_WRITTEN_BY' => 'Napisane przez',
+
+);
+?>
diff --git a/core/lang/pl/install.php b/core/lang/pl/install.php
index 903c1e0d1..6722acd09 100644
--- a/core/lang/pl/install.php
+++ b/core/lang/pl/install.php
@@ -1,36 +1,36 @@
- 'Instalacja',
-'L_WRONG_PHP_VERSION' => 'PluXml wymaga PHP 5 lub nowszego, do uruchomienia.',
-'L_SELECT_LANG' => 'Wybierz język',
-'L_INPUT_CHANGE' => 'Zmień',
-'L_DEFAULT_CATEGORY_TITLE' => 'Kategoria 1',
-'L_DEFAULT_CATEGORY_URL' => 'kategoria-1',
-'L_DEFAULT_STATIC_TITLE' => 'Strona 1',
-'L_DEFAULT_STATIC_URL' => 'strona-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Pierwszy post',
-'L_DEFAULT_ARTICLE_URL' => 'pierwszy-post',
-'L_DEFAULT_COMMENT_CONTENT' => 'To jest pierwszy komentarz !',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml jest już zainstalowany !',
-'L_ERR_MISSING_USER' => 'Proszę wpisać nazwę !',
-'L_ERR_MISSING_LOGIN' => 'Proszę wpisać login !',
-'L_ERR_MISSING_PASSWORD' => 'Proszę wpisać hasło !',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Niepoprawne potwierdzenie hasła',
-'L_PLUXML_INSTALLATION' => 'Instalacja PluXml',
-'L_SITE_DESCRIPTION' => 'Blog i CMS oparty na XML !',
-'L_VERSION' => 'wersja',
-'L_USERNAME' => 'Nazwa admina',
-'L_LOGIN' => 'Login admina',
-'L_PASSWORD' => 'Hasło',
-'L_PASSWORD_CONFIRMATION' => 'Potwierdź hasło',
-'L_INPUT_INSTALL' => 'Zainstaluj',
-'L_TIMEZONE' => 'Strefa czasowa',
-'L_PWD_VERY_WEAK' => 'Bardzo słabe hasło',
-'L_PWD_WEAK' => 'Słabe hasło',
-'L_PWD_GOOD' => 'Dobre hasło',
-'L_PWD_STRONG' => 'Silne hasło',
-);
-?>
+ 'Instalacja',
+'L_WRONG_PHP_VERSION' => 'PluXml wymaga PHP 5 lub nowszego, do uruchomienia.',
+'L_SELECT_LANG' => 'Wybierz język',
+'L_INPUT_CHANGE' => 'Zmień',
+'L_DEFAULT_CATEGORY_TITLE' => 'Kategoria 1',
+'L_DEFAULT_CATEGORY_URL' => 'kategoria-1',
+'L_DEFAULT_STATIC_TITLE' => 'Strona 1',
+'L_DEFAULT_STATIC_URL' => 'strona-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Pierwszy post',
+'L_DEFAULT_ARTICLE_URL' => 'pierwszy-post',
+'L_DEFAULT_COMMENT_CONTENT' => 'To jest pierwszy komentarz !',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml jest już zainstalowany !',
+'L_ERR_MISSING_USER' => 'Proszę wpisać nazwę !',
+'L_ERR_MISSING_LOGIN' => 'Proszę wpisać login !',
+'L_ERR_MISSING_PASSWORD' => 'Proszę wpisać hasło !',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Niepoprawne potwierdzenie hasła',
+'L_PLUXML_INSTALLATION' => 'Instalacja PluXml',
+'L_SITE_DESCRIPTION' => 'Blog i CMS oparty na XML !',
+'L_VERSION' => 'wersja',
+'L_USERNAME' => 'Nazwa admina',
+'L_LOGIN' => 'Login admina',
+'L_PASSWORD' => 'Hasło',
+'L_PASSWORD_CONFIRMATION' => 'Potwierdź hasło',
+'L_INPUT_INSTALL' => 'Zainstaluj',
+'L_TIMEZONE' => 'Strefa czasowa',
+'L_PWD_VERY_WEAK' => 'Bardzo słabe hasło',
+'L_PWD_WEAK' => 'Słabe hasło',
+'L_PWD_GOOD' => 'Dobre hasło',
+'L_PWD_STRONG' => 'Silne hasło',
+);
+?>
diff --git a/core/lang/pl/update.php b/core/lang/pl/update.php
index a9b32cd03..4640e9823 100644
--- a/core/lang/pl/update.php
+++ b/core/lang/pl/update.php
@@ -1,59 +1,59 @@
- 'Dane zostały pomyślnie zapisane',
-'L_UPDATE_TITLE' => 'Aktualizacja PluXml',
-'L_WRONG_PHP_VERSION' => 'PluXml wymaga PHP 5 lub nowszego, do uruchomienia.',
-
-'L_SELECT_LANG' => 'Wybierz język',
-'L_INPUT_CHANGE' => 'Zmień',
-
-'L_UPDATE_UPTODATE' => 'Twój PluXml jest aktualny',
-'L_UPDATE_NOT_AVAILABLE' => 'Brak dostępnych akutalizacji.',
-'L_UPDATE_BACK' => 'Powrót do strony głównej',
-'L_UPDATE_WARNING1' => 'Twoja wersja PluXml wymaga aktualizacji',
-'L_UPDATE_SELECT_VERSION' => 'Proszę wybrać wersję PluXml, którą chcesz zaktualizować.',
-'L_UPDATE_WARNING2' => 'Jeżeli nie ma twojej wersji na liście, może to oznaczać że jest zbyt stara i nie posiada automatycznej aktualizacji. Sugerujemy, aby pobrać najnowszą wersję PluXml i wykonać nową instalację.',
-'L_UPDATE_WARNING3' => 'OSTRZEŻENIE przed rozpoczęciem aktualizacji należy wykonać kopię zapasową danych folderu "data"',
-'L_UPDATE_START' => 'Rozpocznij aktualizację',
-
-'L_UPDATE_ENDED' => 'Aktualizacja do wersji %s zakończona.',
-'L_UPDATE_INPROGRESS' => 'Wersja aplikacji aktualizacji',
-'L_UPDATE_ERROR' => 'Wystąpił błąd podczas aktualizacji.',
-'L_UPDATE_SUCCESSFUL' => 'Wszystkie aktualizacje zostały z powodzeniem zastosowane!',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Aktualizacja pliku parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Tworzenie pliku tags.xml',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Wystąpił błąd podczas tworzenia pliku tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Tworzenie pliku motywu',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Wystąpił błąd podczas tworzenia pliku',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Konwersja artykułów do nowego formatu',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Wystąpił błąd podczas przetwarzania pliku',
-'L_UPDATE_STATICS_MIGRATION' => 'Migracja statycznego pliku stron',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Wystąpił błąd podczas migracji statycznych stron',
-'L_UPDATE_CREATE_USERS_FILE' => 'Tworzenie pliku użytkownika',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Wystąpił błąd podczas tworzenia pliku',
-'L_UPDATE_USERS_MIGRATION' => 'Migracja pliku użytkownika',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Wystąpił błąd podczas migracji użytkownika',
-'L_UPDATE_ERR_NO_USERS' => 'Brak użytkowników w pliku',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Tworzenie pliku .htaccess',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Wystąpił błąd podczas tworzenia pliku .htaccess',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Aktualizacja pliku .htaccess',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Wystąpił błąd podczas aktualizacji pliku .htaccess',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Migracja pliku kategorii',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Wystąpił błąd podczas migracji kategorii',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Tworzenie pliku plugins.xml',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Wystąpił błąd podczas tworzea pliku plugins.xml',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Usuwanie pliku core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Wystąpił błąd podczas usuwania pliku core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Usuwanie folderu core/plxtoolbar/',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Wystąpił błąd podczas usuwania folderu core/plxtoolbar/',
-'L_UPDATE_FILE' => 'Aktualizacja plików',
-'L_UPDATE_ERR_FILE' => 'Wystąpił błąd podczas aktualizacji pliku',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migracja wtyczek parametrów pliku w folderze konfiguracyjnym',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Aktualizacja pliku plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Uwagi dotyczące migracji',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Błąd podczas migracji komentarzy',
-);
-?>
+ 'Dane zostały pomyślnie zapisane',
+'L_UPDATE_TITLE' => 'Aktualizacja PluXml',
+'L_WRONG_PHP_VERSION' => 'PluXml wymaga PHP 5 lub nowszego, do uruchomienia.',
+
+'L_SELECT_LANG' => 'Wybierz język',
+'L_INPUT_CHANGE' => 'Zmień',
+
+'L_UPDATE_UPTODATE' => 'Twój PluXml jest aktualny',
+'L_UPDATE_NOT_AVAILABLE' => 'Brak dostępnych akutalizacji.',
+'L_UPDATE_BACK' => 'Powrót do strony głównej',
+'L_UPDATE_WARNING1' => 'Twoja wersja PluXml wymaga aktualizacji',
+'L_UPDATE_SELECT_VERSION' => 'Proszę wybrać wersję PluXml, którą chcesz zaktualizować.',
+'L_UPDATE_WARNING2' => 'Jeżeli nie ma twojej wersji na liście, może to oznaczać że jest zbyt stara i nie posiada automatycznej aktualizacji. Sugerujemy, aby pobrać najnowszą wersję PluXml i wykonać nową instalację.',
+'L_UPDATE_WARNING3' => 'OSTRZEŻENIE przed rozpoczęciem aktualizacji należy wykonać kopię zapasową danych folderu "data"',
+'L_UPDATE_START' => 'Rozpocznij aktualizację',
+
+'L_UPDATE_ENDED' => 'Aktualizacja do wersji %s zakończona.',
+'L_UPDATE_INPROGRESS' => 'Wersja aplikacji aktualizacji',
+'L_UPDATE_ERROR' => 'Wystąpił błąd podczas aktualizacji.',
+'L_UPDATE_SUCCESSFUL' => 'Wszystkie aktualizacje zostały z powodzeniem zastosowane!',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Aktualizacja pliku parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Tworzenie pliku tags.xml',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Wystąpił błąd podczas tworzenia pliku tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Tworzenie pliku motywu',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Wystąpił błąd podczas tworzenia pliku',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Konwersja artykułów do nowego formatu',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Wystąpił błąd podczas przetwarzania pliku',
+'L_UPDATE_STATICS_MIGRATION' => 'Migracja statycznego pliku stron',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Wystąpił błąd podczas migracji statycznych stron',
+'L_UPDATE_CREATE_USERS_FILE' => 'Tworzenie pliku użytkownika',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Wystąpił błąd podczas tworzenia pliku',
+'L_UPDATE_USERS_MIGRATION' => 'Migracja pliku użytkownika',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Wystąpił błąd podczas migracji użytkownika',
+'L_UPDATE_ERR_NO_USERS' => 'Brak użytkowników w pliku',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Tworzenie pliku .htaccess',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Wystąpił błąd podczas tworzenia pliku .htaccess',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Aktualizacja pliku .htaccess',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Wystąpił błąd podczas aktualizacji pliku .htaccess',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Migracja pliku kategorii',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Wystąpił błąd podczas migracji kategorii',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Tworzenie pliku plugins.xml',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Wystąpił błąd podczas tworzea pliku plugins.xml',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Usuwanie pliku core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Wystąpił błąd podczas usuwania pliku core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Usuwanie folderu core/plxtoolbar/',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Wystąpił błąd podczas usuwania folderu core/plxtoolbar/',
+'L_UPDATE_FILE' => 'Aktualizacja plików',
+'L_UPDATE_ERR_FILE' => 'Wystąpił błąd podczas aktualizacji pliku',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migracja wtyczek parametrów pliku w folderze konfiguracyjnym',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Aktualizacja pliku plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Uwagi dotyczące migracji',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Błąd podczas migracji komentarzy',
+);
+?>
diff --git a/core/lang/pt/core.php b/core/lang/pt/core.php
index b90e6ccae..f540068c7 100644
--- a/core/lang/pt/core.php
+++ b/core/lang/pt/core.php
@@ -1,140 +1,140 @@
- 'Português',
-
-'L_DATE_CREATION' => 'Data de criação',
-'L_DATE_UPDATE' => 'Data atualizada',
-
-# common
-'L_PLUXML_VERSION' => 'Versão de Pluxml',
-'L_HOMEPAGE' => 'Índice',
-'L_UNCLASSIFIED' => 'Não categorizado;',
-'L_INFO_PHP_VERSION' => 'Versão de php',
-'L_INFO_MAGIC_QUOTES' => 'Estado dos "magic quotes"',
-'L_INFO_CHARSET' => 'codagem',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'Tema principal PluXml não foi encontrado',
-'L_ERR_FILE_NOTFOUND' => 'O ficheiro de destino PluXml não foi encontrado',
-'L_ERR_PAGE_NOT_FOUND' => 'Página não encontrada',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'jan',
-'L_SHORT_FEBRUARY' => 'fev',
-'L_SHORT_MARCH' => 'março',
-'L_SHORT_APRIL' => 'abril',
-'L_SHORT_MAY' => 'maio',
-'L_SHORT_JUNE' => 'junho',
-'L_SHORT_JULY' => 'julho',
-'L_SHORT_AUGUST' => 'agosto',
-'L_SHORT_SEPTEMBER' => 'set',
-'L_SHORT_OCTOBER' => 'out',
-'L_SHORT_NOVEMBER' => 'nov',
-'L_SHORT_DECEMBER' => 'dez',
-'L_JANUARY' => 'Janeiro',
-'L_FEBRUARY' => 'Fevereiro',
-'L_MARCH' => 'Março',
-'L_APRIL' => 'Avril',
-'L_MAY' => 'Maio',
-'L_JUNE' => 'Junho',
-'L_JULY' => 'Julho',
-'L_AUGUST' => 'Agosto',
-'L_SEPTEMBER' => 'Setembro',
-'L_OCTOBER' => 'Outubro',
-'L_NOVEMBER' => 'Novembro',
-'L_DECEMBER' => 'Dezembro',
-'L_MONDAY' => 'Segunda-feira',
-'L_TUESDAY' => 'Terça-feira',
-'L_WEDNESDAY' => 'Quarta-feira',
-'L_THURSDAY' => 'Quinta-feira',
-'L_FRIDAY' => 'Sexta-feira',
-'L_SATURDAY' => 'Sábado',
-'L_SUNDAY' => 'Domingo',
-
-# class.plx.capcha.php
-'L_LAST' => 'ultima',
-'L_FIRST' => 'primeira',
-'L_SECOND' => 'segunda',
-'L_THIRD' => 'terceira',
-'L_FOURTH' => 'quarta',
-'L_FIFTH' => 'quinta',
-'L_SIXTH' => 'sexta',
-'L_SEVENTH' => 'sétima',
-'L_EIGTH' => 'oitáva',
-'L_NINTH' => 'nôna',
-'L_TENTH' => 'décima',
-'L_NTH' => 'èsima',
-'L_CAPCHA_QUESTION' => 'Dígite a %s lêtra da palavra %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s é accessivél em escritura',
-'L_WRITE_NOT_ACCESS' => '%s não é accessivél em escritura ou não existe',
-'L_MODREWRITE_AVAILABLE' => 'Módulo apache de reescrever URLS "mod_rewrite" disponivél',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Módulo apache de reescrever URLS "mod_rewrite" indisponivél',
-'L_LIBGD_INSTALLED' => 'Bibliotéca GD instalada',
-'L_LIBGD_NOT_INSTALLED' => 'Bibliotéca GD não instalada',
-'L_LIBXML_INSTALLED' => 'Bibliotéca XML instalada',
-'L_LIBXML_NOT_INSTALLED' => 'Bibliotéca XML não instalada',
-'L_MAIL_AVAILABLE' => 'Função de envio de e-mail disponivél',
-'L_MAIL_NOT_AVAILABLE' => 'Função de envio de e-mail indisponivél',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'Nenhum artigo correspondente a este tag; !',
-'L_UNKNOWN_CATEGORY' => 'Esta categorai não existe !',
-'L_NO_ARTICLE_PAGE' => 'Nenhum artigo correspondente a esta página !',
-'L_UNKNOWN_ARTICLE' => 'Este artigo nunca existiu ou foi suprimido !',
-'L_COM_IN_MODERATION' => 'O comentário em espera de moderação pelo administrador',
-'L_UNKNOWN_STATIC' => 'Cette page n\'existe pas ou n\'existe plus !',
-'L_DOCUMENT_NOT_FOUND' => 'O documentos especificado não foi encontrado',
-'L_NEWCOMMENT_ERR' => 'Ocorreu um erro durante a publicação do comentário',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Queira por favor preenchêr todos os campos obrigatórios',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'A verificação anti-spam está incorrecta, tente novamente;',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Compressão %s activada',
-'L_PAGETITLE_ARCHIVES' => 'Arquivos',
-'L_PAGETITLE_TAG' => 'Tag',
-'L_NO_CATEGORY' => 'nenhuma categoria',
-'L_CATEGORY' => 'categoria',
-'L_CATEGORIES' => 'categorias',
-'L_NO_ARTICLE' => 'nenhum artigo',
-'L_ARTICLE' => 'artigo',
-'L_ARTICLES' => 'artigos',
-'L_ARTAUTHOR_UNKNOWN' => 'desconhecido',
-'L_ARTTAGS_NONE' => 'sem tags',
-'L_ARTCHAPO' => 'Lêr mais #art_title',
-'L_ARTFEED_RSS_CATEGORY' => 'Fluxo Rss dos artigos desta categoria',
-'L_ARTFEED_RSS_TAG' => 'Fluxo Rss dos artigos deste tag',
-'L_ARTFEED_RSS' => 'Fluxo Rss dos artigos',
-'L_NO_COMMENT' => 'não comentários',
-'L_COMMENT' => 'comentário',
-'L_COMMENTS' => 'comentários',
-'L_COMFEED_RSS_ARTICLE' => 'Fluxo Rss dos comentários deste artigo',
-'L_COMFEED_RSS' => 'Fluxo Rss dos comentários',
-'L_STATICCONTENT_INPROCESS' => 'Esta página está actualmente em curso de redacção',
-'L_SAID' => 'escreveu',
-
-'L_PAGINATION_FIRST_TITLE' => 'Ir á primeira página',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Anterior',
-'L_PAGINATION_PREVIOUS' => 'anterior',
-'L_PAGINATION_NEXT_TITLE' => 'Seguinte',
-'L_PAGINATION_NEXT' => 'seguinte',
-'L_PAGINATION_LAST_TITLE' => 'Ir á ultima página',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'página %s de %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Os URLS privados não foram inicializados nos parâmetros de administração !',
-'L_FEED_COMMENTS' => 'Comentários',
-'L_FEED_ONLINE_COMMENTS' => 'Comentários online',
-'L_FEED_OFFLINE_COMMENTS' => 'Comentários offline',
-'L_FEED_WRITTEN_BY' => 'Escrito por',
-
-);
-?>
+ 'Português',
+
+'L_DATE_CREATION' => 'Data de criação',
+'L_DATE_UPDATE' => 'Data atualizada',
+
+# common
+'L_PLUXML_VERSION' => 'Versão de Pluxml',
+'L_HOMEPAGE' => 'Índice',
+'L_UNCLASSIFIED' => 'Não categorizado;',
+'L_INFO_PHP_VERSION' => 'Versão de php',
+'L_INFO_MAGIC_QUOTES' => 'Estado dos "magic quotes"',
+'L_INFO_CHARSET' => 'codagem',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'Tema principal PluXml não foi encontrado',
+'L_ERR_FILE_NOTFOUND' => 'O ficheiro de destino PluXml não foi encontrado',
+'L_ERR_PAGE_NOT_FOUND' => 'Página não encontrada',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'jan',
+'L_SHORT_FEBRUARY' => 'fev',
+'L_SHORT_MARCH' => 'março',
+'L_SHORT_APRIL' => 'abril',
+'L_SHORT_MAY' => 'maio',
+'L_SHORT_JUNE' => 'junho',
+'L_SHORT_JULY' => 'julho',
+'L_SHORT_AUGUST' => 'agosto',
+'L_SHORT_SEPTEMBER' => 'set',
+'L_SHORT_OCTOBER' => 'out',
+'L_SHORT_NOVEMBER' => 'nov',
+'L_SHORT_DECEMBER' => 'dez',
+'L_JANUARY' => 'Janeiro',
+'L_FEBRUARY' => 'Fevereiro',
+'L_MARCH' => 'Março',
+'L_APRIL' => 'Avril',
+'L_MAY' => 'Maio',
+'L_JUNE' => 'Junho',
+'L_JULY' => 'Julho',
+'L_AUGUST' => 'Agosto',
+'L_SEPTEMBER' => 'Setembro',
+'L_OCTOBER' => 'Outubro',
+'L_NOVEMBER' => 'Novembro',
+'L_DECEMBER' => 'Dezembro',
+'L_MONDAY' => 'Segunda-feira',
+'L_TUESDAY' => 'Terça-feira',
+'L_WEDNESDAY' => 'Quarta-feira',
+'L_THURSDAY' => 'Quinta-feira',
+'L_FRIDAY' => 'Sexta-feira',
+'L_SATURDAY' => 'Sábado',
+'L_SUNDAY' => 'Domingo',
+
+# class.plx.capcha.php
+'L_LAST' => 'ultima',
+'L_FIRST' => 'primeira',
+'L_SECOND' => 'segunda',
+'L_THIRD' => 'terceira',
+'L_FOURTH' => 'quarta',
+'L_FIFTH' => 'quinta',
+'L_SIXTH' => 'sexta',
+'L_SEVENTH' => 'sétima',
+'L_EIGTH' => 'oitáva',
+'L_NINTH' => 'nôna',
+'L_TENTH' => 'décima',
+'L_NTH' => 'èsima',
+'L_CAPCHA_QUESTION' => 'Dígite a %s lêtra da palavra %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s é accessivél em escritura',
+'L_WRITE_NOT_ACCESS' => '%s não é accessivél em escritura ou não existe',
+'L_MODREWRITE_AVAILABLE' => 'Módulo apache de reescrever URLS "mod_rewrite" disponivél',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Módulo apache de reescrever URLS "mod_rewrite" indisponivél',
+'L_LIBGD_INSTALLED' => 'Bibliotéca GD instalada',
+'L_LIBGD_NOT_INSTALLED' => 'Bibliotéca GD não instalada',
+'L_LIBXML_INSTALLED' => 'Bibliotéca XML instalada',
+'L_LIBXML_NOT_INSTALLED' => 'Bibliotéca XML não instalada',
+'L_MAIL_AVAILABLE' => 'Função de envio de e-mail disponivél',
+'L_MAIL_NOT_AVAILABLE' => 'Função de envio de e-mail indisponivél',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'Nenhum artigo correspondente a este tag; !',
+'L_UNKNOWN_CATEGORY' => 'Esta categorai não existe !',
+'L_NO_ARTICLE_PAGE' => 'Nenhum artigo correspondente a esta página !',
+'L_UNKNOWN_ARTICLE' => 'Este artigo nunca existiu ou foi suprimido !',
+'L_COM_IN_MODERATION' => 'O comentário em espera de moderação pelo administrador',
+'L_UNKNOWN_STATIC' => 'Cette page n\'existe pas ou n\'existe plus !',
+'L_DOCUMENT_NOT_FOUND' => 'O documentos especificado não foi encontrado',
+'L_NEWCOMMENT_ERR' => 'Ocorreu um erro durante a publicação do comentário',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Queira por favor preenchêr todos os campos obrigatórios',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'A verificação anti-spam está incorrecta, tente novamente;',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Compressão %s activada',
+'L_PAGETITLE_ARCHIVES' => 'Arquivos',
+'L_PAGETITLE_TAG' => 'Tag',
+'L_NO_CATEGORY' => 'nenhuma categoria',
+'L_CATEGORY' => 'categoria',
+'L_CATEGORIES' => 'categorias',
+'L_NO_ARTICLE' => 'nenhum artigo',
+'L_ARTICLE' => 'artigo',
+'L_ARTICLES' => 'artigos',
+'L_ARTAUTHOR_UNKNOWN' => 'desconhecido',
+'L_ARTTAGS_NONE' => 'sem tags',
+'L_ARTCHAPO' => 'Lêr mais #art_title',
+'L_ARTFEED_RSS_CATEGORY' => 'Fluxo Rss dos artigos desta categoria',
+'L_ARTFEED_RSS_TAG' => 'Fluxo Rss dos artigos deste tag',
+'L_ARTFEED_RSS' => 'Fluxo Rss dos artigos',
+'L_NO_COMMENT' => 'não comentários',
+'L_COMMENT' => 'comentário',
+'L_COMMENTS' => 'comentários',
+'L_COMFEED_RSS_ARTICLE' => 'Fluxo Rss dos comentários deste artigo',
+'L_COMFEED_RSS' => 'Fluxo Rss dos comentários',
+'L_STATICCONTENT_INPROCESS' => 'Esta página está actualmente em curso de redacção',
+'L_SAID' => 'escreveu',
+
+'L_PAGINATION_FIRST_TITLE' => 'Ir á primeira página',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Anterior',
+'L_PAGINATION_PREVIOUS' => 'anterior',
+'L_PAGINATION_NEXT_TITLE' => 'Seguinte',
+'L_PAGINATION_NEXT' => 'seguinte',
+'L_PAGINATION_LAST_TITLE' => 'Ir á ultima página',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'página %s de %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Os URLS privados não foram inicializados nos parâmetros de administração !',
+'L_FEED_COMMENTS' => 'Comentários',
+'L_FEED_ONLINE_COMMENTS' => 'Comentários online',
+'L_FEED_OFFLINE_COMMENTS' => 'Comentários offline',
+'L_FEED_WRITTEN_BY' => 'Escrito por',
+
+);
+?>
diff --git a/core/lang/pt/install.php b/core/lang/pt/install.php
index 804a78bb9..b5fab17e3 100644
--- a/core/lang/pt/install.php
+++ b/core/lang/pt/install.php
@@ -1,36 +1,36 @@
- 'Instalação',
-'L_WRONG_PHP_VERSION' => 'PluXml exige a execução de PHP 5 ou superior para poder funcionar.',
-'L_SELECT_LANG' => 'Seléccione o seu idioma',
-'L_INPUT_CHANGE' => 'Alterar',
-'L_DEFAULT_CATEGORY_TITLE' => 'Rubrica 1',
-'L_DEFAULT_CATEGORY_URL' => 'rubrica-1',
-'L_DEFAULT_STATIC_TITLE' => 'Stática 1',
-'L_DEFAULT_STATIC_URL' => 'stática-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Primeiro artigo',
-'L_DEFAULT_ARTICLE_URL' => 'primeiro-artigo',
-'L_DEFAULT_COMMENT_CONTENT' => 'Este é o primeiro comentário !',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml já está configurado !',
-'L_ERR_MISSING_USER' => 'Por favor, indique o nome do redactor !',
-'L_ERR_MISSING_LOGIN' => 'Por favor, indique o login de conexão !',
-'L_ERR_MISSING_PASSWORD' => 'Por favor, indique a sua senha !',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Confirmação da senha incorrecta !',
-'L_PLUXML_INSTALLATION' => 'Instalação de PluXml',
-'L_SITE_DESCRIPTION' => 'Blog ou Cms á Xml !',
-'L_VERSION' => 'versão',
-'L_USERNAME' => 'Nome do administrador',
-'L_LOGIN' => 'Login de conexão à administração',
-'L_PASSWORD' => 'Senha',
-'L_PASSWORD_CONFIRMATION' => 'Confirmação da senha',
-'L_INPUT_INSTALL' => 'Instalar',
-'L_TIMEZONE' => 'Fuso horário',
-'L_PWD_VERY_WEAK' => 'Senha muito fraca',
-'L_PWD_WEAK' => 'Senha fraca',
-'L_PWD_GOOD' => 'Boa senha',
-'L_PWD_STRONG' => 'Senha forte',
-);
-?>
+ 'Instalação',
+'L_WRONG_PHP_VERSION' => 'PluXml exige a execução de PHP 5 ou superior para poder funcionar.',
+'L_SELECT_LANG' => 'Seléccione o seu idioma',
+'L_INPUT_CHANGE' => 'Alterar',
+'L_DEFAULT_CATEGORY_TITLE' => 'Rubrica 1',
+'L_DEFAULT_CATEGORY_URL' => 'rubrica-1',
+'L_DEFAULT_STATIC_TITLE' => 'Stática 1',
+'L_DEFAULT_STATIC_URL' => 'stática-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Primeiro artigo',
+'L_DEFAULT_ARTICLE_URL' => 'primeiro-artigo',
+'L_DEFAULT_COMMENT_CONTENT' => 'Este é o primeiro comentário !',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml já está configurado !',
+'L_ERR_MISSING_USER' => 'Por favor, indique o nome do redactor !',
+'L_ERR_MISSING_LOGIN' => 'Por favor, indique o login de conexão !',
+'L_ERR_MISSING_PASSWORD' => 'Por favor, indique a sua senha !',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Confirmação da senha incorrecta !',
+'L_PLUXML_INSTALLATION' => 'Instalação de PluXml',
+'L_SITE_DESCRIPTION' => 'Blog ou Cms á Xml !',
+'L_VERSION' => 'versão',
+'L_USERNAME' => 'Nome do administrador',
+'L_LOGIN' => 'Login de conexão à administração',
+'L_PASSWORD' => 'Senha',
+'L_PASSWORD_CONFIRMATION' => 'Confirmação da senha',
+'L_INPUT_INSTALL' => 'Instalar',
+'L_TIMEZONE' => 'Fuso horário',
+'L_PWD_VERY_WEAK' => 'Senha muito fraca',
+'L_PWD_WEAK' => 'Senha fraca',
+'L_PWD_GOOD' => 'Boa senha',
+'L_PWD_STRONG' => 'Senha forte',
+);
+?>
diff --git a/core/lang/pt/update.php b/core/lang/pt/update.php
index 77534ba7d..6800aba06 100644
--- a/core/lang/pt/update.php
+++ b/core/lang/pt/update.php
@@ -1,59 +1,59 @@
- 'Gabação dos dados efectuado com sucesso',
-'L_UPDATE_TITLE' => 'Actualização de PluXml',
-'L_WRONG_PHP_VERSION' => 'PluXml exige a execução de PHP 5 ou superior para poder funcionar.',
-
-'L_SELECT_LANG' => 'Seléccione o seu idioma',
-'L_INPUT_CHANGE' => 'Alterar',
-
-'L_UPDATE_UPTODATE' => 'Pluxml está actualizado.',
-'L_UPDATE_NOT_AVAILABLE' => 'Nenhuma actualização disponivél.',
-'L_UPDATE_BACK' => 'Voltar ao web-site',
-'L_UPDATE_WARNING1' => 'Está prestes a actualizar a sua versão de Pluxml',
-'L_UPDATE_SELECT_VERSION' => 'Seléccione na lista seguinte a sua antiga versão de Pluxml a actualizar.',
-'L_UPDATE_WARNING2' => 'Se a sua antiga versão não se encontra na lista seguinte, e porque não existe processo de actualização automático, porque a sua versão é muito antiga. Sugerimos que descarregue a nova versão de PluXml e que faça uma nova instalção.',
-'L_UPDATE_WARNING3' => 'Atenção, antes de comoçar a actualização não se esquêça de fazer uma cópia dos seus dados, que se encontram na pasta "data"',
-'L_UPDATE_START' => 'Come¸ar a actualização',
-
-'L_UPDATE_ENDED' => 'Actualização terminada.',
-'L_UPDATE_INPROGRESS' => 'Aplicação das actualizações',
-'L_UPDATE_ERROR' => 'Um erro ocorreu durante o processo de actualização.',
-'L_UPDATE_SUCCESSFUL' => 'Todas a actualizaçõés foram aplicadas com sucesso !',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Actualização do ficheiro... parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Criação do ficheiro... tags.xml',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Ocorreu um erro durante o processo de criação do ficheiro tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Criação do ficheiro tema (template)',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Ocorreu um erro durante o processoa de criação do ficheiro',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Conversão dos artigos ao novo formato',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Ocorreu um erro durante o processo de tratamento do ficheiro',
-'L_UPDATE_STATICS_MIGRATION' => 'Migração do ficheiro das páginas státicas',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Occoreu um erro durante o processo de migração do ficheiro das páginas státicas',
-'L_UPDATE_CREATE_USERS_FILE' => 'Criação do ficheiro dos utilizadores',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Ocorreu um erro durante o processo de creção do ficheiro dos utilizadores',
-'L_UPDATE_USERS_MIGRATION' => 'Migração do ficheiro dos utilizadores',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Ocorreu um erro durante o processo de migrção do ficheiro dos utilizadores',
-'L_UPDATE_ERR_NO_USERS' => 'Nenhum utilizador presente no ficheiro',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Criação do ficheiro .htaccess',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Ocorreu um erro durante o processo de criação do ficheiro .htaccess',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Atualizar o arquivo .htaccess',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Erro ao atualizar o arquivo .htaccess',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Migração do ficheiro das categorias',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Ocorreu um erro durante o processo de migração do ficheiro das categorias',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Criação do ficheiro... plugins.xml',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Ocorreu um erro durante o processo de criação do ficheiro... plugins.xml',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Supressão do ficheiro... core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Ocorreur um erro durante o processo de supressão do ficheiro... core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Supressão da pasta... core/plxtoolbar/',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Ocorreur um erro durante o processo de supressão da pasta... core/plxtoolbar/',
-'L_UPDATE_FILE' => 'Atualize arquivo',
-'L_UPDATE_ERR_FILE' => 'Erro durante o ficheiro de actualização',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migrando arquivos parâmetros no arquivo de configuração do plugin',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Actualização do ficheiro... plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Comentários de migração',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Erro durante a migração comentários',
-);
+ 'Gabação dos dados efectuado com sucesso',
+'L_UPDATE_TITLE' => 'Actualização de PluXml',
+'L_WRONG_PHP_VERSION' => 'PluXml exige a execução de PHP 5 ou superior para poder funcionar.',
+
+'L_SELECT_LANG' => 'Seléccione o seu idioma',
+'L_INPUT_CHANGE' => 'Alterar',
+
+'L_UPDATE_UPTODATE' => 'Pluxml está actualizado.',
+'L_UPDATE_NOT_AVAILABLE' => 'Nenhuma actualização disponivél.',
+'L_UPDATE_BACK' => 'Voltar ao web-site',
+'L_UPDATE_WARNING1' => 'Está prestes a actualizar a sua versão de Pluxml',
+'L_UPDATE_SELECT_VERSION' => 'Seléccione na lista seguinte a sua antiga versão de Pluxml a actualizar.',
+'L_UPDATE_WARNING2' => 'Se a sua antiga versão não se encontra na lista seguinte, e porque não existe processo de actualização automático, porque a sua versão é muito antiga. Sugerimos que descarregue a nova versão de PluXml e que faça uma nova instalção.',
+'L_UPDATE_WARNING3' => 'Atenção, antes de comoçar a actualização não se esquêça de fazer uma cópia dos seus dados, que se encontram na pasta "data"',
+'L_UPDATE_START' => 'Come¸ar a actualização',
+
+'L_UPDATE_ENDED' => 'Actualização terminada.',
+'L_UPDATE_INPROGRESS' => 'Aplicação das actualizações',
+'L_UPDATE_ERROR' => 'Um erro ocorreu durante o processo de actualização.',
+'L_UPDATE_SUCCESSFUL' => 'Todas a actualizaçõés foram aplicadas com sucesso !',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Actualização do ficheiro... parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Criação do ficheiro... tags.xml',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Ocorreu um erro durante o processo de criação do ficheiro tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Criação do ficheiro tema (template)',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Ocorreu um erro durante o processoa de criação do ficheiro',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Conversão dos artigos ao novo formato',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Ocorreu um erro durante o processo de tratamento do ficheiro',
+'L_UPDATE_STATICS_MIGRATION' => 'Migração do ficheiro das páginas státicas',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Occoreu um erro durante o processo de migração do ficheiro das páginas státicas',
+'L_UPDATE_CREATE_USERS_FILE' => 'Criação do ficheiro dos utilizadores',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Ocorreu um erro durante o processo de creção do ficheiro dos utilizadores',
+'L_UPDATE_USERS_MIGRATION' => 'Migração do ficheiro dos utilizadores',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Ocorreu um erro durante o processo de migrção do ficheiro dos utilizadores',
+'L_UPDATE_ERR_NO_USERS' => 'Nenhum utilizador presente no ficheiro',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Criação do ficheiro .htaccess',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Ocorreu um erro durante o processo de criação do ficheiro .htaccess',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Atualizar o arquivo .htaccess',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Erro ao atualizar o arquivo .htaccess',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Migração do ficheiro das categorias',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Ocorreu um erro durante o processo de migração do ficheiro das categorias',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Criação do ficheiro... plugins.xml',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Ocorreu um erro durante o processo de criação do ficheiro... plugins.xml',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Supressão do ficheiro... core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Ocorreur um erro durante o processo de supressão do ficheiro... core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Supressão da pasta... core/plxtoolbar/',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Ocorreur um erro durante o processo de supressão da pasta... core/plxtoolbar/',
+'L_UPDATE_FILE' => 'Atualize arquivo',
+'L_UPDATE_ERR_FILE' => 'Erro durante o ficheiro de actualização',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migrando arquivos parâmetros no arquivo de configuração do plugin',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Actualização do ficheiro... plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Comentários de migração',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Erro durante a migração comentários',
+);
?>
\ No newline at end of file
diff --git a/core/lang/ro/core.php b/core/lang/ro/core.php
index 6a55292f6..dc6904a1c 100644
--- a/core/lang/ro/core.php
+++ b/core/lang/ro/core.php
@@ -1,140 +1,140 @@
- 'Română',
-
-'L_DATE_CREATION' => 'Data crearii',
-'L_DATE_UPDATE' => 'Data de actualizare',
-
-# common
-'L_PLUXML_VERSION' => 'Pluxml version',
-'L_HOMEPAGE' => 'Home',
-'L_UNCLASSIFIED' => 'Neclasificat',
-'L_INFO_PHP_VERSION' => 'Versiune php',
-'L_INFO_MAGIC_QUOTES' => 'Starea "magic quotes"',
-'L_INFO_CHARSET' => 'encoding',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'Tema principala este gasita',
-'L_ERR_FILE_NOTFOUND' => 'Fisierul tinta nu este gasit ',
-'L_ERR_PAGE_NOT_FOUND' => 'Pagina nu a fost gasit',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => 'ian',
-'L_SHORT_FEBRUARY' => 'feb',
-'L_SHORT_MARCH' => 'mar',
-'L_SHORT_APRIL' => 'apr',
-'L_SHORT_MAY' => 'mai',
-'L_SHORT_JUNE' => 'iunie',
-'L_SHORT_JULY' => 'iulie',
-'L_SHORT_AUGUST' => 'aug',
-'L_SHORT_SEPTEMBER' => 'sept',
-'L_SHORT_OCTOBER' => 'oct',
-'L_SHORT_NOVEMBER' => 'noem',
-'L_SHORT_DECEMBER' => 'dec',
-'L_JANUARY' => 'ianuarie',
-'L_FEBRUARY' => 'februarie',
-'L_MARCH' => 'martie',
-'L_APRIL' => 'aprilie',
-'L_MAY' => 'mai',
-'L_JUNE' => 'iunie',
-'L_JULY' => 'iulie',
-'L_AUGUST' => 'august',
-'L_SEPTEMBER' => 'septembrie',
-'L_OCTOBER' => 'octombrie',
-'L_NOVEMBER' => 'noiembrie',
-'L_DECEMBER' => 'decembrie',
-'L_MONDAY' => 'luni',
-'L_TUESDAY' => 'marti',
-'L_WEDNESDAY' => 'miercuri',
-'L_THURSDAY' => 'joi',
-'L_FRIDAY' => 'vineri',
-'L_SATURDAY' => 'sambata',
-'L_SUNDAY' => 'duminica',
-
-# class.plx.capcha.php
-'L_LAST' => 'ultima',
-'L_FIRST' => 'prima',
-'L_SECOND' => 'a doua',
-'L_THIRD' => 'a treia',
-'L_FOURTH' => 'a patra',
-'L_FIFTH' => 'a cincia',
-'L_SIXTH' => 'a şasea',
-'L_SEVENTH' => 'a şaptea',
-'L_EIGTH' => 'a opta',
-'L_NINTH' => 'a noua',
-'L_TENTH' => 'a zecea',
-'L_NTH' => 'lea',
-'L_CAPCHA_QUESTION' => 'Care este %s litera a cuvantului %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s are acces de scriere',
-'L_WRITE_NOT_ACCESS' => '%s nu are acces de scriere sau nu există',
-'L_MODREWRITE_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite este disponibil',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite nu este disponibil',
-'L_LIBGD_INSTALLED' => 'Biblioteca GD este instalată',
-'L_LIBGD_NOT_INSTALLED' => 'Biblioteca GD nu este instalată',
-'L_LIBXML_INSTALLED' => 'Biblioteca XML este instalată',
-'L_LIBXML_NOT_INSTALLED' => 'Biblioteca XML nu este instalată',
-'L_MAIL_AVAILABLE' => 'Functia de a trimite e-mail disponibilă',
-'L_MAIL_NOT_AVAILABLE' => 'Functia de a trimite e-mail nu este disponibilă',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'Nici un articol pentru acest cuvant cheie !',
-'L_UNKNOWN_CATEGORY' => 'Aceasta categorie nu exista!',
-'L_NO_ARTICLE_PAGE' => 'Nu exista articole pentru aceasta pagina !',
-'L_UNKNOWN_ARTICLE' => 'Acest produs nu exista sau nu-i sunt mai !',
-'L_COM_IN_MODERATION' => 'Comentariul este moderat de catre administratorul acestui site',
-'L_UNKNOWN_STATIC' => 'Aceasta pagina nu exista sau nu-i sunt mai !',
-'L_DOCUMENT_NOT_FOUND' => 'Documentul mentionat nu a fost gasit',
-'L_NEWCOMMENT_ERR' => 'O eroare este intalnit in timp ce publicarea acestui comentariu',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Va multumim completati toate campurile obligatorii',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'SPAM de verificare a esuat',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Compresie %s activata',
-'L_PAGETITLE_ARCHIVES' => 'Arhive',
-'L_PAGETITLE_TAG' => 'Tag',
-'L_NO_CATEGORY' => 'nicio categorie',
-'L_CATEGORY' => 'categoria',
-'L_CATEGORIES' => 'categorii',
-'L_NO_ARTICLE' => 'nici un articol',
-'L_ARTICLE' => 'articolul',
-'L_ARTICLES' => 'articole',
-'L_ARTAUTHOR_UNKNOWN' => 'necunoscut',
-'L_ARTTAGS_NONE' => 'nimic',
-'L_ARTCHAPO' => 'Continuati lectura #art_title',
-'L_ARTFEED_RSS_CATEGORY' => 'RSS Feed Elementele din această categorie',
-'L_ARTFEED_RSS_TAG' => 'RSS Feed Elementele din această etichetă',
-'L_ARTFEED_RSS' => 'Articole RSS Feed',
-'L_NO_COMMENT' => 'nici un comentariu',
-'L_COMMENT' => 'comentariu',
-'L_COMMENTS' => 'comentarii',
-'L_COMFEED_RSS_ARTICLE' => 'RSS feed pentru comentarii pe acest articol',
-'L_COMFEED_RSS' => 'Comentarii RSS feed',
-'L_STATICCONTENT_INPROCESS' => 'Aceasta pagina este in curs de elaborare',
-'L_SAID' => 'a spus',
-
-'L_PAGINATION_FIRST_TITLE' => 'Du-te la prima pagina',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Pagina anterioara',
-'L_PAGINATION_PREVIOUS' => 'Anterioare',
-'L_PAGINATION_NEXT_TITLE' => 'Pagina urmatoare',
-'L_PAGINATION_NEXT' => 'Urmatorul',
-'L_PAGINATION_LAST_TITLE' => 'Du-te la ultima pagina',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'pagina %s din %s',
-
-'L_PAGEBLOG_TITLE' => 'Blog',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'URL-uri private nu au fost initializate in parametrii dvs. de administrare !',
-'L_FEED_COMMENTS' => 'Comentarii',
-'L_FEED_ONLINE_COMMENTS' => 'Comentarii online',
-'L_FEED_OFFLINE_COMMENTS' => 'Comentarii offline',
-'L_FEED_WRITTEN_BY' => 'Scris de',
-
-);
-?>
+ 'Română',
+
+'L_DATE_CREATION' => 'Data crearii',
+'L_DATE_UPDATE' => 'Data de actualizare',
+
+# common
+'L_PLUXML_VERSION' => 'Pluxml version',
+'L_HOMEPAGE' => 'Home',
+'L_UNCLASSIFIED' => 'Neclasificat',
+'L_INFO_PHP_VERSION' => 'Versiune php',
+'L_INFO_MAGIC_QUOTES' => 'Starea "magic quotes"',
+'L_INFO_CHARSET' => 'encoding',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'Tema principala este gasita',
+'L_ERR_FILE_NOTFOUND' => 'Fisierul tinta nu este gasit ',
+'L_ERR_PAGE_NOT_FOUND' => 'Pagina nu a fost gasit',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => 'ian',
+'L_SHORT_FEBRUARY' => 'feb',
+'L_SHORT_MARCH' => 'mar',
+'L_SHORT_APRIL' => 'apr',
+'L_SHORT_MAY' => 'mai',
+'L_SHORT_JUNE' => 'iunie',
+'L_SHORT_JULY' => 'iulie',
+'L_SHORT_AUGUST' => 'aug',
+'L_SHORT_SEPTEMBER' => 'sept',
+'L_SHORT_OCTOBER' => 'oct',
+'L_SHORT_NOVEMBER' => 'noem',
+'L_SHORT_DECEMBER' => 'dec',
+'L_JANUARY' => 'ianuarie',
+'L_FEBRUARY' => 'februarie',
+'L_MARCH' => 'martie',
+'L_APRIL' => 'aprilie',
+'L_MAY' => 'mai',
+'L_JUNE' => 'iunie',
+'L_JULY' => 'iulie',
+'L_AUGUST' => 'august',
+'L_SEPTEMBER' => 'septembrie',
+'L_OCTOBER' => 'octombrie',
+'L_NOVEMBER' => 'noiembrie',
+'L_DECEMBER' => 'decembrie',
+'L_MONDAY' => 'luni',
+'L_TUESDAY' => 'marti',
+'L_WEDNESDAY' => 'miercuri',
+'L_THURSDAY' => 'joi',
+'L_FRIDAY' => 'vineri',
+'L_SATURDAY' => 'sambata',
+'L_SUNDAY' => 'duminica',
+
+# class.plx.capcha.php
+'L_LAST' => 'ultima',
+'L_FIRST' => 'prima',
+'L_SECOND' => 'a doua',
+'L_THIRD' => 'a treia',
+'L_FOURTH' => 'a patra',
+'L_FIFTH' => 'a cincia',
+'L_SIXTH' => 'a şasea',
+'L_SEVENTH' => 'a şaptea',
+'L_EIGTH' => 'a opta',
+'L_NINTH' => 'a noua',
+'L_TENTH' => 'a zecea',
+'L_NTH' => 'lea',
+'L_CAPCHA_QUESTION' => 'Care este %s litera a cuvantului %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s are acces de scriere',
+'L_WRITE_NOT_ACCESS' => '%s nu are acces de scriere sau nu există',
+'L_MODREWRITE_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite este disponibil',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Apache URL Rewriting module mod_rewrite nu este disponibil',
+'L_LIBGD_INSTALLED' => 'Biblioteca GD este instalată',
+'L_LIBGD_NOT_INSTALLED' => 'Biblioteca GD nu este instalată',
+'L_LIBXML_INSTALLED' => 'Biblioteca XML este instalată',
+'L_LIBXML_NOT_INSTALLED' => 'Biblioteca XML nu este instalată',
+'L_MAIL_AVAILABLE' => 'Functia de a trimite e-mail disponibilă',
+'L_MAIL_NOT_AVAILABLE' => 'Functia de a trimite e-mail nu este disponibilă',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'Nici un articol pentru acest cuvant cheie !',
+'L_UNKNOWN_CATEGORY' => 'Aceasta categorie nu exista!',
+'L_NO_ARTICLE_PAGE' => 'Nu exista articole pentru aceasta pagina !',
+'L_UNKNOWN_ARTICLE' => 'Acest produs nu exista sau nu-i sunt mai !',
+'L_COM_IN_MODERATION' => 'Comentariul este moderat de catre administratorul acestui site',
+'L_UNKNOWN_STATIC' => 'Aceasta pagina nu exista sau nu-i sunt mai !',
+'L_DOCUMENT_NOT_FOUND' => 'Documentul mentionat nu a fost gasit',
+'L_NEWCOMMENT_ERR' => 'O eroare este intalnit in timp ce publicarea acestui comentariu',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Va multumim completati toate campurile obligatorii',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'SPAM de verificare a esuat',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Compresie %s activata',
+'L_PAGETITLE_ARCHIVES' => 'Arhive',
+'L_PAGETITLE_TAG' => 'Tag',
+'L_NO_CATEGORY' => 'nicio categorie',
+'L_CATEGORY' => 'categoria',
+'L_CATEGORIES' => 'categorii',
+'L_NO_ARTICLE' => 'nici un articol',
+'L_ARTICLE' => 'articolul',
+'L_ARTICLES' => 'articole',
+'L_ARTAUTHOR_UNKNOWN' => 'necunoscut',
+'L_ARTTAGS_NONE' => 'nimic',
+'L_ARTCHAPO' => 'Continuati lectura #art_title',
+'L_ARTFEED_RSS_CATEGORY' => 'RSS Feed Elementele din această categorie',
+'L_ARTFEED_RSS_TAG' => 'RSS Feed Elementele din această etichetă',
+'L_ARTFEED_RSS' => 'Articole RSS Feed',
+'L_NO_COMMENT' => 'nici un comentariu',
+'L_COMMENT' => 'comentariu',
+'L_COMMENTS' => 'comentarii',
+'L_COMFEED_RSS_ARTICLE' => 'RSS feed pentru comentarii pe acest articol',
+'L_COMFEED_RSS' => 'Comentarii RSS feed',
+'L_STATICCONTENT_INPROCESS' => 'Aceasta pagina este in curs de elaborare',
+'L_SAID' => 'a spus',
+
+'L_PAGINATION_FIRST_TITLE' => 'Du-te la prima pagina',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Pagina anterioara',
+'L_PAGINATION_PREVIOUS' => 'Anterioare',
+'L_PAGINATION_NEXT_TITLE' => 'Pagina urmatoare',
+'L_PAGINATION_NEXT' => 'Urmatorul',
+'L_PAGINATION_LAST_TITLE' => 'Du-te la ultima pagina',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'pagina %s din %s',
+
+'L_PAGEBLOG_TITLE' => 'Blog',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'URL-uri private nu au fost initializate in parametrii dvs. de administrare !',
+'L_FEED_COMMENTS' => 'Comentarii',
+'L_FEED_ONLINE_COMMENTS' => 'Comentarii online',
+'L_FEED_OFFLINE_COMMENTS' => 'Comentarii offline',
+'L_FEED_WRITTEN_BY' => 'Scris de',
+
+);
+?>
diff --git a/core/lang/ro/install.php b/core/lang/ro/install.php
index dccbe035e..f729d14db 100644
--- a/core/lang/ro/install.php
+++ b/core/lang/ro/install.php
@@ -1,36 +1,36 @@
- 'Instalaţie',
-'L_WRONG_PHP_VERSION' => 'PluXml necesită PHP 5 sau o versiune mai mare pentru a lucra.',
-'L_SELECT_LANG' => 'Alegeţi limba dorită',
-'L_INPUT_CHANGE' => 'Schimbă',
-'L_DEFAULT_CATEGORY_TITLE' => 'Categoria 1',
-'L_DEFAULT_CATEGORY_URL' => 'categoria-1',
-'L_DEFAULT_STATIC_TITLE' => 'Pagina 1',
-'L_DEFAULT_STATIC_URL' => 'pagina-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Primul Articol',
-'L_DEFAULT_ARTICLE_URL' => 'primul-articol',
-'L_DEFAULT_COMMENT_CONTENT' => 'Acesta este primul comentariu !',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml este deja instalat !',
-'L_ERR_MISSING_USER' => 'Vă rugăm să introduceti corect numele !',
-'L_ERR_MISSING_LOGIN' => 'Vă rugăm să introduceti corect username-ul !',
-'L_ERR_MISSING_PASSWORD' => 'Vă rugăm să introduceti corect parola!',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Confirmarea parolă incorectă !',
-'L_PLUXML_INSTALLATION' => 'Instalaţia PluXml',
-'L_SITE_DESCRIPTION' => 'Site pe baza la Xml !',
-'L_VERSION' => 'versiunea',
-'L_USERNAME' => 'Numele Administratorului',
-'L_LOGIN' => 'Username-ul Administratorului',
-'L_PASSWORD' => 'Parola',
-'L_PASSWORD_CONFIRMATION' => 'Confirmarea Parolei',
-'L_INPUT_INSTALL' => 'Instalează',
-'L_TIMEZONE' => 'Time Zone',
-'L_PWD_VERY_WEAK' => 'Parola foarte slabă',
-'L_PWD_WEAK' => 'Parolă slabă',
-'L_PWD_GOOD' => 'Parolă bună',
-'L_PWD_STRONG' => 'Parolă puternică',
-);
+ 'Instalaţie',
+'L_WRONG_PHP_VERSION' => 'PluXml necesită PHP 5 sau o versiune mai mare pentru a lucra.',
+'L_SELECT_LANG' => 'Alegeţi limba dorită',
+'L_INPUT_CHANGE' => 'Schimbă',
+'L_DEFAULT_CATEGORY_TITLE' => 'Categoria 1',
+'L_DEFAULT_CATEGORY_URL' => 'categoria-1',
+'L_DEFAULT_STATIC_TITLE' => 'Pagina 1',
+'L_DEFAULT_STATIC_URL' => 'pagina-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Primul Articol',
+'L_DEFAULT_ARTICLE_URL' => 'primul-articol',
+'L_DEFAULT_COMMENT_CONTENT' => 'Acesta este primul comentariu !',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml este deja instalat !',
+'L_ERR_MISSING_USER' => 'Vă rugăm să introduceti corect numele !',
+'L_ERR_MISSING_LOGIN' => 'Vă rugăm să introduceti corect username-ul !',
+'L_ERR_MISSING_PASSWORD' => 'Vă rugăm să introduceti corect parola!',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Confirmarea parolă incorectă !',
+'L_PLUXML_INSTALLATION' => 'Instalaţia PluXml',
+'L_SITE_DESCRIPTION' => 'Site pe baza la Xml !',
+'L_VERSION' => 'versiunea',
+'L_USERNAME' => 'Numele Administratorului',
+'L_LOGIN' => 'Username-ul Administratorului',
+'L_PASSWORD' => 'Parola',
+'L_PASSWORD_CONFIRMATION' => 'Confirmarea Parolei',
+'L_INPUT_INSTALL' => 'Instalează',
+'L_TIMEZONE' => 'Time Zone',
+'L_PWD_VERY_WEAK' => 'Parola foarte slabă',
+'L_PWD_WEAK' => 'Parolă slabă',
+'L_PWD_GOOD' => 'Parolă bună',
+'L_PWD_STRONG' => 'Parolă puternică',
+);
?>
\ No newline at end of file
diff --git a/core/lang/ro/update.php b/core/lang/ro/update.php
index 2a79d4013..715bc269a 100644
--- a/core/lang/ro/update.php
+++ b/core/lang/ro/update.php
@@ -1,59 +1,59 @@
- 'Inregistrarea datelor a avut loc cu succes',
-'L_UPDATE_TITLE' => 'Actualizare PluXml',
-'L_WRONG_PHP_VERSION' => 'PluXml necesită PHP 5 sau o versiune mai mare pentru a lucra.',
-
-'L_SELECT_LANG' => 'Alegeţi limba dorită',
-'L_INPUT_CHANGE' => 'Schimbă',
-
-'L_UPDATE_UPTODATE' => 'PluXml dvs. este deja actualizat.',
-'L_UPDATE_NOT_AVAILABLE' => 'Nici o actualizare nu este disponibila.',
-'L_UPDATE_BACK' => 'Go Back',
-'L_UPDATE_WARNING1' => 'Acum se va actualiza versiunea dvs. veche de PluXml',
-'L_UPDATE_SELECT_VERSION' => 'Va rugam sa selectati din lista de mai jos versiunea veche pentru actualizarea PluXml.',
-'L_UPDATE_WARNING2' => 'In caz ca versiunea dvs. nu o gasiti printre cele enumerate in lista, atunci dvs. folositi o versiune fara pachet de actualizare. Va sugeram sa descarcati cea mai recenta versiune a PluXml a> si de a face o instalare noua.',
-'L_UPDATE_WARNING3' => 'Pentru orice eventualitate nu uita sa faci o copie de rezerva a datelor.',
-'L_UPDATE_START' => 'Start actualizare',
-
-'L_UPDATE_ENDED' => 'Actualizarea versiunii, %s finalizate.',
-'L_UPDATE_INPROGRESS' => 'Cerere versiune actualizari',
-'L_UPDATE_ERROR' => 'O eroare a fost generata in timpul actualizarii.',
-'L_UPDATE_SUCCESSFUL' => 'Toate actualizarile au fost aplicate cu succes !',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Fisierul de actualizare parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Crearea fisierului tags.xml',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Eroare la crearea fisierului tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Crearea fisierului de stil',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Eroare la crearea fisierului',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Traducerea articolelor pentru noul format',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Eroare in timpul procesarii fisierului',
-'L_UPDATE_STATICS_MIGRATION' => 'Migrarea de pagini statice Fisier',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Eroare in timpul migratiei de fisier de la pagini statice',
-'L_UPDATE_CREATE_USERS_FILE' => 'Crearea de fisier utilizatori',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Eroare la crearea dosarului de utilizatori',
-'L_UPDATE_USERS_MIGRATION' => 'Migratia fisierului utilizatori',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Eroare in timpul migratiei de utilizatori',
-'L_UPDATE_ERR_NO_USERS' => 'Nici un utilizator gasit',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Crearea fisieruli .htaccess',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Eroare la crearea fisierului .htaccess',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Actualizaţi fişierul .htaccess',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Eroare în timp ce actualizarea fişierul .htaccess',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Migratia tipurilor de fisiere',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Eroare in timpul migratiei categorii fisier',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Crearea fisierului plugins.xml',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Eroare la crearea fisierului plugins.xml',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Stergeti fisierul core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Eroare la stergerea fisierului core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Stergeti dosarul core/plxtoolbar/',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Eroare la stergerea dosarului core/plxtoolbar/',
-'L_UPDATE_FILE' => 'Fişierul de actualizare',
-'L_UPDATE_ERR_FILE' => 'Eroare în timpul fişierul de actualizare',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migrarea fişierelor de setări parametrii plugin fişierul de configurare',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Fisierul de actualizare plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Comentariile de migrare',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Eroare la migrarea comentarii',
-);
+ 'Inregistrarea datelor a avut loc cu succes',
+'L_UPDATE_TITLE' => 'Actualizare PluXml',
+'L_WRONG_PHP_VERSION' => 'PluXml necesită PHP 5 sau o versiune mai mare pentru a lucra.',
+
+'L_SELECT_LANG' => 'Alegeţi limba dorită',
+'L_INPUT_CHANGE' => 'Schimbă',
+
+'L_UPDATE_UPTODATE' => 'PluXml dvs. este deja actualizat.',
+'L_UPDATE_NOT_AVAILABLE' => 'Nici o actualizare nu este disponibila.',
+'L_UPDATE_BACK' => 'Go Back',
+'L_UPDATE_WARNING1' => 'Acum se va actualiza versiunea dvs. veche de PluXml',
+'L_UPDATE_SELECT_VERSION' => 'Va rugam sa selectati din lista de mai jos versiunea veche pentru actualizarea PluXml.',
+'L_UPDATE_WARNING2' => 'In caz ca versiunea dvs. nu o gasiti printre cele enumerate in lista, atunci dvs. folositi o versiune fara pachet de actualizare. Va sugeram sa descarcati cea mai recenta versiune a PluXml a> si de a face o instalare noua.',
+'L_UPDATE_WARNING3' => 'Pentru orice eventualitate nu uita sa faci o copie de rezerva a datelor.',
+'L_UPDATE_START' => 'Start actualizare',
+
+'L_UPDATE_ENDED' => 'Actualizarea versiunii, %s finalizate.',
+'L_UPDATE_INPROGRESS' => 'Cerere versiune actualizari',
+'L_UPDATE_ERROR' => 'O eroare a fost generata in timpul actualizarii.',
+'L_UPDATE_SUCCESSFUL' => 'Toate actualizarile au fost aplicate cu succes !',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Fisierul de actualizare parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Crearea fisierului tags.xml',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Eroare la crearea fisierului tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Crearea fisierului de stil',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Eroare la crearea fisierului',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Traducerea articolelor pentru noul format',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Eroare in timpul procesarii fisierului',
+'L_UPDATE_STATICS_MIGRATION' => 'Migrarea de pagini statice Fisier',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Eroare in timpul migratiei de fisier de la pagini statice',
+'L_UPDATE_CREATE_USERS_FILE' => 'Crearea de fisier utilizatori',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Eroare la crearea dosarului de utilizatori',
+'L_UPDATE_USERS_MIGRATION' => 'Migratia fisierului utilizatori',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Eroare in timpul migratiei de utilizatori',
+'L_UPDATE_ERR_NO_USERS' => 'Nici un utilizator gasit',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Crearea fisieruli .htaccess',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Eroare la crearea fisierului .htaccess',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Actualizaţi fişierul .htaccess',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Eroare în timp ce actualizarea fişierul .htaccess',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Migratia tipurilor de fisiere',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Eroare in timpul migratiei categorii fisier',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Crearea fisierului plugins.xml',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Eroare la crearea fisierului plugins.xml',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Stergeti fisierul core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Eroare la stergerea fisierului core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Stergeti dosarul core/plxtoolbar/',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Eroare la stergerea dosarului core/plxtoolbar/',
+'L_UPDATE_FILE' => 'Fişierul de actualizare',
+'L_UPDATE_ERR_FILE' => 'Eroare în timpul fişierul de actualizare',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Migrarea fişierelor de setări parametrii plugin fişierul de configurare',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Fisierul de actualizare plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Comentariile de migrare',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Eroare la migrarea comentarii',
+);
?>
\ No newline at end of file
diff --git a/core/lang/ru/core.php b/core/lang/ru/core.php
index 2047fe03a..d3ff52667 100644
--- a/core/lang/ru/core.php
+++ b/core/lang/ru/core.php
@@ -1,140 +1,140 @@
- 'Russian',
-
-'L_DATE_CREATION' => 'Дата создания',
-'L_DATE_UPDATE' => 'Дата обновляются',
-
-# common
-'L_PLUXML_VERSION' => 'PluXml версия',
-'L_HOMEPAGE' => 'Главная',
-'L_UNCLASSIFIED' => 'Без категории',
-'L_INFO_PHP_VERSION' => 'PHP версия',
-'L_INFO_MAGIC_QUOTES' => 'Состояние "magic quotes"',
-'L_INFO_CHARSET' => 'кодировка',
-
-# index.php
-'L_ERR_THEME_NOTFOUND' => 'Тема не найдена',
-'L_ERR_FILE_NOTFOUND' => 'Файл не найден',
-'L_ERR_PAGE_NOT_FOUND' => 'Страница не найдена',
-
-# class.plx.date.php
-'L_SHORT_JANUARY' => '',
-'L_SHORT_FEBRUARY' => '',
-'L_SHORT_MARCH' => '',
-'L_SHORT_APRIL' => '',
-'L_SHORT_MAY' => '',
-'L_SHORT_JUNE' => '',
-'L_SHORT_JULY' => '',
-'L_SHORT_AUGUST' => '',
-'L_SHORT_SEPTEMBER' => '',
-'L_SHORT_OCTOBER' => '',
-'L_SHORT_NOVEMBER' => '',
-'L_SHORT_DECEMBER' => '',
-'L_JANUARY' => 'январь',
-'L_FEBRUARY' => 'февраль',
-'L_MARCH' => 'март',
-'L_APRIL' => 'апрель',
-'L_MAY' => 'май',
-'L_JUNE' => 'июнь',
-'L_JULY' => 'июль',
-'L_AUGUST' => 'август',
-'L_SEPTEMBER' => 'сентябрь',
-'L_OCTOBER' => 'октябрь',
-'L_NOVEMBER' => 'ноябрь',
-'L_DECEMBER' => 'декабрь',
-'L_MONDAY' => 'понедельник',
-'L_TUESDAY' => 'вторник',
-'L_WEDNESDAY' => 'среда',
-'L_THURSDAY' => 'четверг',
-'L_FRIDAY' => 'пятница',
-'L_SATURDAY' => 'субота',
-'L_SUNDAY' => 'воскресенье',
-
-# class.plx.capcha.php
-'L_LAST' => 'последняя',
-'L_FIRST' => 'первая',
-'L_SECOND' => 'вторая',
-'L_THIRD' => 'третья',
-'L_FOURTH' => 'четвертая',
-'L_FIFTH' => 'пятая',
-'L_SIXTH' => 'шестая',
-'L_SEVENTH' => 'седьмая',
-'L_EIGTH' => 'восьмая',
-'L_NINTH' => 'девятая',
-'L_TENTH' => 'десятая',
-'L_NTH' => 'и',
-'L_CAPCHA_QUESTION' => 'Напечатйте, какая %s буква в этом тексте %s ?',
-
-# class.plx.utils.php
-'L_WRITE_ACCESS' => '%s имеет доступ на запись',
-'L_WRITE_NOT_ACCESS' => '%s не имеет доступ на запись или не существует',
-'L_MODREWRITE_AVAILABLE' => 'Apache URL модуля mod_rewrite доступны',
-'L_MODREWRITE_NOT_AVAILABLE' => 'Apache URL модуля mod_rewrite недоступен',
-'L_LIBGD_INSTALLED' => 'GD библиотека установлена',
-'L_LIBGD_NOT_INSTALLED' => 'GD библиотека не установлена',
-'L_LIBXML_INSTALLED' => 'XML библиотека установлена',
-'L_LIBXML_NOT_INSTALLED' => 'XML библиотека не установлена',
-'L_MAIL_AVAILABLE' => 'функция отправки почты доступна',
-'L_MAIL_NOT_AVAILABLE' => 'Функция отправки почты недоступна',
-
-# class.plx.motor.php
-'L_ARTICLE_NO_TAG' => 'Для этого тега нет статьи!',
-'L_UNKNOWN_CATEGORY' => 'Эта категория не существует!',
-'L_NO_ARTICLE_PAGE' => 'Нет статей в этой категории!',
-'L_UNKNOWN_ARTICLE' => 'Эта статья не существует!',
-'L_COM_IN_MODERATION' => 'Спасибо! Ваш комментарий появится после проверки',
-'L_UNKNOWN_STATIC' => 'Эта страница не существует!',
-'L_DOCUMENT_NOT_FOUND' => 'Документ не найден',
-'L_NEWCOMMENT_ERR' => 'Произошла ошибка при публикации комментария',
-'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Пожалуйста, заполните все необходимые поля',
-'L_NEWCOMMENT_ERR_ANTISPAM' => 'Ошибка проверки Антиспам',
-
-# class.plx.show.php
-
-'L_HTTPENCODING' => 'Сжатие %s активированно',
-'L_PAGETITLE_ARCHIVES' => 'Архив',
-'L_PAGETITLE_TAG' => 'Тэги',
-'L_NO_CATEGORY' => 'без категории',
-'L_CATEGORY' => 'категория',
-'L_CATEGORIES' => 'категории',
-'L_NO_ARTICLE' => 'нет статьи',
-'L_ARTICLE' => 'статья',
-'L_ARTICLES' => 'статей',
-'L_ARTAUTHOR_UNKNOWN' => 'неизвестный',
-'L_ARTTAGS_NONE' => 'нет',
-'L_ARTCHAPO' => 'Читать далее',
-'L_ARTFEED_RSS_CATEGORY' => 'RSS-поток категорий',
-'L_ARTFEED_RSS_TAG' => 'RSS-поток статей в этом теге',
-'L_ARTFEED_RSS' => 'RSS-поток статей',
-'L_NO_COMMENT' => 'нет комментариев',
-'L_COMMENT' => 'комментарий',
-'L_COMMENTS' => 'комментария',
-'L_COMFEED_RSS_ARTICLE' => 'RSS-поток комментариев статей',
-'L_COMFEED_RSS' => 'RSS-поток комментариев',
-'L_STATICCONTENT_INPROCESS' => 'Эта страница в настоящее время редактируется',
-'L_SAID' => 'сказал',
-
-'L_PAGINATION_FIRST_TITLE' => 'Перейти на первую страницу',
-'L_PAGINATION_FIRST' => '«',
-'L_PAGINATION_PREVIOUS_TITLE' => 'Предыдущая страница',
-'L_PAGINATION_PREVIOUS' => 'Назад',
-'L_PAGINATION_NEXT_TITLE' => 'Следующая страница',
-'L_PAGINATION_NEXT' => 'Далее',
-'L_PAGINATION_LAST_TITLE' => 'Перейти к последней странице',
-'L_PAGINATION_LAST' => '»',
-'L_PAGINATION' => 'страниц %s из %s',
-
-'L_PAGEBLOG_TITLE' => 'Блог',
-
-# class.plx.feed.php
-'L_FEED_NO_PRIVATE_URL' => 'Закрытые URL не был инициализированы в настройках Админпанели!',
-'L_FEED_COMMENTS' => 'Комментарии',
-'L_FEED_ONLINE_COMMENTS' => 'Комментарии онлайн',
-'L_FEED_OFFLINE_COMMENTS' => 'Комментарии оффлайн',
-'L_FEED_WRITTEN_BY' => 'Автор',
-
-);
-?>
+ 'Russian',
+
+'L_DATE_CREATION' => 'Дата создания',
+'L_DATE_UPDATE' => 'Дата обновляются',
+
+# common
+'L_PLUXML_VERSION' => 'PluXml версия',
+'L_HOMEPAGE' => 'Главная',
+'L_UNCLASSIFIED' => 'Без категории',
+'L_INFO_PHP_VERSION' => 'PHP версия',
+'L_INFO_MAGIC_QUOTES' => 'Состояние "magic quotes"',
+'L_INFO_CHARSET' => 'кодировка',
+
+# index.php
+'L_ERR_THEME_NOTFOUND' => 'Тема не найдена',
+'L_ERR_FILE_NOTFOUND' => 'Файл не найден',
+'L_ERR_PAGE_NOT_FOUND' => 'Страница не найдена',
+
+# class.plx.date.php
+'L_SHORT_JANUARY' => '',
+'L_SHORT_FEBRUARY' => '',
+'L_SHORT_MARCH' => '',
+'L_SHORT_APRIL' => '',
+'L_SHORT_MAY' => '',
+'L_SHORT_JUNE' => '',
+'L_SHORT_JULY' => '',
+'L_SHORT_AUGUST' => '',
+'L_SHORT_SEPTEMBER' => '',
+'L_SHORT_OCTOBER' => '',
+'L_SHORT_NOVEMBER' => '',
+'L_SHORT_DECEMBER' => '',
+'L_JANUARY' => 'январь',
+'L_FEBRUARY' => 'февраль',
+'L_MARCH' => 'март',
+'L_APRIL' => 'апрель',
+'L_MAY' => 'май',
+'L_JUNE' => 'июнь',
+'L_JULY' => 'июль',
+'L_AUGUST' => 'август',
+'L_SEPTEMBER' => 'сентябрь',
+'L_OCTOBER' => 'октябрь',
+'L_NOVEMBER' => 'ноябрь',
+'L_DECEMBER' => 'декабрь',
+'L_MONDAY' => 'понедельник',
+'L_TUESDAY' => 'вторник',
+'L_WEDNESDAY' => 'среда',
+'L_THURSDAY' => 'четверг',
+'L_FRIDAY' => 'пятница',
+'L_SATURDAY' => 'субота',
+'L_SUNDAY' => 'воскресенье',
+
+# class.plx.capcha.php
+'L_LAST' => 'последняя',
+'L_FIRST' => 'первая',
+'L_SECOND' => 'вторая',
+'L_THIRD' => 'третья',
+'L_FOURTH' => 'четвертая',
+'L_FIFTH' => 'пятая',
+'L_SIXTH' => 'шестая',
+'L_SEVENTH' => 'седьмая',
+'L_EIGTH' => 'восьмая',
+'L_NINTH' => 'девятая',
+'L_TENTH' => 'десятая',
+'L_NTH' => 'и',
+'L_CAPCHA_QUESTION' => 'Напечатйте, какая %s буква в этом тексте %s ?',
+
+# class.plx.utils.php
+'L_WRITE_ACCESS' => '%s имеет доступ на запись',
+'L_WRITE_NOT_ACCESS' => '%s не имеет доступ на запись или не существует',
+'L_MODREWRITE_AVAILABLE' => 'Apache URL модуля mod_rewrite доступны',
+'L_MODREWRITE_NOT_AVAILABLE' => 'Apache URL модуля mod_rewrite недоступен',
+'L_LIBGD_INSTALLED' => 'GD библиотека установлена',
+'L_LIBGD_NOT_INSTALLED' => 'GD библиотека не установлена',
+'L_LIBXML_INSTALLED' => 'XML библиотека установлена',
+'L_LIBXML_NOT_INSTALLED' => 'XML библиотека не установлена',
+'L_MAIL_AVAILABLE' => 'функция отправки почты доступна',
+'L_MAIL_NOT_AVAILABLE' => 'Функция отправки почты недоступна',
+
+# class.plx.motor.php
+'L_ARTICLE_NO_TAG' => 'Для этого тега нет статьи!',
+'L_UNKNOWN_CATEGORY' => 'Эта категория не существует!',
+'L_NO_ARTICLE_PAGE' => 'Нет статей в этой категории!',
+'L_UNKNOWN_ARTICLE' => 'Эта статья не существует!',
+'L_COM_IN_MODERATION' => 'Спасибо! Ваш комментарий появится после проверки',
+'L_UNKNOWN_STATIC' => 'Эта страница не существует!',
+'L_DOCUMENT_NOT_FOUND' => 'Документ не найден',
+'L_NEWCOMMENT_ERR' => 'Произошла ошибка при публикации комментария',
+'L_NEWCOMMENT_FIELDS_REQUIRED' => 'Пожалуйста, заполните все необходимые поля',
+'L_NEWCOMMENT_ERR_ANTISPAM' => 'Ошибка проверки Антиспам',
+
+# class.plx.show.php
+
+'L_HTTPENCODING' => 'Сжатие %s активированно',
+'L_PAGETITLE_ARCHIVES' => 'Архив',
+'L_PAGETITLE_TAG' => 'Тэги',
+'L_NO_CATEGORY' => 'без категории',
+'L_CATEGORY' => 'категория',
+'L_CATEGORIES' => 'категории',
+'L_NO_ARTICLE' => 'нет статьи',
+'L_ARTICLE' => 'статья',
+'L_ARTICLES' => 'статей',
+'L_ARTAUTHOR_UNKNOWN' => 'неизвестный',
+'L_ARTTAGS_NONE' => 'нет',
+'L_ARTCHAPO' => 'Читать далее',
+'L_ARTFEED_RSS_CATEGORY' => 'RSS-поток категорий',
+'L_ARTFEED_RSS_TAG' => 'RSS-поток статей в этом теге',
+'L_ARTFEED_RSS' => 'RSS-поток статей',
+'L_NO_COMMENT' => 'нет комментариев',
+'L_COMMENT' => 'комментарий',
+'L_COMMENTS' => 'комментария',
+'L_COMFEED_RSS_ARTICLE' => 'RSS-поток комментариев статей',
+'L_COMFEED_RSS' => 'RSS-поток комментариев',
+'L_STATICCONTENT_INPROCESS' => 'Эта страница в настоящее время редактируется',
+'L_SAID' => 'сказал',
+
+'L_PAGINATION_FIRST_TITLE' => 'Перейти на первую страницу',
+'L_PAGINATION_FIRST' => '«',
+'L_PAGINATION_PREVIOUS_TITLE' => 'Предыдущая страница',
+'L_PAGINATION_PREVIOUS' => 'Назад',
+'L_PAGINATION_NEXT_TITLE' => 'Следующая страница',
+'L_PAGINATION_NEXT' => 'Далее',
+'L_PAGINATION_LAST_TITLE' => 'Перейти к последней странице',
+'L_PAGINATION_LAST' => '»',
+'L_PAGINATION' => 'страниц %s из %s',
+
+'L_PAGEBLOG_TITLE' => 'Блог',
+
+# class.plx.feed.php
+'L_FEED_NO_PRIVATE_URL' => 'Закрытые URL не был инициализированы в настройках Админпанели!',
+'L_FEED_COMMENTS' => 'Комментарии',
+'L_FEED_ONLINE_COMMENTS' => 'Комментарии онлайн',
+'L_FEED_OFFLINE_COMMENTS' => 'Комментарии оффлайн',
+'L_FEED_WRITTEN_BY' => 'Автор',
+
+);
+?>
diff --git a/core/lang/ru/install.php b/core/lang/ru/install.php
index 6de8116fa..4e903b251 100644
--- a/core/lang/ru/install.php
+++ b/core/lang/ru/install.php
@@ -1,36 +1,36 @@
- 'Инсталяция',
-'L_WRONG_PHP_VERSION' => 'PluXml требует PHP версии 5 и выше',
-'L_SELECT_LANG' => 'Выберите ваш язык',
-'L_INPUT_CHANGE' => 'Изменить',
-'L_DEFAULT_CATEGORY_TITLE' => 'Категория 1',
-'L_DEFAULT_CATEGORY_URL' => 'caregory-1',
-'L_DEFAULT_STATIC_TITLE' => 'Статическая 1',
-'L_DEFAULT_STATIC_URL' => 'static-1',
-'L_DEFAULT_ARTICLE_TITLE' => 'Первая статья',
-'L_DEFAULT_ARTICLE_URL' => 'first-article',
-'L_DEFAULT_COMMENT_CONTENT' => 'Это первый комментарий!',
-'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml уже создана!',
-'L_ERR_MISSING_USER' => 'Пожалуйста, заполните поля!',
-'L_ERR_MISSING_LOGIN' => 'Пожалуйста, заполните поле Логин!',
-'L_ERR_MISSING_PASSWORD' => 'Пожалуйста, заполните поле Пароль!',
-'L_ERR_PASSWORD_CONFIRMATION' => 'Неверный пароль!',
-'L_PLUXML_INSTALLATION' => 'Установка PluXml, ',
-'L_SITE_DESCRIPTION' => 'Блог или CMS на XML!',
-'L_VERSION' => 'версия',
-'L_USERNAME' => 'Имя Администратора',
-'L_LOGIN' => 'Логин Администратора',
-'L_PASSWORD' => 'Пароль',
-'L_PASSWORD_CONFIRMATION' => 'Подтвердить пароль',
-'L_INPUT_INSTALL' => 'Установка',
-'L_TIMEZONE' => 'Часовой пояс',
-'L_PWD_VERY_WEAK' => 'очень слабый пароль',
-'L_PWD_WEAK' => 'слабый пароль',
-'L_PWD_GOOD' => 'хороший пароль',
-'L_PWD_STRONG' => 'Надежный пароль',
-);
+ 'Инсталяция',
+'L_WRONG_PHP_VERSION' => 'PluXml требует PHP версии 5 и выше',
+'L_SELECT_LANG' => 'Выберите ваш язык',
+'L_INPUT_CHANGE' => 'Изменить',
+'L_DEFAULT_CATEGORY_TITLE' => 'Категория 1',
+'L_DEFAULT_CATEGORY_URL' => 'caregory-1',
+'L_DEFAULT_STATIC_TITLE' => 'Статическая 1',
+'L_DEFAULT_STATIC_URL' => 'static-1',
+'L_DEFAULT_ARTICLE_TITLE' => 'Первая статья',
+'L_DEFAULT_ARTICLE_URL' => 'first-article',
+'L_DEFAULT_COMMENT_CONTENT' => 'Это первый комментарий!',
+'L_ERR_PLUXML_ALREADY_INSTALLED' => 'PluXml уже создана!',
+'L_ERR_MISSING_USER' => 'Пожалуйста, заполните поля!',
+'L_ERR_MISSING_LOGIN' => 'Пожалуйста, заполните поле Логин!',
+'L_ERR_MISSING_PASSWORD' => 'Пожалуйста, заполните поле Пароль!',
+'L_ERR_PASSWORD_CONFIRMATION' => 'Неверный пароль!',
+'L_PLUXML_INSTALLATION' => 'Установка PluXml, ',
+'L_SITE_DESCRIPTION' => 'Блог или CMS на XML!',
+'L_VERSION' => 'версия',
+'L_USERNAME' => 'Имя Администратора',
+'L_LOGIN' => 'Логин Администратора',
+'L_PASSWORD' => 'Пароль',
+'L_PASSWORD_CONFIRMATION' => 'Подтвердить пароль',
+'L_INPUT_INSTALL' => 'Установка',
+'L_TIMEZONE' => 'Часовой пояс',
+'L_PWD_VERY_WEAK' => 'очень слабый пароль',
+'L_PWD_WEAK' => 'слабый пароль',
+'L_PWD_GOOD' => 'хороший пароль',
+'L_PWD_STRONG' => 'Надежный пароль',
+);
?>
\ No newline at end of file
diff --git a/core/lang/ru/update.php b/core/lang/ru/update.php
index cbe032a91..20278c92b 100644
--- a/core/lang/ru/update.php
+++ b/core/lang/ru/update.php
@@ -1,61 +1,61 @@
- 'Данные были успешно сохранены',
-'L_UPDATE_TITLE' => 'Обновление PluXml',
-'L_WRONG_PHP_VERSION' => 'Для PluXml необходим PHP версии 5 или выше.',
-
-'L_SELECT_LANG' => 'Выберите ваш язык',
-'L_INPUT_CHANGE' => 'Изменить',
-
-'L_UPDATE_UPTODATE' => 'Ваша PluXml имеет актуальную версию.',
-'L_UPDATE_NOT_AVAILABLE' => 'Нет доступных обновлений.',
-'L_UPDATE_BACK' => 'Вернуться на Главную страницу',
-'L_UPDATE_WARNING1' => 'Вы собираетесь обновить вашу старую версию PluXml',
-'L_UPDATE_SELECT_VERSION' => 'Пожалуйста, выберите старую версию PluXml, которую вы желаете обновить.',
-'L_UPDATE_WARNING2' => 'Если вы не можете найти старую версию PluXml в списке ниже, для нее нет автоматического обновления, так как ваша версия очень старая. Мы советуем вам скачать последнюю версию PluXml и проделать новую установку.',
-'L_UPDATE_WARNING3' => 'Внимание: перед тем, как начать обновление, не забудьте сделать копию вашего сайта, сохранив папку "data" в надежном месте',
-'L_UPDATE_START' => 'Начать обновление',
-
-'L_UPDATE_ENDED' => 'Обновление завершено',
-'L_UPDATE_INPROGRESS' => 'Происходит обновление',
-'L_UPDATE_ERROR' => 'Во время обновления произошла ошибка.',
-'L_UPDATE_SUCCESSFUL' => 'Обновление завершено успешно!',
-
-'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Обновление parametres.xml',
-'L_UPDATE_CREATE_TAGS_FILE' => 'Создается tags.xml',
-'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Произошла ошибка во время создания tags.xml',
-'L_UPDATE_CREATE_THEME_FILE' => 'Создается файл темы',
-'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Произошла ошибка во время создания файла темы',
-'L_UPDATE_ARTICLES_CONVERSION' => 'Преобразование статей в новый формат',
-'L_UPDATE_ERR_FILE_PROCESSING' => 'Произошла ошибка в процессе обработки файла',
-'L_UPDATE_STATICS_MIGRATION' => 'Миграция файла статических страниц',
-'L_UPDATE_ERR_STATICS_MIGRATION' => 'Произошла ошибка во время миграции файла статических страниц',
-'L_UPDATE_CREATE_USERS_FILE' => 'Создается файлы пользователя users\' ',
-'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Произошла ошибка во время создания файла пользователя',
-'L_UPDATE_USERS_MIGRATION' => 'Миграция файла пользователя users\' ',
-'L_UPDATE_ERR_USERS_MIGRATION' => 'Произошла ошибка во время миграции файла пользователя',
-'L_UPDATE_ERR_NO_USERS' => 'В файле не найдены пользователи',
-'L_UPDATE_CREATE_HTACCESS_FILE' => 'Создается файл .htaccess',
-'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Произошла ошибка во время создания файла .htaccess',
-'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Обновление файла .htaccess',
-'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Произошла ошибка во время обновления файла .htaccess',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Миграция файла категорий',
-'L_UPDATE_CATEGORIES_MIGRATION' => 'Миграция файла категорий',
-'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Произошла ошибка во время миграции файла категорий',
-'L_UPDATE_CREATE_PLUGINS_FILE' => 'Создается plugins.xml',
-'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Произошла ошибка во время создания plugins.xml',
-'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Удаление core/admin/fullscreen.php',
-'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Произошла ошибка во время удаления core/admin/fullscreen.php',
-'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Удаление папки core/plxtoolbar/',
-'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Произошла ошибка во время удаления папки core/plxtoolbar/',
-'L_UPDATE_FILE' => 'Обновление файла',
-'L_UPDATE_ERR_FILE' => 'Ошибка при обновлении файла',
-'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Миграция файлов плагина параметров в файле конфигурации',
-'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Обновление plugins.xml',
-'L_UPDATE_COMMENTS_MIGRATION' => 'Миграция комментарии',
-'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Ошибка при переходе комментарии',
-
-);
+ 'Данные были успешно сохранены',
+'L_UPDATE_TITLE' => 'Обновление PluXml',
+'L_WRONG_PHP_VERSION' => 'Для PluXml необходим PHP версии 5 или выше.',
+
+'L_SELECT_LANG' => 'Выберите ваш язык',
+'L_INPUT_CHANGE' => 'Изменить',
+
+'L_UPDATE_UPTODATE' => 'Ваша PluXml имеет актуальную версию.',
+'L_UPDATE_NOT_AVAILABLE' => 'Нет доступных обновлений.',
+'L_UPDATE_BACK' => 'Вернуться на Главную страницу',
+'L_UPDATE_WARNING1' => 'Вы собираетесь обновить вашу старую версию PluXml',
+'L_UPDATE_SELECT_VERSION' => 'Пожалуйста, выберите старую версию PluXml, которую вы желаете обновить.',
+'L_UPDATE_WARNING2' => 'Если вы не можете найти старую версию PluXml в списке ниже, для нее нет автоматического обновления, так как ваша версия очень старая. Мы советуем вам скачать последнюю версию PluXml и проделать новую установку.',
+'L_UPDATE_WARNING3' => 'Внимание: перед тем, как начать обновление, не забудьте сделать копию вашего сайта, сохранив папку "data" в надежном месте',
+'L_UPDATE_START' => 'Начать обновление',
+
+'L_UPDATE_ENDED' => 'Обновление завершено',
+'L_UPDATE_INPROGRESS' => 'Происходит обновление',
+'L_UPDATE_ERROR' => 'Во время обновления произошла ошибка.',
+'L_UPDATE_SUCCESSFUL' => 'Обновление завершено успешно!',
+
+'L_UPDATE_UPDATE_PARAMETERS_FILE' => 'Обновление parametres.xml',
+'L_UPDATE_CREATE_TAGS_FILE' => 'Создается tags.xml',
+'L_UPDATE_ERR_CREATE_TAGS_FILE' => 'Произошла ошибка во время создания tags.xml',
+'L_UPDATE_CREATE_THEME_FILE' => 'Создается файл темы',
+'L_UPDATE_ERR_CREATE_THEME_FILE' => 'Произошла ошибка во время создания файла темы',
+'L_UPDATE_ARTICLES_CONVERSION' => 'Преобразование статей в новый формат',
+'L_UPDATE_ERR_FILE_PROCESSING' => 'Произошла ошибка в процессе обработки файла',
+'L_UPDATE_STATICS_MIGRATION' => 'Миграция файла статических страниц',
+'L_UPDATE_ERR_STATICS_MIGRATION' => 'Произошла ошибка во время миграции файла статических страниц',
+'L_UPDATE_CREATE_USERS_FILE' => 'Создается файлы пользователя users\' ',
+'L_UPDATE_ERR_CREATE_USERS_FILE' => 'Произошла ошибка во время создания файла пользователя',
+'L_UPDATE_USERS_MIGRATION' => 'Миграция файла пользователя users\' ',
+'L_UPDATE_ERR_USERS_MIGRATION' => 'Произошла ошибка во время миграции файла пользователя',
+'L_UPDATE_ERR_NO_USERS' => 'В файле не найдены пользователи',
+'L_UPDATE_CREATE_HTACCESS_FILE' => 'Создается файл .htaccess',
+'L_UPDATE_ERR_CREATE_HTACCESS_FILE' => 'Произошла ошибка во время создания файла .htaccess',
+'L_UPDATE_UPDATE_HTACCESS_FILE' => 'Обновление файла .htaccess',
+'L_UPDATE_ERR_UPDATE_HTACCESS_FILE' => 'Произошла ошибка во время обновления файла .htaccess',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Миграция файла категорий',
+'L_UPDATE_CATEGORIES_MIGRATION' => 'Миграция файла категорий',
+'L_UPDATE_ERR_CATEGORIES_MIGRATION' => 'Произошла ошибка во время миграции файла категорий',
+'L_UPDATE_CREATE_PLUGINS_FILE' => 'Создается plugins.xml',
+'L_UPDATE_ERR_CREATE_PLUGINS_FILE' => 'Произошла ошибка во время создания plugins.xml',
+'L_UPDATE_DELETE_FULLSCREEN_FILE' => 'Удаление core/admin/fullscreen.php',
+'L_UPDATE_ERR_DELETE_FULLSCREEN_FILE'=> 'Произошла ошибка во время удаления core/admin/fullscreen.php',
+'L_UPDATE_DELETE_PLXTOOLBAR_FOLDER' => 'Удаление папки core/plxtoolbar/',
+'L_UPDATE_ERR_DELETE_PLXTOOLBAR_FOLDER' => 'Произошла ошибка во время удаления папки core/plxtoolbar/',
+'L_UPDATE_FILE' => 'Обновление файла',
+'L_UPDATE_ERR_FILE' => 'Ошибка при обновлении файла',
+'L_UPDATE_PLUG_MOVEPARAMFILE' => 'Миграция файлов плагина параметров в файле конфигурации',
+'L_UPDATE_UPDATE_PLUGINS_FILE' => 'Обновление plugins.xml',
+'L_UPDATE_COMMENTS_MIGRATION' => 'Миграция комментарии',
+'L_UPDATE_ERR_COMMENTS_MIGRATION' => 'Ошибка при переходе комментарии',
+
+);
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.date.php b/core/lib/class.plx.date.php
index 63ec5277c..184744666 100644
--- a/core/lib/class.plx.date.php
+++ b/core/lib/class.plx.date.php
@@ -1,170 +1,170 @@
- L_JANUARY,
- '02' => L_FEBRUARY,
- '03' => L_MARCH,
- '04' => L_APRIL,
- '05' => L_MAY,
- '06' => L_JUNE,
- '07' => L_JULY,
- '08' => L_AUGUST,
- '09' => L_SEPTEMBER,
- '10' => L_OCTOBER,
- '11' => L_NOVEMBER,
- '12' => L_DECEMBER);
- $aShortMonth = array(
- '01' => L_SHORT_JANUARY,
- '02' => L_SHORT_FEBRUARY,
- '03' => L_SHORT_MARCH,
- '04' => L_SHORT_APRIL,
- '05' => L_SHORT_MAY,
- '06' => L_SHORT_JUNE,
- '07' => L_SHORT_JULY,
- '08' => L_SHORT_AUGUST,
- '09' => L_SHORT_SEPTEMBER,
- '10' => L_SHORT_OCTOBER,
- '11' => L_SHORT_NOVEMBER,
- '12' => L_SHORT_DECEMBER);
- $aDay = array(
- '1' => L_MONDAY,
- '2' => L_TUESDAY,
- '3' => L_WEDNESDAY,
- '4' => L_THURSDAY,
- '5' => L_FRIDAY,
- '6' => L_SATURDAY,
- '0' => L_SUNDAY);
-
- switch ($key) {
- case 'day':
- $day = isset($aDay[$value]) ? $aDay[$value] : '';
- return $day; break;
- case 'month':
- $month = isset($aMonth[$value]) ? $aMonth[$value] : '';
- return $month; break;
- case 'short_month':
- $short_month = isset($aShortMonth[$value]) ? $aShortMonth[$value] : '';
- return $short_month; break;
- }
- }
-
- /**
- * Méthode qui formate l'affichage d'une date
- *
- * @param date date/heure au format YYYYMMDDHHMM
- * @param format format d'affichage
- * @return string date/heure formatée
- * @author Stephane F.
- **/
- public static function formatDate($date, $format='#num_day/#num_month/#num_year(4)') {
-
- # On decoupe notre date
- $year4 = substr($date, 0, 4);
- $year2 = substr($date, 2, 2);
- $month = substr($date, 4, 2);
- $day = substr($date, 6, 2);
- $day_num = date('w',mktime(0,0,0,intval($month),intval($day),intval($year4)));
- $hour = substr($date,8,2);
- $minute = substr($date,10,2);
-
- # On retourne notre date au format humain
- $format = str_replace('#time', $hour.':'.$minute, $format);
- $format = str_replace('#minute', $minute, $format);
- $format = str_replace('#hour', $hour, $format);
- $format = str_replace('#day', plxDate::getCalendar('day', $day_num), $format);
- $format = str_replace('#short_month', plxDate::getCalendar('short_month', $month), $format);
- $format = str_replace('#month', plxDate::getCalendar('month', $month), $format);
- $format = str_replace('#num_day(1)', intval($day), $format);
- $format = str_replace('#num_day(2)', $day, $format);
- $format = str_replace('#num_day', $day, $format);
- $format = str_replace('#num_month', $month, $format);
- $format = str_replace('#num_year(2)', $year2 , $format);
- $format = str_replace('#num_year(4)', $year4 , $format);
- return $format;
- }
-
- /**
- * Méthode qui convertis un timestamp en date/time
- *
- * @param timestamp timstamp au format unix
- * @return string date au format YYYYMMDDHHMM
- * @author Stephane F.
- **/
- public static function timestamp2Date($timestamp) {
-
- return date('YmdHi', $timestamp);
-
- }
-
- /**
- * Méthode qui éclate une date au format YYYYMMDDHHMM dans un tableau
- *
- * @param date date au format YYYYMMDDHHMM
- * @return array tableau contenant le détail de la date
- * @author Stephane F.
- **/
- public static function date2Array($date) {
-
- preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})([0-9:]{2})([0-9:]{2})/',$date,$capture);
- return array (
- 'year' => $capture[1],
- 'month' => $capture[2],
- 'day' => $capture[3],
- 'hour' => $capture[4],
- 'minute'=> $capture[5],
- 'time' => $capture[4].':'.$capture[5]
- );
- }
-
- /**
- * Méthode qui vérifie la validité de la date et de l'heure
- *
- * @param int mois
- * @param int jour
- * @param int année
- * @param int heure:minute
- * @return boolean vrai si la date est valide
- * @author Amaury Graillat
- **/
- public static function checkDate($day, $month, $year, $time) {
-
- return (preg_match("/^(0[1-9]|[1-2][0-9]|3[0-1])(0[1-9]|1[0-2])[1-2][0-9]{3}([0-1][0-9]|2[0-3])\:[0-5][0-9]$/",$day.$month.$year.$time)
- AND checkdate($month, $day, $year));
-
- }
-
- /**
- * Fonction de conversion de date ISO en format RFC822
- *
- * @param date date à convertir
- * @return string date au format iso.
- * @author Amaury GRAILLAT
- **/
- public static function dateIso2rfc822($date) {
-
- $tmpDate = plxDate::date2Array($date);
- return date(DATE_RSS, mktime(substr($tmpDate['time'],0,2), substr($tmpDate['time'],3,2), 0, $tmpDate['month'], $tmpDate['day'], $tmpDate['year']));
- }
-
-}
+ L_JANUARY,
+ '02' => L_FEBRUARY,
+ '03' => L_MARCH,
+ '04' => L_APRIL,
+ '05' => L_MAY,
+ '06' => L_JUNE,
+ '07' => L_JULY,
+ '08' => L_AUGUST,
+ '09' => L_SEPTEMBER,
+ '10' => L_OCTOBER,
+ '11' => L_NOVEMBER,
+ '12' => L_DECEMBER);
+ $aShortMonth = array(
+ '01' => L_SHORT_JANUARY,
+ '02' => L_SHORT_FEBRUARY,
+ '03' => L_SHORT_MARCH,
+ '04' => L_SHORT_APRIL,
+ '05' => L_SHORT_MAY,
+ '06' => L_SHORT_JUNE,
+ '07' => L_SHORT_JULY,
+ '08' => L_SHORT_AUGUST,
+ '09' => L_SHORT_SEPTEMBER,
+ '10' => L_SHORT_OCTOBER,
+ '11' => L_SHORT_NOVEMBER,
+ '12' => L_SHORT_DECEMBER);
+ $aDay = array(
+ '1' => L_MONDAY,
+ '2' => L_TUESDAY,
+ '3' => L_WEDNESDAY,
+ '4' => L_THURSDAY,
+ '5' => L_FRIDAY,
+ '6' => L_SATURDAY,
+ '0' => L_SUNDAY);
+
+ switch ($key) {
+ case 'day':
+ $day = isset($aDay[$value]) ? $aDay[$value] : '';
+ return $day; break;
+ case 'month':
+ $month = isset($aMonth[$value]) ? $aMonth[$value] : '';
+ return $month; break;
+ case 'short_month':
+ $short_month = isset($aShortMonth[$value]) ? $aShortMonth[$value] : '';
+ return $short_month; break;
+ }
+ }
+
+ /**
+ * Méthode qui formate l'affichage d'une date
+ *
+ * @param date date/heure au format YYYYMMDDHHMM
+ * @param format format d'affichage
+ * @return string date/heure formatée
+ * @author Stephane F.
+ **/
+ public static function formatDate($date, $format='#num_day/#num_month/#num_year(4)') {
+
+ # On decoupe notre date
+ $year4 = substr($date, 0, 4);
+ $year2 = substr($date, 2, 2);
+ $month = substr($date, 4, 2);
+ $day = substr($date, 6, 2);
+ $day_num = date('w',mktime(0,0,0,intval($month),intval($day),intval($year4)));
+ $hour = substr($date,8,2);
+ $minute = substr($date,10,2);
+
+ # On retourne notre date au format humain
+ $format = str_replace('#time', $hour.':'.$minute, $format);
+ $format = str_replace('#minute', $minute, $format);
+ $format = str_replace('#hour', $hour, $format);
+ $format = str_replace('#day', plxDate::getCalendar('day', $day_num), $format);
+ $format = str_replace('#short_month', plxDate::getCalendar('short_month', $month), $format);
+ $format = str_replace('#month', plxDate::getCalendar('month', $month), $format);
+ $format = str_replace('#num_day(1)', intval($day), $format);
+ $format = str_replace('#num_day(2)', $day, $format);
+ $format = str_replace('#num_day', $day, $format);
+ $format = str_replace('#num_month', $month, $format);
+ $format = str_replace('#num_year(2)', $year2 , $format);
+ $format = str_replace('#num_year(4)', $year4 , $format);
+ return $format;
+ }
+
+ /**
+ * Méthode qui convertis un timestamp en date/time
+ *
+ * @param timestamp timstamp au format unix
+ * @return string date au format YYYYMMDDHHMM
+ * @author Stephane F.
+ **/
+ public static function timestamp2Date($timestamp) {
+
+ return date('YmdHi', $timestamp);
+
+ }
+
+ /**
+ * Méthode qui éclate une date au format YYYYMMDDHHMM dans un tableau
+ *
+ * @param date date au format YYYYMMDDHHMM
+ * @return array tableau contenant le détail de la date
+ * @author Stephane F.
+ **/
+ public static function date2Array($date) {
+
+ preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})([0-9:]{2})([0-9:]{2})/',$date,$capture);
+ return array (
+ 'year' => $capture[1],
+ 'month' => $capture[2],
+ 'day' => $capture[3],
+ 'hour' => $capture[4],
+ 'minute'=> $capture[5],
+ 'time' => $capture[4].':'.$capture[5]
+ );
+ }
+
+ /**
+ * Méthode qui vérifie la validité de la date et de l'heure
+ *
+ * @param int mois
+ * @param int jour
+ * @param int année
+ * @param int heure:minute
+ * @return boolean vrai si la date est valide
+ * @author Amaury Graillat
+ **/
+ public static function checkDate($day, $month, $year, $time) {
+
+ return (preg_match("/^(0[1-9]|[1-2][0-9]|3[0-1])(0[1-9]|1[0-2])[1-2][0-9]{3}([0-1][0-9]|2[0-3])\:[0-5][0-9]$/",$day.$month.$year.$time)
+ AND checkdate($month, $day, $year));
+
+ }
+
+ /**
+ * Fonction de conversion de date ISO en format RFC822
+ *
+ * @param date date à convertir
+ * @return string date au format iso.
+ * @author Amaury GRAILLAT
+ **/
+ public static function dateIso2rfc822($date) {
+
+ $tmpDate = plxDate::date2Array($date);
+ return date(DATE_RSS, mktime(substr($tmpDate['time'],0,2), substr($tmpDate['time'],3,2), 0, $tmpDate['month'], $tmpDate['day'], $tmpDate['year']));
+ }
+
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.glob.php b/core/lib/class.plx.glob.php
index 0a72197bf..20289b609 100644
--- a/core/lib/class.plx.glob.php
+++ b/core/lib/class.plx.glob.php
@@ -1,231 +1,231 @@
-dir = $dir;
- $this->rep = $rep;
- $this->onlyfilename = $onlyfilename;
- $this->initCache($type);
- }
-
- /**
- * Méthode qui se charger de créer le Singleton plxGlob
- *
- * @param dir répertoire à lire
- * @param rep boolean pour ne prendre que les répertoires sans les fichiers
- * @param onlyfilename boolean pour ne récupérer que le nom des fichiers sans le chemin
- * @param type type de fichier lus (arts ou '')
- * @return objet return une instance de la classe plxGlob
- * @author Stephane F
- **/
- public static function getInstance($dir,$rep=false,$onlyfilename=true,$type=''){
- $basename = str_replace(PLX_ROOT, '', $dir);
- if (!isset(self::$instance[$basename]))
- self::$instance[$basename] = new plxGlob($dir,$rep,$onlyfilename,$type);
- return self::$instance[$basename];
- }
-
- /**
- * Méthode qui se charger de mémoriser le contenu d'un dossier
- *
- * @param type type de fichier lus (arts ou '')
- * @return null
- * @author Amaury Graillat et Stephane F
- **/
- private function initCache($type='') {
-
- if(is_dir($this->dir)) {
- # On ouvre le repertoire
- if($dh = opendir($this->dir)) {
- # Récupération du dirname
- if($this->onlyfilename) # On recupere uniquement le nom du fichier
- $dirname = '';
- else # On concatene egalement le nom du repertoire
- $dirname = $this->dir;
- # Pour chaque entree du repertoire
- while(false !== ($file = readdir($dh))) {
- if($file[0]!='.') {
- $dir = is_dir($this->dir.'/'.$file);
- if($this->rep AND $dir) {
- $this->aFiles[] = $dirname.$file;
- }
- elseif(!$this->rep AND !$dir) {
- if($type=='arts') {
- $index = str_replace('_','',substr($file, 0,strpos($file,'.')));
- if(is_numeric($index)) {
- $this->aFiles[$index] = $file;
- }
- } else {
- $this->aFiles[] = $file;
- }
- }
- }
- }
- # On ferme la ressource sur le repertoire
- closedir($dh);
- }
- }
- }
-
- /**
- * Méthode qui cherche les fichiers correspondants au motif $motif
- *
- * @param motif motif de recherche des fichiers sous forme d'expression réguliere
- * @param type type de recherche: article ('art'), commentaire ('com') ou autre (''))
- * @param tri type de tri (sort, rsort, alpha, ralpha)
- * @param publi recherche des fichiers avant ou après la date du jour
- * @return array ou false
- * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F
- **/
- private function search($motif,$type,$tri,$publi) {
-
- $array=array();
- $this->count = 0;
-
- if($this->aFiles) {
-
- # Pour chaque entree du repertoire
- foreach ($this->aFiles as $file) {
-
- if(preg_match($motif,$file)) {
-
- if($type === 'art') { # Tri selon les dates de publication (article)
- # On decoupe le nom du fichier
- $index = explode('.',$file);
- # On cree un tableau associatif en choisissant bien nos cles et en verifiant la date de publication
- $key = ($tri === 'alpha' OR $tri === 'ralpha') ? $index[4].'~'.$index[0] : $index[3].$index[0];
- if($publi === 'before' AND $index[3] <= date('YmdHi'))
- $array[$key] = $file;
- elseif($publi === 'after' AND $index[3] >= date('YmdHi'))
- $array[$key] = $file;
- elseif($publi === 'all')
- $array[$key] = $file;
- # On verifie que l'index existe
- if(isset($array[$key]))
- $this->count++; # On incremente le compteur
- }
- elseif($type === 'com') { # Tri selon les dates de publications (commentaire)
- # On decoupe le nom du fichier
- $index = explode('.',$file);
- # On cree un tableau associatif en choisissant bien nos cles et en verifiant la date de publication
- if($publi === 'before' AND $index[1] <= time())
- $array[ $index[1].$index[0] ] = $file;
- elseif($publi === 'after' AND $index[1] >= time())
- $array[ $index[1].$index[0] ] = $file;
- elseif($publi === 'all')
- $array[ $index[1].$index[0] ] = $file;
- # On verifie que l'index existe
- if(isset($array[ $index[1].$index[0] ]))
- $this->count++; # On incremente le compteur
- }
- else { # Aucun tri
- $array[] = $file;
- # On incremente le compteur
- $this->count++;
- }
- }
- }
- }
-
- # On retourne le tableau si celui-ci existe
- if($this->count > 0)
- return $array;
- else
- return false;
- }
-
- /**
- * Méthode qui retourne un tableau trié, des fichiers correspondants
- * au motif $motif, respectant les différentes limites
- *
- * @param motif motif de recherche des fichiers sous forme d'expression régulière
- * @param type type de recherche: article ('art'), commentaire ('com') ou autre (''))
- * @param tri type de tri (sort, rsort, alpha, random)
- * @param depart indice de départ de la sélection
- * @param limite nombre d'éléments à sélectionner
- * @param publi recherche des fichiers avant ou après la date du jour
- * @return array ou false
- * @author Anthony GUÉRIN et Florent MONTHEL
- **/
- public function query($motif,$type='',$tri='',$depart='0',$limite=false,$publi='all') {
-
- # Si on a des résultats
- if($rs = $this->search($motif,$type,$tri,$publi)) {
-
- # Ordre de tri du tableau
- if ($type != '') {
- switch ($tri) {
- case 'random':
- shuffle($rs);
- break;
- case 'alpha':
- case 'asc':
- case 'sort':
- ksort($rs);
- break;
- case 'ralpha':
- case 'desc':
- case 'rsort':
- krsort($rs);
- break;
- default:
- }
- } else {
- switch ($tri) {
- case 'random':
- shuffle($rs);
- break;
- case 'alpha':
- case 'sort':
- sort($rs);
- break;
- case 'ralpha':
- case 'rsort':
- rsort($rs);
- break;
- default:
- }
- }
-
- # On enlève les clés du tableau
- $rs = array_values($rs);
- # On a une limite, on coupe le tableau
- if($limite)
- $rs = array_slice($rs,$depart,$limite);
- # On retourne le tableau
- return $rs;
- }
- # On retourne une valeur négative
- return false;
- }
-
-}
+dir = $dir;
+ $this->rep = $rep;
+ $this->onlyfilename = $onlyfilename;
+ $this->initCache($type);
+ }
+
+ /**
+ * Méthode qui se charger de créer le Singleton plxGlob
+ *
+ * @param dir répertoire à lire
+ * @param rep boolean pour ne prendre que les répertoires sans les fichiers
+ * @param onlyfilename boolean pour ne récupérer que le nom des fichiers sans le chemin
+ * @param type type de fichier lus (arts ou '')
+ * @return objet return une instance de la classe plxGlob
+ * @author Stephane F
+ **/
+ public static function getInstance($dir,$rep=false,$onlyfilename=true,$type=''){
+ $basename = str_replace(PLX_ROOT, '', $dir);
+ if (!isset(self::$instance[$basename]))
+ self::$instance[$basename] = new plxGlob($dir,$rep,$onlyfilename,$type);
+ return self::$instance[$basename];
+ }
+
+ /**
+ * Méthode qui se charger de mémoriser le contenu d'un dossier
+ *
+ * @param type type de fichier lus (arts ou '')
+ * @return null
+ * @author Amaury Graillat et Stephane F
+ **/
+ private function initCache($type='') {
+
+ if(is_dir($this->dir)) {
+ # On ouvre le repertoire
+ if($dh = opendir($this->dir)) {
+ # Récupération du dirname
+ if($this->onlyfilename) # On recupere uniquement le nom du fichier
+ $dirname = '';
+ else # On concatene egalement le nom du repertoire
+ $dirname = $this->dir;
+ # Pour chaque entree du repertoire
+ while(false !== ($file = readdir($dh))) {
+ if($file[0]!='.') {
+ $dir = is_dir($this->dir.'/'.$file);
+ if($this->rep AND $dir) {
+ $this->aFiles[] = $dirname.$file;
+ }
+ elseif(!$this->rep AND !$dir) {
+ if($type=='arts') {
+ $index = str_replace('_','',substr($file, 0,strpos($file,'.')));
+ if(is_numeric($index)) {
+ $this->aFiles[$index] = $file;
+ }
+ } else {
+ $this->aFiles[] = $file;
+ }
+ }
+ }
+ }
+ # On ferme la ressource sur le repertoire
+ closedir($dh);
+ }
+ }
+ }
+
+ /**
+ * Méthode qui cherche les fichiers correspondants au motif $motif
+ *
+ * @param motif motif de recherche des fichiers sous forme d'expression réguliere
+ * @param type type de recherche: article ('art'), commentaire ('com') ou autre (''))
+ * @param tri type de tri (sort, rsort, alpha, ralpha)
+ * @param publi recherche des fichiers avant ou après la date du jour
+ * @return array ou false
+ * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F
+ **/
+ private function search($motif,$type,$tri,$publi) {
+
+ $array=array();
+ $this->count = 0;
+
+ if($this->aFiles) {
+
+ # Pour chaque entree du repertoire
+ foreach ($this->aFiles as $file) {
+
+ if(preg_match($motif,$file)) {
+
+ if($type === 'art') { # Tri selon les dates de publication (article)
+ # On decoupe le nom du fichier
+ $index = explode('.',$file);
+ # On cree un tableau associatif en choisissant bien nos cles et en verifiant la date de publication
+ $key = ($tri === 'alpha' OR $tri === 'ralpha') ? $index[4].'~'.$index[0] : $index[3].$index[0];
+ if($publi === 'before' AND $index[3] <= date('YmdHi'))
+ $array[$key] = $file;
+ elseif($publi === 'after' AND $index[3] >= date('YmdHi'))
+ $array[$key] = $file;
+ elseif($publi === 'all')
+ $array[$key] = $file;
+ # On verifie que l'index existe
+ if(isset($array[$key]))
+ $this->count++; # On incremente le compteur
+ }
+ elseif($type === 'com') { # Tri selon les dates de publications (commentaire)
+ # On decoupe le nom du fichier
+ $index = explode('.',$file);
+ # On cree un tableau associatif en choisissant bien nos cles et en verifiant la date de publication
+ if($publi === 'before' AND $index[1] <= time())
+ $array[ $index[1].$index[0] ] = $file;
+ elseif($publi === 'after' AND $index[1] >= time())
+ $array[ $index[1].$index[0] ] = $file;
+ elseif($publi === 'all')
+ $array[ $index[1].$index[0] ] = $file;
+ # On verifie que l'index existe
+ if(isset($array[ $index[1].$index[0] ]))
+ $this->count++; # On incremente le compteur
+ }
+ else { # Aucun tri
+ $array[] = $file;
+ # On incremente le compteur
+ $this->count++;
+ }
+ }
+ }
+ }
+
+ # On retourne le tableau si celui-ci existe
+ if($this->count > 0)
+ return $array;
+ else
+ return false;
+ }
+
+ /**
+ * Méthode qui retourne un tableau trié, des fichiers correspondants
+ * au motif $motif, respectant les différentes limites
+ *
+ * @param motif motif de recherche des fichiers sous forme d'expression régulière
+ * @param type type de recherche: article ('art'), commentaire ('com') ou autre (''))
+ * @param tri type de tri (sort, rsort, alpha, random)
+ * @param depart indice de départ de la sélection
+ * @param limite nombre d'éléments à sélectionner
+ * @param publi recherche des fichiers avant ou après la date du jour
+ * @return array ou false
+ * @author Anthony GUÉRIN et Florent MONTHEL
+ **/
+ public function query($motif,$type='',$tri='',$depart='0',$limite=false,$publi='all') {
+
+ # Si on a des résultats
+ if($rs = $this->search($motif,$type,$tri,$publi)) {
+
+ # Ordre de tri du tableau
+ if ($type != '') {
+ switch ($tri) {
+ case 'random':
+ shuffle($rs);
+ break;
+ case 'alpha':
+ case 'asc':
+ case 'sort':
+ ksort($rs);
+ break;
+ case 'ralpha':
+ case 'desc':
+ case 'rsort':
+ krsort($rs);
+ break;
+ default:
+ }
+ } else {
+ switch ($tri) {
+ case 'random':
+ shuffle($rs);
+ break;
+ case 'alpha':
+ case 'sort':
+ sort($rs);
+ break;
+ case 'ralpha':
+ case 'rsort':
+ rsort($rs);
+ break;
+ default:
+ }
+ }
+
+ # On enlève les clés du tableau
+ $rs = array_values($rs);
+ # On a une limite, on coupe le tableau
+ if($limite)
+ $rs = array_slice($rs,$depart,$limite);
+ # On retourne le tableau
+ return $rs;
+ }
+ # On retourne une valeur négative
+ return false;
+ }
+
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.msg.php b/core/lib/class.plx.msg.php
index 12bb77cff..fe0dc4b50 100644
--- a/core/lib/class.plx.msg.php
+++ b/core/lib/class.plx.msg.php
@@ -1,52 +1,52 @@
-'.$_SESSION['error'].'
';
- elseif(isset($_SESSION['info']) AND !empty($_SESSION['info']))
- echo ''.$_SESSION['info'].'
';
- unset($_SESSION['error']);
- unset($_SESSION['info']);
- }
-}
+'.$_SESSION['error'].'';
+ elseif(isset($_SESSION['info']) AND !empty($_SESSION['info']))
+ echo ''.$_SESSION['info'].'
';
+ unset($_SESSION['error']);
+ unset($_SESSION['info']);
+ }
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.plugins.php b/core/lib/class.plx.plugins.php
index 5180525b1..048078e55 100644
--- a/core/lib/class.plx.plugins.php
+++ b/core/lib/class.plx.plugins.php
@@ -1,697 +1,697 @@
-default_lang=$default_lang;
- }
-
- /**
- * Méthode qui renvoit une instance d'un plugin
- *
- * @param plugName nom du plugin
- * @return object object de type plxPlugin / false en cas d'erreur
- * @return null
- * @author Stephane F
- **/
- public function getInstance($plugName) {
- $filename = PLX_PLUGINS.$plugName.'/'.$plugName.'.php';
- if(is_file($filename)) {
- include_once($filename);
- if (class_exists($plugName)) {
- # réactualisation de la langue si elle a été modifié par un plugin
- $context = defined('PLX_ADMIN') ? 'admin_lang' : 'lang';
- $lang = isset($_SESSION[$context]) ? $_SESSION[$context] : $this->default_lang;
- # chargement du plugin en créant une nouvelle instance
- return new $plugName($lang);
- }
- }
- return false;
- }
-
- /**
- * Méthode qui charge le fichier plugins.xml
- *
- * @return null
- * @author Stephane F
- **/
- public function loadPlugins() {
-
- if(!is_file(path('XMLFILE_PLUGINS'))) return;
-
- $updAction = false;
-
- # Mise en place du parseur XML
- $data = implode('',file(path('XMLFILE_PLUGINS')));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- # On verifie qu'il existe des tags "plugin"
- if(isset($iTags['plugin'])) {
- # On compte le nombre de tags "plugin"
- $nb = sizeof($iTags['plugin']);
- # On boucle sur $nb
- for($i = 0; $i < $nb; $i++) {
- $name = $values[$iTags['plugin'][$i] ]['attributes']['name'];
- if($instance=$this->getInstance($name)) {
- $this->aPlugins[$name] = $instance;
- $this->aHooks = array_merge_recursive($this->aHooks, $instance->getHooks());
- # Si le plugin a une méthode pour des actions de mises à jour
- if(method_exists($instance, 'onUpdate')) {
- if(is_file(PLX_PLUGINS.$name.'/update')) {
- # on supprime le fichier update pour eviter d'appeler la methode onUpdate
- # à chaque chargement du plugin
- chmod(PLX_PLUGINS.$name.'/update', 0644);
- unlink(PLX_PLUGINS.$name.'/update');
- $updAction = $instance->onUpdate();
- }
- }
- }
- }
- }
-
- if($updAction) {
- if(isset($updAction['cssCache']) AND $updAction['cssCache']==true) {
- $this->cssCache('admin');
- $this->cssCache('site');
- }
- }
- }
-
- /**
- * Méthode qui execute les hooks des plugins
- *
- * @param hookname nom du hook à appliquer
- * @param parms parametre ou liste de paramètres sous forme de array
- * @return null
- * @author Stephane F
- **/
- public function callHook($hookName, $parms=null) {
- if(isset($this->aHooks[$hookName])) {
- ob_start();
- foreach($this->aHooks[$hookName] as $callback) {
- if($callback['class']=='=SHORTCODE=') {
- echo $callback['method'];
- } else {
- $return = $this->aPlugins[$callback['class']]->{$callback['method']}($parms);
- }
- }
- if(isset($return))
- return array('?>'.ob_get_clean().''.ob_get_clean().'aPlugins as $plugName => $plugInstance) {
- $plugInstance->getInfos();
- }
- }
-
- /**
- * Méthode qui renvoie la liste des plugins inactifs
- *
- * @return array liste des plugins inactifs
- * @author Stephane F
- **/
- public function getInactivePlugins() {
-
- $aPlugins = array();
- $dirs = plxGlob::getInstance(PLX_PLUGINS, true);
- if(sizeof($dirs->aFiles)>0) {
- foreach($dirs->aFiles as $plugName) {
- if(!isset($this->aPlugins[$plugName]) AND $plugInstance=$this->getInstance($plugName)) {
- $plugInstance->getInfos();
- $aPlugins[$plugName] = $plugInstance;
- }
- }
- }
- ksort($aPlugins);
- return $aPlugins;
- }
-
- /**
- * Méthode qui sauvegarde le fichier plugins.xml et qui génère les fichiers admin.css et site.css des plugins
- *
- * @param content array content $_POST
- * @return boolean resultat de la sauvegarde / TRUE = ok
- * @author Stephane F
- **/
- public function saveConfig($content) {
-
- # activation des plugins
- if(isset($content['selection']) AND $content['selection']=='activate' AND empty($content['update'])) {
- foreach($content['chkAction'] as $idx => $plugName) {
- if($plugInstance = $this->getInstance($plugName)) {
- if(method_exists($plugName, 'OnActivate'))
- $plugInstance->OnActivate();
- $this->aPlugins[$plugName] = $plugInstance;
- }
- }
- }
- # désactivation des plugins
- elseif(isset($content['selection']) AND $content['selection']=='deactivate' AND empty($content['update'])) {
- foreach($content['chkAction'] as $idx => $plugName) {
- if($plugInstance = $this->aPlugins[$plugName]) {
- if(method_exists($plugName, 'OnDeActivate'))
- $plugInstance->OnDeActivate();
- unset($this->aPlugins[$plugName]);
- }
- }
- }
- # suppression des plugins
- elseif(isset($content['selection']) AND $content['selection']=='delete' AND empty($content['update'])) {
- foreach($content['chkAction'] as $idx => $plugName) {
- if($this->deleteDir(realpath(PLX_PLUGINS.$plugName))) {
- # suppression fichier de config du plugin
- if(is_file(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.xml'))
- unlink(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.xml');
- # suppression fichier site.css du plugin
- if(is_file(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.site.css'))
- unlink(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.site.css');
- # suppression fichier admin.css du plugin
- if(is_file(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.admin.css'))
- unlink(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.admin.css');
- unset($this->aPlugins[$plugName]);
- }
- }
- }
- # tri des plugins par ordre de chargement
- elseif(isset($content['update'])) {
- $aPlugins = array();
- asort($content['plugOrdre']);
- foreach($content['plugOrdre'] as $plugName => $idx) {
- $aPlugins[$plugName] = $this->aPlugins[$plugName];
- }
- $this->aPlugins = $aPlugins;
- }
-
- # génération du cache css des plugins
- $this->cssCache('site');
- $this->cssCache('admin');
-
- # Début du fichier XML
- $xml = "\n";
- $xml .= "\n";
- foreach($this->aPlugins as $k=>$v) {
- $xml .= "\t \n";
- }
- $xml .= " ";
-
- # On écrit le fichier
- if(plxUtils::write($xml,path('XMLFILE_PLUGINS')))
- return plxMsg::Info(L_SAVE_SUCCESSFUL);
- else
- return plxMsg::Error(L_SAVE_ERR.' '.path('XMLFILE_PLUGINS'));
-
- }
-
- /**
- * Méthode récursive qui supprime tous les dossiers et les fichiers d'un répertoire
- *
- * @param deldir répertoire de suppression
- * @return boolean résultat de la suppression
- * @author Stephane F
- **/
- public function deleteDir($deldir) { #fonction récursive
-
- if(is_dir($deldir) AND !is_link($deldir)) {
- if($dh = opendir($deldir)) {
- while(FALSE !== ($file = readdir($dh))) {
- if($file != '.' AND $file != '..') {
- $this->deleteDir(($deldir!='' ? $deldir.'/' : '').$file);
- }
- }
- closedir($dh);
- }
- return rmdir($deldir);
- }
- return unlink($deldir);
- }
-
- /**
- * Méthode qui génère le fichier css admin.css ou site.css
- *
- * @param type type du fichier (admin|site)
- * @return boolean vrai si cache généré
- * @author Stephane F
- **/
- public function cssCache($type) {
-
- $cache = '';
- foreach($this->aPlugins as $plugName => $plugInstance) {
- $filename = PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.'.$type.'.css';
- if(is_file($filename)) {
- $cache .= trim(file_get_contents($filename));
- } else {
- $filename = PLX_PLUGINS.$plugName.'/css/'.$type.'.css';
- if(is_file($filename)) {
- $cache .= trim(file_get_contents($filename));
- }
- }
- }
- if(is_file(PLX_PLUGINS.$type.'.css'))
- unlink(PLX_PLUGINS.$type.'.css');
- if($cache!='') {
- return plxUtils::write(plxUtils::minify($cache), PLX_PLUGINS.$type.'.css');
- }
- return true;
- }
-}
-
-/**
- * Classe plxPlugin destiné à créer un plugin
- *
- * @package PLX
- * @author Stephane F
- **/
-class plxPlugin {
-
- protected $aInfos=array(); # tableau des infos sur le plugins venant du fichier infos.xml
- protected $aParams=array(); # tableau des paramètres sur le plugins venant du fichier parameters.xml
- protected $aHooks=array(); # tableau des hooks du plugin
- protected $aLang=array(); # tableau contenant les clés de traduction de la langue courante de PluXml
-
- protected $plug=array(); # tableau contenant des infos diverses pour le fonctionnement du plugin
- protected $adminProfil=''; # profil(s) utilisateur(s) autorisé(s) à acceder à la page admin.php du plugin
- protected $configProfil=''; # profil(s) utilisateur(s) autorisé(s) à acceder à la page config.php du plugin
-
- public $default_lang=DEFAULT_LANG; # langue par defaut de PluXml
- public $adminMenu=false; # infos de customisation du menu pour accèder à la page admin.php du plugin
-
- /**
- * Constructeur de la classe plxPlugin
- *
- * @param default_lang langue par défaut utilisée par PluXml
- * @return null
- * @author Stephane F
- **/
- public function __construct($default_lang='') {
-
- $plugName= get_class($this);
- $this->getPluginLang($plugName, $default_lang);
- $this->plug = array(
- 'dir' => PLX_PLUGINS,
- 'name' => $plugName,
- 'filename' => PLX_PLUGINS.$plugName.'/'.$plugName.'.php',
- 'parameters.xml'=> PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.xml',
- 'infos.xml' => PLX_PLUGINS.$plugName.'/infos.xml'
- );
- $this->loadParams();
- if(defined('PLX_ADMIN'))
- $this->getInfos();
-
- }
-
- /**
- * Méthode qui charge le fichier de langue du plugin
- * Si la langue par défaut n'est pas disponible on tente de charger le fr.php sinon on prend le 1er fichier de langue dispo
- *
- * @param default_lang langue par défaut utilisée par PluXml
- * @return null
- * @author Stephane F
- **/
-
- public function getPluginLang($plugName, $lang) {
-
- $dirname = PLX_PLUGINS.$plugName.'/lang/';
-
- if(is_dir($dirname)) {
-
- $filename = $dirname.$lang.'.php';
-
- if(!is_file($filename)) {
- if(is_file($dirname.'fr.php'))
- $lang = 'fr';
- else {
- if($dh = opendir($dirname)) {
- while(false !== ($file = readdir($dh))) {
- if(preg_match('/^([a-zA-Z]{2})\.php$/', $file, $capture)) {
- $lang = $capture[1];
- break;
- }
- }
- }
- closedir($dh);
- }
- }
- }
-
- $this->default_lang = $lang;
- $this->aLang = $this->loadLang(PLX_PLUGINS.$plugName.'/lang/'.$this->default_lang.'.php');
-
- }
-
- /**
- * Méthode qui renvoit le(s) profil(s) utilisateur(s) autorisé(s) à acceder à la page admin.php du plugin
- *
- * @return string profil(s) utilisateur(s)
- * @author Stephane F
- **/
- public function getAdminProfil() {
- return $this->adminProfil;
- }
-
- /**
- * Méthode qui mémorise le(s) profil(s) utilisateur(s) autorisé(s) à acceder à la page admin.php du plugin
- *
- * @param profil profil(s) (PROFIL_ADMIN, PROFIL_MANAGER, PROFIL_MODERATOR, PROFIL_EDITOR, PROFIL_WRITER)
- * @return null
- * @author Stephane F
- **/
- public function setAdminProfil($profil) {
- $this->adminProfil=func_get_args();
- }
-
- /**
- * Méthode qui permet de personnaliser le menu qui permet d'acceder à la page admin.php du plugin
- *
- * @param title titre du menu
- * @param position position du menu dans la sidebar
- * @param caption légende du menu (balise title du lien)
- * @return null
- * @author Stephane F
- **/
- public function setAdminMenu($title='', $position='', $caption='') {
- $this->adminMenu = array(
- 'title'=>$title,
- 'position'=>($position==''?false:$position),
- 'caption'=>($caption==''?$title:$caption)
- );
- }
-
- /**
- * Méthode qui renvoit le(s) profil(s) utilisateur(s) autorisé(s) à accéder à la page config.php du plugin
- *
- * @return string profil(s) utilisateur(s)
- * @author Stephane F
- **/
- public function getConfigProfil() {
- return $this->configProfil;
- }
-
- /**
- * Méthode qui mémorise le(s) profil(s) utilisateur(s) autorisé(s) à accéder à la page config.php du plugin
- *
- * @param profil profil(s) (PROFIL_ADMIN, PROFIL_MANAGER, PROFIL_MODERATOR, PROFIL_EDITOR, PROFIL_WRITER)
- * @return null
- * @author Stephane F
- **/
- public function setConfigProfil($profil) {
- $this->configProfil=func_get_args();
- }
-
- /**
- * Méthode qui retourne les hooks définis dans le plugin
- *
- * @return array tableau des hooks du plugin
- * @author Stephane F
- **/
- public function getHooks() {
- return $this->aHooks;
- }
-
- /**
- * Méthode qui charge le fichier de langue par défaut du plugin
- *
- * @param filename fichier de langue à charger
- * @return array tableau contenant les clés de traduction
- * @author Stephane F
- **/
- public function loadLang($filename) {
- if(!is_file($filename)) return;
- include($filename);
- return $LANG;
- }
-
- /**
- * Méthode qui affiche une clé de traduction dans la langue par défaut de PluXml
- *
- * @param key clé de traduction à récuperer
- * @return stdio
- * @author Stephane F
- **/
- public function lang($key='') {
- if(isset($this->aLang[$key]))
- echo $this->aLang[$key];
- else
- echo $key;
- }
-
- /**
- * Méthode qui retourne une clé de traduction dans la langue par défaut de PluXml
- *
- * @param key clé de traduction à récuperer
- * @return string clé de traduite
- * @author Stephane F
- **/
- public function getLang($key='') {
- if(isset($this->aLang[$key]))
- return $this->aLang[$key];
- else
- return $key;
- }
-
- /**
- * Méthode qui charge le fichier des parametres du plugin parameters.xml
- *
- * @return null
- * @author Stephane F
- **/
- public function loadParams() {
-
- if(!is_file($this->plug['parameters.xml'])) return;
-
- # Mise en place du parseur XML
- $data = implode('',file($this->plug['parameters.xml']));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- # On verifie qu'il existe des tags "parameter"
- if(isset($iTags['parameter'])) {
- # On compte le nombre de tags "parameter"
- $nb = sizeof($iTags['parameter']);
- # On boucle sur $nb
- for($i = 0; $i < $nb; $i++) {
- if(isset($values[$iTags['parameter'][$i]]['attributes']['name'])) {
- $name=$values[$iTags['parameter'][$i]]['attributes']['name'];
- $type=isset($values[$iTags['parameter'][$i]]['attributes']['type'])?$values[$iTags['parameter'][$i]]['attributes']['type']:'numeric';
- $value=isset($values[$iTags['parameter'][$i]]['value'])?$value=$values[$iTags['parameter'][$i]]['value']:'';
- $this->aParams[$name] = array(
- 'type' => $type,
- 'value' => $value
- );
- }
- }
- }
- }
-
- /**
- * Méthode qui sauvegarde le fichier des parametres du plugin parameters.xml
- *
- * @return boolean resultat de la sauvegarde / TRUE = ok
- * @author Stephane F
- **/
- public function saveParams() {
-
- # Début du fichier XML
- $xml = "\n";
- $xml .= "\n";
- foreach($this->aParams as $k=>$v) {
- switch($v['type']) {
- case 'numeric':
- $xml .= "\t".intval($v['value'])." \n";
- break;
- case 'string':
- $xml .= "\t".plxUtils::cdataCheck(plxUtils::strCheck($v['value']))." \n";
- break;
- case 'cdata':
- $xml .= "\t \n";
- break;
- }
- }
- $xml .= " ";
-
- # On écrit le fichier
- if(plxUtils::write($xml,$this->plug['parameters.xml'])) {
- # suppression ancien fichier parameters.xml s'il existe encore (5.1.7+)
- if(file_exists($this->plug['dir'].$this->plug['name'].'/parameters.xml'))
- unlink($this->plug['dir'].$this->plug['name'].'/parameters.xml');
- return plxMsg::Info(L_SAVE_SUCCESSFUL);
- }
- else
- return plxMsg::Error(L_SAVE_ERR.' '.$this->plug['parameters.xml']);
- }
-
- /**
- * Méthode qui renvoie le tableau des paramètres
- *
- * @return array tableau aParams
- * @author Stephane F
- **/
- public function getParams() {
- if(sizeof($this->aParams)>0)
- return $this->aParams;
- else
- return false;
- }
-
- /**
- * Méthode qui renvoie la valeur d'un parametre du fichier parameters.xml
- *
- * @param param nom du parametre à recuperer
- * @return string valeur du parametre
- * @author Stephane F
- **/
- public function getParam($param) {
- return (isset($this->aParams[$param])? $this->aParams[$param]['value']:'');
- }
-
- /**
- * Méthode qui modifie la valeur d'un parametre du fichier parameters.xml
- *
- * @param param nom du parametre à recuperer
- * @param value valeur du parametre
- * @type type type du parametre (numeric, string, cdata)
- * @return null
- * @author Stephane F
- **/
- public function setParam($param, $value, $type=false) {
-
+default_lang=$default_lang;
+ }
+
+ /**
+ * Méthode qui renvoit une instance d'un plugin
+ *
+ * @param plugName nom du plugin
+ * @return object object de type plxPlugin / false en cas d'erreur
+ * @return null
+ * @author Stephane F
+ **/
+ public function getInstance($plugName) {
+ $filename = PLX_PLUGINS.$plugName.'/'.$plugName.'.php';
+ if(is_file($filename)) {
+ include_once($filename);
+ if (class_exists($plugName)) {
+ # réactualisation de la langue si elle a été modifié par un plugin
+ $context = defined('PLX_ADMIN') ? 'admin_lang' : 'lang';
+ $lang = isset($_SESSION[$context]) ? $_SESSION[$context] : $this->default_lang;
+ # chargement du plugin en créant une nouvelle instance
+ return new $plugName($lang);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Méthode qui charge le fichier plugins.xml
+ *
+ * @return null
+ * @author Stephane F
+ **/
+ public function loadPlugins() {
+
+ if(!is_file(path('XMLFILE_PLUGINS'))) return;
+
+ $updAction = false;
+
+ # Mise en place du parseur XML
+ $data = implode('',file(path('XMLFILE_PLUGINS')));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ # On verifie qu'il existe des tags "plugin"
+ if(isset($iTags['plugin'])) {
+ # On compte le nombre de tags "plugin"
+ $nb = sizeof($iTags['plugin']);
+ # On boucle sur $nb
+ for($i = 0; $i < $nb; $i++) {
+ $name = $values[$iTags['plugin'][$i] ]['attributes']['name'];
+ if($instance=$this->getInstance($name)) {
+ $this->aPlugins[$name] = $instance;
+ $this->aHooks = array_merge_recursive($this->aHooks, $instance->getHooks());
+ # Si le plugin a une méthode pour des actions de mises à jour
+ if(method_exists($instance, 'onUpdate')) {
+ if(is_file(PLX_PLUGINS.$name.'/update')) {
+ # on supprime le fichier update pour eviter d'appeler la methode onUpdate
+ # à chaque chargement du plugin
+ chmod(PLX_PLUGINS.$name.'/update', 0644);
+ unlink(PLX_PLUGINS.$name.'/update');
+ $updAction = $instance->onUpdate();
+ }
+ }
+ }
+ }
+ }
+
+ if($updAction) {
+ if(isset($updAction['cssCache']) AND $updAction['cssCache']==true) {
+ $this->cssCache('admin');
+ $this->cssCache('site');
+ }
+ }
+ }
+
+ /**
+ * Méthode qui execute les hooks des plugins
+ *
+ * @param hookname nom du hook à appliquer
+ * @param parms parametre ou liste de paramètres sous forme de array
+ * @return null
+ * @author Stephane F
+ **/
+ public function callHook($hookName, $parms=null) {
+ if(isset($this->aHooks[$hookName])) {
+ ob_start();
+ foreach($this->aHooks[$hookName] as $callback) {
+ if($callback['class']=='=SHORTCODE=') {
+ echo $callback['method'];
+ } else {
+ $return = $this->aPlugins[$callback['class']]->{$callback['method']}($parms);
+ }
+ }
+ if(isset($return))
+ return array('?>'.ob_get_clean().''.ob_get_clean().'aPlugins as $plugName => $plugInstance) {
+ $plugInstance->getInfos();
+ }
+ }
+
+ /**
+ * Méthode qui renvoie la liste des plugins inactifs
+ *
+ * @return array liste des plugins inactifs
+ * @author Stephane F
+ **/
+ public function getInactivePlugins() {
+
+ $aPlugins = array();
+ $dirs = plxGlob::getInstance(PLX_PLUGINS, true);
+ if(sizeof($dirs->aFiles)>0) {
+ foreach($dirs->aFiles as $plugName) {
+ if(!isset($this->aPlugins[$plugName]) AND $plugInstance=$this->getInstance($plugName)) {
+ $plugInstance->getInfos();
+ $aPlugins[$plugName] = $plugInstance;
+ }
+ }
+ }
+ ksort($aPlugins);
+ return $aPlugins;
+ }
+
+ /**
+ * Méthode qui sauvegarde le fichier plugins.xml et qui génère les fichiers admin.css et site.css des plugins
+ *
+ * @param content array content $_POST
+ * @return boolean resultat de la sauvegarde / TRUE = ok
+ * @author Stephane F
+ **/
+ public function saveConfig($content) {
+
+ # activation des plugins
+ if(isset($content['selection']) AND $content['selection']=='activate' AND empty($content['update'])) {
+ foreach($content['chkAction'] as $idx => $plugName) {
+ if($plugInstance = $this->getInstance($plugName)) {
+ if(method_exists($plugName, 'OnActivate'))
+ $plugInstance->OnActivate();
+ $this->aPlugins[$plugName] = $plugInstance;
+ }
+ }
+ }
+ # désactivation des plugins
+ elseif(isset($content['selection']) AND $content['selection']=='deactivate' AND empty($content['update'])) {
+ foreach($content['chkAction'] as $idx => $plugName) {
+ if($plugInstance = $this->aPlugins[$plugName]) {
+ if(method_exists($plugName, 'OnDeActivate'))
+ $plugInstance->OnDeActivate();
+ unset($this->aPlugins[$plugName]);
+ }
+ }
+ }
+ # suppression des plugins
+ elseif(isset($content['selection']) AND $content['selection']=='delete' AND empty($content['update'])) {
+ foreach($content['chkAction'] as $idx => $plugName) {
+ if($this->deleteDir(realpath(PLX_PLUGINS.$plugName))) {
+ # suppression fichier de config du plugin
+ if(is_file(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.xml'))
+ unlink(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.xml');
+ # suppression fichier site.css du plugin
+ if(is_file(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.site.css'))
+ unlink(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.site.css');
+ # suppression fichier admin.css du plugin
+ if(is_file(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.admin.css'))
+ unlink(PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.admin.css');
+ unset($this->aPlugins[$plugName]);
+ }
+ }
+ }
+ # tri des plugins par ordre de chargement
+ elseif(isset($content['update'])) {
+ $aPlugins = array();
+ asort($content['plugOrdre']);
+ foreach($content['plugOrdre'] as $plugName => $idx) {
+ $aPlugins[$plugName] = $this->aPlugins[$plugName];
+ }
+ $this->aPlugins = $aPlugins;
+ }
+
+ # génération du cache css des plugins
+ $this->cssCache('site');
+ $this->cssCache('admin');
+
+ # Début du fichier XML
+ $xml = "\n";
+ $xml .= "\n";
+ foreach($this->aPlugins as $k=>$v) {
+ $xml .= "\t \n";
+ }
+ $xml .= " ";
+
+ # On écrit le fichier
+ if(plxUtils::write($xml,path('XMLFILE_PLUGINS')))
+ return plxMsg::Info(L_SAVE_SUCCESSFUL);
+ else
+ return plxMsg::Error(L_SAVE_ERR.' '.path('XMLFILE_PLUGINS'));
+
+ }
+
+ /**
+ * Méthode récursive qui supprime tous les dossiers et les fichiers d'un répertoire
+ *
+ * @param deldir répertoire de suppression
+ * @return boolean résultat de la suppression
+ * @author Stephane F
+ **/
+ public function deleteDir($deldir) { #fonction récursive
+
+ if(is_dir($deldir) AND !is_link($deldir)) {
+ if($dh = opendir($deldir)) {
+ while(FALSE !== ($file = readdir($dh))) {
+ if($file != '.' AND $file != '..') {
+ $this->deleteDir(($deldir!='' ? $deldir.'/' : '').$file);
+ }
+ }
+ closedir($dh);
+ }
+ return rmdir($deldir);
+ }
+ return unlink($deldir);
+ }
+
+ /**
+ * Méthode qui génère le fichier css admin.css ou site.css
+ *
+ * @param type type du fichier (admin|site)
+ * @return boolean vrai si cache généré
+ * @author Stephane F
+ **/
+ public function cssCache($type) {
+
+ $cache = '';
+ foreach($this->aPlugins as $plugName => $plugInstance) {
+ $filename = PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.'.$type.'.css';
+ if(is_file($filename)) {
+ $cache .= trim(file_get_contents($filename));
+ } else {
+ $filename = PLX_PLUGINS.$plugName.'/css/'.$type.'.css';
+ if(is_file($filename)) {
+ $cache .= trim(file_get_contents($filename));
+ }
+ }
+ }
+ if(is_file(PLX_PLUGINS.$type.'.css'))
+ unlink(PLX_PLUGINS.$type.'.css');
+ if($cache!='') {
+ return plxUtils::write(plxUtils::minify($cache), PLX_PLUGINS.$type.'.css');
+ }
+ return true;
+ }
+}
+
+/**
+ * Classe plxPlugin destiné à créer un plugin
+ *
+ * @package PLX
+ * @author Stephane F
+ **/
+class plxPlugin {
+
+ protected $aInfos=array(); # tableau des infos sur le plugins venant du fichier infos.xml
+ protected $aParams=array(); # tableau des paramètres sur le plugins venant du fichier parameters.xml
+ protected $aHooks=array(); # tableau des hooks du plugin
+ protected $aLang=array(); # tableau contenant les clés de traduction de la langue courante de PluXml
+
+ protected $plug=array(); # tableau contenant des infos diverses pour le fonctionnement du plugin
+ protected $adminProfil=''; # profil(s) utilisateur(s) autorisé(s) à acceder à la page admin.php du plugin
+ protected $configProfil=''; # profil(s) utilisateur(s) autorisé(s) à acceder à la page config.php du plugin
+
+ public $default_lang=DEFAULT_LANG; # langue par defaut de PluXml
+ public $adminMenu=false; # infos de customisation du menu pour accèder à la page admin.php du plugin
+
+ /**
+ * Constructeur de la classe plxPlugin
+ *
+ * @param default_lang langue par défaut utilisée par PluXml
+ * @return null
+ * @author Stephane F
+ **/
+ public function __construct($default_lang='') {
+
+ $plugName= get_class($this);
+ $this->getPluginLang($plugName, $default_lang);
+ $this->plug = array(
+ 'dir' => PLX_PLUGINS,
+ 'name' => $plugName,
+ 'filename' => PLX_PLUGINS.$plugName.'/'.$plugName.'.php',
+ 'parameters.xml'=> PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.$plugName.'.xml',
+ 'infos.xml' => PLX_PLUGINS.$plugName.'/infos.xml'
+ );
+ $this->loadParams();
+ if(defined('PLX_ADMIN'))
+ $this->getInfos();
+
+ }
+
+ /**
+ * Méthode qui charge le fichier de langue du plugin
+ * Si la langue par défaut n'est pas disponible on tente de charger le fr.php sinon on prend le 1er fichier de langue dispo
+ *
+ * @param default_lang langue par défaut utilisée par PluXml
+ * @return null
+ * @author Stephane F
+ **/
+
+ public function getPluginLang($plugName, $lang) {
+
+ $dirname = PLX_PLUGINS.$plugName.'/lang/';
+
+ if(is_dir($dirname)) {
+
+ $filename = $dirname.$lang.'.php';
+
+ if(!is_file($filename)) {
+ if(is_file($dirname.'fr.php'))
+ $lang = 'fr';
+ else {
+ if($dh = opendir($dirname)) {
+ while(false !== ($file = readdir($dh))) {
+ if(preg_match('/^([a-zA-Z]{2})\.php$/', $file, $capture)) {
+ $lang = $capture[1];
+ break;
+ }
+ }
+ }
+ closedir($dh);
+ }
+ }
+ }
+
+ $this->default_lang = $lang;
+ $this->aLang = $this->loadLang(PLX_PLUGINS.$plugName.'/lang/'.$this->default_lang.'.php');
+
+ }
+
+ /**
+ * Méthode qui renvoit le(s) profil(s) utilisateur(s) autorisé(s) à acceder à la page admin.php du plugin
+ *
+ * @return string profil(s) utilisateur(s)
+ * @author Stephane F
+ **/
+ public function getAdminProfil() {
+ return $this->adminProfil;
+ }
+
+ /**
+ * Méthode qui mémorise le(s) profil(s) utilisateur(s) autorisé(s) à acceder à la page admin.php du plugin
+ *
+ * @param profil profil(s) (PROFIL_ADMIN, PROFIL_MANAGER, PROFIL_MODERATOR, PROFIL_EDITOR, PROFIL_WRITER)
+ * @return null
+ * @author Stephane F
+ **/
+ public function setAdminProfil($profil) {
+ $this->adminProfil=func_get_args();
+ }
+
+ /**
+ * Méthode qui permet de personnaliser le menu qui permet d'acceder à la page admin.php du plugin
+ *
+ * @param title titre du menu
+ * @param position position du menu dans la sidebar
+ * @param caption légende du menu (balise title du lien)
+ * @return null
+ * @author Stephane F
+ **/
+ public function setAdminMenu($title='', $position='', $caption='') {
+ $this->adminMenu = array(
+ 'title'=>$title,
+ 'position'=>($position==''?false:$position),
+ 'caption'=>($caption==''?$title:$caption)
+ );
+ }
+
+ /**
+ * Méthode qui renvoit le(s) profil(s) utilisateur(s) autorisé(s) à accéder à la page config.php du plugin
+ *
+ * @return string profil(s) utilisateur(s)
+ * @author Stephane F
+ **/
+ public function getConfigProfil() {
+ return $this->configProfil;
+ }
+
+ /**
+ * Méthode qui mémorise le(s) profil(s) utilisateur(s) autorisé(s) à accéder à la page config.php du plugin
+ *
+ * @param profil profil(s) (PROFIL_ADMIN, PROFIL_MANAGER, PROFIL_MODERATOR, PROFIL_EDITOR, PROFIL_WRITER)
+ * @return null
+ * @author Stephane F
+ **/
+ public function setConfigProfil($profil) {
+ $this->configProfil=func_get_args();
+ }
+
+ /**
+ * Méthode qui retourne les hooks définis dans le plugin
+ *
+ * @return array tableau des hooks du plugin
+ * @author Stephane F
+ **/
+ public function getHooks() {
+ return $this->aHooks;
+ }
+
+ /**
+ * Méthode qui charge le fichier de langue par défaut du plugin
+ *
+ * @param filename fichier de langue à charger
+ * @return array tableau contenant les clés de traduction
+ * @author Stephane F
+ **/
+ public function loadLang($filename) {
+ if(!is_file($filename)) return;
+ include($filename);
+ return $LANG;
+ }
+
+ /**
+ * Méthode qui affiche une clé de traduction dans la langue par défaut de PluXml
+ *
+ * @param key clé de traduction à récuperer
+ * @return stdio
+ * @author Stephane F
+ **/
+ public function lang($key='') {
+ if(isset($this->aLang[$key]))
+ echo $this->aLang[$key];
+ else
+ echo $key;
+ }
+
+ /**
+ * Méthode qui retourne une clé de traduction dans la langue par défaut de PluXml
+ *
+ * @param key clé de traduction à récuperer
+ * @return string clé de traduite
+ * @author Stephane F
+ **/
+ public function getLang($key='') {
+ if(isset($this->aLang[$key]))
+ return $this->aLang[$key];
+ else
+ return $key;
+ }
+
+ /**
+ * Méthode qui charge le fichier des parametres du plugin parameters.xml
+ *
+ * @return null
+ * @author Stephane F
+ **/
+ public function loadParams() {
+
+ if(!is_file($this->plug['parameters.xml'])) return;
+
+ # Mise en place du parseur XML
+ $data = implode('',file($this->plug['parameters.xml']));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ # On verifie qu'il existe des tags "parameter"
+ if(isset($iTags['parameter'])) {
+ # On compte le nombre de tags "parameter"
+ $nb = sizeof($iTags['parameter']);
+ # On boucle sur $nb
+ for($i = 0; $i < $nb; $i++) {
+ if(isset($values[$iTags['parameter'][$i]]['attributes']['name'])) {
+ $name=$values[$iTags['parameter'][$i]]['attributes']['name'];
+ $type=isset($values[$iTags['parameter'][$i]]['attributes']['type'])?$values[$iTags['parameter'][$i]]['attributes']['type']:'numeric';
+ $value=isset($values[$iTags['parameter'][$i]]['value'])?$value=$values[$iTags['parameter'][$i]]['value']:'';
+ $this->aParams[$name] = array(
+ 'type' => $type,
+ 'value' => $value
+ );
+ }
+ }
+ }
+ }
+
+ /**
+ * Méthode qui sauvegarde le fichier des parametres du plugin parameters.xml
+ *
+ * @return boolean resultat de la sauvegarde / TRUE = ok
+ * @author Stephane F
+ **/
+ public function saveParams() {
+
+ # Début du fichier XML
+ $xml = "\n";
+ $xml .= "\n";
+ foreach($this->aParams as $k=>$v) {
+ switch($v['type']) {
+ case 'numeric':
+ $xml .= "\t".intval($v['value'])." \n";
+ break;
+ case 'string':
+ $xml .= "\t".plxUtils::cdataCheck(plxUtils::strCheck($v['value']))." \n";
+ break;
+ case 'cdata':
+ $xml .= "\t \n";
+ break;
+ }
+ }
+ $xml .= " ";
+
+ # On écrit le fichier
+ if(plxUtils::write($xml,$this->plug['parameters.xml'])) {
+ # suppression ancien fichier parameters.xml s'il existe encore (5.1.7+)
+ if(file_exists($this->plug['dir'].$this->plug['name'].'/parameters.xml'))
+ unlink($this->plug['dir'].$this->plug['name'].'/parameters.xml');
+ return plxMsg::Info(L_SAVE_SUCCESSFUL);
+ }
+ else
+ return plxMsg::Error(L_SAVE_ERR.' '.$this->plug['parameters.xml']);
+ }
+
+ /**
+ * Méthode qui renvoie le tableau des paramètres
+ *
+ * @return array tableau aParams
+ * @author Stephane F
+ **/
+ public function getParams() {
+ if(sizeof($this->aParams)>0)
+ return $this->aParams;
+ else
+ return false;
+ }
+
+ /**
+ * Méthode qui renvoie la valeur d'un parametre du fichier parameters.xml
+ *
+ * @param param nom du parametre à recuperer
+ * @return string valeur du parametre
+ * @author Stephane F
+ **/
+ public function getParam($param) {
+ return (isset($this->aParams[$param])? $this->aParams[$param]['value']:'');
+ }
+
+ /**
+ * Méthode qui modifie la valeur d'un parametre du fichier parameters.xml
+ *
+ * @param param nom du parametre à recuperer
+ * @param value valeur du parametre
+ * @type type type du parametre (numeric, string, cdata)
+ * @return null
+ * @author Stephane F
+ **/
+ public function setParam($param, $value, $type=false) {
+
if(!empty($type) and in_array($type, array('numeric', 'string', 'cdata'))) {
- $this->aParams[$param]['type'] = $type;
- $this->aParams[$param]['value'] = ($type == 'numeric') ? intval($value) : $value;
- }
- }
-
- /**
- * Méthode qui supprime un parametre du fichier parameters.xml
- *
- * @param param nom du parametre à supprimer
- * @return true si parametre supprimé, false sinon
- * @author Sebastien H
- **/
- public function delParam($param) {
- if(isset($this->aParams[$param])) {
- unset($this->aParams[$param]);
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * Méthode qui recupere les données du fichier infos.xml
- *
- * @return null
- * @author Stephane F
- **/
- public function getInfos() {
-
- if(!is_file($this->plug['infos.xml'])) return;
-
- # Mise en place du parseur XML
- $data = implode('',file($this->plug['infos.xml']));
- $parser = xml_parser_create(PLX_CHARSET);
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
- xml_parse_into_struct($parser,$data,$values,$iTags);
- xml_parser_free($parser);
- $this->aInfos = array(
- 'title' => (isset($iTags['title']) AND isset($values[$iTags['title'][0]]['value']))?$values[$iTags['title'][0]]['value']:'',
- 'author' => (isset($iTags['author']) AND isset($values[$iTags['author'][0]]['value']))?$values[$iTags['author'][0]]['value']:'',
- 'version' => (isset($iTags['version']) AND isset($values[$iTags['version'][0]]['value']))?$values[$iTags['version'][0]]['value']:'',
- 'date' => (isset($iTags['date']) AND isset($values[$iTags['date'][0]]['value']))?$values[$iTags['date'][0]]['value']:'',
- 'site' => (isset($iTags['site']) AND isset($values[$iTags['site'][0]]['value']))?$values[$iTags['site'][0]]['value']:'',
- 'description' => (isset($iTags['description']) AND isset($values[$iTags['description'][0]]['value']))?$values[$iTags['description'][0]]['value']:'',
- );
-
- }
-
- /**
- * Méthode qui renvoie la valeur d'un parametre du fichier infos.xml
- *
- * @param param nom du parametre à recuperer
- * @return string valeur de l'info
- * @author Stephane F
- **/
- public function getInfo($param) {
- return (isset($this->aInfos[$param])?$this->aInfos[$param]:'');
- }
-
- /**
- * Méthode qui ajoute un hook à executer
- *
- * @param hookname nom du hook
- * @param userfunction nom de la fonction du plugin à executer
- * @return null
- * @author Stephane F
- **/
- public function addHook($hookname, $userfunction) {
- if(method_exists(get_class($this), $userfunction)) {
- $this->aHooks[$hookname][]=array(
- 'class' => get_class($this),
- 'method' => $userfunction
- );
- }
- }
-
- /**
- * Méthode qui retourne le chemin relatif du dossier du plugin
- *
- * @return string chemin vers le dossier du plugin
- * @author Stephane F
- **/
- public function REL_PATH() {
- return PLX_PLUGINS.get_class($this).'/';
- }
-
- /**
- * Méthode qui retourne le chemin absolu du dossier du plugin
- *
- * @return string chemin vers le dossier du plugin
- * @author Stephane F
- **/
- public function ABS_PATH() {
- return str_replace(PLX_ROOT, '', $this->REL_PATH());
- }
-
- /**
- * Méthode qui retourne l'url du dossier du plugin (avec le http://)
- *
- * @return string url vers le dossier du plugin
- * @author Stephane F
- **/
- public function URL() {
- return plxUtils::getRacine().$this->ABS_PATH();
- }
-
-}
+ $this->aParams[$param]['type'] = $type;
+ $this->aParams[$param]['value'] = ($type == 'numeric') ? intval($value) : $value;
+ }
+ }
+
+ /**
+ * Méthode qui supprime un parametre du fichier parameters.xml
+ *
+ * @param param nom du parametre à supprimer
+ * @return true si parametre supprimé, false sinon
+ * @author Sebastien H
+ **/
+ public function delParam($param) {
+ if(isset($this->aParams[$param])) {
+ unset($this->aParams[$param]);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Méthode qui recupere les données du fichier infos.xml
+ *
+ * @return null
+ * @author Stephane F
+ **/
+ public function getInfos() {
+
+ if(!is_file($this->plug['infos.xml'])) return;
+
+ # Mise en place du parseur XML
+ $data = implode('',file($this->plug['infos.xml']));
+ $parser = xml_parser_create(PLX_CHARSET);
+ xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+ xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+ xml_parse_into_struct($parser,$data,$values,$iTags);
+ xml_parser_free($parser);
+ $this->aInfos = array(
+ 'title' => (isset($iTags['title']) AND isset($values[$iTags['title'][0]]['value']))?$values[$iTags['title'][0]]['value']:'',
+ 'author' => (isset($iTags['author']) AND isset($values[$iTags['author'][0]]['value']))?$values[$iTags['author'][0]]['value']:'',
+ 'version' => (isset($iTags['version']) AND isset($values[$iTags['version'][0]]['value']))?$values[$iTags['version'][0]]['value']:'',
+ 'date' => (isset($iTags['date']) AND isset($values[$iTags['date'][0]]['value']))?$values[$iTags['date'][0]]['value']:'',
+ 'site' => (isset($iTags['site']) AND isset($values[$iTags['site'][0]]['value']))?$values[$iTags['site'][0]]['value']:'',
+ 'description' => (isset($iTags['description']) AND isset($values[$iTags['description'][0]]['value']))?$values[$iTags['description'][0]]['value']:'',
+ );
+
+ }
+
+ /**
+ * Méthode qui renvoie la valeur d'un parametre du fichier infos.xml
+ *
+ * @param param nom du parametre à recuperer
+ * @return string valeur de l'info
+ * @author Stephane F
+ **/
+ public function getInfo($param) {
+ return (isset($this->aInfos[$param])?$this->aInfos[$param]:'');
+ }
+
+ /**
+ * Méthode qui ajoute un hook à executer
+ *
+ * @param hookname nom du hook
+ * @param userfunction nom de la fonction du plugin à executer
+ * @return null
+ * @author Stephane F
+ **/
+ public function addHook($hookname, $userfunction) {
+ if(method_exists(get_class($this), $userfunction)) {
+ $this->aHooks[$hookname][]=array(
+ 'class' => get_class($this),
+ 'method' => $userfunction
+ );
+ }
+ }
+
+ /**
+ * Méthode qui retourne le chemin relatif du dossier du plugin
+ *
+ * @return string chemin vers le dossier du plugin
+ * @author Stephane F
+ **/
+ public function REL_PATH() {
+ return PLX_PLUGINS.get_class($this).'/';
+ }
+
+ /**
+ * Méthode qui retourne le chemin absolu du dossier du plugin
+ *
+ * @return string chemin vers le dossier du plugin
+ * @author Stephane F
+ **/
+ public function ABS_PATH() {
+ return str_replace(PLX_ROOT, '', $this->REL_PATH());
+ }
+
+ /**
+ * Méthode qui retourne l'url du dossier du plugin (avec le http://)
+ *
+ * @return string url vers le dossier du plugin
+ * @author Stephane F
+ **/
+ public function URL() {
+ return plxUtils::getRacine().$this->ABS_PATH();
+ }
+
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.record.php b/core/lib/class.plx.record.php
index f3ca17caa..c2ef0417b 100644
--- a/core/lib/class.plx.record.php
+++ b/core/lib/class.plx.record.php
@@ -1,66 +1,66 @@
-result = &$array;
- $this->size = sizeof($this->result);
- }
-
- /**
- * Méthode qui incrémente judicieusement la variable $i
- *
- * @return booléen
- * @author Anthony GUÉRIN
- **/
- public function loop() {
-
- if($this->i < $this->size-1) { # Tant que l'on est pas en fin de tableau
- $this->i++;
- return true;
- }
- # On sort par une valeur negative
- $this->i = -1;
- return false;
- }
-
- /**
- * Méthode qui récupère la valeur du champ $field
- * correspondant à la position courante
- *
- * @param field clef du tableau à retourner
- * @return string ou false
- * @author Anthony GUÉRIN et Florent MONTHEL
- **/
- public function f($field) {
-
- if($this->i === -1) # Compteur négatif
- $this->i++;
- # On controle que le champ demande existe bien
- if(isset($this->result[ $this->i ][ $field ]))
- return $this->result[ $this->i ][ $field ];
- else # Sinon on sort par une valeur negative
- return false;
- }
-
-}
+result = &$array;
+ $this->size = sizeof($this->result);
+ }
+
+ /**
+ * Méthode qui incrémente judicieusement la variable $i
+ *
+ * @return booléen
+ * @author Anthony GUÉRIN
+ **/
+ public function loop() {
+
+ if($this->i < $this->size-1) { # Tant que l'on est pas en fin de tableau
+ $this->i++;
+ return true;
+ }
+ # On sort par une valeur negative
+ $this->i = -1;
+ return false;
+ }
+
+ /**
+ * Méthode qui récupère la valeur du champ $field
+ * correspondant à la position courante
+ *
+ * @param field clef du tableau à retourner
+ * @return string ou false
+ * @author Anthony GUÉRIN et Florent MONTHEL
+ **/
+ public function f($field) {
+
+ if($this->i === -1) # Compteur négatif
+ $this->i++;
+ # On controle que le champ demande existe bien
+ if(isset($this->result[ $this->i ][ $field ]))
+ return $this->result[ $this->i ][ $field ];
+ else # Sinon on sort par une valeur negative
+ return false;
+ }
+
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.show.php b/core/lib/class.plx.show.php
index 4275b4b1d..a204cefe6 100755
--- a/core/lib/class.plx.show.php
+++ b/core/lib/class.plx.show.php
@@ -1,1950 +1,1950 @@
-plxMotor = plxMotor::getInstance();
-
- # Chargement du fichier de lang du theme
- $langfile = PLX_ROOT.$this->plxMotor->aConf['racine_themes'].$this->plxMotor->style.'/lang/'.$this->plxMotor->aConf['default_lang'].'.php';
- if(is_file($langfile)) {
- include($langfile);
- $this->lang = $LANG; # $LANG = tableau contenant les traductions présentes dans le fichier de langue
- }
-
- # Hook Plugins
- eval($this->plxMotor->plxPlugins->callHook('plxShowConstruct'));
-
- }
-
- /**
- * Méthode qui affiche les urls réécrites
- *
- * @param url url à réécrire
- * @return stdout
- * @author Stéphane F
- **/
- public function urlRewrite($url='') {
-
- echo $this->plxMotor->urlRewrite($url);
- }
-
- /**
- * Méthode qui affiche le type de compression http
- *
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function httpEncoding() {
-
- $encoding = plxUtils::httpEncoding();
- if($this->plxMotor->aConf['gzip'] AND $encoding)
- printf(L_HTTPENCODING, strtoupper($encoding));
-
- }
-
- /**
- * Méthode qui affiche l'URL du site
- *
- * @return stdout
- * @scope global
- * @author Florent MONTHEL
- **/
- public function racine() {
-
- echo $this->plxMotor->racine;
- }
-
- /**
- * Méthode qui affiche ou retourne le mode d'affichage
- *
- * @param echo si à VRAI affichage écran (à FAUX par défaut pour gérer la non régression PluXml < 5.6)
- * @return string mode d'affichage (home, article, categorie, static ou erreur)
- * @scope global
- * @author Stephane F.
- **/
- public function mode($echo=false) {
- if($echo)
- echo $this->plxMotor->mode;
- else
- return $this->plxMotor->mode;
- }
-
- /**
- * Méthode qui affiche le charset selon la casse $casse
- *
- * @param casse casse min ou maj
- * @return stdout
- * @scope global
- * @author Florent MONTHEL
- **/
- public function charset($casse='min') {
-
- if($casse != 'min') # En majuscule
- echo strtoupper(PLX_CHARSET);
- else # En minuscule
- echo strtolower(PLX_CHARSET);
- }
-
- /**
- * Méthode qui affiche la version de PluXml
- *
- * @return stdout
- * @scope global
- * @author Anthony GUÉRIN et Florent MONTHEL
- **/
- public function version() {
-
- echo PLX_VERSION;
- }
-
- /**
- * Méthode qui affiche ou renvoie la langue par défaut
- *
- * @param echo si à VRAI affichage à l'écran
- * @return stdout/string
- * @author Stéphane F
- **/
- public function defaultLang($echo=true) {
- if($echo)
- echo $this->plxMotor->aConf['default_lang'];
- else
- return $this->plxMotor->aConf['default_lang'];
- }
-
-
- /**
- * Méthode qui affiche la variable get de l'objet plxMotor (variable $_GET globale)
- *
- * @return stdout
- * @scope global
- * @author Florent MONTHEL
- **/
- public function get() {
-
- echo $this->plxMotor->get;
- }
-
- /**
- * Méthode qui affiche le temps d'exécution de la page
- *
- * @return stdout
- * @scope global
- * @author Anthony GUÉRIN et Florent MONTHEL
- **/
- public function chrono() {
-
- echo round(getMicrotime()-PLX_MICROTIME,3).'s';
- }
-
- /**
- * Méthode qui affiche le dossier de stockage du style actif
- *
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function template() {
-
- echo $this->plxMotor->urlRewrite($this->plxMotor->aConf['racine_themes'].$this->plxMotor->style);
-
- }
-
- /**
- * Méthode qui affiche le titre de la page selon le mode
- *
- * @parm format format d'affichage (ex: home=#title - #subtitle;article=#title)
- * paramètres: home, categorie, article, static, archives, tags, erreur
- * @parm sep caractère de séparation dans le format d'affichage entre les paramètres
- * @return stdout
- * @scope global
- * @author Stéphane F
- **/
- public function pageTitle($format='',$sep=";") {
-
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowPageTitle'))) return;
-
- if($this->plxMotor->mode == 'home') {
- $title = $this->plxMotor->aConf['title'];
- $subtitle = $this->plxMotor->aConf['description'];
- }
- elseif($this->plxMotor->mode == 'categorie') {
- $title_htmltag = $this->plxMotor->aCats[$this->plxMotor->cible ]['title_htmltag'];
- $title = $title_htmltag !='' ? $title_htmltag : $this->plxMotor->aCats[$this->plxMotor->cible]['name'];
- $subtitle = $this->plxMotor->aConf['title'];
- }
- elseif($this->plxMotor->mode == 'article') {
- $title_htmltag = $this->plxMotor->plxRecord_arts->f('title_htmltag');
- $title = $title_htmltag !='' ? $title_htmltag : $this->plxMotor->plxRecord_arts->f('title');
- $subtitle = $this->plxMotor->aConf['title'];
- }
- elseif($this->plxMotor->mode == 'static') {
- $title_htmltag = $this->plxMotor->aStats[$this->plxMotor->cible ]['title_htmltag'];
- $title = $title_htmltag !='' ? $title_htmltag : $this->plxMotor->aStats[$this->plxMotor->cible]['name'];
- $subtitle = $this->plxMotor->aConf['title'];
- }
- elseif($this->plxMotor->mode == 'archives') {
- preg_match('/^(\d{4})(\d{2})?(\d{2})?/',$this->plxMotor->cible, $capture);
- $year = !empty($capture[1]) ? ' '.$capture[1] : '';
- $month = !empty($capture[2]) ? ' '.plxDate::getCalendar('month', $capture[2]) : '';
- $day = !empty($capture[3]) ? ' '.plxDate::getCalendar('day', $capture[3]) : '';
- $title = L_PAGETITLE_ARCHIVES.$day.$month.$year;
- $subtitle = $this->plxMotor->aConf['title'];
- }
- elseif($this->plxMotor->mode == 'tags') {
- $title = L_PAGETITLE_TAG.' '.$this->plxMotor->cibleName;
- $subtitle = $this->plxMotor->aConf['title'];
- }
- elseif($this->plxMotor->mode == 'erreur') {
- $title = $this->plxMotor->plxErreur->getMessage();
- $subtitle = $this->plxMotor->aConf['title'];
- }
- else { # mode par défaut
- $title = $this->plxMotor->aConf['title'];
- $subtitle = $this->plxMotor->aConf['description'];
- }
-
- $fmt = '';
- if(preg_match('/'.$this->plxMotor->mode.'\s*=\s*(.*?)\s*('.$sep.'|$)/i',$format,$capture)) {
- $fmt = trim($capture[1]);
- }
- $format = $fmt=='' ? '#title - #subtitle' : $fmt;
- $txt = str_replace('#title', trim($title), $format);
- $txt = str_replace('#subtitle', trim($subtitle), $txt);
- echo plxUtils::strCheck(trim($txt, ' - '));
-
- }
-
- /**
- * Méthode qui affiche le meta passé en paramètre
- *
- * @param meta nom du meta à afficher (description, keywords,author)
- * @return stdout
- * @scope global
- * @author Stéphane F
- **/
- public function meta($meta='') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowMeta'))) return;
-
- if(!in_array($meta, array('description','keywords','author')))
- return;
-
- $meta=strtolower($meta);
-
- if($this->plxMotor->mode == 'home') {
- if(!empty($this->plxMotor->aConf['meta_'.$meta]))
- echo ' '."\n";
- return;
- }
- if($this->plxMotor->mode == 'article') {
- if($meta=='author')
- echo ' '."\n";
- else {
- $meta_content=trim($this->plxMotor->plxRecord_arts->f('meta_'.$meta));
- if(!empty($meta_content))
- echo ' '."\n";
- elseif(!empty($this->plxMotor->aConf['meta_'.$meta]))
- echo ' '."\n";
- }
- return;
- }
- if($this->plxMotor->mode == 'static') {
- if(!empty($this->plxMotor->aStats[ $this->plxMotor->cible ]['meta_'.$meta]))
- echo ' '."\n";
- elseif(!empty($this->plxMotor->aConf['meta_'.$meta]))
- echo ' '."\n";
- return;
- }
- if($this->plxMotor->mode == 'categorie') {
- if(!empty($this->plxMotor->aCats[ $this->plxMotor->cible ]['meta_'.$meta]))
- echo ' '."\n";
- elseif(!empty($this->plxMotor->aConf['meta_'.$meta]))
- echo ' '."\n";
- return;
- }
- }
-
- /**
- * Méthode qui affiche le titre du blog linké (variable $type='link') ou non
- *
- * @param type type d'affichage: texte ou sous forme de lien
- * @return stdout
- * @scope global
- * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
- **/
- public function mainTitle($type='') {
-
- $title = plxUtils::strCheck($this->plxMotor->aConf['title']);
- if($type == 'link') # Type lien
- echo ''.$title.' ';
- else # Type normal
- echo $title;
- }
-
- /**
- * Méthode qui affiche le sous-titre du blog
- *
- * @return stdout
- * @scope global
- * @author Anthony GUÉRIN et Florent MONTHEL
- **/
- public function subTitle() {
-
- echo plxUtils::strCheck($this->plxMotor->aConf['description']);
- }
-
- /**
- * Méthode qui affiche la liste des catégories actives.
- * Si la variable $extra est renseignée, un lien vers la
- * page d'accueil (nommé $extra) sera mis en place en première
- * position.
- *
- * @param extra nom du lien vers la page d'accueil
- * @param format format du texte pour chaque catégorie (variable : #cat_id, #cat_status, #cat_url, #cat_name, #cat_description, #art_nb)
- * @param include liste des catégories à afficher séparées par le caractère | (exemple: 001|003)
- * @param exclude liste des catégories à ne pas afficher séparées par le caractère | (exemple: 002|003)
- * @return stdout
- * @scope global
- * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
- **/
- public function catList($extra='', $format='#cat_name ', $include='', $exclude='') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastCatList'))) return;
-
- # Si on a la variable extra, on affiche un lien vers la page d'accueil (avec $extra comme nom)
- if($extra != '') {
- $name = str_replace('#cat_id','cat-home',$format);
- $name = str_replace('#cat_url',$this->plxMotor->urlRewrite(),$name);
- $name = str_replace('#cat_name',plxUtils::strCheck($extra),$name);
- $name = str_replace('#cat_status',($this->catId()=='home'?'active':'noactive'), $name);
- $name = str_replace('#art_nb','',$name);
- echo $name;
- }
- # On verifie qu'il y a des categories
- if($this->plxMotor->aCats) {
- foreach($this->plxMotor->aCats as $k=>$v) {
- $in = (empty($include) OR preg_match('/('.$include.')/', $k));
- $ex = (!empty($exclude) AND preg_match('/('.$exclude.')/', $k));
- if($in AND !$ex) {
- if(($v['articles']>0 OR $this->plxMotor->aConf['display_empty_cat']) AND ($v['menu']=='oui') AND $v['active']) { # On a des articles
- # On modifie nos motifs
- $name = str_replace('#cat_id','cat-'.intval($k),$format);
- $name = str_replace('#cat_url',$this->plxMotor->urlRewrite('?categorie'.intval($k).'/'.$v['url']),$name);
- $name = str_replace('#cat_name',plxUtils::strCheck($v['name']),$name);
- $name = str_replace('#cat_status',($this->catId()==intval($k)?'active':'noactive'), $name);
- $name = str_replace('#cat_description',plxUtils::strCheck($v['description']),$name);
- $name = str_replace('#art_nb',$v['articles'],$name);
- echo $name;
- }
- }
- } # Fin du while
- }
- }
-
- /**
- * Méthode qui retourne l'id de la catégorie en question (sans les 0 supplémentaires)
- *
- * @return int ou string
- * @scope home,categorie,article,tags,archives
- * @author Florent MONTHEL
- **/
- public function catId() {
-
- # On va verifier que la categorie existe en mode categorie
- if($this->plxMotor->mode == 'categorie' AND isset($this->plxMotor->aCats[ $this->plxMotor->cible ]))
- return intval($this->plxMotor->cible);
- # On va verifier que la categorie existe en mode article
- if($this->plxMotor->mode == 'article' AND isset($this->plxMotor->aCats[ $this->plxMotor->plxRecord_arts->f('categorie') ]))
- return intval($this->plxMotor->plxRecord_arts->f('categorie'));
- # On va vérifier si c'est la catégorie home
- if($this->plxMotor->mode == 'categorie' OR $this->plxMotor->mode == 'home' OR $this->plxMotor->mode == 'article')
- return 'home';
- }
-
- /**
- * Méthode qui affiche le contenu de la description d'une catégorie
- *
- * @param format format du texte à afficher (variable: #cat_description)
- * @return stdout
- * @scope categorie
- * @author Stephane F.
- **/
- public function catDescription($format='#cat_description
') {
-
- $desc = plxUtils::getValue($this->plxMotor->aCats[$this->plxMotor->cible]['description']);
- if($this->plxMotor->mode AND $desc)
- echo str_replace('#cat_description',$desc, $format);
- }
-
- /**
- * Méthode qui retourne l'url d'une catégorie
- *
- * @param id id de la categorie sous la forme numérique ou formatée (ex: 1 ou 001)
- * @return string
- * @author Stephane F.
- **/
- public function catUrl($id) {
-
- $id=str_pad($id,3,'0',STR_PAD_LEFT);
- if(isset($this->plxMotor->aCats[$id])) {
- return $this->plxMotor->urlRewrite('?categorie'.intval($id).'/'.$this->plxMotor->aCats[$id]['url']);
- }
- }
-
- /**
- * Méthode qui affiche le nom de la catégorie active (linké ou non)
- *
- * @param type type d'affichage : link => sous forme de lien
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Florent MONTHEL, Stephane F
- **/
- public function catName($type='') {
-
- # On va verifier que la categorie existe en mode categorie
- if($this->plxMotor->mode == 'categorie' AND isset($this->plxMotor->aCats[$this->plxMotor->cible])) {
- # On recupere les infos de la categorie
- $id = $this->plxMotor->cible;
- $name = plxUtils::strCheck($this->plxMotor->aCats[$id]['name']);
- $url = $this->catUrl($id);
- # On effectue l'affichage
- if($type == 'link')
- echo ''.$name.' ';
- else
- echo $name;
- }
- # On va verifier que la categorie existe en mode article
- elseif($this->plxMotor->mode == 'article' AND isset($this->plxMotor->aCats[$this->plxMotor->plxRecord_arts->f('categorie')])) {
- # On recupere les infos de la categorie
- $id = $this->plxMotor->plxRecord_arts->f('categorie');
- $name = plxUtils::strCheck($this->plxMotor->aCats[ $id ]['name']);
- $url = $this->catUrl($id);
- # On effectue l'affichage
- if($type == 'link')
- echo ''.$name.' ';
- else
- echo $name;
- }
- # Mode home
- elseif($this->plxMotor->mode == 'home') {
- if($type == 'link')
- echo ''.L_HOMEPAGE.' ';
- else
- echo L_HOMEPAGE;
- } else {
- echo L_UNCLASSIFIED;
- }
- }
-
- /**
- * Méthode qui retourne l'identifiant de l'article en question (sans les 0 supplémentaires)
- *
- * @return int
- * @scope home,categorie,article,tags,archives
- * @author Florent MONTHEL
- **/
- public function artId() {
-
- return intval($this->plxMotor->plxRecord_arts->f('numero'));
- }
-
- /**
- * Méthode qui affiche ou retourne l'url de l'article
- *
- * @param echo si à VRAI affichage à l'écran
- * @param extra paramètres supplémentaires pouvant être rajoutés à la fin de l'url de l'atricle
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Florent MONTHEL, Stephane F
- **/
- public function artUrl($echo=true, $extra='') {
-
- # On affiche l'URL
- $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
- $url = $this->plxMotor->urlRewrite('?article'.$id.'/'.$this->plxMotor->plxRecord_arts->f('url').$extra);
- if($echo)
- echo $url;
- else
- return $url;
-
- }
-
- /**
- * Méthode qui affiche le titre de l'article linké (variable $type='link') ou non
- *
- * @param type type d'affichage : link => sous forme de lien
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
- **/
- public function artTitle($type='') {
-
- if($type == 'link') { # Type lien
- $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
- $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
- $url = $this->plxMotor->plxRecord_arts->f('url');
- # On effectue l'affichage
- echo ''.$title.' ';
- } else { # Type normal
- echo plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
- }
- }
-
- /**
- * Méthode qui affiche l'image d'accroche
- *
- * @param format format d'affichage (variables: #img_url, #img_alt, #img_title)
- * @param echo si à VRAI affichage à l'écran
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
- public function artThumbnail($format=' ', $echo=true) {
-
- $imgUrl = $this->plxMotor->plxRecord_arts->f('thumbnail');
- if($imgUrl) {
- $row = str_replace('#img_url', $this->plxMotor->urlRewrite($imgUrl), $format);
- $row = str_replace('#img_title', plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('thumbnail_title')), $row);
- $row = str_replace('#img_alt', $this->plxMotor->plxRecord_arts->f('thumbnail_alt'), $row);
- if($echo)
- echo $row;
- else
- return $row;
- } else {
- if(!$echo) return false;
- }
-
- }
-
- /**
- * Méthode qui affiche ou renvoie l'auteur de l'article
- *
- * @param echo si à VRAI affichage à l'écran
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F
- **/
- public function artAuthor($echo=true) {
-
- if(isset($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['name']))
- $author = plxUtils::strCheck($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['name']);
- else
- $author = L_ARTAUTHOR_UNKNOWN;
- if($echo)
- echo $author;
- else
- return $author;
- }
-
- /**
- * Méthode qui affiche l'adresse email de l'auteur de l'article
- *
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
- public function artAuthorEmail() {
-
- if(isset($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['email']))
- echo plxUtils::strCheck($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['email']);
- }
-
- /**
- * Méthode qui affiche les informations sur l'auteur de l'article
- *
- * @param format format du texte à afficher (variable: #art_authorinfos, #art_author)
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
-
- public function artAuthorInfos($format='#art_authorinfos
') {
-
- $infos = plxUtils::getValue($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['infos']);
- if(trim($infos)!='') {
- $txt = str_replace('#art_authorinfos', $infos, $format);
- $txt = str_replace('#art_author', $this->artAuthor(false), $txt);
- echo $txt;
- }
- }
-
- /**
- * Méthode qui affiche la date de publication de l'article selon le format choisi
- *
- * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F.
- **/
- public function artDate($format='#day #num_day #month #num_year(4)') {
-
- echo plxDate::formatDate($this->plxMotor->plxRecord_arts->f('date'),$format);
- }
-
- /**
- * Méthode qui retourne la liste des catégories de l'article séparées par des virgules
- *
- * @return string
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
- public function artCatIds() {
-
- return $this->plxMotor->plxRecord_arts->f('categorie');
- }
-
- /**
- * Méthode qui retourne un tableau contenant les numéros des catégories actives de l'article
- *
- * @return array
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
- public function artActiveCatIds() {
-
- $artCatIds = explode(',', $this->plxMotor->plxRecord_arts->f('categorie'));
- $activeCats = explode('|',$this->plxMotor->activeCats);
- return array_intersect($artCatIds,$activeCats);
-
- }
-
- /**
- * Méthode qui affiche la liste des catégories l'article sous forme de lien
- * ou la chaîne de caractère 'Non classé' si la catégorie
- * de l'article n'existe pas
- *
- * @param separator caractère de séparation entre les catégories affichées
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
- **/
- public function artCat($separator=', ') {
-
- $cats = array();
- # Initialisation de notre variable interne
- $catIds = $this->artActiveCatIds();
- foreach ($catIds as $idx => $catId) {
- # On verifie que la categorie n'est pas "home"
- if($catId != 'home') {
- # On va verifier que la categorie existe
- if(isset($this->plxMotor->aCats[ $catId ])) {
- # On recupere les infos de la categorie
- $name = plxUtils::strCheck($this->plxMotor->aCats[ $catId ]['name']);
- $url = $this->plxMotor->aCats[ $catId ]['url'];
- if(isset($this->plxMotor->aCats[ $this->plxMotor->cible ]['url']))
- $active = $this->plxMotor->aCats[ $this->plxMotor->cible ]['url']==$url?"active":"noactive";
- else
- $active = "noactive";
- # On effectue l'affichage
- $cats[] = ''.$name.' ';
- } else { # La categorie n'existe pas
- $cats[] = L_UNCLASSIFIED;
- }
- } else { # Categorie "home"
- $cats[] = ''.L_HOMEPAGE.' ';
- }
- }
- echo implode($separator, $cats);
- }
-
- /**
- * Méthode qui affiche la liste des tags l'article sous forme de lien
- *
- * @param format format du texte pour chaque tag (variable : #tag_status, #tag_url, #tag_name)
- * @param separator caractère de séparation entre les tags affichées
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
- public function artTags($format='#tag_name ', $separator=',') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowArtTags'))) return;
-
- # Initialisation de notre variable interne
- $taglist = $this->plxMotor->plxRecord_arts->f('tags');
- if(!empty($taglist)) {
- $tags = array_map('trim', explode(',', $taglist));
- foreach($tags as $idx => $tag) {
- $t = plxUtils::title2url($tag);
- $name = str_replace('#tag_url',$this->plxMotor->urlRewrite('?tag/'.$t),$format);
- $name = str_replace('#tag_name',plxUtils::strCheck($tag),$name);
- $name = str_replace('#tag_status',(($this->plxMotor->mode=='tags' AND $this->plxMotor->cible==$t)?'active':'noactive'), $name);
- echo $name;
- if ($idx!=sizeof($tags)-1) echo $separator.' ';
- }
- }
- else echo L_ARTTAGS_NONE;
- }
-
- /**
- * Méthode qui affiche le lien "Lire la suite" si le chapô de l'article est renseigné
- *
- * @param format format d'affichage du lien pour lire la suite de l'article (#art_url, #art_title)
- * @return stdout
- * @scope home,categorie,tags,archives
- * @author Stephane F
- **/
- public function artReadMore($format='') {
-
- # Affichage du lien "Lire la suite" si un chapo existe
- if($this->plxMotor->plxRecord_arts->f('chapo') != '') {
- $format = ($format=='' ? ''.L_ARTCHAPO.'
' : $format);
- if($format) {
- # On recupere les infos de l'article
- $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
- $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
- $url = $this->plxMotor->plxRecord_arts->f('url');
- # Formatage de l'affichage
- $row = str_replace("#art_url", $this->plxMotor->urlRewrite('?article'.$id.'/'.$url), $format);
- $row = str_replace("#art_title", $title, $row);
- echo $row;
- }
- }
- }
-
- /**
- * Méthode qui affiche le châpo de l'article ainsi qu'un lien
- * pour lire la suite de l'article. Si l'article n'a pas de chapô,
- * le contenu de l'article est affiché (selon paramètres)
- *
- * @param format format d'affichage du lien pour lire la suite de l'article (#art_title)
- * @param content affichage oui/non du contenu si le chapô est vide
- * @param anchor ancre dans l'article pour faire pointer le lien "Lire la suite" quand on clic dessus
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
- **/
- public function artChapo($format=L_ARTCHAPO, $content=true, $anchor='') {
-
- # On verifie qu'un chapo existe
- if($this->plxMotor->plxRecord_arts->f('chapo') != '') {
- # On récupère les infos de l'article
- $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
- $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
- $url = $this->plxMotor->plxRecord_arts->f('url');
- # On effectue l'affichage
- echo $this->plxMotor->plxRecord_arts->f('chapo')."\n";
- if($format) {
- $title = str_replace("#art_title", $title, $format);
- echo ''.$title.'
'."\n";
- }
- } else { # Pas de chapo, affichage du contenu
- if($content === true) {
- echo $this->plxMotor->plxRecord_arts->f('content')."\n";
- }
- }
- }
-
- /**
- * Méthode qui affiche le chapô (selon paramètres) suivi du contenu de l'article
- *
- * @param chapo affichage oui/non du chapo
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F
- **/
- public function artContent($chapo=true) {
-
- if($chapo === true)
- echo $this->plxMotor->plxRecord_arts->f('chapo')."\n"; # Chapo
- echo $this->plxMotor->plxRecord_arts->f('content')."\n";
-
- }
-
- /**
- * Méthode qui affiche la date de creation d'un article selon le format choisi
- *
- * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F.
- **/
- public function artCreationDate($format='#num_day/#num_month/#num_year(4) #time') {
-
- echo plxDate::formatDate($this->plxMotor->plxRecord_arts->f('date_creation'),$format);
- }
-
- /**
- * Méthode qui affiche la date de mise à jour d'un article selon le format choisi
- *
- * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F.
- **/
- public function artUpdateDate($format='#num_day/#num_month/#num_year(4) #time') {
-
- echo plxDate::formatDate($this->plxMotor->plxRecord_arts->f('date_update'),$format);
- }
-
- /**
- * Méthode qui affiche un lien vers le fil Rss des articles
- * d'une catégorie précise (si $categorie renseigné) ou du site tout entier
- *
- * @param type type de flux (obsolete)
- * @param categorie identifiant (sans les 0) d'une catégorie
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Florent MONTHEL, Stephane F
- **/
- public function artFeed($type='rss', $categorie='') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowArtFeed'))) return;
-
- if($categorie != '' AND is_numeric($categorie)) {
- # Fil Rss des articles d'une catégorie
- $id=str_pad($categorie,3,'0',STR_PAD_LEFT);
- if(isset($this->plxMotor->aCats[$id])) {
- echo ''.L_ARTFEED_RSS_CATEGORY.' ';
- }
- } else {
- # Fil Rss des articles
- echo ''.L_ARTFEED_RSS.' ';
- }
- }
-
- /**
- * Méthode qui affiche le nombre de commentaires (sous forme de lien ou non selon le mode) d'un article
- *
- * @param f1 format d'affichage si nombre de commentaire = 0 (#nb pour afficher le nombre de commentaire)
- * @param f2 format d'affichage si nombre de commentaire = 1 (#nb pour afficher le nombre de commentaire)
- * @param f3 format d'affichage si nombre de commentaire > 1 (#nb pour afficher le nombre de commentaire)
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
- public function artNbCom($f1='L_NO_COMMENT',$f2='#nb L_COMMENT',$f3='#nb L_COMMENTS') {
-
- $nb = intval($this->plxMotor->plxRecord_arts->f('nb_com'));
- $num = intval($this->plxMotor->plxRecord_arts->f('numero'));
- $url = $this->plxMotor->plxRecord_arts->f('url');
-
- if($nb==0) {
- $txt = str_replace('L_NO_COMMENT', L_NO_COMMENT, $f1);
- $title = $nb.' '.L_NO_COMMENT;
- }
- elseif($nb==1) {
- $txt = str_replace('L_COMMENT', L_COMMENT, $f2);
- $title = $nb.' '.L_COMMENT;
- }
- else {
- $txt = str_replace('L_COMMENTS', L_COMMENTS, $f3);
- $title = $nb.' '.L_COMMENTS;
- }
- $txt = str_replace('#nb',$nb,$txt);
-
- if($this->plxMotor->mode == 'article')
- echo $txt;
- else
- echo ''.$txt.' ';
-
- }
-
- /**
- * Méthode qui affiche le nombre total d'articles publiés sur le site.
- *
- * @param f1 format d'affichage si nombre d'article = 0 (#nb pour afficher le nombre de commentaire)
- * @param f2 format d'affichage si nombre d'article = 1 (#nb pour afficher le nombre de commentaire)
- * @param f3 format d'affichage si nombre d'article > 1 (#nb pour afficher le nombre de commentaire)
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function nbAllArt($f1='L_NO_ARTICLE',$f2='#nb L_ARTICLE',$f3='#nb L_ARTICLES') {
-
- $nb = $this->plxMotor->nbArticles('published', '[0-9]{3}', '', 'before');
-
- if($nb==0)
- $txt = str_replace('L_NO_ARTICLE', L_NO_ARTICLE, $f1);
- elseif($nb==1)
- $txt = str_replace('L_ARTICLE', L_ARTICLE, $f2);
- else
- $txt = str_replace('L_ARTICLES', L_ARTICLES, $f3);
-
- $txt = str_replace('#nb',$nb,$txt);
-
- echo $txt;
- }
-
- /**
- * Méthode qui affiche la liste des $max derniers articles.
- * Si la variable $cat_id est renseignée, seuls les articles de cette catégorie sont retournés.
- * On tient compte si la catégorie est active
- *
- * @param format format du texte pour chaque article
- * @param max nombre d'articles maximum
- * @param cat_id ids des catégories cible
- * @param ending texte à ajouter en fin de ligne
- * @param sort tri de l'affichage des articles (sort|rsort|alpha|random)
- * @return stdout
- * @scope global
- * @author Florent MONTHEL, Stephane F
- **/
- public function lastArtList($format='#art_title ',$max=5,$cat_id='',$ending='', $sort='rsort') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastArtList'))) return;
- # Génération de notre motif
- if(empty($cat_id))
- $motif = '/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->plxMotor->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
- else
- $motif = '/^[0-9]{4}.((?:[0-9]|home|,)*(?:'.str_pad($cat_id,3,'0',STR_PAD_LEFT).')(?:[0-9]|home|,)*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
-
- # Nouvel objet plxGlob et récupération des fichiers
- $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
- if($aFiles = $plxGlob_arts->query($motif,'art',$sort,0,$max,'before')) {
- foreach($aFiles as $v) { # On parcourt tous les fichiers
- $art = $this->plxMotor->parseArticle(PLX_ROOT.$this->plxMotor->aConf['racine_articles'].$v);
- $num = intval($art['numero']);
- $date = $art['date'];
- if(($this->plxMotor->mode == 'article') AND ($art['numero'] == $this->plxMotor->cible))
- $status = 'active';
- else
- $status = 'noactive';
- # Mise en forme de la liste des catégories
- $catList = array();
- $catIds = explode(',', $art['categorie']);
- foreach ($catIds as $idx => $catId) {
- if(isset($this->plxMotor->aCats[$catId])) { # La catégorie existe
- $catName = plxUtils::strCheck($this->plxMotor->aCats[$catId]['name']);
- $catUrl = $this->plxMotor->aCats[$catId]['url'];
- $catList[] = ''.$catName.' ';
- } else {
- $catList[] = L_UNCLASSIFIED;
- }
- }
- # On modifie nos motifs
- $row = str_replace('#art_id',$num,$format);
- $row = str_replace('#cat_list', implode(', ',$catList),$row);
- $row = str_replace('#art_url',$this->plxMotor->urlRewrite('?article'.$num.'/'.$art['url']),$row);
- $row = str_replace('#art_status',$status,$row);
- $author = plxUtils::getValue($this->plxMotor->aUsers[$art['author']]['name']);
- $row = str_replace('#art_author',plxUtils::strCheck($author),$row);
- $row = str_replace('#art_title',plxUtils::strCheck($art['title']),$row);
- $strlength = preg_match('/#art_chapo\(([0-9]+)\)/',$row,$capture) ? $capture[1] : '100';
- $chapo = plxUtils::truncate($art['chapo'],$strlength,$ending,true,true);
- $row = str_replace('#art_chapo('.$strlength.')','#art_chapo',$row);
- $row = str_replace('#art_chapo',$chapo,$row);
- $strlength = preg_match('/#art_content\(([0-9]+)\)/',$row,$capture) ? $capture[1] : '100';
- $content = plxUtils::truncate($art['content'],$strlength,$ending,true,true);
- $row = str_replace('#art_content('.$strlength.')','#art_content',$row);
- $row = str_replace('#art_content',$content,$row);
- $row = str_replace('#art_date',plxDate::formatDate($date,'#num_day/#num_month/#num_year(4)'),$row);
- $row = str_replace('#art_hour',plxDate::formatDate($date,'#hour:#minute'),$row);
- $row = str_replace('#art_time',plxDate::formatDate($date,'#time'),$row);
- $row = plxDate::formatDate($date,$row);
- $row = str_replace('#art_nbcoms',$art['nb_com'],$row);
- $row = str_replace('#art_thumbnail', ' ',$row);
- $row = str_replace('#img_url',$this->plxMotor->urlRewrite($art['thumbnail']),$row);
- $row = str_replace('#img_title',$art['thumbnail_title'],$row);
- $row = str_replace('#img_alt',$art['thumbnail_alt'],$row);
- # Hook plugin
- eval($this->plxMotor->plxPlugins->callHook('plxShowLastArtListContent'));
- # On genère notre ligne
- echo $row;
- }
- }
- }
-
- /**
- * Méthode qui affiche l'id du commentaire précédé de la lettre 'c'
- *
- * @param echo (boolean) fait un affichage si valeur à TRUE
- * @return stdout/id sortie stdout ou retourne l'id du commentaire
- * @scope article
- * @author Florent MONTHEL
- **/
- public function comId($echo=true) {
- $id = 'c'.$this->plxMotor->plxRecord_coms->f('article').'-'.$this->plxMotor->plxRecord_coms->f('index');
- if($echo)
- echo $id;
- else
- return $id;
- }
-
- /**
- * Méthode qui affiche l'url du commentaire de type relatif ou absolu
- *
- * @param type type de lien : relatif ou absolu (URL complète) DEPRECATED
- * @return stdout
- * @scope article
- * @author Florent MONTHEL, Stephane F
- **/
- public function comUrl($type='relatif') {
-
- # On affiche l'URL
- $artId = $this->plxMotor->plxRecord_coms->f('article');
- $artInfo = $this->plxMotor->artInfoFromFilename($this->plxMotor->plxGlob_arts->aFiles[$artId]);
- echo $this->urlRewrite('?article'.intval($artId).'/'.$artInfo['artUrl'].'#'.$this->ComId(false));
- }
-
- /**
- * Méthode qui affiche l'index d'un commentaire
- *
- * @return stdout
- * @scope article
- * @author Stephane F.
- **/
- public function comIndex() {
-
- echo $this->plxMotor->plxRecord_coms->f('index');
- }
-
- /**
- * Méthode qui retourne le niveau d'indentation du commentaire
- *
- * @return integer numéro du niveau d'indentation du commentaire
- * @scope article
- * @author Stephane F.
- **/
- public function comNumLevel() {
- return $this->plxMotor->plxRecord_coms->f('level');
- }
-
- /**
- * Méthode qui formate et affiche le niveau d'indentation du commentaire
- *
- * @param class nom de la classe css servant à l'indentation des commentaires
- * @return stdout
- * @scope article
- * @author Stephane F., Jerry Wham
- **/
- public function comLevel($class='level') {
- if($this->comNumLevel() > 5)
- echo $class.'-'.$this->comNumLevel().' '.$class.'-max';
- else
- echo $class.'-'.$this->comNumLevel();
- }
-
- /**
- * Méthode qui affiche le nombre total de commentaires publiés sur le site.
- *
- * @param f1 format d'affichage si nombre de commentaire = 0 (#nb pour afficher le nombre de commentaire)
- * @param f2 format d'affichage si nombre de commentaire = 1 (#nb pour afficher le nombre de commentaire)
- * @param f3 format d'affichage si nombre de commentaire > 1 (#nb pour afficher le nombre de commentaire)
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function nbAllCom($f1='L_NO_COMMENT',$f2='#nb L_COMMENT',$f3='#nb L_COMMENTS') {
-
- $nb = $this->plxMotor->nbComments('online', 'before');
-
- if($nb==0)
- $txt = str_replace('L_NO_COMMENT', L_NO_COMMENT, $f1);
- elseif($nb==1)
- $txt = str_replace('L_COMMENT', L_COMMENT, $f2);
- else
- $txt = str_replace('L_COMMENTS', L_COMMENTS, $f3);
-
- $txt = str_replace('#nb',$nb,$txt);
-
- echo $txt;
- }
-
- /**
- * Méthode qui affiche l'auteur du commentaires linké ou non
- *
- * @param type type d'affichage : link => sous forme de lien
- * @return stdout
- * @scope article
- * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F.
- **/
- public function comAuthor($type='') {
-
- # Initialisation de nos variables interne
- $author = $this->plxMotor->plxRecord_coms->f('author');
- $site = $this->plxMotor->plxRecord_coms->f('site');
- if($type == 'link' AND $site != '') # Type lien
- echo ''.$author.' ';
- else # Type normal
- echo $author;
- }
-
- /**
- * Méthode qui affiche le type du commentaire (admin ou normal)
- *
- * @return stdout
- * @scope article
- * @author Florent MONTHEL
- **/
- public function comType() {
-
- echo $this->plxMotor->plxRecord_coms->f('type');
- }
-
- /**
- * Méthode qui affiche la date de publication d'un commentaire selon le format choisi
- *
- * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(2), #num_year(4), #time)
- * @return stdout
- * @scope article
- * @author Florent MONTHEL et Stephane F
- **/
- public function comDate($format='#day #num_day #month #num_year(4) @ #time') {
-
- echo plxDate::formatDate($this->plxMotor->plxRecord_coms->f('date'),$format);
- }
-
- /**
- * Méthode qui affiche le contenu d'un commentaire
- *
- * @return stdout
- * @scope article
- * @author Florent MONTHEL
- **/
- public function comContent() {
-
- echo nl2br($this->plxMotor->plxRecord_coms->f('content'));
- }
-
- /**
- * Méthode qui affiche si besoin le message généré par le système
- * suite à la création d'un commentaire
- * @param format format du texte à afficher (variable: #com_message)
- * @return stdout
- * @scope article
- * @author Stephane F.
- **/
- public function comMessage($format='#com_message') {
-
- if(isset($_SESSION['msgcom']) AND !empty($_SESSION['msgcom'])) {
- $row = str_replace('#com_message',$_SESSION['msgcom'],$format);
- echo $row;
- $_SESSION['msgcom']='';
- }
-
- }
-
- /**
- * Méthode qui affiche si besoin la variable $_GET[$key] suite au dépôt d'un commentaire
- *
- * @param key clé du tableau GET
- * @param defaut valeur par défaut si variable vide
- * @return stdout
- * @scope article
- * @author Florent MONTHEL
- **/
- public function comGet($key,$defaut='') {
-
- if(isset($_SESSION['msg'][$key]) AND !empty($_SESSION['msg'][$key])) {
- echo plxUtils::strCheck($_SESSION['msg'][$key]);
- $_SESSION['msg'][$key]='';
- }
- else echo $defaut;
-
- }
-
- /**
- * Méthode qui affiche un lien vers le fil Rss des commentaires
- * d'un article précis (si $article renseigné) ou du site tout entier
- *
- * @param type type de flux (obsolete)
- * @param article identifiant (sans les 0) d'un article
- * @return stdout
- * @scope global
- * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
- **/
- public function comFeed($type='rss', $article='') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowComFeed'))) return;
-
- if($article != '' AND is_numeric($article)) # Fil Rss des commentaires d'un article
- echo ''.L_COMFEED_RSS_ARTICLE.' ';
- else # Fil Rss des commentaires global
- echo ''.L_COMFEED_RSS.' ';
- }
-
- /**
- * Méthode qui affiche la liste des $max derniers commentaires.
- * Si la variable $art_id est renseignée, seuls les commentaires de cet article sont retournés.
- *
- * @param format format du texte pour chaque commentaire
- * @param max nombre de commentaires maximum
- * @param art_id id de l'article cible (24,3)
- * @param cat_ids liste des categories pour filtrer les derniers commentaires (sous la forme 001|002)
- * @return stdout
- * @scope global
- * @author Florent MONTHEL, Stephane F
- **/
- public function lastComList($format='#com_author L_SAID : #com_content(50) ',$max=5,$art_id='',$cat_ids='') {
-
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastComList'))) return;
-
- # Génération de notre motif
- if(empty($art_id))
- $motif = '/^[0-9]{4}.[0-9]{10}-[0-9]+.xml$/';
- else
- $motif = '/^'.str_pad($art_id,4,'0',STR_PAD_LEFT).'.[0-9]{10}-[0-9]+.xml$/';
-
- $count=1;
- $datetime=date('YmdHi');
- # Nouvel objet plxGlob et récupération des fichiers
- $plxGlob_coms = clone $this->plxMotor->plxGlob_coms;
- if($aFiles = $plxGlob_coms->query($motif,'com','rsort',0,false,'before')) {
- $aComArtTitles = array(); # tableau contenant les titres des articles
- $isComArtTitle = (strpos($format, '#com_art_title')!=FALSE) ? true : false;
- # On parcourt les fichiers des commentaires
- foreach($aFiles as $v) {
- # On filtre si le commentaire appartient à un article d'une catégorie inactive
- if(isset($this->plxMotor->activeArts[substr($v,0,4)])) {
- $com = $this->plxMotor->parseCommentaire(PLX_ROOT.$this->plxMotor->aConf['racine_commentaires'].$v);
- $artInfo = $this->plxMotor->artInfoFromFilename($this->plxMotor->plxGlob_arts->aFiles[$com['article']]);
- if($artInfo['artDate']<=$datetime) { # on ne prends que les commentaires pour les articles publiés
- if(empty($cat_ids) OR preg_match('/('.$cat_ids.')/', $artInfo['catId'])) {
- $url = '?article'.intval($com['article']).'/'.$artInfo['artUrl'].'#c'.$com['article'].'-'.$com['index'];
- $date = $com['date'];
- $content = strip_tags($com['content']);
- # On modifie nos motifs
- $row = str_replace('L_SAID', L_SAID, $format);
- $row = str_replace('#com_id',$com['index'],$row);
- $row = str_replace('#com_url',$this->plxMotor->urlRewrite($url),$row);
- $row = str_replace('#com_author',$com['author'],$row);
- while(preg_match('/#com_content\(([0-9]+)\)/',$row,$capture)) {
- if($com['author'] == 'admin')
- $row = str_replace('#com_content('.$capture[1].')',plxUtils::strCut($content,$capture[1]),$row);
- else
- $row = str_replace('#com_content('.$capture[1].')',plxUtils::strCheck(plxUtils::strCut(plxUtils::strRevCheck($content),$capture[1])),$row);
- }
- $row = str_replace('#com_content',$content,$row);
- $row = str_replace('#com_date',plxDate::formatDate($date,'#num_day/#num_month/#num_year(4)'),$row);
- $row = str_replace('#com_hour',plxDate::formatDate($date,'#time'),$row);
- $row = plxDate::formatDate($date,$row);
- # récupération du titre de l'article
- if($isComArtTitle) {
- if(isset($aComArtTitles[$com['article']])) {
- $row = str_replace('#com_art_title',$aComArtTitles[$com['article']],$row);
- }
- else {
- if($file = $this->plxMotor->plxGlob_arts->query('/^'.$com['article'].'.(.*).xml$/')) {
- $art = $this->plxMotor->parseArticle(PLX_ROOT.$this->plxMotor->aConf['racine_articles'].$file[0]);
- $aComArtTitles[$com['article']] = $art_title = $art['title'];
- $row = str_replace('#com_art_title',$art_title,$row);
- }
- }
- }
- # On genère notre ligne
- echo $row;
- $count++;
- }
- }
- }
- if($count>$max) break;
- }
- }
- }
-
- /**
- * Méthode qui affiche la liste des pages statiques.
- *
- * @param extra si renseigné: nom du lien vers la page d'accueil affiché en première position
- * @param format format du texte pour chaque page (variable : #static_id, #static_status, #static_url, #static_name, #group_id, #group_class, #group_name)
- * @param format_group format du texte pour chaque groupe (variable : #group_class, #group_name, #group_status)
- * @param menublog position du menu Blog (si non renseigné le menu n'est pas affiché)
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function staticList($extra='', $format='#static_name ', $format_group='#group_name ', $menublog=false) {
-
- $menus = array();
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticListBegin'))) return;
- $home = ((empty($this->plxMotor->get) OR preg_match('/^page[0-9]*/',$this->plxMotor->get)) AND basename($_SERVER['SCRIPT_NAME'])=="index.php");
- # Si on a la variable extra, on affiche un lien vers la page d'accueil (avec $extra comme nom)
- if($extra != '') {
- $stat = str_replace('#static_id','static-home',$format);
- $stat = str_replace('#static_class','static menu',$stat);
- $stat = str_replace('#static_url',$this->plxMotor->urlRewrite(),$stat);
- $stat = str_replace('#static_name',plxUtils::strCheck($extra),$stat);
- $stat = str_replace('#static_status',($home==true?"active":"noactive"), $stat);
- $menus[][] = $stat;
- }
- $group_active = "";
- if($this->plxMotor->aStats) {
- foreach($this->plxMotor->aStats as $k=>$v) {
- if($v['active'] == 1 AND $v['menu'] == 'oui') { # La page est bien active et dispo ds le menu
- $stat = str_replace('#static_id','static-'.intval($k),$format);
- $stat = str_replace('#static_class','static menu',$stat);
- if($v['url'][0]=='?') # url interne commençant par ?
- $stat = str_replace('#static_url',$this->plxMotor->urlRewrite($v['url']),$stat);
- elseif(plxUtils::checkSite($v['url'],false)) # url externe en http ou autre
- $stat = str_replace('#static_url',$v['url'],$stat);
- else # url page statique
- $stat = str_replace('#static_url',$this->plxMotor->urlRewrite('?static'.intval($k).'/'.$v['url']),$stat);
- $stat = str_replace('#static_name',plxUtils::strCheck($v['name']),$stat);
- $stat = str_replace('#static_status',($this->staticId()==intval($k)?'active':'noactive'), $stat);
- if($v['group']=='')
- $menus[][] = $stat;
- else
- $menus[$v['group']][] = $stat;
- if($group_active=="" AND $home===false AND $this->staticId()==intval($k) AND $v['group']!='')
- $group_active = $v['group'];
- }
- }
- }
- if($menublog) {
- if($this->plxMotor->aConf['homestatic']!='' AND isset($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']])) {
- if($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']]['active']) {
- $menu = str_replace('#static_id','static-blog',$format);
- if ($this->plxMotor->get AND preg_match('/(blog|categorie|archives|tag|article)/', $_SERVER['QUERY_STRING'].$this->plxMotor->mode)) {
- $menu = str_replace('#static_status','active',$menu);
- } else {
- $menu = str_replace('#static_status','noactive',$menu);
- }
- $menu = str_replace('#static_url', $this->plxMotor->urlRewrite('?blog'),$menu);
- $menu = str_replace('#static_name',L_PAGEBLOG_TITLE,$menu);
- $menu = str_replace('#static_class','static menu',$menu);
- array_splice($menus, (intval($menublog)-1), 0, array($menu));
- }
- }
- }
-
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticListEnd'))) return;
-
- # Affichage des pages statiques + menu Accueil et Blog
- if($menus) {
- foreach($menus as $k=>$v) {
- if(is_numeric($k)) {
- echo "\n".(is_array($v) ? $v[0] : $v);
- }
- else {
- $group = str_replace('#group_id','static-group-'.plxUtils::title2url($k),$format_group);
- $group = str_replace('#group_class','static group',$group);
- $group = str_replace('#group_status',($group_active==$k?'active':'noactive'),$group);
- $group = str_replace('#group_name',plxUtils::strCheck($k),$group);
- echo "\n\n\t".$group."\n\t\t\t";
- foreach($v as $kk => $vv) {
- echo "\n\t\t".$vv;
- }
- echo "\n\t \n \n";
- }
- }
- echo "\n";
- }
-
- }
-
- /**
- * Méthode qui retourne l'id de la page statique active
- *
- * @return int
- * @scope static
- * @author Florent MONTHEL, Stéphane F.
- **/
- public function staticId() {
-
- # On va vérifier que la catégorie existe en mode catégorie
- if($this->plxMotor->mode == 'static' AND isset($this->plxMotor->aStats[ $this->plxMotor->cible ]))
- return intval($this->plxMotor->cible);
- else
- return plxUtils::strCheck($this->plxMotor->mode);
- }
-
- /**
- * Méthode qui affiche ou retourne l'url de la page statique
- *
- * @param echo si à VRAI affichage à l'écran
- * @param extra paramètres supplémentaires pouvant être rajoutés à la fin de l'url de l'atricle
- * @return stdout
- * @scope static
- * @author Florent MONTHEL, Stéphane F
- **/
- public function staticUrl($echo=true, $extra='') {
-
- # Recupération ID URL
- $staticId = $this->staticId();
- $staticIdFill = str_pad($staticId,3,'0',STR_PAD_LEFT);
- if(!empty($staticId) AND isset($this->plxMotor->aStats[$staticIdFill])) {
- $url = $this->plxMotor->urlRewrite('?static'.$staticId.'/'.$this->plxMotor->aStats[$staticIdFill]['url'].$extra);
- if($echo)
- echo $url;
- else
- return $url;
- }
- }
-
- /**
- * Méthode qui affiche le titre de la page statique
- *
- * @return stdout
- * @scope static
- * @author Florent MONTHEL
- **/
- public function staticTitle() {
-
- echo plxUtils::strCheck($this->plxMotor->aStats[ $this->plxMotor->cible ]['name']);
- }
-
- /**
- * Méthode qui affiche le groupe de la page statique
- *
- * @return stdout
- * @scope static
- * @author Stéphane F.
- **/
- public function staticGroup() {
-
- echo plxUtils::strCheck($this->plxMotor->aStats[ $this->plxMotor->cible ]['group']);
- }
-
- /**
- * Méthode qui affiche la date de la dernière modification de la page statique selon le format choisi
- *
- * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
- * @return stdout
- * @scope static
- * @author Anthony T.
- **/
- public function staticDate($format='#day #num_day #month #num_year(4)') {
-
- # On genere le nom du fichier dont on veux récupérer la date
- $file = PLX_ROOT.$this->plxMotor->aConf['racine_statiques'].$this->plxMotor->cible;
- $file .= '.'.$this->plxMotor->aStats[ $this->plxMotor->cible ]['url'].'.php';
- # Test de l'existence du fichier
- if(!file_exists($file)) return;
- # On récupère la date de la dernière modification du fichier qu'on formate
- echo plxDate::formatDate(date('YmdHi', filemtime($file)), $format);
- }
-
- /**
- * Méthode qui affiche la date de creation de la page statique selon le format choisi
- *
- * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
- * @return stdout
- * @scope static
- * @author Stephane F.
- **/
- public function staticCreationDate($format='#num_day/#num_month/#num_year(4) #time') {
-
- echo plxDate::formatDate($this->plxMotor->aStats[$this->plxMotor->cible]['date_creation'],$format);
- }
-
- /**
- * Méthode qui affiche la date de modification de la page statique selon le format choisi
- *
- * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2))
- * @return stdout
- * @scope static
- * @author Stephane F.
- **/
- public function staticUpdateDate($format='#num_day/#num_month/#num_year(4) #time') {
-
- echo plxDate::formatDate($this->plxMotor->aStats[$this->plxMotor->cible]['date_update'],$format);
- }
-
- /**
- * Méthode qui inclut le code source de la page statique
- *
- * @return stdout
- * @scope static
- * @author Florent MONTHEL, Stephane F
- **/
- public function staticContent() {
-
- if (eval($this->plxMotor->plxPlugins->callHook("plxShowStaticContentBegin"))) return;
-
- # On va verifier que la page a inclure est lisible
- if($this->plxMotor->aStats[ $this->plxMotor->cible ]['readable'] == 1) {
- # On genere le nom du fichier a inclure
- $file = PLX_ROOT.$this->plxMotor->aConf['racine_statiques'].$this->plxMotor->cible;
- $file .= '.'.$this->plxMotor->aStats[ $this->plxMotor->cible ]['url'].'.php';
- # Inclusion du fichier
- ob_start();
- require $file;
- $output = ob_get_clean();
- eval($this->plxMotor->plxPlugins->callHook('plxShowStaticContent'));
- echo $output;
- } else {
- echo ''.L_STATICCONTENT_INPROCESS.'
';
- }
-
- }
-
- /**
- * Méthode qui affiche une page statique en lui passant son id (si cette page est active ou non)
- *
- * @param id id numérique ou url/titre de la page statique
- * @return stdout
- * @scope global
- * @author Stéphane F
- **/
- public function staticInclude($id) {
-
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticInclude'))) return ;
- # On génère un nouvel objet plxGlob
- $plxGlob_stats = plxGlob::getInstance(PLX_ROOT.$this->plxMotor->aConf['racine_statiques']);
- if(is_numeric($id)) # inclusion à partir de l'id de la page
- $regx = '/^'.str_pad($id,3,'0',STR_PAD_LEFT).'.[a-z0-9-]+.php$/';
- else { # inclusion à partir du titre de la page
- $url = plxUtils::title2url($id);
- $regx = '/^[0-9]{3}.'.$url.'.php$/';
- }
- if($files = $plxGlob_stats->query($regx)) {
- # on récupère l'id de la page pour tester si elle est active
- if(preg_match('/^([0-9]{3}).(.*).php$/', $files[0], $c)) {
- if($this->plxMotor->aStats[$c[1]]['active'])
- include(PLX_ROOT.$this->plxMotor->aConf['racine_statiques'].$files[0]);
- }
- }
- }
-
- /**
- * Méthode qui affiche la pagination
- *
- * @return stdout
- * @scope global
- * @author Florent MONTHEL, Stephane F
- **/
- public function pagination() {
-
- $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
- $aFiles = $plxGlob_arts->query($this->plxMotor->motif,'art','',0,false,'before');
-
- if($aFiles AND $this->plxMotor->bypage AND sizeof($aFiles)>$this->plxMotor->bypage) {
-
- # on supprime le n° de page courante dans l'url
- $arg_url = $this->plxMotor->get;
- if(preg_match('/(\/?page[0-9]+)$/',$arg_url,$capture)) {
- $arg_url = str_replace($capture[1], '', $arg_url);
- }
- # Calcul des pages
- $prev_page = $this->plxMotor->page - 1;
- $next_page = $this->plxMotor->page + 1;
- $last_page = ceil(sizeof($aFiles)/$this->plxMotor->bypage);
- # Generation des URLs
- $f_url = $this->plxMotor->urlRewrite('?'.$arg_url); # Premiere page
- $arg = (!empty($arg_url) AND $prev_page>1) ? $arg_url.'/' : $arg_url;
- $p_url = $this->plxMotor->urlRewrite('?'.$arg.($prev_page<=1?'':'page'.$prev_page)); # Page precedente
- $arg = !empty($arg_url) ? $arg_url.'/' : $arg_url;
- $n_url = $this->plxMotor->urlRewrite('?'.$arg.'page'.$next_page); # Page suivante
- $l_url = $this->plxMotor->urlRewrite('?'.$arg.'page'.$last_page); # Derniere page
-
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowPagination'))) return;
-
- # On effectue l'affichage
- if($this->plxMotor->page > 2) # Si la page active > 2 on affiche un lien 1ere page
- echo ''.L_PAGINATION_FIRST.' ';
- if($this->plxMotor->page > 1) # Si la page active > 1 on affiche un lien page precedente
- echo ''.L_PAGINATION_PREVIOUS.' ';
- # Affichage de la page courante
- printf(''.L_PAGINATION.' ',$this->plxMotor->page,$last_page);
- if($this->plxMotor->page < $last_page) # Si la page active < derniere page on affiche un lien page suivante
- echo ' '.L_PAGINATION_NEXT.' ';
- if(($this->plxMotor->page + 1) < $last_page) # Si la page active++ < derniere page on affiche un lien derniere page
- echo ' '.L_PAGINATION_LAST.' ';
- }
- }
-
- /**
- * Méthode qui affiche la question du capcha
- *
- * @return stdout
- * @scope global
- * @author Florent MONTHEL, Stephane F.
- **/
- public function capchaQ() {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowCapchaQ'))) return;
- echo $this->plxMotor->plxCapcha->q();
- echo ' ';
- }
-
- /**
- * Méthode qui affiche la réponse du capcha cryptée en sha1
- * DEPRECATED
- *
- * @return stdout
- * @scope global
- * @author Florent MONTHEL, Stephane F.
- **/
- public function capchaR() {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowCapchaR'))) return;
- echo $this->plxMotor->plxCapcha->r();
-
- }
-
- /**
- * Méthode qui affiche le message d'erreur de l'objet plxErreur
- *
- * @return stdout
- * @scope erreur
- * @author Florent MONTHEL
- **/
- public function erreurMessage() {
-
- echo $this->plxMotor->plxErreur->getMessage();
- }
-
- /**
- * Méthode qui affiche le nom du tag (linké ou non)
- *
- * @param type type d'affichage : link => sous forme de lien
- * @return stdout
- * @scope tags
- * @author Stephane F
- **/
- public function tagName($type='') {
-
- if($this->plxMotor->mode == 'tags') {
- $tag = plxUtils::strCheck($this->plxMotor->cible);
- $tagName = plxUtils::strCheck($this->plxMotor->cibleName);
- # On effectue l'affichage
- if($type == 'link')
- echo ''.$tagName.' ';
- else
- echo $tagName;
- }
- }
-
- /**
- * Méthode qui affiche un lien vers le fil Rss des articles d'un tag
- *
- * @param type type de flux (obsolete)
- * @param tag nom du tag
- * @return stdout
- * @scope home,categorie,article,tags,archives
- * @author Stephane F
- **/
-
- public function tagFeed($type='rss', $tag='') {
-
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowTagFeed'))) return;
-
- if($tag=='' AND $this->plxMotor->mode == 'tags')
- $tag = $this->plxMotor->cible;
-
- echo ''.L_ARTFEED_RSS_TAG.' ';
-
- }
-
- /**
- * Méthode qui affiche la liste de tous les tags.
- *
- * @param format format du texte pour chaque tag (variable : #tag_size #tag_status, #tag_count, #tag_item, #tag_url, #tag_name, #nb_art)
- * @param max nombre maxi de tags à afficher
- * @param order tri des tags (random, alpha, '')
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function tagList($format='#tag_name ', $max='', $order='') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowTagList'))) return;
-
- $datetime = date('YmdHi');
- $array=array();
- $alphasort=array();
- # On verifie qu'il y a des tags
- if($this->plxMotor->aTags) {
- # On liste les tags sans créer de doublon
- foreach($this->plxMotor->aTags as $idart => $tag) {
- if(isset($this->plxMotor->activeArts[$idart]) AND $tag['date']<=$datetime AND $tag['active']) {
- if($tags = array_map('trim', explode(',', $tag['tags']))) {
- foreach($tags as $tag) {
- if($tag!='') {
- $t = plxUtils::title2url($tag);
- if(!isset($array['_'.$tag])) {
- $array['_'.$tag]=array('name'=>$tag,'url'=>$t,'count'=>1);
- }
- else
- $array['_'.$tag]['count']++;
- if(!in_array($t, $alphasort))
- $alphasort[] = $t; # pour le tri alpha
- }
- }
- }
- }
- }
-
- # tri des tags
- switch($order) {
- case 'alpha':
- if($alphasort) array_multisort($alphasort, SORT_ASC, $array);
- break;
- case 'random':
- $arr_elem = array();
- $keys = array_keys($array);
- shuffle($keys);
- foreach ($keys as $key) {
- $arr_elem[$key] = $array[$key];
- }
- $array = $arr_elem;
- break;
- }
-
- # limite sur le nombre de tags à afficher
- if($max!='') $array=array_slice($array, 0, intval($max), true);
-
- }
-
- $mode = $this->plxMotor->mode;
-
- # Récupération de la liste des tags de l'article si on est en mode 'article'
- # pour mettre en évidence les tags dans la sidebar s'ils sont attachés à l'article
- $artTags = array();
- if($mode=='article') {
- $artTagList = $this->plxMotor->plxRecord_arts->f('tags');
- if(!empty($artTagList)) {
- $artTags = array_map('trim', explode(',', $artTagList));
- }
- }
-
- # On affiche la liste
- $size=0;
- foreach($array as $tagname => $tag) {
- $name = str_replace('#tag_id','tag-'.$size++,$format);
- $name = str_replace('#tag_size','tag-size-'.($tag['count']>10?'max':$tag['count']),$name);
- $name = str_replace('#tag_count',$tag['count'],$name);
- $name = str_replace('#tag_item',$tag['url'],$name);
- $name = str_replace('#tag_url',$this->plxMotor->urlRewrite('?tag/'.$tag['url']),$name);
- $name = str_replace('#tag_name',plxUtils::strCheck($tag['name']),$name);
- $name = str_replace('#nb_art',$tag['count'],$name);
- if($mode=='article' AND in_array($tag['name'],$artTags))
- $name = str_replace('#tag_status','active', $name);
- else
- $name = str_replace('#tag_status',(($mode=='tags' AND $this->plxMotor->cible==$tag['url'])?'active':'noactive'), $name);
-
- echo $name;
- }
- }
-
- /**
- * Méthode qui affiche la liste des archives
- *
- * @param format format du texte pour l'affichage (variable : #archives_id, #archives_status, #archives_nbart, #archives_url, #archives_name, #archives_month, #archives_year)
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function archList($format='#archives_name '){
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowArchList'))) return;
-
- $curYear=date('Y');
- $array = array();
-
- $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
-
- if($files = $plxGlob_arts->query('/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->plxMotor->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/','art','rsort',0,false,'before')) {
- foreach($files as $id => $filename){
- if(preg_match('/([0-9]{4}).((?:[0-9]|home|,)*(?:'.$this->plxMotor->activeCats.'|home)(?:[0-9]|home|,)*).[0-9]{3}.([0-9]{4})([0-9]{2})([0-9]{6}).([a-z0-9-]+).xml$/',$filename,$capture)){
- if($capture[3]==$curYear) {
- if(!isset($array[$capture[3]][$capture[4]])) $array[$capture[3]][$capture[4]]=1;
- else $array[$capture[3]][$capture[4]]++;
- } else {
- if(!isset($array[$capture[3]])) $array[$capture[3]]=1;
- else $array[$capture[3]]++;
- }
- }
- }
- krsort($array);
- # Affichage pour l'année en cours
- if(isset($array[$curYear])) {
- foreach($array[$curYear] as $month => $nbarts){
- $name = str_replace('#archives_id','archives-'.$curYear.$month,$format);
- $name = str_replace('#archives_name',plxDate::getCalendar('month', $month).' '.$curYear,$name);
- $name = str_replace('#archives_year',$curYear,$name);
- $name = str_replace('#archives_month',plxDate::getCalendar('month', $month),$name);
- $name = str_replace('#archives_url', $this->plxMotor->urlRewrite('?archives/'.$curYear.'/'.$month), $name);
- $name = str_replace('#archives_nbart',$nbarts,$name);
- $name = str_replace('#archives_status',(($this->plxMotor->mode=="archives" AND $this->plxMotor->cible==$curYear.$month)?'active':'noactive'), $name);
- echo $name;
- }
- }
- # Affichage pour les années précédentes
- unset($array[$curYear]);
- foreach($array as $year => $nbarts){
- $name = str_replace('#archives_id','archives-'.$year,$format);
- $name = str_replace('#archives_name',$year,$name);
- $name = str_replace('#archives_year',$year,$name);
- $name = str_replace('#archives_month',$year,$name);
- $name = str_replace('#archives_url', $this->plxMotor->urlRewrite('?archives/'.$year), $name);
- $name = str_replace('#archives_nbart',$nbarts,$name);
- $name = str_replace('#archives_status',(($this->plxMotor->mode=="archives" AND $this->plxMotor->cible==$year)?'active':'noactive'), $name);
- echo $name;
- }
- }
- }
-
- /**
- * Méthode qui affiche un lien vers la page blog.php
- *
- * @param format format du texte pour l'affichage (variable : #page_id, #page_status, #page_url, #page_name)
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function pageBlog($format='#page_name ') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowPageBlog'))) return;
-
- if($this->plxMotor->aConf['homestatic']!='' AND isset($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']])) {
- if($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']]['active']) {
- $name = str_replace('#page_id','static-blog',$format);
- if ($this->plxMotor->get AND preg_match('/(blog|categorie|archives|tag|article)/', $_SERVER['QUERY_STRING'].$this->plxMotor->mode)) {
- $name = str_replace('#page_status','active',$name);
- } else {
- $name = str_replace('#page_status','noactive',$name);
- }
- $name = str_replace('#page_class','static menu',$name);
- $name = str_replace('#page_url', $this->plxMotor->urlRewrite('?blog'),$name);
- $name = str_replace('#page_name',L_PAGEBLOG_TITLE,$name);
- echo $name;
- }
- }
- }
-
- /**
- * Méthode qui ajoute, s'il existe, le fichier css associé à un template
- *
- * @param css_dir répertoire de stockage des fichiers css (avec un / à la fin)
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function templateCss($css_dir='') {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowTemplateCss'))) return;
-
- $theme = $this->plxMotor->aConf['racine_themes'].$this->plxMotor->style.'/';
- $min_css = str_replace('php','min.css',$this->plxMotor->template);
- $css = str_replace('php','css',$this->plxMotor->template);
-
- if(is_file($theme.$css_dir.$min_css)) {
- echo ' '."\n";
- }
- elseif(is_file($theme.$css_dir.$css)) {
- echo ' '."\n";
- }
- }
-
- /**
- * Méthode qui ajoute, s'il existe, le fichier css associé aux plugins
- *
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function pluginsCss() {
- # Hook Plugins
- if(eval($this->plxMotor->plxPlugins->callHook('plxShowPluginsCss'))) return;
-
- $filename = $this->plxMotor->aConf['racine_plugins'].'site.css';
- if(is_file(PLX_ROOT.$filename))
- echo ' '."\n";
- }
-
- /**
- * Méthode qui affiche une clé de traduction appelée à partir du thème
- *
- * @param $lang clé de traduction à afficher
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function lang($key='') {
- if(isset($this->lang[$key]))
- echo $this->lang[$key];
- else
- echo $key;
- }
-
- /**
- * Méthode qui renvoie une clé de traduction appelée à partir du thème
- *
- * @param $lang clé de traduction à afficher
- * @return stdout
- * @scope global
- * @author Stephane F
- **/
- public function getLang($key='') {
- if(isset($this->lang[$key]))
- return $this->lang[$key];
- else
- return $key;
- }
-
- /**
- * Méthode qui appel un hook à partir du thème
- *
- * @param hookName nom du hook
- * @param parms parametre ou liste de paramètres sous forme de array
- * @return stdout
- * @scope global
- * @author Stephane F
- *
- * Exemple:
- * # sans return, passage d'un paramètre
- * eval($plxShow->callHook('MyPluginFunction', 'AZERTY'));
- * # avec return, passage de 2 paramètres à faire sous forme de tableau
- * $b = $plxShow->callHook('MyPluginFunction', array('AZERTY', 'QWERTY'));
- **/
- public function callHook($hookName, $parms=null) {
- $return = $this->plxMotor->plxPlugins->callHook($hookName, $parms);
- if(is_array($return)) {
- ob_start();
- eval($return[0]);
- echo ob_get_clean();
- return $return[1];
- } else {
- return $return;
- }
- }
-
- /**
- * Méthode qui permet d'injecter du code php au niveau d'un hook
- *
- * @param hookName nom du hook
- * @param code code php à injecter
- * @scope global
- * @author Stephane F
- */
- public function addCodeToHook($hookName, $userCode) {
- $this->plxMotor->plxPlugins->aHooks[$hookName][] = array(
- 'class' => '=SHORTCODE=',
- 'method' => $userCode
- );
- }
-
-}
-?>
+plxMotor = plxMotor::getInstance();
+
+ # Chargement du fichier de lang du theme
+ $langfile = PLX_ROOT.$this->plxMotor->aConf['racine_themes'].$this->plxMotor->style.'/lang/'.$this->plxMotor->aConf['default_lang'].'.php';
+ if(is_file($langfile)) {
+ include($langfile);
+ $this->lang = $LANG; # $LANG = tableau contenant les traductions présentes dans le fichier de langue
+ }
+
+ # Hook Plugins
+ eval($this->plxMotor->plxPlugins->callHook('plxShowConstruct'));
+
+ }
+
+ /**
+ * Méthode qui affiche les urls réécrites
+ *
+ * @param url url à réécrire
+ * @return stdout
+ * @author Stéphane F
+ **/
+ public function urlRewrite($url='') {
+
+ echo $this->plxMotor->urlRewrite($url);
+ }
+
+ /**
+ * Méthode qui affiche le type de compression http
+ *
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function httpEncoding() {
+
+ $encoding = plxUtils::httpEncoding();
+ if($this->plxMotor->aConf['gzip'] AND $encoding)
+ printf(L_HTTPENCODING, strtoupper($encoding));
+
+ }
+
+ /**
+ * Méthode qui affiche l'URL du site
+ *
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL
+ **/
+ public function racine() {
+
+ echo $this->plxMotor->racine;
+ }
+
+ /**
+ * Méthode qui affiche ou retourne le mode d'affichage
+ *
+ * @param echo si à VRAI affichage écran (à FAUX par défaut pour gérer la non régression PluXml < 5.6)
+ * @return string mode d'affichage (home, article, categorie, static ou erreur)
+ * @scope global
+ * @author Stephane F.
+ **/
+ public function mode($echo=false) {
+ if($echo)
+ echo $this->plxMotor->mode;
+ else
+ return $this->plxMotor->mode;
+ }
+
+ /**
+ * Méthode qui affiche le charset selon la casse $casse
+ *
+ * @param casse casse min ou maj
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL
+ **/
+ public function charset($casse='min') {
+
+ if($casse != 'min') # En majuscule
+ echo strtoupper(PLX_CHARSET);
+ else # En minuscule
+ echo strtolower(PLX_CHARSET);
+ }
+
+ /**
+ * Méthode qui affiche la version de PluXml
+ *
+ * @return stdout
+ * @scope global
+ * @author Anthony GUÉRIN et Florent MONTHEL
+ **/
+ public function version() {
+
+ echo PLX_VERSION;
+ }
+
+ /**
+ * Méthode qui affiche ou renvoie la langue par défaut
+ *
+ * @param echo si à VRAI affichage à l'écran
+ * @return stdout/string
+ * @author Stéphane F
+ **/
+ public function defaultLang($echo=true) {
+ if($echo)
+ echo $this->plxMotor->aConf['default_lang'];
+ else
+ return $this->plxMotor->aConf['default_lang'];
+ }
+
+
+ /**
+ * Méthode qui affiche la variable get de l'objet plxMotor (variable $_GET globale)
+ *
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL
+ **/
+ public function get() {
+
+ echo $this->plxMotor->get;
+ }
+
+ /**
+ * Méthode qui affiche le temps d'exécution de la page
+ *
+ * @return stdout
+ * @scope global
+ * @author Anthony GUÉRIN et Florent MONTHEL
+ **/
+ public function chrono() {
+
+ echo round(getMicrotime()-PLX_MICROTIME,3).'s';
+ }
+
+ /**
+ * Méthode qui affiche le dossier de stockage du style actif
+ *
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function template() {
+
+ echo $this->plxMotor->urlRewrite($this->plxMotor->aConf['racine_themes'].$this->plxMotor->style);
+
+ }
+
+ /**
+ * Méthode qui affiche le titre de la page selon le mode
+ *
+ * @parm format format d'affichage (ex: home=#title - #subtitle;article=#title)
+ * paramètres: home, categorie, article, static, archives, tags, erreur
+ * @parm sep caractère de séparation dans le format d'affichage entre les paramètres
+ * @return stdout
+ * @scope global
+ * @author Stéphane F
+ **/
+ public function pageTitle($format='',$sep=";") {
+
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowPageTitle'))) return;
+
+ if($this->plxMotor->mode == 'home') {
+ $title = $this->plxMotor->aConf['title'];
+ $subtitle = $this->plxMotor->aConf['description'];
+ }
+ elseif($this->plxMotor->mode == 'categorie') {
+ $title_htmltag = $this->plxMotor->aCats[$this->plxMotor->cible ]['title_htmltag'];
+ $title = $title_htmltag !='' ? $title_htmltag : $this->plxMotor->aCats[$this->plxMotor->cible]['name'];
+ $subtitle = $this->plxMotor->aConf['title'];
+ }
+ elseif($this->plxMotor->mode == 'article') {
+ $title_htmltag = $this->plxMotor->plxRecord_arts->f('title_htmltag');
+ $title = $title_htmltag !='' ? $title_htmltag : $this->plxMotor->plxRecord_arts->f('title');
+ $subtitle = $this->plxMotor->aConf['title'];
+ }
+ elseif($this->plxMotor->mode == 'static') {
+ $title_htmltag = $this->plxMotor->aStats[$this->plxMotor->cible ]['title_htmltag'];
+ $title = $title_htmltag !='' ? $title_htmltag : $this->plxMotor->aStats[$this->plxMotor->cible]['name'];
+ $subtitle = $this->plxMotor->aConf['title'];
+ }
+ elseif($this->plxMotor->mode == 'archives') {
+ preg_match('/^(\d{4})(\d{2})?(\d{2})?/',$this->plxMotor->cible, $capture);
+ $year = !empty($capture[1]) ? ' '.$capture[1] : '';
+ $month = !empty($capture[2]) ? ' '.plxDate::getCalendar('month', $capture[2]) : '';
+ $day = !empty($capture[3]) ? ' '.plxDate::getCalendar('day', $capture[3]) : '';
+ $title = L_PAGETITLE_ARCHIVES.$day.$month.$year;
+ $subtitle = $this->plxMotor->aConf['title'];
+ }
+ elseif($this->plxMotor->mode == 'tags') {
+ $title = L_PAGETITLE_TAG.' '.$this->plxMotor->cibleName;
+ $subtitle = $this->plxMotor->aConf['title'];
+ }
+ elseif($this->plxMotor->mode == 'erreur') {
+ $title = $this->plxMotor->plxErreur->getMessage();
+ $subtitle = $this->plxMotor->aConf['title'];
+ }
+ else { # mode par défaut
+ $title = $this->plxMotor->aConf['title'];
+ $subtitle = $this->plxMotor->aConf['description'];
+ }
+
+ $fmt = '';
+ if(preg_match('/'.$this->plxMotor->mode.'\s*=\s*(.*?)\s*('.$sep.'|$)/i',$format,$capture)) {
+ $fmt = trim($capture[1]);
+ }
+ $format = $fmt=='' ? '#title - #subtitle' : $fmt;
+ $txt = str_replace('#title', trim($title), $format);
+ $txt = str_replace('#subtitle', trim($subtitle), $txt);
+ echo plxUtils::strCheck(trim($txt, ' - '));
+
+ }
+
+ /**
+ * Méthode qui affiche le meta passé en paramètre
+ *
+ * @param meta nom du meta à afficher (description, keywords,author)
+ * @return stdout
+ * @scope global
+ * @author Stéphane F
+ **/
+ public function meta($meta='') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowMeta'))) return;
+
+ if(!in_array($meta, array('description','keywords','author')))
+ return;
+
+ $meta=strtolower($meta);
+
+ if($this->plxMotor->mode == 'home') {
+ if(!empty($this->plxMotor->aConf['meta_'.$meta]))
+ echo ' '."\n";
+ return;
+ }
+ if($this->plxMotor->mode == 'article') {
+ if($meta=='author')
+ echo ' '."\n";
+ else {
+ $meta_content=trim($this->plxMotor->plxRecord_arts->f('meta_'.$meta));
+ if(!empty($meta_content))
+ echo ' '."\n";
+ elseif(!empty($this->plxMotor->aConf['meta_'.$meta]))
+ echo ' '."\n";
+ }
+ return;
+ }
+ if($this->plxMotor->mode == 'static') {
+ if(!empty($this->plxMotor->aStats[ $this->plxMotor->cible ]['meta_'.$meta]))
+ echo ' '."\n";
+ elseif(!empty($this->plxMotor->aConf['meta_'.$meta]))
+ echo ' '."\n";
+ return;
+ }
+ if($this->plxMotor->mode == 'categorie') {
+ if(!empty($this->plxMotor->aCats[ $this->plxMotor->cible ]['meta_'.$meta]))
+ echo ' '."\n";
+ elseif(!empty($this->plxMotor->aConf['meta_'.$meta]))
+ echo ' '."\n";
+ return;
+ }
+ }
+
+ /**
+ * Méthode qui affiche le titre du blog linké (variable $type='link') ou non
+ *
+ * @param type type d'affichage: texte ou sous forme de lien
+ * @return stdout
+ * @scope global
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
+ **/
+ public function mainTitle($type='') {
+
+ $title = plxUtils::strCheck($this->plxMotor->aConf['title']);
+ if($type == 'link') # Type lien
+ echo ''.$title.' ';
+ else # Type normal
+ echo $title;
+ }
+
+ /**
+ * Méthode qui affiche le sous-titre du blog
+ *
+ * @return stdout
+ * @scope global
+ * @author Anthony GUÉRIN et Florent MONTHEL
+ **/
+ public function subTitle() {
+
+ echo plxUtils::strCheck($this->plxMotor->aConf['description']);
+ }
+
+ /**
+ * Méthode qui affiche la liste des catégories actives.
+ * Si la variable $extra est renseignée, un lien vers la
+ * page d'accueil (nommé $extra) sera mis en place en première
+ * position.
+ *
+ * @param extra nom du lien vers la page d'accueil
+ * @param format format du texte pour chaque catégorie (variable : #cat_id, #cat_status, #cat_url, #cat_name, #cat_description, #art_nb)
+ * @param include liste des catégories à afficher séparées par le caractère | (exemple: 001|003)
+ * @param exclude liste des catégories à ne pas afficher séparées par le caractère | (exemple: 002|003)
+ * @return stdout
+ * @scope global
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
+ **/
+ public function catList($extra='', $format='#cat_name ', $include='', $exclude='') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastCatList'))) return;
+
+ # Si on a la variable extra, on affiche un lien vers la page d'accueil (avec $extra comme nom)
+ if($extra != '') {
+ $name = str_replace('#cat_id','cat-home',$format);
+ $name = str_replace('#cat_url',$this->plxMotor->urlRewrite(),$name);
+ $name = str_replace('#cat_name',plxUtils::strCheck($extra),$name);
+ $name = str_replace('#cat_status',($this->catId()=='home'?'active':'noactive'), $name);
+ $name = str_replace('#art_nb','',$name);
+ echo $name;
+ }
+ # On verifie qu'il y a des categories
+ if($this->plxMotor->aCats) {
+ foreach($this->plxMotor->aCats as $k=>$v) {
+ $in = (empty($include) OR preg_match('/('.$include.')/', $k));
+ $ex = (!empty($exclude) AND preg_match('/('.$exclude.')/', $k));
+ if($in AND !$ex) {
+ if(($v['articles']>0 OR $this->plxMotor->aConf['display_empty_cat']) AND ($v['menu']=='oui') AND $v['active']) { # On a des articles
+ # On modifie nos motifs
+ $name = str_replace('#cat_id','cat-'.intval($k),$format);
+ $name = str_replace('#cat_url',$this->plxMotor->urlRewrite('?categorie'.intval($k).'/'.$v['url']),$name);
+ $name = str_replace('#cat_name',plxUtils::strCheck($v['name']),$name);
+ $name = str_replace('#cat_status',($this->catId()==intval($k)?'active':'noactive'), $name);
+ $name = str_replace('#cat_description',plxUtils::strCheck($v['description']),$name);
+ $name = str_replace('#art_nb',$v['articles'],$name);
+ echo $name;
+ }
+ }
+ } # Fin du while
+ }
+ }
+
+ /**
+ * Méthode qui retourne l'id de la catégorie en question (sans les 0 supplémentaires)
+ *
+ * @return int ou string
+ * @scope home,categorie,article,tags,archives
+ * @author Florent MONTHEL
+ **/
+ public function catId() {
+
+ # On va verifier que la categorie existe en mode categorie
+ if($this->plxMotor->mode == 'categorie' AND isset($this->plxMotor->aCats[ $this->plxMotor->cible ]))
+ return intval($this->plxMotor->cible);
+ # On va verifier que la categorie existe en mode article
+ if($this->plxMotor->mode == 'article' AND isset($this->plxMotor->aCats[ $this->plxMotor->plxRecord_arts->f('categorie') ]))
+ return intval($this->plxMotor->plxRecord_arts->f('categorie'));
+ # On va vérifier si c'est la catégorie home
+ if($this->plxMotor->mode == 'categorie' OR $this->plxMotor->mode == 'home' OR $this->plxMotor->mode == 'article')
+ return 'home';
+ }
+
+ /**
+ * Méthode qui affiche le contenu de la description d'une catégorie
+ *
+ * @param format format du texte à afficher (variable: #cat_description)
+ * @return stdout
+ * @scope categorie
+ * @author Stephane F.
+ **/
+ public function catDescription($format='#cat_description
') {
+
+ $desc = plxUtils::getValue($this->plxMotor->aCats[$this->plxMotor->cible]['description']);
+ if($this->plxMotor->mode AND $desc)
+ echo str_replace('#cat_description',$desc, $format);
+ }
+
+ /**
+ * Méthode qui retourne l'url d'une catégorie
+ *
+ * @param id id de la categorie sous la forme numérique ou formatée (ex: 1 ou 001)
+ * @return string
+ * @author Stephane F.
+ **/
+ public function catUrl($id) {
+
+ $id=str_pad($id,3,'0',STR_PAD_LEFT);
+ if(isset($this->plxMotor->aCats[$id])) {
+ return $this->plxMotor->urlRewrite('?categorie'.intval($id).'/'.$this->plxMotor->aCats[$id]['url']);
+ }
+ }
+
+ /**
+ * Méthode qui affiche le nom de la catégorie active (linké ou non)
+ *
+ * @param type type d'affichage : link => sous forme de lien
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function catName($type='') {
+
+ # On va verifier que la categorie existe en mode categorie
+ if($this->plxMotor->mode == 'categorie' AND isset($this->plxMotor->aCats[$this->plxMotor->cible])) {
+ # On recupere les infos de la categorie
+ $id = $this->plxMotor->cible;
+ $name = plxUtils::strCheck($this->plxMotor->aCats[$id]['name']);
+ $url = $this->catUrl($id);
+ # On effectue l'affichage
+ if($type == 'link')
+ echo ''.$name.' ';
+ else
+ echo $name;
+ }
+ # On va verifier que la categorie existe en mode article
+ elseif($this->plxMotor->mode == 'article' AND isset($this->plxMotor->aCats[$this->plxMotor->plxRecord_arts->f('categorie')])) {
+ # On recupere les infos de la categorie
+ $id = $this->plxMotor->plxRecord_arts->f('categorie');
+ $name = plxUtils::strCheck($this->plxMotor->aCats[ $id ]['name']);
+ $url = $this->catUrl($id);
+ # On effectue l'affichage
+ if($type == 'link')
+ echo ''.$name.' ';
+ else
+ echo $name;
+ }
+ # Mode home
+ elseif($this->plxMotor->mode == 'home') {
+ if($type == 'link')
+ echo ''.L_HOMEPAGE.' ';
+ else
+ echo L_HOMEPAGE;
+ } else {
+ echo L_UNCLASSIFIED;
+ }
+ }
+
+ /**
+ * Méthode qui retourne l'identifiant de l'article en question (sans les 0 supplémentaires)
+ *
+ * @return int
+ * @scope home,categorie,article,tags,archives
+ * @author Florent MONTHEL
+ **/
+ public function artId() {
+
+ return intval($this->plxMotor->plxRecord_arts->f('numero'));
+ }
+
+ /**
+ * Méthode qui affiche ou retourne l'url de l'article
+ *
+ * @param echo si à VRAI affichage à l'écran
+ * @param extra paramètres supplémentaires pouvant être rajoutés à la fin de l'url de l'atricle
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function artUrl($echo=true, $extra='') {
+
+ # On affiche l'URL
+ $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
+ $url = $this->plxMotor->urlRewrite('?article'.$id.'/'.$this->plxMotor->plxRecord_arts->f('url').$extra);
+ if($echo)
+ echo $url;
+ else
+ return $url;
+
+ }
+
+ /**
+ * Méthode qui affiche le titre de l'article linké (variable $type='link') ou non
+ *
+ * @param type type d'affichage : link => sous forme de lien
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
+ **/
+ public function artTitle($type='') {
+
+ if($type == 'link') { # Type lien
+ $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
+ $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
+ $url = $this->plxMotor->plxRecord_arts->f('url');
+ # On effectue l'affichage
+ echo ''.$title.' ';
+ } else { # Type normal
+ echo plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
+ }
+ }
+
+ /**
+ * Méthode qui affiche l'image d'accroche
+ *
+ * @param format format d'affichage (variables: #img_url, #img_alt, #img_title)
+ * @param echo si à VRAI affichage à l'écran
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+ public function artThumbnail($format=' ', $echo=true) {
+
+ $imgUrl = $this->plxMotor->plxRecord_arts->f('thumbnail');
+ if($imgUrl) {
+ $row = str_replace('#img_url', $this->plxMotor->urlRewrite($imgUrl), $format);
+ $row = str_replace('#img_title', plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('thumbnail_title')), $row);
+ $row = str_replace('#img_alt', $this->plxMotor->plxRecord_arts->f('thumbnail_alt'), $row);
+ if($echo)
+ echo $row;
+ else
+ return $row;
+ } else {
+ if(!$echo) return false;
+ }
+
+ }
+
+ /**
+ * Méthode qui affiche ou renvoie l'auteur de l'article
+ *
+ * @param echo si à VRAI affichage à l'écran
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F
+ **/
+ public function artAuthor($echo=true) {
+
+ if(isset($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['name']))
+ $author = plxUtils::strCheck($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['name']);
+ else
+ $author = L_ARTAUTHOR_UNKNOWN;
+ if($echo)
+ echo $author;
+ else
+ return $author;
+ }
+
+ /**
+ * Méthode qui affiche l'adresse email de l'auteur de l'article
+ *
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+ public function artAuthorEmail() {
+
+ if(isset($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['email']))
+ echo plxUtils::strCheck($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['email']);
+ }
+
+ /**
+ * Méthode qui affiche les informations sur l'auteur de l'article
+ *
+ * @param format format du texte à afficher (variable: #art_authorinfos, #art_author)
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+
+ public function artAuthorInfos($format='#art_authorinfos
') {
+
+ $infos = plxUtils::getValue($this->plxMotor->aUsers[$this->plxMotor->plxRecord_arts->f('author')]['infos']);
+ if(trim($infos)!='') {
+ $txt = str_replace('#art_authorinfos', $infos, $format);
+ $txt = str_replace('#art_author', $this->artAuthor(false), $txt);
+ echo $txt;
+ }
+ }
+
+ /**
+ * Méthode qui affiche la date de publication de l'article selon le format choisi
+ *
+ * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F.
+ **/
+ public function artDate($format='#day #num_day #month #num_year(4)') {
+
+ echo plxDate::formatDate($this->plxMotor->plxRecord_arts->f('date'),$format);
+ }
+
+ /**
+ * Méthode qui retourne la liste des catégories de l'article séparées par des virgules
+ *
+ * @return string
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+ public function artCatIds() {
+
+ return $this->plxMotor->plxRecord_arts->f('categorie');
+ }
+
+ /**
+ * Méthode qui retourne un tableau contenant les numéros des catégories actives de l'article
+ *
+ * @return array
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+ public function artActiveCatIds() {
+
+ $artCatIds = explode(',', $this->plxMotor->plxRecord_arts->f('categorie'));
+ $activeCats = explode('|',$this->plxMotor->activeCats);
+ return array_intersect($artCatIds,$activeCats);
+
+ }
+
+ /**
+ * Méthode qui affiche la liste des catégories l'article sous forme de lien
+ * ou la chaîne de caractère 'Non classé' si la catégorie
+ * de l'article n'existe pas
+ *
+ * @param separator caractère de séparation entre les catégories affichées
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
+ **/
+ public function artCat($separator=', ') {
+
+ $cats = array();
+ # Initialisation de notre variable interne
+ $catIds = $this->artActiveCatIds();
+ foreach ($catIds as $idx => $catId) {
+ # On verifie que la categorie n'est pas "home"
+ if($catId != 'home') {
+ # On va verifier que la categorie existe
+ if(isset($this->plxMotor->aCats[ $catId ])) {
+ # On recupere les infos de la categorie
+ $name = plxUtils::strCheck($this->plxMotor->aCats[ $catId ]['name']);
+ $url = $this->plxMotor->aCats[ $catId ]['url'];
+ if(isset($this->plxMotor->aCats[ $this->plxMotor->cible ]['url']))
+ $active = $this->plxMotor->aCats[ $this->plxMotor->cible ]['url']==$url?"active":"noactive";
+ else
+ $active = "noactive";
+ # On effectue l'affichage
+ $cats[] = ''.$name.' ';
+ } else { # La categorie n'existe pas
+ $cats[] = L_UNCLASSIFIED;
+ }
+ } else { # Categorie "home"
+ $cats[] = ''.L_HOMEPAGE.' ';
+ }
+ }
+ echo implode($separator, $cats);
+ }
+
+ /**
+ * Méthode qui affiche la liste des tags l'article sous forme de lien
+ *
+ * @param format format du texte pour chaque tag (variable : #tag_status, #tag_url, #tag_name)
+ * @param separator caractère de séparation entre les tags affichées
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+ public function artTags($format='#tag_name ', $separator=',') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowArtTags'))) return;
+
+ # Initialisation de notre variable interne
+ $taglist = $this->plxMotor->plxRecord_arts->f('tags');
+ if(!empty($taglist)) {
+ $tags = array_map('trim', explode(',', $taglist));
+ foreach($tags as $idx => $tag) {
+ $t = plxUtils::title2url($tag);
+ $name = str_replace('#tag_url',$this->plxMotor->urlRewrite('?tag/'.$t),$format);
+ $name = str_replace('#tag_name',plxUtils::strCheck($tag),$name);
+ $name = str_replace('#tag_status',(($this->plxMotor->mode=='tags' AND $this->plxMotor->cible==$t)?'active':'noactive'), $name);
+ echo $name;
+ if ($idx!=sizeof($tags)-1) echo $separator.' ';
+ }
+ }
+ else echo L_ARTTAGS_NONE;
+ }
+
+ /**
+ * Méthode qui affiche le lien "Lire la suite" si le chapô de l'article est renseigné
+ *
+ * @param format format d'affichage du lien pour lire la suite de l'article (#art_url, #art_title)
+ * @return stdout
+ * @scope home,categorie,tags,archives
+ * @author Stephane F
+ **/
+ public function artReadMore($format='') {
+
+ # Affichage du lien "Lire la suite" si un chapo existe
+ if($this->plxMotor->plxRecord_arts->f('chapo') != '') {
+ $format = ($format=='' ? ''.L_ARTCHAPO.'
' : $format);
+ if($format) {
+ # On recupere les infos de l'article
+ $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
+ $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
+ $url = $this->plxMotor->plxRecord_arts->f('url');
+ # Formatage de l'affichage
+ $row = str_replace("#art_url", $this->plxMotor->urlRewrite('?article'.$id.'/'.$url), $format);
+ $row = str_replace("#art_title", $title, $row);
+ echo $row;
+ }
+ }
+ }
+
+ /**
+ * Méthode qui affiche le châpo de l'article ainsi qu'un lien
+ * pour lire la suite de l'article. Si l'article n'a pas de chapô,
+ * le contenu de l'article est affiché (selon paramètres)
+ *
+ * @param format format d'affichage du lien pour lire la suite de l'article (#art_title)
+ * @param content affichage oui/non du contenu si le chapô est vide
+ * @param anchor ancre dans l'article pour faire pointer le lien "Lire la suite" quand on clic dessus
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
+ **/
+ public function artChapo($format=L_ARTCHAPO, $content=true, $anchor='') {
+
+ # On verifie qu'un chapo existe
+ if($this->plxMotor->plxRecord_arts->f('chapo') != '') {
+ # On récupère les infos de l'article
+ $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
+ $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
+ $url = $this->plxMotor->plxRecord_arts->f('url');
+ # On effectue l'affichage
+ echo $this->plxMotor->plxRecord_arts->f('chapo')."\n";
+ if($format) {
+ $title = str_replace("#art_title", $title, $format);
+ echo ''.$title.'
'."\n";
+ }
+ } else { # Pas de chapo, affichage du contenu
+ if($content === true) {
+ echo $this->plxMotor->plxRecord_arts->f('content')."\n";
+ }
+ }
+ }
+
+ /**
+ * Méthode qui affiche le chapô (selon paramètres) suivi du contenu de l'article
+ *
+ * @param chapo affichage oui/non du chapo
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F
+ **/
+ public function artContent($chapo=true) {
+
+ if($chapo === true)
+ echo $this->plxMotor->plxRecord_arts->f('chapo')."\n"; # Chapo
+ echo $this->plxMotor->plxRecord_arts->f('content')."\n";
+
+ }
+
+ /**
+ * Méthode qui affiche la date de creation d'un article selon le format choisi
+ *
+ * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F.
+ **/
+ public function artCreationDate($format='#num_day/#num_month/#num_year(4) #time') {
+
+ echo plxDate::formatDate($this->plxMotor->plxRecord_arts->f('date_creation'),$format);
+ }
+
+ /**
+ * Méthode qui affiche la date de mise à jour d'un article selon le format choisi
+ *
+ * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F.
+ **/
+ public function artUpdateDate($format='#num_day/#num_month/#num_year(4) #time') {
+
+ echo plxDate::formatDate($this->plxMotor->plxRecord_arts->f('date_update'),$format);
+ }
+
+ /**
+ * Méthode qui affiche un lien vers le fil Rss des articles
+ * d'une catégorie précise (si $categorie renseigné) ou du site tout entier
+ *
+ * @param type type de flux (obsolete)
+ * @param categorie identifiant (sans les 0) d'une catégorie
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function artFeed($type='rss', $categorie='') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowArtFeed'))) return;
+
+ if($categorie != '' AND is_numeric($categorie)) {
+ # Fil Rss des articles d'une catégorie
+ $id=str_pad($categorie,3,'0',STR_PAD_LEFT);
+ if(isset($this->plxMotor->aCats[$id])) {
+ echo ''.L_ARTFEED_RSS_CATEGORY.' ';
+ }
+ } else {
+ # Fil Rss des articles
+ echo ''.L_ARTFEED_RSS.' ';
+ }
+ }
+
+ /**
+ * Méthode qui affiche le nombre de commentaires (sous forme de lien ou non selon le mode) d'un article
+ *
+ * @param f1 format d'affichage si nombre de commentaire = 0 (#nb pour afficher le nombre de commentaire)
+ * @param f2 format d'affichage si nombre de commentaire = 1 (#nb pour afficher le nombre de commentaire)
+ * @param f3 format d'affichage si nombre de commentaire > 1 (#nb pour afficher le nombre de commentaire)
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+ public function artNbCom($f1='L_NO_COMMENT',$f2='#nb L_COMMENT',$f3='#nb L_COMMENTS') {
+
+ $nb = intval($this->plxMotor->plxRecord_arts->f('nb_com'));
+ $num = intval($this->plxMotor->plxRecord_arts->f('numero'));
+ $url = $this->plxMotor->plxRecord_arts->f('url');
+
+ if($nb==0) {
+ $txt = str_replace('L_NO_COMMENT', L_NO_COMMENT, $f1);
+ $title = $nb.' '.L_NO_COMMENT;
+ }
+ elseif($nb==1) {
+ $txt = str_replace('L_COMMENT', L_COMMENT, $f2);
+ $title = $nb.' '.L_COMMENT;
+ }
+ else {
+ $txt = str_replace('L_COMMENTS', L_COMMENTS, $f3);
+ $title = $nb.' '.L_COMMENTS;
+ }
+ $txt = str_replace('#nb',$nb,$txt);
+
+ if($this->plxMotor->mode == 'article')
+ echo $txt;
+ else
+ echo ''.$txt.' ';
+
+ }
+
+ /**
+ * Méthode qui affiche le nombre total d'articles publiés sur le site.
+ *
+ * @param f1 format d'affichage si nombre d'article = 0 (#nb pour afficher le nombre de commentaire)
+ * @param f2 format d'affichage si nombre d'article = 1 (#nb pour afficher le nombre de commentaire)
+ * @param f3 format d'affichage si nombre d'article > 1 (#nb pour afficher le nombre de commentaire)
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function nbAllArt($f1='L_NO_ARTICLE',$f2='#nb L_ARTICLE',$f3='#nb L_ARTICLES') {
+
+ $nb = $this->plxMotor->nbArticles('published', '[0-9]{3}', '', 'before');
+
+ if($nb==0)
+ $txt = str_replace('L_NO_ARTICLE', L_NO_ARTICLE, $f1);
+ elseif($nb==1)
+ $txt = str_replace('L_ARTICLE', L_ARTICLE, $f2);
+ else
+ $txt = str_replace('L_ARTICLES', L_ARTICLES, $f3);
+
+ $txt = str_replace('#nb',$nb,$txt);
+
+ echo $txt;
+ }
+
+ /**
+ * Méthode qui affiche la liste des $max derniers articles.
+ * Si la variable $cat_id est renseignée, seuls les articles de cette catégorie sont retournés.
+ * On tient compte si la catégorie est active
+ *
+ * @param format format du texte pour chaque article
+ * @param max nombre d'articles maximum
+ * @param cat_id ids des catégories cible
+ * @param ending texte à ajouter en fin de ligne
+ * @param sort tri de l'affichage des articles (sort|rsort|alpha|random)
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function lastArtList($format='#art_title ',$max=5,$cat_id='',$ending='', $sort='rsort') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastArtList'))) return;
+ # Génération de notre motif
+ if(empty($cat_id))
+ $motif = '/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->plxMotor->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
+ else
+ $motif = '/^[0-9]{4}.((?:[0-9]|home|,)*(?:'.str_pad($cat_id,3,'0',STR_PAD_LEFT).')(?:[0-9]|home|,)*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/';
+
+ # Nouvel objet plxGlob et récupération des fichiers
+ $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
+ if($aFiles = $plxGlob_arts->query($motif,'art',$sort,0,$max,'before')) {
+ foreach($aFiles as $v) { # On parcourt tous les fichiers
+ $art = $this->plxMotor->parseArticle(PLX_ROOT.$this->plxMotor->aConf['racine_articles'].$v);
+ $num = intval($art['numero']);
+ $date = $art['date'];
+ if(($this->plxMotor->mode == 'article') AND ($art['numero'] == $this->plxMotor->cible))
+ $status = 'active';
+ else
+ $status = 'noactive';
+ # Mise en forme de la liste des catégories
+ $catList = array();
+ $catIds = explode(',', $art['categorie']);
+ foreach ($catIds as $idx => $catId) {
+ if(isset($this->plxMotor->aCats[$catId])) { # La catégorie existe
+ $catName = plxUtils::strCheck($this->plxMotor->aCats[$catId]['name']);
+ $catUrl = $this->plxMotor->aCats[$catId]['url'];
+ $catList[] = ''.$catName.' ';
+ } else {
+ $catList[] = L_UNCLASSIFIED;
+ }
+ }
+ # On modifie nos motifs
+ $row = str_replace('#art_id',$num,$format);
+ $row = str_replace('#cat_list', implode(', ',$catList),$row);
+ $row = str_replace('#art_url',$this->plxMotor->urlRewrite('?article'.$num.'/'.$art['url']),$row);
+ $row = str_replace('#art_status',$status,$row);
+ $author = plxUtils::getValue($this->plxMotor->aUsers[$art['author']]['name']);
+ $row = str_replace('#art_author',plxUtils::strCheck($author),$row);
+ $row = str_replace('#art_title',plxUtils::strCheck($art['title']),$row);
+ $strlength = preg_match('/#art_chapo\(([0-9]+)\)/',$row,$capture) ? $capture[1] : '100';
+ $chapo = plxUtils::truncate($art['chapo'],$strlength,$ending,true,true);
+ $row = str_replace('#art_chapo('.$strlength.')','#art_chapo',$row);
+ $row = str_replace('#art_chapo',$chapo,$row);
+ $strlength = preg_match('/#art_content\(([0-9]+)\)/',$row,$capture) ? $capture[1] : '100';
+ $content = plxUtils::truncate($art['content'],$strlength,$ending,true,true);
+ $row = str_replace('#art_content('.$strlength.')','#art_content',$row);
+ $row = str_replace('#art_content',$content,$row);
+ $row = str_replace('#art_date',plxDate::formatDate($date,'#num_day/#num_month/#num_year(4)'),$row);
+ $row = str_replace('#art_hour',plxDate::formatDate($date,'#hour:#minute'),$row);
+ $row = str_replace('#art_time',plxDate::formatDate($date,'#time'),$row);
+ $row = plxDate::formatDate($date,$row);
+ $row = str_replace('#art_nbcoms',$art['nb_com'],$row);
+ $row = str_replace('#art_thumbnail', ' ',$row);
+ $row = str_replace('#img_url',$this->plxMotor->urlRewrite($art['thumbnail']),$row);
+ $row = str_replace('#img_title',$art['thumbnail_title'],$row);
+ $row = str_replace('#img_alt',$art['thumbnail_alt'],$row);
+ # Hook plugin
+ eval($this->plxMotor->plxPlugins->callHook('plxShowLastArtListContent'));
+ # On genère notre ligne
+ echo $row;
+ }
+ }
+ }
+
+ /**
+ * Méthode qui affiche l'id du commentaire précédé de la lettre 'c'
+ *
+ * @param echo (boolean) fait un affichage si valeur à TRUE
+ * @return stdout/id sortie stdout ou retourne l'id du commentaire
+ * @scope article
+ * @author Florent MONTHEL
+ **/
+ public function comId($echo=true) {
+ $id = 'c'.$this->plxMotor->plxRecord_coms->f('article').'-'.$this->plxMotor->plxRecord_coms->f('index');
+ if($echo)
+ echo $id;
+ else
+ return $id;
+ }
+
+ /**
+ * Méthode qui affiche l'url du commentaire de type relatif ou absolu
+ *
+ * @param type type de lien : relatif ou absolu (URL complète) DEPRECATED
+ * @return stdout
+ * @scope article
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function comUrl($type='relatif') {
+
+ # On affiche l'URL
+ $artId = $this->plxMotor->plxRecord_coms->f('article');
+ $artInfo = $this->plxMotor->artInfoFromFilename($this->plxMotor->plxGlob_arts->aFiles[$artId]);
+ echo $this->urlRewrite('?article'.intval($artId).'/'.$artInfo['artUrl'].'#'.$this->ComId(false));
+ }
+
+ /**
+ * Méthode qui affiche l'index d'un commentaire
+ *
+ * @return stdout
+ * @scope article
+ * @author Stephane F.
+ **/
+ public function comIndex() {
+
+ echo $this->plxMotor->plxRecord_coms->f('index');
+ }
+
+ /**
+ * Méthode qui retourne le niveau d'indentation du commentaire
+ *
+ * @return integer numéro du niveau d'indentation du commentaire
+ * @scope article
+ * @author Stephane F.
+ **/
+ public function comNumLevel() {
+ return $this->plxMotor->plxRecord_coms->f('level');
+ }
+
+ /**
+ * Méthode qui formate et affiche le niveau d'indentation du commentaire
+ *
+ * @param class nom de la classe css servant à l'indentation des commentaires
+ * @return stdout
+ * @scope article
+ * @author Stephane F., Jerry Wham
+ **/
+ public function comLevel($class='level') {
+ if($this->comNumLevel() > 5)
+ echo $class.'-'.$this->comNumLevel().' '.$class.'-max';
+ else
+ echo $class.'-'.$this->comNumLevel();
+ }
+
+ /**
+ * Méthode qui affiche le nombre total de commentaires publiés sur le site.
+ *
+ * @param f1 format d'affichage si nombre de commentaire = 0 (#nb pour afficher le nombre de commentaire)
+ * @param f2 format d'affichage si nombre de commentaire = 1 (#nb pour afficher le nombre de commentaire)
+ * @param f3 format d'affichage si nombre de commentaire > 1 (#nb pour afficher le nombre de commentaire)
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function nbAllCom($f1='L_NO_COMMENT',$f2='#nb L_COMMENT',$f3='#nb L_COMMENTS') {
+
+ $nb = $this->plxMotor->nbComments('online', 'before');
+
+ if($nb==0)
+ $txt = str_replace('L_NO_COMMENT', L_NO_COMMENT, $f1);
+ elseif($nb==1)
+ $txt = str_replace('L_COMMENT', L_COMMENT, $f2);
+ else
+ $txt = str_replace('L_COMMENTS', L_COMMENTS, $f3);
+
+ $txt = str_replace('#nb',$nb,$txt);
+
+ echo $txt;
+ }
+
+ /**
+ * Méthode qui affiche l'auteur du commentaires linké ou non
+ *
+ * @param type type d'affichage : link => sous forme de lien
+ * @return stdout
+ * @scope article
+ * @author Anthony GUÉRIN, Florent MONTHEL et Stephane F.
+ **/
+ public function comAuthor($type='') {
+
+ # Initialisation de nos variables interne
+ $author = $this->plxMotor->plxRecord_coms->f('author');
+ $site = $this->plxMotor->plxRecord_coms->f('site');
+ if($type == 'link' AND $site != '') # Type lien
+ echo ''.$author.' ';
+ else # Type normal
+ echo $author;
+ }
+
+ /**
+ * Méthode qui affiche le type du commentaire (admin ou normal)
+ *
+ * @return stdout
+ * @scope article
+ * @author Florent MONTHEL
+ **/
+ public function comType() {
+
+ echo $this->plxMotor->plxRecord_coms->f('type');
+ }
+
+ /**
+ * Méthode qui affiche la date de publication d'un commentaire selon le format choisi
+ *
+ * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(2), #num_year(4), #time)
+ * @return stdout
+ * @scope article
+ * @author Florent MONTHEL et Stephane F
+ **/
+ public function comDate($format='#day #num_day #month #num_year(4) @ #time') {
+
+ echo plxDate::formatDate($this->plxMotor->plxRecord_coms->f('date'),$format);
+ }
+
+ /**
+ * Méthode qui affiche le contenu d'un commentaire
+ *
+ * @return stdout
+ * @scope article
+ * @author Florent MONTHEL
+ **/
+ public function comContent() {
+
+ echo nl2br($this->plxMotor->plxRecord_coms->f('content'));
+ }
+
+ /**
+ * Méthode qui affiche si besoin le message généré par le système
+ * suite à la création d'un commentaire
+ * @param format format du texte à afficher (variable: #com_message)
+ * @return stdout
+ * @scope article
+ * @author Stephane F.
+ **/
+ public function comMessage($format='#com_message') {
+
+ if(isset($_SESSION['msgcom']) AND !empty($_SESSION['msgcom'])) {
+ $row = str_replace('#com_message',$_SESSION['msgcom'],$format);
+ echo $row;
+ $_SESSION['msgcom']='';
+ }
+
+ }
+
+ /**
+ * Méthode qui affiche si besoin la variable $_GET[$key] suite au dépôt d'un commentaire
+ *
+ * @param key clé du tableau GET
+ * @param defaut valeur par défaut si variable vide
+ * @return stdout
+ * @scope article
+ * @author Florent MONTHEL
+ **/
+ public function comGet($key,$defaut='') {
+
+ if(isset($_SESSION['msg'][$key]) AND !empty($_SESSION['msg'][$key])) {
+ echo plxUtils::strCheck($_SESSION['msg'][$key]);
+ $_SESSION['msg'][$key]='';
+ }
+ else echo $defaut;
+
+ }
+
+ /**
+ * Méthode qui affiche un lien vers le fil Rss des commentaires
+ * d'un article précis (si $article renseigné) ou du site tout entier
+ *
+ * @param type type de flux (obsolete)
+ * @param article identifiant (sans les 0) d'un article
+ * @return stdout
+ * @scope global
+ * @author Anthony GUÉRIN, Florent MONTHEL, Stephane F
+ **/
+ public function comFeed($type='rss', $article='') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowComFeed'))) return;
+
+ if($article != '' AND is_numeric($article)) # Fil Rss des commentaires d'un article
+ echo ''.L_COMFEED_RSS_ARTICLE.' ';
+ else # Fil Rss des commentaires global
+ echo ''.L_COMFEED_RSS.' ';
+ }
+
+ /**
+ * Méthode qui affiche la liste des $max derniers commentaires.
+ * Si la variable $art_id est renseignée, seuls les commentaires de cet article sont retournés.
+ *
+ * @param format format du texte pour chaque commentaire
+ * @param max nombre de commentaires maximum
+ * @param art_id id de l'article cible (24,3)
+ * @param cat_ids liste des categories pour filtrer les derniers commentaires (sous la forme 001|002)
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function lastComList($format='#com_author L_SAID : #com_content(50) ',$max=5,$art_id='',$cat_ids='') {
+
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastComList'))) return;
+
+ # Génération de notre motif
+ if(empty($art_id))
+ $motif = '/^[0-9]{4}.[0-9]{10}-[0-9]+.xml$/';
+ else
+ $motif = '/^'.str_pad($art_id,4,'0',STR_PAD_LEFT).'.[0-9]{10}-[0-9]+.xml$/';
+
+ $count=1;
+ $datetime=date('YmdHi');
+ # Nouvel objet plxGlob et récupération des fichiers
+ $plxGlob_coms = clone $this->plxMotor->plxGlob_coms;
+ if($aFiles = $plxGlob_coms->query($motif,'com','rsort',0,false,'before')) {
+ $aComArtTitles = array(); # tableau contenant les titres des articles
+ $isComArtTitle = (strpos($format, '#com_art_title')!=FALSE) ? true : false;
+ # On parcourt les fichiers des commentaires
+ foreach($aFiles as $v) {
+ # On filtre si le commentaire appartient à un article d'une catégorie inactive
+ if(isset($this->plxMotor->activeArts[substr($v,0,4)])) {
+ $com = $this->plxMotor->parseCommentaire(PLX_ROOT.$this->plxMotor->aConf['racine_commentaires'].$v);
+ $artInfo = $this->plxMotor->artInfoFromFilename($this->plxMotor->plxGlob_arts->aFiles[$com['article']]);
+ if($artInfo['artDate']<=$datetime) { # on ne prends que les commentaires pour les articles publiés
+ if(empty($cat_ids) OR preg_match('/('.$cat_ids.')/', $artInfo['catId'])) {
+ $url = '?article'.intval($com['article']).'/'.$artInfo['artUrl'].'#c'.$com['article'].'-'.$com['index'];
+ $date = $com['date'];
+ $content = strip_tags($com['content']);
+ # On modifie nos motifs
+ $row = str_replace('L_SAID', L_SAID, $format);
+ $row = str_replace('#com_id',$com['index'],$row);
+ $row = str_replace('#com_url',$this->plxMotor->urlRewrite($url),$row);
+ $row = str_replace('#com_author',$com['author'],$row);
+ while(preg_match('/#com_content\(([0-9]+)\)/',$row,$capture)) {
+ if($com['author'] == 'admin')
+ $row = str_replace('#com_content('.$capture[1].')',plxUtils::strCut($content,$capture[1]),$row);
+ else
+ $row = str_replace('#com_content('.$capture[1].')',plxUtils::strCheck(plxUtils::strCut(plxUtils::strRevCheck($content),$capture[1])),$row);
+ }
+ $row = str_replace('#com_content',$content,$row);
+ $row = str_replace('#com_date',plxDate::formatDate($date,'#num_day/#num_month/#num_year(4)'),$row);
+ $row = str_replace('#com_hour',plxDate::formatDate($date,'#time'),$row);
+ $row = plxDate::formatDate($date,$row);
+ # récupération du titre de l'article
+ if($isComArtTitle) {
+ if(isset($aComArtTitles[$com['article']])) {
+ $row = str_replace('#com_art_title',$aComArtTitles[$com['article']],$row);
+ }
+ else {
+ if($file = $this->plxMotor->plxGlob_arts->query('/^'.$com['article'].'.(.*).xml$/')) {
+ $art = $this->plxMotor->parseArticle(PLX_ROOT.$this->plxMotor->aConf['racine_articles'].$file[0]);
+ $aComArtTitles[$com['article']] = $art_title = $art['title'];
+ $row = str_replace('#com_art_title',$art_title,$row);
+ }
+ }
+ }
+ # On genère notre ligne
+ echo $row;
+ $count++;
+ }
+ }
+ }
+ if($count>$max) break;
+ }
+ }
+ }
+
+ /**
+ * Méthode qui affiche la liste des pages statiques.
+ *
+ * @param extra si renseigné: nom du lien vers la page d'accueil affiché en première position
+ * @param format format du texte pour chaque page (variable : #static_id, #static_status, #static_url, #static_name, #group_id, #group_class, #group_name)
+ * @param format_group format du texte pour chaque groupe (variable : #group_class, #group_name, #group_status)
+ * @param menublog position du menu Blog (si non renseigné le menu n'est pas affiché)
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function staticList($extra='', $format='#static_name ', $format_group='#group_name ', $menublog=false) {
+
+ $menus = array();
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticListBegin'))) return;
+ $home = ((empty($this->plxMotor->get) OR preg_match('/^page[0-9]*/',$this->plxMotor->get)) AND basename($_SERVER['SCRIPT_NAME'])=="index.php");
+ # Si on a la variable extra, on affiche un lien vers la page d'accueil (avec $extra comme nom)
+ if($extra != '') {
+ $stat = str_replace('#static_id','static-home',$format);
+ $stat = str_replace('#static_class','static menu',$stat);
+ $stat = str_replace('#static_url',$this->plxMotor->urlRewrite(),$stat);
+ $stat = str_replace('#static_name',plxUtils::strCheck($extra),$stat);
+ $stat = str_replace('#static_status',($home==true?"active":"noactive"), $stat);
+ $menus[][] = $stat;
+ }
+ $group_active = "";
+ if($this->plxMotor->aStats) {
+ foreach($this->plxMotor->aStats as $k=>$v) {
+ if($v['active'] == 1 AND $v['menu'] == 'oui') { # La page est bien active et dispo ds le menu
+ $stat = str_replace('#static_id','static-'.intval($k),$format);
+ $stat = str_replace('#static_class','static menu',$stat);
+ if($v['url'][0]=='?') # url interne commençant par ?
+ $stat = str_replace('#static_url',$this->plxMotor->urlRewrite($v['url']),$stat);
+ elseif(plxUtils::checkSite($v['url'],false)) # url externe en http ou autre
+ $stat = str_replace('#static_url',$v['url'],$stat);
+ else # url page statique
+ $stat = str_replace('#static_url',$this->plxMotor->urlRewrite('?static'.intval($k).'/'.$v['url']),$stat);
+ $stat = str_replace('#static_name',plxUtils::strCheck($v['name']),$stat);
+ $stat = str_replace('#static_status',($this->staticId()==intval($k)?'active':'noactive'), $stat);
+ if($v['group']=='')
+ $menus[][] = $stat;
+ else
+ $menus[$v['group']][] = $stat;
+ if($group_active=="" AND $home===false AND $this->staticId()==intval($k) AND $v['group']!='')
+ $group_active = $v['group'];
+ }
+ }
+ }
+ if($menublog) {
+ if($this->plxMotor->aConf['homestatic']!='' AND isset($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']])) {
+ if($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']]['active']) {
+ $menu = str_replace('#static_id','static-blog',$format);
+ if ($this->plxMotor->get AND preg_match('/(blog|categorie|archives|tag|article)/', $_SERVER['QUERY_STRING'].$this->plxMotor->mode)) {
+ $menu = str_replace('#static_status','active',$menu);
+ } else {
+ $menu = str_replace('#static_status','noactive',$menu);
+ }
+ $menu = str_replace('#static_url', $this->plxMotor->urlRewrite('?blog'),$menu);
+ $menu = str_replace('#static_name',L_PAGEBLOG_TITLE,$menu);
+ $menu = str_replace('#static_class','static menu',$menu);
+ array_splice($menus, (intval($menublog)-1), 0, array($menu));
+ }
+ }
+ }
+
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticListEnd'))) return;
+
+ # Affichage des pages statiques + menu Accueil et Blog
+ if($menus) {
+ foreach($menus as $k=>$v) {
+ if(is_numeric($k)) {
+ echo "\n".(is_array($v) ? $v[0] : $v);
+ }
+ else {
+ $group = str_replace('#group_id','static-group-'.plxUtils::title2url($k),$format_group);
+ $group = str_replace('#group_class','static group',$group);
+ $group = str_replace('#group_status',($group_active==$k?'active':'noactive'),$group);
+ $group = str_replace('#group_name',plxUtils::strCheck($k),$group);
+ echo "\n\n\t".$group."\n\t\t\t";
+ foreach($v as $kk => $vv) {
+ echo "\n\t\t".$vv;
+ }
+ echo "\n\t \n \n";
+ }
+ }
+ echo "\n";
+ }
+
+ }
+
+ /**
+ * Méthode qui retourne l'id de la page statique active
+ *
+ * @return int
+ * @scope static
+ * @author Florent MONTHEL, Stéphane F.
+ **/
+ public function staticId() {
+
+ # On va vérifier que la catégorie existe en mode catégorie
+ if($this->plxMotor->mode == 'static' AND isset($this->plxMotor->aStats[ $this->plxMotor->cible ]))
+ return intval($this->plxMotor->cible);
+ else
+ return plxUtils::strCheck($this->plxMotor->mode);
+ }
+
+ /**
+ * Méthode qui affiche ou retourne l'url de la page statique
+ *
+ * @param echo si à VRAI affichage à l'écran
+ * @param extra paramètres supplémentaires pouvant être rajoutés à la fin de l'url de l'atricle
+ * @return stdout
+ * @scope static
+ * @author Florent MONTHEL, Stéphane F
+ **/
+ public function staticUrl($echo=true, $extra='') {
+
+ # Recupération ID URL
+ $staticId = $this->staticId();
+ $staticIdFill = str_pad($staticId,3,'0',STR_PAD_LEFT);
+ if(!empty($staticId) AND isset($this->plxMotor->aStats[$staticIdFill])) {
+ $url = $this->plxMotor->urlRewrite('?static'.$staticId.'/'.$this->plxMotor->aStats[$staticIdFill]['url'].$extra);
+ if($echo)
+ echo $url;
+ else
+ return $url;
+ }
+ }
+
+ /**
+ * Méthode qui affiche le titre de la page statique
+ *
+ * @return stdout
+ * @scope static
+ * @author Florent MONTHEL
+ **/
+ public function staticTitle() {
+
+ echo plxUtils::strCheck($this->plxMotor->aStats[ $this->plxMotor->cible ]['name']);
+ }
+
+ /**
+ * Méthode qui affiche le groupe de la page statique
+ *
+ * @return stdout
+ * @scope static
+ * @author Stéphane F.
+ **/
+ public function staticGroup() {
+
+ echo plxUtils::strCheck($this->plxMotor->aStats[ $this->plxMotor->cible ]['group']);
+ }
+
+ /**
+ * Méthode qui affiche la date de la dernière modification de la page statique selon le format choisi
+ *
+ * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
+ * @return stdout
+ * @scope static
+ * @author Anthony T.
+ **/
+ public function staticDate($format='#day #num_day #month #num_year(4)') {
+
+ # On genere le nom du fichier dont on veux récupérer la date
+ $file = PLX_ROOT.$this->plxMotor->aConf['racine_statiques'].$this->plxMotor->cible;
+ $file .= '.'.$this->plxMotor->aStats[ $this->plxMotor->cible ]['url'].'.php';
+ # Test de l'existence du fichier
+ if(!file_exists($file)) return;
+ # On récupère la date de la dernière modification du fichier qu'on formate
+ echo plxDate::formatDate(date('YmdHi', filemtime($file)), $format);
+ }
+
+ /**
+ * Méthode qui affiche la date de creation de la page statique selon le format choisi
+ *
+ * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
+ * @return stdout
+ * @scope static
+ * @author Stephane F.
+ **/
+ public function staticCreationDate($format='#num_day/#num_month/#num_year(4) #time') {
+
+ echo plxDate::formatDate($this->plxMotor->aStats[$this->plxMotor->cible]['date_creation'],$format);
+ }
+
+ /**
+ * Méthode qui affiche la date de modification de la page statique selon le format choisi
+ *
+ * @param format format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2))
+ * @return stdout
+ * @scope static
+ * @author Stephane F.
+ **/
+ public function staticUpdateDate($format='#num_day/#num_month/#num_year(4) #time') {
+
+ echo plxDate::formatDate($this->plxMotor->aStats[$this->plxMotor->cible]['date_update'],$format);
+ }
+
+ /**
+ * Méthode qui inclut le code source de la page statique
+ *
+ * @return stdout
+ * @scope static
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function staticContent() {
+
+ if (eval($this->plxMotor->plxPlugins->callHook("plxShowStaticContentBegin"))) return;
+
+ # On va verifier que la page a inclure est lisible
+ if($this->plxMotor->aStats[ $this->plxMotor->cible ]['readable'] == 1) {
+ # On genere le nom du fichier a inclure
+ $file = PLX_ROOT.$this->plxMotor->aConf['racine_statiques'].$this->plxMotor->cible;
+ $file .= '.'.$this->plxMotor->aStats[ $this->plxMotor->cible ]['url'].'.php';
+ # Inclusion du fichier
+ ob_start();
+ require $file;
+ $output = ob_get_clean();
+ eval($this->plxMotor->plxPlugins->callHook('plxShowStaticContent'));
+ echo $output;
+ } else {
+ echo ''.L_STATICCONTENT_INPROCESS.'
';
+ }
+
+ }
+
+ /**
+ * Méthode qui affiche une page statique en lui passant son id (si cette page est active ou non)
+ *
+ * @param id id numérique ou url/titre de la page statique
+ * @return stdout
+ * @scope global
+ * @author Stéphane F
+ **/
+ public function staticInclude($id) {
+
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticInclude'))) return ;
+ # On génère un nouvel objet plxGlob
+ $plxGlob_stats = plxGlob::getInstance(PLX_ROOT.$this->plxMotor->aConf['racine_statiques']);
+ if(is_numeric($id)) # inclusion à partir de l'id de la page
+ $regx = '/^'.str_pad($id,3,'0',STR_PAD_LEFT).'.[a-z0-9-]+.php$/';
+ else { # inclusion à partir du titre de la page
+ $url = plxUtils::title2url($id);
+ $regx = '/^[0-9]{3}.'.$url.'.php$/';
+ }
+ if($files = $plxGlob_stats->query($regx)) {
+ # on récupère l'id de la page pour tester si elle est active
+ if(preg_match('/^([0-9]{3}).(.*).php$/', $files[0], $c)) {
+ if($this->plxMotor->aStats[$c[1]]['active'])
+ include(PLX_ROOT.$this->plxMotor->aConf['racine_statiques'].$files[0]);
+ }
+ }
+ }
+
+ /**
+ * Méthode qui affiche la pagination
+ *
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL, Stephane F
+ **/
+ public function pagination() {
+
+ $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
+ $aFiles = $plxGlob_arts->query($this->plxMotor->motif,'art','',0,false,'before');
+
+ if($aFiles AND $this->plxMotor->bypage AND sizeof($aFiles)>$this->plxMotor->bypage) {
+
+ # on supprime le n° de page courante dans l'url
+ $arg_url = $this->plxMotor->get;
+ if(preg_match('/(\/?page[0-9]+)$/',$arg_url,$capture)) {
+ $arg_url = str_replace($capture[1], '', $arg_url);
+ }
+ # Calcul des pages
+ $prev_page = $this->plxMotor->page - 1;
+ $next_page = $this->plxMotor->page + 1;
+ $last_page = ceil(sizeof($aFiles)/$this->plxMotor->bypage);
+ # Generation des URLs
+ $f_url = $this->plxMotor->urlRewrite('?'.$arg_url); # Premiere page
+ $arg = (!empty($arg_url) AND $prev_page>1) ? $arg_url.'/' : $arg_url;
+ $p_url = $this->plxMotor->urlRewrite('?'.$arg.($prev_page<=1?'':'page'.$prev_page)); # Page precedente
+ $arg = !empty($arg_url) ? $arg_url.'/' : $arg_url;
+ $n_url = $this->plxMotor->urlRewrite('?'.$arg.'page'.$next_page); # Page suivante
+ $l_url = $this->plxMotor->urlRewrite('?'.$arg.'page'.$last_page); # Derniere page
+
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowPagination'))) return;
+
+ # On effectue l'affichage
+ if($this->plxMotor->page > 2) # Si la page active > 2 on affiche un lien 1ere page
+ echo ''.L_PAGINATION_FIRST.' ';
+ if($this->plxMotor->page > 1) # Si la page active > 1 on affiche un lien page precedente
+ echo ''.L_PAGINATION_PREVIOUS.' ';
+ # Affichage de la page courante
+ printf(''.L_PAGINATION.' ',$this->plxMotor->page,$last_page);
+ if($this->plxMotor->page < $last_page) # Si la page active < derniere page on affiche un lien page suivante
+ echo ' '.L_PAGINATION_NEXT.' ';
+ if(($this->plxMotor->page + 1) < $last_page) # Si la page active++ < derniere page on affiche un lien derniere page
+ echo ' '.L_PAGINATION_LAST.' ';
+ }
+ }
+
+ /**
+ * Méthode qui affiche la question du capcha
+ *
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL, Stephane F.
+ **/
+ public function capchaQ() {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowCapchaQ'))) return;
+ echo $this->plxMotor->plxCapcha->q();
+ echo ' ';
+ }
+
+ /**
+ * Méthode qui affiche la réponse du capcha cryptée en sha1
+ * DEPRECATED
+ *
+ * @return stdout
+ * @scope global
+ * @author Florent MONTHEL, Stephane F.
+ **/
+ public function capchaR() {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowCapchaR'))) return;
+ echo $this->plxMotor->plxCapcha->r();
+
+ }
+
+ /**
+ * Méthode qui affiche le message d'erreur de l'objet plxErreur
+ *
+ * @return stdout
+ * @scope erreur
+ * @author Florent MONTHEL
+ **/
+ public function erreurMessage() {
+
+ echo $this->plxMotor->plxErreur->getMessage();
+ }
+
+ /**
+ * Méthode qui affiche le nom du tag (linké ou non)
+ *
+ * @param type type d'affichage : link => sous forme de lien
+ * @return stdout
+ * @scope tags
+ * @author Stephane F
+ **/
+ public function tagName($type='') {
+
+ if($this->plxMotor->mode == 'tags') {
+ $tag = plxUtils::strCheck($this->plxMotor->cible);
+ $tagName = plxUtils::strCheck($this->plxMotor->cibleName);
+ # On effectue l'affichage
+ if($type == 'link')
+ echo ''.$tagName.' ';
+ else
+ echo $tagName;
+ }
+ }
+
+ /**
+ * Méthode qui affiche un lien vers le fil Rss des articles d'un tag
+ *
+ * @param type type de flux (obsolete)
+ * @param tag nom du tag
+ * @return stdout
+ * @scope home,categorie,article,tags,archives
+ * @author Stephane F
+ **/
+
+ public function tagFeed($type='rss', $tag='') {
+
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowTagFeed'))) return;
+
+ if($tag=='' AND $this->plxMotor->mode == 'tags')
+ $tag = $this->plxMotor->cible;
+
+ echo ''.L_ARTFEED_RSS_TAG.' ';
+
+ }
+
+ /**
+ * Méthode qui affiche la liste de tous les tags.
+ *
+ * @param format format du texte pour chaque tag (variable : #tag_size #tag_status, #tag_count, #tag_item, #tag_url, #tag_name, #nb_art)
+ * @param max nombre maxi de tags à afficher
+ * @param order tri des tags (random, alpha, '')
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function tagList($format='#tag_name ', $max='', $order='') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowTagList'))) return;
+
+ $datetime = date('YmdHi');
+ $array=array();
+ $alphasort=array();
+ # On verifie qu'il y a des tags
+ if($this->plxMotor->aTags) {
+ # On liste les tags sans créer de doublon
+ foreach($this->plxMotor->aTags as $idart => $tag) {
+ if(isset($this->plxMotor->activeArts[$idart]) AND $tag['date']<=$datetime AND $tag['active']) {
+ if($tags = array_map('trim', explode(',', $tag['tags']))) {
+ foreach($tags as $tag) {
+ if($tag!='') {
+ $t = plxUtils::title2url($tag);
+ if(!isset($array['_'.$tag])) {
+ $array['_'.$tag]=array('name'=>$tag,'url'=>$t,'count'=>1);
+ }
+ else
+ $array['_'.$tag]['count']++;
+ if(!in_array($t, $alphasort))
+ $alphasort[] = $t; # pour le tri alpha
+ }
+ }
+ }
+ }
+ }
+
+ # tri des tags
+ switch($order) {
+ case 'alpha':
+ if($alphasort) array_multisort($alphasort, SORT_ASC, $array);
+ break;
+ case 'random':
+ $arr_elem = array();
+ $keys = array_keys($array);
+ shuffle($keys);
+ foreach ($keys as $key) {
+ $arr_elem[$key] = $array[$key];
+ }
+ $array = $arr_elem;
+ break;
+ }
+
+ # limite sur le nombre de tags à afficher
+ if($max!='') $array=array_slice($array, 0, intval($max), true);
+
+ }
+
+ $mode = $this->plxMotor->mode;
+
+ # Récupération de la liste des tags de l'article si on est en mode 'article'
+ # pour mettre en évidence les tags dans la sidebar s'ils sont attachés à l'article
+ $artTags = array();
+ if($mode=='article') {
+ $artTagList = $this->plxMotor->plxRecord_arts->f('tags');
+ if(!empty($artTagList)) {
+ $artTags = array_map('trim', explode(',', $artTagList));
+ }
+ }
+
+ # On affiche la liste
+ $size=0;
+ foreach($array as $tagname => $tag) {
+ $name = str_replace('#tag_id','tag-'.$size++,$format);
+ $name = str_replace('#tag_size','tag-size-'.($tag['count']>10?'max':$tag['count']),$name);
+ $name = str_replace('#tag_count',$tag['count'],$name);
+ $name = str_replace('#tag_item',$tag['url'],$name);
+ $name = str_replace('#tag_url',$this->plxMotor->urlRewrite('?tag/'.$tag['url']),$name);
+ $name = str_replace('#tag_name',plxUtils::strCheck($tag['name']),$name);
+ $name = str_replace('#nb_art',$tag['count'],$name);
+ if($mode=='article' AND in_array($tag['name'],$artTags))
+ $name = str_replace('#tag_status','active', $name);
+ else
+ $name = str_replace('#tag_status',(($mode=='tags' AND $this->plxMotor->cible==$tag['url'])?'active':'noactive'), $name);
+
+ echo $name;
+ }
+ }
+
+ /**
+ * Méthode qui affiche la liste des archives
+ *
+ * @param format format du texte pour l'affichage (variable : #archives_id, #archives_status, #archives_nbart, #archives_url, #archives_name, #archives_month, #archives_year)
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function archList($format='#archives_name '){
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowArchList'))) return;
+
+ $curYear=date('Y');
+ $array = array();
+
+ $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
+
+ if($files = $plxGlob_arts->query('/^[0-9]{4}.(?:[0-9]|home|,)*(?:'.$this->plxMotor->activeCats.'|home)(?:[0-9]|home|,)*.[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/','art','rsort',0,false,'before')) {
+ foreach($files as $id => $filename){
+ if(preg_match('/([0-9]{4}).((?:[0-9]|home|,)*(?:'.$this->plxMotor->activeCats.'|home)(?:[0-9]|home|,)*).[0-9]{3}.([0-9]{4})([0-9]{2})([0-9]{6}).([a-z0-9-]+).xml$/',$filename,$capture)){
+ if($capture[3]==$curYear) {
+ if(!isset($array[$capture[3]][$capture[4]])) $array[$capture[3]][$capture[4]]=1;
+ else $array[$capture[3]][$capture[4]]++;
+ } else {
+ if(!isset($array[$capture[3]])) $array[$capture[3]]=1;
+ else $array[$capture[3]]++;
+ }
+ }
+ }
+ krsort($array);
+ # Affichage pour l'année en cours
+ if(isset($array[$curYear])) {
+ foreach($array[$curYear] as $month => $nbarts){
+ $name = str_replace('#archives_id','archives-'.$curYear.$month,$format);
+ $name = str_replace('#archives_name',plxDate::getCalendar('month', $month).' '.$curYear,$name);
+ $name = str_replace('#archives_year',$curYear,$name);
+ $name = str_replace('#archives_month',plxDate::getCalendar('month', $month),$name);
+ $name = str_replace('#archives_url', $this->plxMotor->urlRewrite('?archives/'.$curYear.'/'.$month), $name);
+ $name = str_replace('#archives_nbart',$nbarts,$name);
+ $name = str_replace('#archives_status',(($this->plxMotor->mode=="archives" AND $this->plxMotor->cible==$curYear.$month)?'active':'noactive'), $name);
+ echo $name;
+ }
+ }
+ # Affichage pour les années précédentes
+ unset($array[$curYear]);
+ foreach($array as $year => $nbarts){
+ $name = str_replace('#archives_id','archives-'.$year,$format);
+ $name = str_replace('#archives_name',$year,$name);
+ $name = str_replace('#archives_year',$year,$name);
+ $name = str_replace('#archives_month',$year,$name);
+ $name = str_replace('#archives_url', $this->plxMotor->urlRewrite('?archives/'.$year), $name);
+ $name = str_replace('#archives_nbart',$nbarts,$name);
+ $name = str_replace('#archives_status',(($this->plxMotor->mode=="archives" AND $this->plxMotor->cible==$year)?'active':'noactive'), $name);
+ echo $name;
+ }
+ }
+ }
+
+ /**
+ * Méthode qui affiche un lien vers la page blog.php
+ *
+ * @param format format du texte pour l'affichage (variable : #page_id, #page_status, #page_url, #page_name)
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function pageBlog($format='#page_name ') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowPageBlog'))) return;
+
+ if($this->plxMotor->aConf['homestatic']!='' AND isset($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']])) {
+ if($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']]['active']) {
+ $name = str_replace('#page_id','static-blog',$format);
+ if ($this->plxMotor->get AND preg_match('/(blog|categorie|archives|tag|article)/', $_SERVER['QUERY_STRING'].$this->plxMotor->mode)) {
+ $name = str_replace('#page_status','active',$name);
+ } else {
+ $name = str_replace('#page_status','noactive',$name);
+ }
+ $name = str_replace('#page_class','static menu',$name);
+ $name = str_replace('#page_url', $this->plxMotor->urlRewrite('?blog'),$name);
+ $name = str_replace('#page_name',L_PAGEBLOG_TITLE,$name);
+ echo $name;
+ }
+ }
+ }
+
+ /**
+ * Méthode qui ajoute, s'il existe, le fichier css associé à un template
+ *
+ * @param css_dir répertoire de stockage des fichiers css (avec un / à la fin)
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function templateCss($css_dir='') {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowTemplateCss'))) return;
+
+ $theme = $this->plxMotor->aConf['racine_themes'].$this->plxMotor->style.'/';
+ $min_css = str_replace('php','min.css',$this->plxMotor->template);
+ $css = str_replace('php','css',$this->plxMotor->template);
+
+ if(is_file($theme.$css_dir.$min_css)) {
+ echo ' '."\n";
+ }
+ elseif(is_file($theme.$css_dir.$css)) {
+ echo ' '."\n";
+ }
+ }
+
+ /**
+ * Méthode qui ajoute, s'il existe, le fichier css associé aux plugins
+ *
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function pluginsCss() {
+ # Hook Plugins
+ if(eval($this->plxMotor->plxPlugins->callHook('plxShowPluginsCss'))) return;
+
+ $filename = $this->plxMotor->aConf['racine_plugins'].'site.css';
+ if(is_file(PLX_ROOT.$filename))
+ echo ' '."\n";
+ }
+
+ /**
+ * Méthode qui affiche une clé de traduction appelée à partir du thème
+ *
+ * @param $lang clé de traduction à afficher
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function lang($key='') {
+ if(isset($this->lang[$key]))
+ echo $this->lang[$key];
+ else
+ echo $key;
+ }
+
+ /**
+ * Méthode qui renvoie une clé de traduction appelée à partir du thème
+ *
+ * @param $lang clé de traduction à afficher
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ **/
+ public function getLang($key='') {
+ if(isset($this->lang[$key]))
+ return $this->lang[$key];
+ else
+ return $key;
+ }
+
+ /**
+ * Méthode qui appel un hook à partir du thème
+ *
+ * @param hookName nom du hook
+ * @param parms parametre ou liste de paramètres sous forme de array
+ * @return stdout
+ * @scope global
+ * @author Stephane F
+ *
+ * Exemple:
+ * # sans return, passage d'un paramètre
+ * eval($plxShow->callHook('MyPluginFunction', 'AZERTY'));
+ * # avec return, passage de 2 paramètres à faire sous forme de tableau
+ * $b = $plxShow->callHook('MyPluginFunction', array('AZERTY', 'QWERTY'));
+ **/
+ public function callHook($hookName, $parms=null) {
+ $return = $this->plxMotor->plxPlugins->callHook($hookName, $parms);
+ if(is_array($return)) {
+ ob_start();
+ eval($return[0]);
+ echo ob_get_clean();
+ return $return[1];
+ } else {
+ return $return;
+ }
+ }
+
+ /**
+ * Méthode qui permet d'injecter du code php au niveau d'un hook
+ *
+ * @param hookName nom du hook
+ * @param code code php à injecter
+ * @scope global
+ * @author Stephane F
+ */
+ public function addCodeToHook($hookName, $userCode) {
+ $this->plxMotor->plxPlugins->aHooks[$hookName][] = array(
+ 'class' => '=SHORTCODE=',
+ 'method' => $userCode
+ );
+ }
+
+}
+?>
diff --git a/core/lib/class.plx.timezones.php b/core/lib/class.plx.timezones.php
index 895897e6e..c3db10350 100644
--- a/core/lib/class.plx.timezones.php
+++ b/core/lib/class.plx.timezones.php
@@ -1,140 +1,140 @@
- "(GMT-11:00) Midway Island",
- 'US/Samoa' => "(GMT-11:00) Samoa",
- 'US/Hawaii' => "(GMT-10:00) Hawaii",
- 'US/Alaska' => "(GMT-09:00) Alaska",
- 'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)",
- 'America/Tijuana' => "(GMT-08:00) Tijuana",
- 'US/Arizona' => "(GMT-07:00) Arizona",
- 'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)",
- 'America/Chihuahua' => "(GMT-07:00) Chihuahua",
- 'America/Mazatlan' => "(GMT-07:00) Mazatlan",
- 'America/Mexico_City' => "(GMT-06:00) Mexico City",
- 'America/Monterrey' => "(GMT-06:00) Monterrey",
- 'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan",
- 'US/Central' => "(GMT-06:00) Central Time (US & Canada)",
- 'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)",
- 'US/East-Indiana' => "(GMT-05:00) Indiana (East)",
- 'America/Bogota' => "(GMT-05:00) Bogota",
- 'America/Lima' => "(GMT-05:00) Lima",
- 'America/Caracas' => "(GMT-04:30) Caracas",
- 'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)",
- 'America/La_Paz' => "(GMT-04:00) La Paz",
- 'America/Santiago' => "(GMT-04:00) Santiago",
- 'Canada/Newfoundland' => "(GMT-03:30) Newfoundland",
- 'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires",
- 'Greenland' => "(GMT-03:00) Greenland",
- 'Atlantic/Stanley' => "(GMT-02:00) Stanley",
- 'Atlantic/Azores' => "(GMT-01:00) Azores",
- 'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.",
- 'Africa/Casablanca' => "(GMT) Casablanca",
- 'Europe/Dublin' => "(GMT) Dublin",
- 'Europe/Lisbon' => "(GMT) Lisbon",
- 'Europe/London' => "(GMT) London",
- 'Africa/Monrovia' => "(GMT) Monrovia",
- 'Europe/Amsterdam' => "(GMT+01:00) Amsterdam",
- 'Europe/Belgrade' => "(GMT+01:00) Belgrade",
- 'Europe/Berlin' => "(GMT+01:00) Berlin",
- 'Europe/Bratislava' => "(GMT+01:00) Bratislava",
- 'Europe/Brussels' => "(GMT+01:00) Brussels",
- 'Europe/Budapest' => "(GMT+01:00) Budapest",
- 'Europe/Copenhagen' => "(GMT+01:00) Copenhagen",
- 'Europe/Ljubljana' => "(GMT+01:00) Ljubljana",
- 'Europe/Madrid' => "(GMT+01:00) Madrid",
- 'Europe/Paris' => "(GMT+01:00) Paris",
- 'Europe/Prague' => "(GMT+01:00) Prague",
- 'Europe/Rome' => "(GMT+01:00) Rome",
- 'Europe/Sarajevo' => "(GMT+01:00) Sarajevo",
- 'Europe/Skopje' => "(GMT+01:00) Skopje",
- 'Europe/Stockholm' => "(GMT+01:00) Stockholm",
- 'Europe/Vienna' => "(GMT+01:00) Vienna",
- 'Europe/Warsaw' => "(GMT+01:00) Warsaw",
- 'Europe/Zagreb' => "(GMT+01:00) Zagreb",
- 'Europe/Athens' => "(GMT+02:00) Athens",
- 'Europe/Bucharest' => "(GMT+02:00) Bucharest",
- 'Africa/Cairo' => "(GMT+02:00) Cairo",
- 'Africa/Harare' => "(GMT+02:00) Harare",
- 'Europe/Helsinki' => "(GMT+02:00) Helsinki",
- 'Europe/Istanbul' => "(GMT+02:00) Istanbul",
- 'Asia/Jerusalem' => "(GMT+02:00) Jerusalem",
- 'Europe/Kiev' => "(GMT+02:00) Kyiv",
- 'Europe/Minsk' => "(GMT+02:00) Minsk",
- 'Europe/Riga' => "(GMT+02:00) Riga",
- 'Europe/Sofia' => "(GMT+02:00) Sofia",
- 'Europe/Tallinn' => "(GMT+02:00) Tallinn",
- 'Europe/Vilnius' => "(GMT+02:00) Vilnius",
- 'Asia/Baghdad' => "(GMT+03:00) Baghdad",
- 'Asia/Kuwait' => "(GMT+03:00) Kuwait",
- 'Europe/Moscow' => "(GMT+03:00) Moscow",
- 'Africa/Nairobi' => "(GMT+03:00) Nairobi",
- 'Asia/Riyadh' => "(GMT+03:00) Riyadh",
- 'Europe/Volgograd' => "(GMT+03:00) Volgograd",
- 'Asia/Tehran' => "(GMT+03:30) Tehran",
- 'Asia/Baku' => "(GMT+04:00) Baku",
- 'Asia/Muscat' => "(GMT+04:00) Muscat",
- 'Asia/Tbilisi' => "(GMT+04:00) Tbilisi",
- 'Asia/Yerevan' => "(GMT+04:00) Yerevan",
- 'Asia/Kabul' => "(GMT+04:30) Kabul",
- 'Asia/Yekaterinburg' => "(GMT+05:00) Ekaterinburg",
- 'Asia/Karachi' => "(GMT+05:00) Karachi",
- 'Asia/Tashkent' => "(GMT+05:00) Tashkent",
- 'Asia/Kolkata' => "(GMT+05:30) Kolkata",
- 'Asia/Kathmandu' => "(GMT+05:45) Kathmandu",
- 'Asia/Almaty' => "(GMT+06:00) Almaty",
- 'Asia/Dhaka' => "(GMT+06:00) Dhaka",
- 'Asia/Novosibirsk' => "(GMT+06:00) Novosibirsk",
- 'Asia/Bangkok' => "(GMT+07:00) Bangkok",
- 'Asia/Jakarta' => "(GMT+07:00) Jakarta",
- 'Asia/Krasnoyarsk' => "(GMT+07:00) Krasnoyarsk",
- 'Asia/Chongqing' => "(GMT+08:00) Chongqing",
- 'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong",
- 'Asia/Irkutsk' => "(GMT+08:00) Irkutsk",
- 'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur",
- 'Australia/Perth' => "(GMT+08:00) Perth",
- 'Asia/Singapore' => "(GMT+08:00) Singapore",
- 'Asia/Taipei' => "(GMT+08:00) Taipei",
- 'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar",
- 'Asia/Urumqi' => "(GMT+08:00) Urumqi",
- 'Asia/Seoul' => "(GMT+09:00) Seoul",
- 'Asia/Tokyo' => "(GMT+09:00) Tokyo",
- 'Asia/Yakutsk' => "(GMT+09:00) Yakutsk",
- 'Australia/Adelaide' => "(GMT+09:30) Adelaide",
- 'Australia/Darwin' => "(GMT+09:30) Darwin",
- 'Australia/Brisbane' => "(GMT+10:00) Brisbane",
- 'Australia/Canberra' => "(GMT+10:00) Canberra",
- 'Pacific/Guam' => "(GMT+10:00) Guam",
- 'Australia/Hobart' => "(GMT+10:00) Hobart",
- 'Australia/Melbourne' => "(GMT+10:00) Melbourne",
- 'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby",
- 'Australia/Sydney' => "(GMT+10:00) Sydney",
- 'Asia/Vladivostok' => "(GMT+10:00) Vladivostok",
- 'Asia/Magadan' => "(GMT+11:00) Magadan",
- 'Pacific/Auckland' => "(GMT+12:00) Auckland",
- 'Pacific/Fiji' => "(GMT+12:00) Fiji",
- 'Asia/Kamchatka' => "(GMT+12:00) Kamchatka"
- );
-
- /**
- * Méthode qui retourne la liste des timezones
- *
- * @return array liste des timezones
- * @author Stephane F.
- **/
- public static function timezones() {
- return plxTimezones::$_timezones;
- }
-
-}
+ "(GMT-11:00) Midway Island",
+ 'US/Samoa' => "(GMT-11:00) Samoa",
+ 'US/Hawaii' => "(GMT-10:00) Hawaii",
+ 'US/Alaska' => "(GMT-09:00) Alaska",
+ 'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)",
+ 'America/Tijuana' => "(GMT-08:00) Tijuana",
+ 'US/Arizona' => "(GMT-07:00) Arizona",
+ 'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)",
+ 'America/Chihuahua' => "(GMT-07:00) Chihuahua",
+ 'America/Mazatlan' => "(GMT-07:00) Mazatlan",
+ 'America/Mexico_City' => "(GMT-06:00) Mexico City",
+ 'America/Monterrey' => "(GMT-06:00) Monterrey",
+ 'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan",
+ 'US/Central' => "(GMT-06:00) Central Time (US & Canada)",
+ 'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)",
+ 'US/East-Indiana' => "(GMT-05:00) Indiana (East)",
+ 'America/Bogota' => "(GMT-05:00) Bogota",
+ 'America/Lima' => "(GMT-05:00) Lima",
+ 'America/Caracas' => "(GMT-04:30) Caracas",
+ 'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)",
+ 'America/La_Paz' => "(GMT-04:00) La Paz",
+ 'America/Santiago' => "(GMT-04:00) Santiago",
+ 'Canada/Newfoundland' => "(GMT-03:30) Newfoundland",
+ 'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires",
+ 'Greenland' => "(GMT-03:00) Greenland",
+ 'Atlantic/Stanley' => "(GMT-02:00) Stanley",
+ 'Atlantic/Azores' => "(GMT-01:00) Azores",
+ 'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.",
+ 'Africa/Casablanca' => "(GMT) Casablanca",
+ 'Europe/Dublin' => "(GMT) Dublin",
+ 'Europe/Lisbon' => "(GMT) Lisbon",
+ 'Europe/London' => "(GMT) London",
+ 'Africa/Monrovia' => "(GMT) Monrovia",
+ 'Europe/Amsterdam' => "(GMT+01:00) Amsterdam",
+ 'Europe/Belgrade' => "(GMT+01:00) Belgrade",
+ 'Europe/Berlin' => "(GMT+01:00) Berlin",
+ 'Europe/Bratislava' => "(GMT+01:00) Bratislava",
+ 'Europe/Brussels' => "(GMT+01:00) Brussels",
+ 'Europe/Budapest' => "(GMT+01:00) Budapest",
+ 'Europe/Copenhagen' => "(GMT+01:00) Copenhagen",
+ 'Europe/Ljubljana' => "(GMT+01:00) Ljubljana",
+ 'Europe/Madrid' => "(GMT+01:00) Madrid",
+ 'Europe/Paris' => "(GMT+01:00) Paris",
+ 'Europe/Prague' => "(GMT+01:00) Prague",
+ 'Europe/Rome' => "(GMT+01:00) Rome",
+ 'Europe/Sarajevo' => "(GMT+01:00) Sarajevo",
+ 'Europe/Skopje' => "(GMT+01:00) Skopje",
+ 'Europe/Stockholm' => "(GMT+01:00) Stockholm",
+ 'Europe/Vienna' => "(GMT+01:00) Vienna",
+ 'Europe/Warsaw' => "(GMT+01:00) Warsaw",
+ 'Europe/Zagreb' => "(GMT+01:00) Zagreb",
+ 'Europe/Athens' => "(GMT+02:00) Athens",
+ 'Europe/Bucharest' => "(GMT+02:00) Bucharest",
+ 'Africa/Cairo' => "(GMT+02:00) Cairo",
+ 'Africa/Harare' => "(GMT+02:00) Harare",
+ 'Europe/Helsinki' => "(GMT+02:00) Helsinki",
+ 'Europe/Istanbul' => "(GMT+02:00) Istanbul",
+ 'Asia/Jerusalem' => "(GMT+02:00) Jerusalem",
+ 'Europe/Kiev' => "(GMT+02:00) Kyiv",
+ 'Europe/Minsk' => "(GMT+02:00) Minsk",
+ 'Europe/Riga' => "(GMT+02:00) Riga",
+ 'Europe/Sofia' => "(GMT+02:00) Sofia",
+ 'Europe/Tallinn' => "(GMT+02:00) Tallinn",
+ 'Europe/Vilnius' => "(GMT+02:00) Vilnius",
+ 'Asia/Baghdad' => "(GMT+03:00) Baghdad",
+ 'Asia/Kuwait' => "(GMT+03:00) Kuwait",
+ 'Europe/Moscow' => "(GMT+03:00) Moscow",
+ 'Africa/Nairobi' => "(GMT+03:00) Nairobi",
+ 'Asia/Riyadh' => "(GMT+03:00) Riyadh",
+ 'Europe/Volgograd' => "(GMT+03:00) Volgograd",
+ 'Asia/Tehran' => "(GMT+03:30) Tehran",
+ 'Asia/Baku' => "(GMT+04:00) Baku",
+ 'Asia/Muscat' => "(GMT+04:00) Muscat",
+ 'Asia/Tbilisi' => "(GMT+04:00) Tbilisi",
+ 'Asia/Yerevan' => "(GMT+04:00) Yerevan",
+ 'Asia/Kabul' => "(GMT+04:30) Kabul",
+ 'Asia/Yekaterinburg' => "(GMT+05:00) Ekaterinburg",
+ 'Asia/Karachi' => "(GMT+05:00) Karachi",
+ 'Asia/Tashkent' => "(GMT+05:00) Tashkent",
+ 'Asia/Kolkata' => "(GMT+05:30) Kolkata",
+ 'Asia/Kathmandu' => "(GMT+05:45) Kathmandu",
+ 'Asia/Almaty' => "(GMT+06:00) Almaty",
+ 'Asia/Dhaka' => "(GMT+06:00) Dhaka",
+ 'Asia/Novosibirsk' => "(GMT+06:00) Novosibirsk",
+ 'Asia/Bangkok' => "(GMT+07:00) Bangkok",
+ 'Asia/Jakarta' => "(GMT+07:00) Jakarta",
+ 'Asia/Krasnoyarsk' => "(GMT+07:00) Krasnoyarsk",
+ 'Asia/Chongqing' => "(GMT+08:00) Chongqing",
+ 'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong",
+ 'Asia/Irkutsk' => "(GMT+08:00) Irkutsk",
+ 'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur",
+ 'Australia/Perth' => "(GMT+08:00) Perth",
+ 'Asia/Singapore' => "(GMT+08:00) Singapore",
+ 'Asia/Taipei' => "(GMT+08:00) Taipei",
+ 'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar",
+ 'Asia/Urumqi' => "(GMT+08:00) Urumqi",
+ 'Asia/Seoul' => "(GMT+09:00) Seoul",
+ 'Asia/Tokyo' => "(GMT+09:00) Tokyo",
+ 'Asia/Yakutsk' => "(GMT+09:00) Yakutsk",
+ 'Australia/Adelaide' => "(GMT+09:30) Adelaide",
+ 'Australia/Darwin' => "(GMT+09:30) Darwin",
+ 'Australia/Brisbane' => "(GMT+10:00) Brisbane",
+ 'Australia/Canberra' => "(GMT+10:00) Canberra",
+ 'Pacific/Guam' => "(GMT+10:00) Guam",
+ 'Australia/Hobart' => "(GMT+10:00) Hobart",
+ 'Australia/Melbourne' => "(GMT+10:00) Melbourne",
+ 'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby",
+ 'Australia/Sydney' => "(GMT+10:00) Sydney",
+ 'Asia/Vladivostok' => "(GMT+10:00) Vladivostok",
+ 'Asia/Magadan' => "(GMT+11:00) Magadan",
+ 'Pacific/Auckland' => "(GMT+12:00) Auckland",
+ 'Pacific/Fiji' => "(GMT+12:00) Fiji",
+ 'Asia/Kamchatka' => "(GMT+12:00) Kamchatka"
+ );
+
+ /**
+ * Méthode qui retourne la liste des timezones
+ *
+ * @return array liste des timezones
+ * @author Stephane F.
+ **/
+ public static function timezones() {
+ return plxTimezones::$_timezones;
+ }
+
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.token.php b/core/lib/class.plx.token.php
index fd0c634eb..d66f09a77 100644
--- a/core/lib/class.plx.token.php
+++ b/core/lib/class.plx.token.php
@@ -1,45 +1,45 @@
-';
-
- }
-
- /**
- * Méthode qui valide la durée de vide d'un token
- *
- * @parm $request (deprecated)
- * @return stdio/null
- * @author Stephane F
- **/
- public static function validateFormToken($request='') {
-
- if($_SERVER['REQUEST_METHOD']=='POST' AND isset($_SESSION['formtoken'])) {
-
- if(empty($_POST['token']) OR plxUtils::getValue($_SESSION['formtoken'][$_POST['token']]) < time() - 3600) { # 3600 seconds
- unset($_SESSION['formtoken']);
- die('Security error : invalid or expired token');
- }
- unset($_SESSION['formtoken'][$_POST['token']]);
- }
-
- }
-
-}
+';
+
+ }
+
+ /**
+ * Méthode qui valide la durée de vide d'un token
+ *
+ * @parm $request (deprecated)
+ * @return stdio/null
+ * @author Stephane F
+ **/
+ public static function validateFormToken($request='') {
+
+ if($_SERVER['REQUEST_METHOD']=='POST' AND isset($_SESSION['formtoken'])) {
+
+ if(empty($_POST['token']) OR plxUtils::getValue($_SESSION['formtoken'][$_POST['token']]) < time() - 3600) { # 3600 seconds
+ unset($_SESSION['formtoken']);
+ die('Security error : invalid or expired token');
+ }
+ unset($_SESSION['formtoken'][$_POST['token']]);
+ }
+
+ }
+
+}
?>
\ No newline at end of file
diff --git a/core/lib/class.plx.utils.php b/core/lib/class.plx.utils.php
index a3d3da3a2..aac85c580 100644
--- a/core/lib/class.plx.utils.php
+++ b/core/lib/class.plx.utils.php
@@ -1,1066 +1,1066 @@
-$v) { # On parcourt le tableau
- if(is_array($v)) {
- foreach($v as $key=>$val)
- $new_content[$k][$key] = stripslashes($val);
- } else {
- $new_content[ $k ] = stripslashes($v);
- }
- }
- } else { # On traite une chaine
- $new_content = stripslashes($content);
- }
- # On retourne le tableau modifie
- return $new_content;
- } else {
- return $content;
- }
- }
-
- /**
- * Méthode qui vérifie le bon formatage d'une adresse email
- *
- * @param mail adresse email à vérifier
- * @return boolean vrai si adresse email bien formatée
- **/
- public static function checkMail($mail) {
-
- if (strlen($mail) > 80)
- return false;
- return preg_match('/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|("[^"]+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/', $mail);
- }
-
- /**
- * Méthode qui vérifie si l'url passée en paramètre correspond à un format valide
- *
- * @param site url d'un site
- * @return boolean vrai si l'url est bien formatée
- **/
- public static function checkSite(&$site, $reset=true) {
-
- $site = preg_replace('#([\'"].*)#', '', $site);
-
- if(isset($site[0]) AND $site[0]=='?') return true; # url interne commençant par ?
- # On vérifie le site via une expression régulière
- # Méthode imme_emosol - http://mathiasbynens.be/demo/url-regex
- # modifiée par Amaury Graillat pour prendre en compte les tirets dans les urls
- if(preg_match('@(https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+([/?][^\s]*)?$@iS', $site))
- return true;
- else {
- if($reset) $site='';
- return false;
- }
- }
-
- /**
- * Méthode qui vérifie le format d'une adresse ip
- *
- * @param ip adresse ip à vérifier
- * @return boolean vrai si format valide
- **/
- public static function isValidIp($ip) {
-
- if($ip=='::1') return false;
- $ipv4 = '/((^|\.)(2[0-5]{2}|[01][0-9]{2}|[0-9]{1,2})(?=\.|$)){4}/';
- $ipv6 = '/^:?([a-fA-F0-9]{1,4}(:|.)?){0,8}(:|::)?([a-fA-F0-9]{1,4}(:|.)?){0,8}$/';
- return (preg_match($ipv4, $ip) OR preg_match($ipv6, $ip));
-
- }
-
- /**
- * Méthode qui retourne l'adresse ip d'un visiteur
- *
- * @return string adresse ip d'un visiteur
- **/
- public static function getIp() {
-
- if(!empty($_SERVER['HTTP_CLIENT_IP'])) # check ip from share internet
- $ip=$_SERVER['HTTP_CLIENT_IP'];
- elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) # to check ip is pass from proxy
- $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
- else
- $ip=$_SERVER['REMOTE_ADDR'];
-
- if(version_compare(phpversion(), '5.3.0', '<'))
- $localIP = getHostByName(php_uname('n'));
- else
- $localIP = getHostByName(getHostName());
-
- return plxUtils::isValidIp($ip) ? $ip : $localIP;
- }
-
- /**
- * Méthode qui affiche une liste de sélection
- *
- * @param name nom de la liste
- * @param array valeurs de la liste sous forme de tableau (nom, valeur)
- * @param selected valeur par défaut
- * @param readonly vrai si la liste est en lecture seule (par défaut à faux)
- * @param class class css à utiliser pour formater l'affichage
- * @param id si vrai génère un id à partir du nom du champ, sinon génère l'id à partir du paramètre
- * @return stdout
- **/
- public static function printSelect($name, $array, $selected='', $readonly=false, $class='', $id=true) {
-
- if(!is_array($array)) $array=array();
-
- if(is_bool($id))
- $id = ($id ? ' id="id_'.$name.'"' : '');
- else
- $id = ($id!='' ? ' id="'.$id.'"' : '');
-
- if($readonly)
- echo ''."\n";
- else
- echo ''."\n";
- foreach($array as $a => $b) {
- if(is_array($b)) {
- echo ''."\n";
- foreach($b as $c=>$d) {
- if($c == $selected)
- echo "\t".''.$d.' '."\n";
- else
- echo "\t".''.$d.' '."\n";
- }
- echo ' '."\n";
- } else {
- if($a == $selected)
- echo "\t".''.$b.' '."\n";
- else
- echo "\t".''.$b.' '."\n";
- }
- }
- echo ' '."\n";
- }
-
- /**
- * Méthode qui affiche un zone de saisie
- *
- * @param name nom de la zone de saisie
- * @param value valeur contenue dans la zone de saisie
- * @param type type du champ (text, password, hidden)
- * @param size longueur du champ - nombre maximal de caractères pouvant être saisis (par défaut 50-255)
- * @param readonly vrai si le champ est en lecture seule (par défaut à faux)
- * @param class class css à utiliser pour formater l'affichage
- * @param placeholder valeur du placeholder du champ (html5)
- * @param extra extra paramètre pour du javascript par exemple (onclick)
- * @return stdout
- **/
- public static function printInput($name, $value='', $type='text', $sizes='50-255', $readonly=false, $className='', $placeholder='', $extra='') {
-
- $params = array(
- 'id="id_'.$name.'"',
- 'name="'.$name.'"',
- 'type="'.$type.'"'
- );
- if(!empty($value))
- $params[] = 'value="'.$value.'"';
- if(!empty($extra))
- $params[] = $extra;
- if($type != 'hidden') {
- if($readonly === true)
- $params[] = 'readonly="readonly" class="readonly"';
- if(!empty($className))
- $params[] = 'class="'.$className.'"';
- if(!empty($placeholder))
- $params[] = $placeholder;
- if(!empty($sizes) AND (strpos($sizes, '-') !== false)) {
- list($size, $maxlength) = explode('-', $sizes);
- if(!empty($size))
- $params[] = 'size="'.$size.'"';
- if(!empty($maxlength))
- $params[] = 'maxlength="'.$maxlength.'"';
- }
- }
- echo ' ';
- }
-
- /**
- * Méthode qui affiche une zone de texte
- *
- * @param name nom de la zone de texte
- * @param value valeur contenue dans la zone de texte
- * @param cols nombre de caractères affichés par colonne
- * @params rows nombre de caractères affichés par ligne
- * @param readonly vrai si le champ est en lecture seule (par défaut à faux)
- * @param class class css à utiliser pour formater l'affichage
- * @return stdout
- **/
- public static function printArea($name, $value='', $cols='', $rows='', $readonly=false, $class='') {
-
- if($readonly)
- echo ''."\n";
- else
- echo ''."\n";
- }
-
- /**
- * Méthode qui teste si un fichier est accessible en écriture
- *
- * @param file emplacement et nom du fichier à tester
- * @param format format d'affichage
- **/
- public static function testWrite($file, $format="#symbol #message \n") {
-
- if(is_writable($file)) {
- $output = str_replace('#color', 'green', $format);
- $output = str_replace('#symbol', '✔', $output);
- $output = str_replace('#message', sprintf(L_WRITE_ACCESS, $file), $output);
- echo $output;
- } else {
- $output = str_replace('#color', 'red', $format);
- $output = str_replace('#symbol', '✗', $output);
- $output = str_replace('#message', sprintf(L_WRITE_NOT_ACCESS, $file), $output);
- echo $output;
- }
- }
-
- /**
- * Méthode qui teste si le module apache mod_rewrite est disponible
- *
- * @param io affiche à l'écran le résultat du test si à VRAI
- * @param format format d'affichage
- * @return boolean retourne vrai si le module apache mod_rewrite est disponible
- * @author Stephane F
- **/
- public static function testModRewrite($io=true, $format="#symbol #message \n") {
-
- if(function_exists('apache_get_modules')) {
- $test = in_array("mod_rewrite", apache_get_modules());
- if($io==true) {
- if($test) {
- $output = str_replace('#color', 'green', $format);
- $output = str_replace('#symbol', '✔', $output);
- $output = str_replace('#message', L_MODREWRITE_AVAILABLE, $output);
- echo $output;
- } else {
- $output = str_replace('#color', 'red', $format);
- $output = str_replace('#symbol', '✗', $output);
- $output = str_replace('#message', L_MODREWRITE_NOT_AVAILABLE, $output);
- echo $output;
- }
- }
- return $test;
- }
- else return true;
- }
-
- /**
- * Méthode qui teste si la fonction php mail est disponible
- *
- * @param io affiche à l'écran le résultat du test si à VRAI
- * @param format format d'affichage
- * @return boolean retourne vrai si la fonction php mail est disponible
- * @author Stephane F
- **/
- public static function testMail($io=true, $format="#symbol #message \n") {
-
- if($return=function_exists('mail')) {
- if($io==true) {
- $output = str_replace('#color', 'green', $format);
- $output = str_replace('#symbol', '✔', $output);
- $output = str_replace('#message', L_MAIL_AVAILABLE, $output);
- echo $output;
- }
- } else {
- if($io==true) {
- $output = str_replace('#color', 'red', $format);
- $output = str_replace('#symbol', '✗', $output);
- $output = str_replace('#message', L_MAIL_NOT_AVAILABLE, $output);
- echo $output;
- }
- }
- return $return;
- }
-
- /**
- * Méthode qui teste si la bibliothèque GD est installé
- *
- * @param format format d'affichage
- * @author Stephane F
- **/
- public static function testLibGD($format="#symbol #message \n") {
-
- if(function_exists('imagecreatetruecolor')) {
- $output = str_replace('#color', 'green', $format);
- $output = str_replace('#symbol', '✔', $output);
- $output = str_replace('#message', L_LIBGD_INSTALLED, $output);
- echo $output;
- } else {
- $output = str_replace('#color', 'red', $format);
- $output = str_replace('#symbol', '✗', $output);
- $output = str_replace('#message', L_LIBGD_NOT_INSTALLED, $output);
- echo $output;
- }
- }
-
- /**
- * Méthode qui teste si la bibliothèque XML est installée
- *
- * @param format format d'affichage
- *
- **/
- public static function testLibXml($format="#symbol #message \n") {
-
- if(function_exists('xml_parser_create')) {
- $output = str_replace('#color', 'green', $format);
- $output = str_replace('#symbol', '✔', $output);
- $output = str_replace('#message', L_LIBXML_INSTALLED, $output);
- echo $output;
- } else {
- $output = str_replace('#color', 'red', $format);
- $output = str_replace('#symbol', '✗', $output);
- $output = str_replace('#message', L_LIBXML_NOT_INSTALLED, $output);
- echo $output;
- }
- }
-
- /**
- * Méthode qui formate une chaine de caractères en supprimant des caractères non valides
- *
- * @param str chaine de caractères à formater
- * @param charset charset à utiliser dans le formatage de la chaine (par défaut utf-8)
- * @return string chaine formatée
- **/
- public static function removeAccents($str,$charset='utf-8') {
-
- $str = htmlentities($str, ENT_NOQUOTES, $charset);
- $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ');
- $b = array('A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o');
- $str = str_replace($a, $b, $str);
- $str = preg_replace('#\&([A-za-z])(?:acute|cedil|circ|grave|ring|tilde|uml|uro)\;#', '\1', $str);
- $str = preg_replace('#\&([A-za-z]{2})(?:lig)\;#', '\1', $str); # pour les ligatures e.g. 'œ'
- $str = preg_replace('#\&[^;]+\;#', '', $str); # supprime les autres caractères
- return $str;
- }
-
- /**
- * Méthode qui convertit une chaine de caractères au format valide pour une url
- *
- * @param str chaine de caractères à formater
- * @return string nom d'url valide
- **/
- public static function title2url($str) {
-
- $str = strtolower(plxUtils::removeAccents($str,PLX_CHARSET));
- $str = preg_replace('/[^[:alnum:]]+/',' ',$str);
- return strtr(trim($str), ' ', '-');
- }
-
- /**
- * Méthode qui convertit une chaine de caractères au format valide pour un nom de fichier
- *
- * @param str chaine de caractères à formater
- * @return string nom de fichier valide
- **/
- public static function title2filename($str) {
-
- $str = strtolower(plxUtils::removeAccents($str,PLX_CHARSET));
- $str = str_replace('|','',$str);
- $str = preg_replace('/\.{2,}/', '.', $str);
- $str = preg_replace('/[^[:alnum:]|.|_]+/',' ',$str);
- return strtr(ltrim(trim($str),'.'), ' ', '-');
- }
-
- /**
- * Méthode qui convertit un chiffre en chaine de caractères sur une longueur de n caractères, completée par des 0 à gauche
- *
- * @param num chiffre à convertir
- * @param length longueur de la chaine à retourner
- * @return string chaine formatée
- **/
- public static function formatRelatif($num, $lenght) {
-
- $fnum = str_pad(abs($num), $lenght, '0', STR_PAD_LEFT);
- if($num > -1)
- return '+'.$fnum;
- else
- return '-'.$fnum;
- }
-
- /**
- * Méthode qui écrit dans un fichier
- * Mode écriture seule; place le pointeur de fichier au début du fichier et réduit la taille du fichier à 0. Si le fichier n'existe pas, on tente de le créer.
- *
- * @param xml contenu du fichier
- * @param filename emplacement et nom du fichier
- * @return boolean retourne vrai si l'écriture s'est bien déroulée
- **/
- public static function write($xml, $filename) {
-
- if(file_exists($filename)) {
- $f = fopen($filename.'.tmp', 'w'); # On ouvre le fichier temporaire
- fwrite($f, trim($xml)); # On écrit
- fclose($f); # On ferme
- unlink($filename);
- rename($filename.'.tmp', $filename); # On renomme le fichier temporaire avec le nom de l'ancien
- } else {
- $f = fopen($filename, 'w'); # On ouvre le fichier
- fwrite($f, trim($xml)); # On écrit
- fclose($f); # On ferme
- }
- # On place les bons droits
- chmod($filename,0644);
- # On vérifie le résultat
- if(file_exists($filename) AND !file_exists($filename.'.tmp'))
- return true;
- else
- return false;
- }
-
- /**
- * Méthode qui formate l'affichage de la taille d'un fichier
- *
- * @param filsize taille en octets d'un fichier
- * @return string chaine d'affichage formatée
- **/
- public static function formatFilesize($bytes) {
-
- if ($bytes < 1024) return $bytes.' B';
- elseif ($bytes < 1048576) return round($bytes / 1024, 2).' Kb';
- elseif ($bytes < 1073741824) return round($bytes / 1048576, 2).' Mb';
-
- }
-
- /**
- * Méthode qui crée la miniature d'une image
- *
- * @param src_image emplacement et nom du fichier source
- * @param dest_image emplacement et nom de la miniature créée
- * @param thumb_width largeur de la miniature
- * @param thumb_height hauteur de la miniature
- * @param quality qualité de l'image
- * @return boolean vrai si image créée
- **/
- public static function makeThumb($src_image, $dest_image, $thumb_width = 48, $thumb_height = 48, $jpg_quality = 90) {
-
- if(!function_exists('imagecreatetruecolor')) return false;
-
- // Get dimensions of existing image
- $image = getimagesize($src_image);
-
- // Check for valid dimensions
- if($image[0] <= 0 || $image[1] <= 0) return false;
-
- // Determine format from MIME-Type
- $image['format'] = strtolower(preg_replace('/^.*?\//', '', $image['mime']));
-
- // calcul du ration si nécessaire
- if($thumb_width!=$thumb_height) {
- # Calcul du ratio
- $x_offset = $y_offset = 0;
- $square_size_w = $image[0];
- $square_size_h = $image[1];
- $ratio_w = $thumb_width / $image[0];
- $ratio_h = $thumb_height / $image[1];
- if($thumb_width == 0)
- $thumb_width = $image[0] * $ratio_h;
- elseif($thumb_height == 0)
- $thumb_height = $image[1] * $ratio_w;
- elseif($ratio_w < $ratio_h AND $ratio_w < 1) {
- $thumb_width = $ratio_w * $image[0];
- $thumb_height = $ratio_w * $image[1];
- } elseif($ratio_h < 1) {
- $thumb_width = $ratio_h * $image[0];
- $thumb_height = $ratio_h * $image[1];
- } else {
- $thumb_width = $image[0];
- $thumb_height = $image[1];
- }
- }
-
- $canvas = imagecreatetruecolor($thumb_width, $thumb_height);
-
- // Import image
- switch( $image['format'] ) {
- case 'jpg':
- case 'jpeg':
- $image_data = imagecreatefromjpeg($src_image);
- break;
- case 'png':
- $image_data = imagecreatefrompng($src_image);
- $color = imagecolortransparent($canvas, imagecolorallocatealpha($canvas, 0, 0, 0, 127));
- imagefill($canvas, 0, 0, $color);
- imagesavealpha($canvas, true);
- break;
- case 'gif':
- $image_data = imagecreatefromgif($src_image);
- $color = imagecolortransparent($canvas, imagecolorallocatealpha($canvas, 0, 0, 0, 127));
- imagefill($canvas, 0, 0, $color);
- imagesavealpha($canvas, true);
- break;
- default:
- return false; // Unsupported format
- break;
- }
-
- // Verify import
- if($image_data == false) return false;
-
- // Calculate measurements (square crop)
- if($thumb_width==$thumb_height) {
- if($image[0] > $image[1]) {
- // For landscape images
- $x_offset = ($image[0] - $image[1]) / 2;
- $y_offset = 0;
- $square_size_w = $square_size_h = $image[0] - ($x_offset * 2);
- } else {
- // For portrait and square images
- $x_offset = 0;
- $y_offset = ($image[1] - $image[0]) / 2;
- $square_size_w = $square_size_h = $image[1] - ($y_offset * 2);
- }
- }
-
- // Resize and crop
- if( imagecopyresampled(
- $canvas,
- $image_data,
- 0,
- 0,
- $x_offset,
- $y_offset,
- $thumb_width,
- $thumb_height,
- $square_size_w,
- $square_size_h
- )) {
-
- // Create thumbnail
- switch( strtolower(preg_replace('/^.*\./', '', $dest_image)) ) {
- case 'jpg':
- case 'jpeg':
- return (imagejpeg($canvas, $dest_image, $jpg_quality) AND is_file($dest_image));
- break;
- case 'png':
- return (imagepng($canvas, $dest_image) AND is_file($dest_image));
- break;
- case 'gif':
- return (imagegif($canvas, $dest_image) AND is_file($dest_image));
- break;
- default:
- return false; // Unsupported format
- break;
- }
-
- } else {
- return false;
- }
-
- }
-
- /**
- * Méthode qui affiche un message
- *
- * @param string message à afficher
- * @param string classe css à utiliser pour formater l'affichage du message
- * @param string format des balises avant le message
- * @param string format des balises après le message
- * @return stdout
- **/
- public static function showMsg($msg, $class='',$format_start='',$format_end='
') {
- $format_start = str_replace('#CLASS',($class != '' ? $class : 'msg'),$format_start);
- echo $format_start.$msg.$format_end;
- }
-
- /**
- * Méthode qui retourne l'url de base du site
- *
- * @return string url de base du site
- **/
- public static function getRacine() {
-
- $protocol = (!empty($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS']) == 'on') || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) AND strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' )? 'https://' : "http://";
- $servername = $_SERVER['HTTP_HOST'];
- $serverport = (preg_match('/:[0-9]+/', $servername) OR $_SERVER['SERVER_PORT'])=='80' ? '' : ':'.$_SERVER['SERVER_PORT'];
- $dirname = preg_replace('/\/(core|plugins)\/(.*)/', '', dirname($_SERVER['SCRIPT_NAME']));
- $racine = rtrim($protocol.$servername.$serverport.$dirname, '/\\').'/';
- if(!plxUtils::checkSite($racine, false))
- die('Error: wrong or invalid url');
- return $racine;
- }
-
- /**
- * Méthode qui retourne une chaine de caractères au hasard
- *
- * @param taille nombre de caractère de la chaine à retourner (par défaut sur 10 caractères)
- * @return string chaine de caractères au hasard
- **/
- public static function charAleatoire($taille='10') {
-
- $string = '';
- $chaine = 'abcdefghijklmnpqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
- mt_srand((float)microtime()*1000000);
- for($i=0; $i<$taille; $i++)
- $string .= $chaine[ mt_rand()%strlen($chaine) ];
- return $string;
- }
-
- /**
- * Méthode qui coupe une chaine de caractères sur n caractères ou sur n mots
- *
- * @param str chaine de caractères à couper
- * @param length nombre de caractères ou nombre de mots à garder (par défaut 25)
- * @param type à renseigner avec la valeur 'word' pour couper en nombre de mots. Par défaut la césure se fait en nombre de caractères
- * @param add_text texte à ajouter après la chaine coupée (par défaut '...' est ajouté)
- * @return string chaine de caractères coupée
- **/
- public static function strCut($str='', $length=25, $type='', $add_text='...') {
- if($type == 'word') { # On coupe la chaine en comptant le nombre de mots
- $content = explode(' ',$str);
- $length = sizeof($content) < $length ? sizeof($content) : $length;
- return implode(' ',array_slice($content,0,$length)).$add_text;
- } else { # On coupe la chaine en comptant le nombre de caractères
- return strlen($str) > $length ? utf8_decode(substr(utf8_encode($str), 0, $length)).$add_text : $str;
- }
- }
-
- /**
- * Méthode qui retourne une chaine de caractères formatée en fonction du charset
- *
- * @param str chaine de caractères
- * @return string chaine de caractères tenant compte du charset
- **/
- public static function strCheck($str) {
-
- return htmlspecialchars($str,ENT_QUOTES,PLX_CHARSET);
- }
-
- /**
- * Méthode qui retourne une chaine de caractères nettoyée des cdata
- *
- * @param str chaine de caractères à nettoyer
- * @return string chaine de caractères nettoyée
- * @author Stephane F
- **/
- public static function cdataCheck($str) {
- $str = str_ireplace('!CDATA', '!CDATA', $str);
- return str_replace(']]>', ']]>', $str);
- }
-
- /**
- * Méthode qui retourne une chaine de caractères HTML en fonction du charset
- *
- * @param str chaine de caractères
- * @return string chaine de caractères tenant compte du charset
- **/
- public static function strRevCheck($str) {
-
- return html_entity_decode($str,ENT_QUOTES,PLX_CHARSET);
- }
-
- /**
- * Méthode qui retourne le type de compression disponible
- *
- * @return stout
- * @author Stephane F., Amaury Graillat
- **/
- public static function httpEncoding() {
- if(headers_sent()){
- $encoding = false;
- }elseif(isset($_SERVER['HTTP_ACCEPT_ENCODING']) AND strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip') !== false){
- $encoding = 'gzip';
- }else{
- $encoding = false;
- }
- return $encoding;
- }
-
- /**
- * Méthode qui converti les liens relatifs en liens absolus
- *
- * @param base url du site qui sera rajoutée devant les liens relatifs
- * @param html chaine de caractères à convertir
- * @return string chaine de caractères modifiée
- * @author Stephane F., Amaury Graillat, J.P. Pourrez
- **/
- public static function rel2abs($base, $html) {
-
- if (substr($base, -1) != '/')
- $base .= '/';
-
- # réécriture des liens commençant uniquement par une ancre
- $url = plxUtils::getRacine().plxUtils::getGets();
- $html = preg_replace('/(href=["|\'])#/', '$1'.$url.'#', $html);
-
- # on protège tous les liens externes au site, et on transforme tous les liens relatifs en absolus
- # on ajoute le hostname si nécessaire
- $mask = '=<<>>=';
- $protect = '(\#|javascript|data|callto|content|fax|file|ftp|imap|irc|jabber|mailto|mms|news|pop|sip|smb|sms|ssh|tel|telnet|vnc|xmpp):?';
- $patterns = array('#(href|src)=("|\')('.$protect.':)#i', '#(href|src)=("|\')([a-z]+://)#i', '#(href|src)=("|\')(?:\./)?([^/])#i');
- $replaces = array('$1'.$mask.'$2$3', '$1'.$mask.'$2$3', '$1=$2'.$base.'$3');
- if (preg_match('#^[a-z]+://#i', $base)) {
- $patterns[] = '#(href|src)=("|\')/([^/])#i';
- $replaces[] = '$1=$2'.$base.'$3';
- }
- $result = preg_replace($patterns, $replaces, $html);
- # on retire la protection des liens externes. Expressions régulières lentes et inutiles
- $result = str_replace($mask, '=', $result);
- return $result;
-
- }
-
- /**
- * Méthode qui retourne la liste des langues disponibles dans un tableau
- *
- * @return string chaine de caractères modifiée
- * @author Stephane F.
- **/
- public static function getLangs() {
- $array = array();
- $glob = plxGlob::getInstance(PLX_CORE.'lang', true);
- if($aFolders = $glob->query("/[a-z]+/i")) {
- foreach($aFolders as $folder) {
- $array[$folder] = $folder;
- }
- }
- ksort($array);
- return $array;
- }
-
- /**
- * Méthode qui empeche de mettre en cache une page
- *
- * @return stdio
- * @author Stephane F.
- **/
- public static function cleanHeaders() {
- @header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
- @header('Last-Modified: '.gmdate( 'D, d M Y H:i:s' ).' GMT');
- @header('Cache-Control: no-cache, must-revalidate, max-age=0');
- @header('Cache: no-cache');
- @header('Pragma: no-cache');
- @header('Content-Type: text/html; charset='.PLX_CHARSET);
- }
-
- /**
- * Méthode d'envoi de mail
- *
- * @param name string Nom de l'expéditeur
- * @param from string Email de l'expéditeur
- * @param to array/string Adresse(s) du(des) destinataires(s)
- * @param subject string Objet du mail
- * @param body string contenu du mail
- * @return boolean renvoie FAUX en cas d'erreur d'envoi
- * @author Amaury Graillat
- **/
- public static function sendMail($name, $from, $to, $subject, $body, $contentType="text", $cc=false, $bcc=false) {
-
- if(is_array($to))
- $to = implode(', ', $to);
- if(is_array($cc))
- $cc = implode(', ', $cc);
- if(is_array($bcc))
- $bcc = implode(', ', $bcc);
-
- $headers = "From: ".$name." <".$from.">\r\n";
- $headers .= "Reply-To: ".$from."\r\n";
- $headers .= 'MIME-Version: 1.0'."\r\n";
- // Content-Type
- if($contentType == 'html')
- $headers .= 'Content-type: text/html; charset="'.PLX_CHARSET.'"'."\r\n";
- else
- $headers .= 'Content-type: text/plain; charset="'.PLX_CHARSET.'"'."\r\n";
-
- $headers .= 'Content-transfer-encoding: 8bit'."\r\n";
- $headers .= 'Date: '.date("D, j M Y G:i:s O")."\r\n"; // Sat, 7 Jun 2001 12:35:58 -0700
-
- if($cc != "")
- $headers .= 'Cc: '.$cc."\r\n";
- if($bcc != "")
- $headers .= 'Bcc: '.$bcc."\r\n";
-
- return mail($to, $subject, $body, $headers);
- }
-
- /**
- * Méthode qui formate un lien pour la barre des menus
- *
- * @param name string titre du menu
- * @param href string lien du menu
- * @param title string contenu de la balise title
- * @param class string contenu de la balise class
- * @param onclick string contenu de la balise onclick
- * @param extra string extra texte à afficher
- * @return string balise formatée
- * @author Stephane F.
- **/
- public static function formatMenu($name, $href, $title=false, $class=false, $onclick=false, $extra='', $highlight=true) {
- $menu = '';
- $basename = explode('?', basename($href));
- $active = ($highlight AND ($basename[0] == basename($_SERVER['SCRIPT_NAME']))) ? ' active':'';
- if($basename[0]=='plugin.php' AND isset($_GET['p']) AND $basename[1]!='p='.$_GET['p']) $active='';
- $title = $title ? ' title="'.$title.'"':'';
- $class = $class ? ' '.$class:'';
- $onclick = $onclick ? ' onclick="'.$onclick.'"':'';
- $menu = '';
- return $menu;
- }
-
- /**
- * Truncates text.
- *
- * Cuts a string to the length of $length and replaces the last characters
- * with the ending if the text is longer than length.
- *
- * @param string $text String to truncate.
- * @param integer $length Length of returned string, including ellipsis.
- * @param string $ending Ending to be appended to the trimmed string.
- * @param boolean $exact If false, $text will not be cut mid-word
- * @param boolean $considerHtml If true, HTML tags would be handled correctly
- * @return string Trimmed string.
- */
- public static function truncate($text, $length = 100, $ending = '...', $exact = true, $considerHtml = false) {
- if ($considerHtml) {
- // if the plain text is shorter than the maximum length, return the whole text
- if (strlen(preg_replace('/<.*?>/', '', $text)) <= $length) {
- return $text;
- }
-
- // splits all html-tags to scanable lines
- preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
-
- $total_length = strlen($ending);
- $open_tags = array();
- $truncate = '';
-
- foreach ($lines as $line_matchings) {
- // if there is any html-tag in this line, handle it and add it (uncounted) to the output
- if (!empty($line_matchings[1])) {
- // if it's an "empty element" with or without xhtml-conform closing slash (f.e. )
- if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) {
- // do nothing
- // if tag is a closing tag (f.e. )
- } else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) {
- // delete tag from $open_tags list
- $pos = array_search($tag_matchings[1], $open_tags);
- if ($pos !== false) {
- unset($open_tags[$pos]);
- }
- // if tag is an opening tag (f.e. )
- } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {
- // add tag to the beginning of $open_tags list
- array_unshift($open_tags, strtolower($tag_matchings[1]));
- }
- // add html-tag to $truncate'd text
- $truncate .= $line_matchings[1];
- }
-
- // calculate the length of the plain text part of the line; handle entities as one character
- $content_length = strlen(preg_replace('/&[0-9a-z]{2,8};|[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
- if ($total_length+$content_length> $length) {
- // the number of characters which are left
- $left = $length - $total_length;
- $entities_length = 0;
- // search for html entities
- if (preg_match_all('/&[0-9a-z]{2,8};|[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) {
- // calculate the real length of all entities in the legal range
- foreach ($entities[0] as $entity) {
- if ($entity[1]+1-$entities_length <= $left) {
- $left--;
- $entities_length += strlen($entity[0]);
- } else {
- // no more characters left
- break;
- }
- }
- }
- $truncate .= substr($line_matchings[2], 0, $left+$entities_length);
- // maximum lenght is reached, so get off the loop
- break;
- } else {
- $truncate .= $line_matchings[2];
- $total_length += $content_length;
- }
-
- // if the maximum length is reached, get off the loop
- if($total_length>= $length) {
- break;
- }
- }
- } else {
- if (strlen($text) <= $length) {
- return $text;
- } else {
- $truncate = substr($text, 0, $length - strlen($ending));
- }
- }
-
- // if the words shouldn't be cut in the middle...
- if (!$exact) {
- // ...search the last occurance of a space...
- $spacepos = strrpos($truncate, ' ');
- if (isset($spacepos)) {
- // ...and cut the text in this position
- $truncate = substr($truncate, 0, $spacepos);
- }
- }
-
- // add the defined ending to the text
- $truncate .= $ending;
- /*
- if($considerHtml) {
- // close all unclosed html-tags
- foreach ($open_tags as $tag) {
- $truncate .= '' . $tag . '>';
- }
- }
- */
- return $truncate;
-
- }
-
- /**
- * Protège une chaine contre un null byte
- *
- * @param string chaine à nettoyer
- * @return string chaine nettoyée
- */
- public static function nullbyteRemove($string) {
- return str_replace("\0", '', $string);
- }
-
- /**
- * Contrôle le nom d'un fichier ou d'un dossier
- *
- * @param string nom d'un fichier
- * @return boolean validité du nom du fichier ou du dossier
- */
- public static function checkSource($src, $type='dir') {
-
- if (is_null($src) OR !strlen($src) OR substr($src,-1,1)=="." OR false!==strpos($src, "..")) {
- return false;
- }
-
- if($type=='dir')
- $regex = ",(/\.)|[[:cntrl:]]|(//)|(\\\\)|([\\:\*\?\"\<\>\|]),";
- elseif($type=='file')
- $regex = ",[[:cntrl:]]|[/\\:\*\?\"\<\>\|],";
-
- if (preg_match($regex, $src)) {
- return false;
- }
- return true;
- }
-
- /**
- * Formate le nom d'une miniature à partir d'un nom de fichier
- *
- * @param string nom d'un fichier
- * @return string nom de la miniature au format fichier.tb.ext
- */
- public static function thumbName($filename) {
- if(preg_match('/^(.*\.)([^.]+)$/D', $filename, $matches)) {
- return $matches[1].'tb.'.$matches[2];
- } else {
- return $filename;
- }
- }
-
- /**
- * Méthode qui minifie un buffer
- *
- * @param string chaine de caractères à minifier
- * @return string chaine de caractères minifiée
- * @author Frédéric Kaplon
- **/
- public static function minify($buffer) {
- /* Supprime les commentaires */
- $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
- /* Supprime les tabs, espaces, saut de ligne, etc. */
- $buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
- return $buffer;
- }
-
- /**
- * Méthode qui converti les urls contenus dans une chaine en liens cliquables.
- *
- * @param string chaîne d'entrée
- * @param string Optionnel. Si spécifié, ce paramètre doit être un tableau associatif de format $arr['attribute'] = $value.
- * @return string Retourne une copie de la chaîne str dont les urls ont été encapsulées dans des balises .
- * @author http://code.seebz.net/p/autolink-php/
- * Exemple 1:
- * $str = 'A link : http://example.com/?param=value#anchor.';
- * $str = autolink($str);
- * echo $str; // A link : http://example.com/?param=value#anchor .
- * Exemple 2:
- * $str = 'http://example.com/';
- * $str = autolink($str, array("target"=>"_blank","rel"=>"nofollow"));
- * echo $str; // http://example.com/
- **/
- public static function autolink($str, $attributes=array()) {
- $attrs = '';
- foreach ($attributes as $attribute => $value) {
- $attrs .= " {$attribute}=\"{$value}\"";
- }
- $str = ' ' . $str;
- $str = preg_replace('#([^"=\'>])((http|https|ftp)://[^\s<]+[^\s<\.)])#i', '$1$2 ', $str);
- $str = substr($str, 1);
- return $str;
- }
-
-/*
- function arrayRemoveDuplicate($array, $field) {
- foreach ($array as $element)
- $cmp[] = $element[$field];
- $unique = array_unique($cmp);
- foreach ($unique as $k => $v)
- $new[] = $array[$k];
- return $new;
- }
-*/
-
- public static function debug($obj) {
- echo "";
- if(is_array($obj))
- print_r($obj);
- else
- echo $obj;
- echo " ";
- }
-}
-?>
+$v) { # On parcourt le tableau
+ if(is_array($v)) {
+ foreach($v as $key=>$val)
+ $new_content[$k][$key] = stripslashes($val);
+ } else {
+ $new_content[ $k ] = stripslashes($v);
+ }
+ }
+ } else { # On traite une chaine
+ $new_content = stripslashes($content);
+ }
+ # On retourne le tableau modifie
+ return $new_content;
+ } else {
+ return $content;
+ }
+ }
+
+ /**
+ * Méthode qui vérifie le bon formatage d'une adresse email
+ *
+ * @param mail adresse email à vérifier
+ * @return boolean vrai si adresse email bien formatée
+ **/
+ public static function checkMail($mail) {
+
+ if (strlen($mail) > 80)
+ return false;
+ return preg_match('/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|("[^"]+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/', $mail);
+ }
+
+ /**
+ * Méthode qui vérifie si l'url passée en paramètre correspond à un format valide
+ *
+ * @param site url d'un site
+ * @return boolean vrai si l'url est bien formatée
+ **/
+ public static function checkSite(&$site, $reset=true) {
+
+ $site = preg_replace('#([\'"].*)#', '', $site);
+
+ if(isset($site[0]) AND $site[0]=='?') return true; # url interne commençant par ?
+ # On vérifie le site via une expression régulière
+ # Méthode imme_emosol - http://mathiasbynens.be/demo/url-regex
+ # modifiée par Amaury Graillat pour prendre en compte les tirets dans les urls
+ if(preg_match('@(https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+([/?][^\s]*)?$@iS', $site))
+ return true;
+ else {
+ if($reset) $site='';
+ return false;
+ }
+ }
+
+ /**
+ * Méthode qui vérifie le format d'une adresse ip
+ *
+ * @param ip adresse ip à vérifier
+ * @return boolean vrai si format valide
+ **/
+ public static function isValidIp($ip) {
+
+ if($ip=='::1') return false;
+ $ipv4 = '/((^|\.)(2[0-5]{2}|[01][0-9]{2}|[0-9]{1,2})(?=\.|$)){4}/';
+ $ipv6 = '/^:?([a-fA-F0-9]{1,4}(:|.)?){0,8}(:|::)?([a-fA-F0-9]{1,4}(:|.)?){0,8}$/';
+ return (preg_match($ipv4, $ip) OR preg_match($ipv6, $ip));
+
+ }
+
+ /**
+ * Méthode qui retourne l'adresse ip d'un visiteur
+ *
+ * @return string adresse ip d'un visiteur
+ **/
+ public static function getIp() {
+
+ if(!empty($_SERVER['HTTP_CLIENT_IP'])) # check ip from share internet
+ $ip=$_SERVER['HTTP_CLIENT_IP'];
+ elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) # to check ip is pass from proxy
+ $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
+ else
+ $ip=$_SERVER['REMOTE_ADDR'];
+
+ if(version_compare(phpversion(), '5.3.0', '<'))
+ $localIP = getHostByName(php_uname('n'));
+ else
+ $localIP = getHostByName(getHostName());
+
+ return plxUtils::isValidIp($ip) ? $ip : $localIP;
+ }
+
+ /**
+ * Méthode qui affiche une liste de sélection
+ *
+ * @param name nom de la liste
+ * @param array valeurs de la liste sous forme de tableau (nom, valeur)
+ * @param selected valeur par défaut
+ * @param readonly vrai si la liste est en lecture seule (par défaut à faux)
+ * @param class class css à utiliser pour formater l'affichage
+ * @param id si vrai génère un id à partir du nom du champ, sinon génère l'id à partir du paramètre
+ * @return stdout
+ **/
+ public static function printSelect($name, $array, $selected='', $readonly=false, $class='', $id=true) {
+
+ if(!is_array($array)) $array=array();
+
+ if(is_bool($id))
+ $id = ($id ? ' id="id_'.$name.'"' : '');
+ else
+ $id = ($id!='' ? ' id="'.$id.'"' : '');
+
+ if($readonly)
+ echo ''."\n";
+ else
+ echo ''."\n";
+ foreach($array as $a => $b) {
+ if(is_array($b)) {
+ echo ''."\n";
+ foreach($b as $c=>$d) {
+ if($c == $selected)
+ echo "\t".''.$d.' '."\n";
+ else
+ echo "\t".''.$d.' '."\n";
+ }
+ echo ' '."\n";
+ } else {
+ if($a == $selected)
+ echo "\t".''.$b.' '."\n";
+ else
+ echo "\t".''.$b.' '."\n";
+ }
+ }
+ echo ' '."\n";
+ }
+
+ /**
+ * Méthode qui affiche un zone de saisie
+ *
+ * @param name nom de la zone de saisie
+ * @param value valeur contenue dans la zone de saisie
+ * @param type type du champ (text, password, hidden)
+ * @param size longueur du champ - nombre maximal de caractères pouvant être saisis (par défaut 50-255)
+ * @param readonly vrai si le champ est en lecture seule (par défaut à faux)
+ * @param class class css à utiliser pour formater l'affichage
+ * @param placeholder valeur du placeholder du champ (html5)
+ * @param extra extra paramètre pour du javascript par exemple (onclick)
+ * @return stdout
+ **/
+ public static function printInput($name, $value='', $type='text', $sizes='50-255', $readonly=false, $className='', $placeholder='', $extra='') {
+
+ $params = array(
+ 'id="id_'.$name.'"',
+ 'name="'.$name.'"',
+ 'type="'.$type.'"'
+ );
+ if(!empty($value))
+ $params[] = 'value="'.$value.'"';
+ if(!empty($extra))
+ $params[] = $extra;
+ if($type != 'hidden') {
+ if($readonly === true)
+ $params[] = 'readonly="readonly" class="readonly"';
+ if(!empty($className))
+ $params[] = 'class="'.$className.'"';
+ if(!empty($placeholder))
+ $params[] = $placeholder;
+ if(!empty($sizes) AND (strpos($sizes, '-') !== false)) {
+ list($size, $maxlength) = explode('-', $sizes);
+ if(!empty($size))
+ $params[] = 'size="'.$size.'"';
+ if(!empty($maxlength))
+ $params[] = 'maxlength="'.$maxlength.'"';
+ }
+ }
+ echo ' ';
+ }
+
+ /**
+ * Méthode qui affiche une zone de texte
+ *
+ * @param name nom de la zone de texte
+ * @param value valeur contenue dans la zone de texte
+ * @param cols nombre de caractères affichés par colonne
+ * @params rows nombre de caractères affichés par ligne
+ * @param readonly vrai si le champ est en lecture seule (par défaut à faux)
+ * @param class class css à utiliser pour formater l'affichage
+ * @return stdout
+ **/
+ public static function printArea($name, $value='', $cols='', $rows='', $readonly=false, $class='') {
+
+ if($readonly)
+ echo ''."\n";
+ else
+ echo ''."\n";
+ }
+
+ /**
+ * Méthode qui teste si un fichier est accessible en écriture
+ *
+ * @param file emplacement et nom du fichier à tester
+ * @param format format d'affichage
+ **/
+ public static function testWrite($file, $format="#symbol #message \n") {
+
+ if(is_writable($file)) {
+ $output = str_replace('#color', 'green', $format);
+ $output = str_replace('#symbol', '✔', $output);
+ $output = str_replace('#message', sprintf(L_WRITE_ACCESS, $file), $output);
+ echo $output;
+ } else {
+ $output = str_replace('#color', 'red', $format);
+ $output = str_replace('#symbol', '✗', $output);
+ $output = str_replace('#message', sprintf(L_WRITE_NOT_ACCESS, $file), $output);
+ echo $output;
+ }
+ }
+
+ /**
+ * Méthode qui teste si le module apache mod_rewrite est disponible
+ *
+ * @param io affiche à l'écran le résultat du test si à VRAI
+ * @param format format d'affichage
+ * @return boolean retourne vrai si le module apache mod_rewrite est disponible
+ * @author Stephane F
+ **/
+ public static function testModRewrite($io=true, $format="#symbol #message \n") {
+
+ if(function_exists('apache_get_modules')) {
+ $test = in_array("mod_rewrite", apache_get_modules());
+ if($io==true) {
+ if($test) {
+ $output = str_replace('#color', 'green', $format);
+ $output = str_replace('#symbol', '✔', $output);
+ $output = str_replace('#message', L_MODREWRITE_AVAILABLE, $output);
+ echo $output;
+ } else {
+ $output = str_replace('#color', 'red', $format);
+ $output = str_replace('#symbol', '✗', $output);
+ $output = str_replace('#message', L_MODREWRITE_NOT_AVAILABLE, $output);
+ echo $output;
+ }
+ }
+ return $test;
+ }
+ else return true;
+ }
+
+ /**
+ * Méthode qui teste si la fonction php mail est disponible
+ *
+ * @param io affiche à l'écran le résultat du test si à VRAI
+ * @param format format d'affichage
+ * @return boolean retourne vrai si la fonction php mail est disponible
+ * @author Stephane F
+ **/
+ public static function testMail($io=true, $format="#symbol #message \n") {
+
+ if($return=function_exists('mail')) {
+ if($io==true) {
+ $output = str_replace('#color', 'green', $format);
+ $output = str_replace('#symbol', '✔', $output);
+ $output = str_replace('#message', L_MAIL_AVAILABLE, $output);
+ echo $output;
+ }
+ } else {
+ if($io==true) {
+ $output = str_replace('#color', 'red', $format);
+ $output = str_replace('#symbol', '✗', $output);
+ $output = str_replace('#message', L_MAIL_NOT_AVAILABLE, $output);
+ echo $output;
+ }
+ }
+ return $return;
+ }
+
+ /**
+ * Méthode qui teste si la bibliothèque GD est installé
+ *
+ * @param format format d'affichage
+ * @author Stephane F
+ **/
+ public static function testLibGD($format="#symbol #message \n") {
+
+ if(function_exists('imagecreatetruecolor')) {
+ $output = str_replace('#color', 'green', $format);
+ $output = str_replace('#symbol', '✔', $output);
+ $output = str_replace('#message', L_LIBGD_INSTALLED, $output);
+ echo $output;
+ } else {
+ $output = str_replace('#color', 'red', $format);
+ $output = str_replace('#symbol', '✗', $output);
+ $output = str_replace('#message', L_LIBGD_NOT_INSTALLED, $output);
+ echo $output;
+ }
+ }
+
+ /**
+ * Méthode qui teste si la bibliothèque XML est installée
+ *
+ * @param format format d'affichage
+ *
+ **/
+ public static function testLibXml($format="#symbol #message \n") {
+
+ if(function_exists('xml_parser_create')) {
+ $output = str_replace('#color', 'green', $format);
+ $output = str_replace('#symbol', '✔', $output);
+ $output = str_replace('#message', L_LIBXML_INSTALLED, $output);
+ echo $output;
+ } else {
+ $output = str_replace('#color', 'red', $format);
+ $output = str_replace('#symbol', '✗', $output);
+ $output = str_replace('#message', L_LIBXML_NOT_INSTALLED, $output);
+ echo $output;
+ }
+ }
+
+ /**
+ * Méthode qui formate une chaine de caractères en supprimant des caractères non valides
+ *
+ * @param str chaine de caractères à formater
+ * @param charset charset à utiliser dans le formatage de la chaine (par défaut utf-8)
+ * @return string chaine formatée
+ **/
+ public static function removeAccents($str,$charset='utf-8') {
+
+ $str = htmlentities($str, ENT_NOQUOTES, $charset);
+ $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ');
+ $b = array('A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o');
+ $str = str_replace($a, $b, $str);
+ $str = preg_replace('#\&([A-za-z])(?:acute|cedil|circ|grave|ring|tilde|uml|uro)\;#', '\1', $str);
+ $str = preg_replace('#\&([A-za-z]{2})(?:lig)\;#', '\1', $str); # pour les ligatures e.g. 'œ'
+ $str = preg_replace('#\&[^;]+\;#', '', $str); # supprime les autres caractères
+ return $str;
+ }
+
+ /**
+ * Méthode qui convertit une chaine de caractères au format valide pour une url
+ *
+ * @param str chaine de caractères à formater
+ * @return string nom d'url valide
+ **/
+ public static function title2url($str) {
+
+ $str = strtolower(plxUtils::removeAccents($str,PLX_CHARSET));
+ $str = preg_replace('/[^[:alnum:]]+/',' ',$str);
+ return strtr(trim($str), ' ', '-');
+ }
+
+ /**
+ * Méthode qui convertit une chaine de caractères au format valide pour un nom de fichier
+ *
+ * @param str chaine de caractères à formater
+ * @return string nom de fichier valide
+ **/
+ public static function title2filename($str) {
+
+ $str = strtolower(plxUtils::removeAccents($str,PLX_CHARSET));
+ $str = str_replace('|','',$str);
+ $str = preg_replace('/\.{2,}/', '.', $str);
+ $str = preg_replace('/[^[:alnum:]|.|_]+/',' ',$str);
+ return strtr(ltrim(trim($str),'.'), ' ', '-');
+ }
+
+ /**
+ * Méthode qui convertit un chiffre en chaine de caractères sur une longueur de n caractères, completée par des 0 à gauche
+ *
+ * @param num chiffre à convertir
+ * @param length longueur de la chaine à retourner
+ * @return string chaine formatée
+ **/
+ public static function formatRelatif($num, $lenght) {
+
+ $fnum = str_pad(abs($num), $lenght, '0', STR_PAD_LEFT);
+ if($num > -1)
+ return '+'.$fnum;
+ else
+ return '-'.$fnum;
+ }
+
+ /**
+ * Méthode qui écrit dans un fichier
+ * Mode écriture seule; place le pointeur de fichier au début du fichier et réduit la taille du fichier à 0. Si le fichier n'existe pas, on tente de le créer.
+ *
+ * @param xml contenu du fichier
+ * @param filename emplacement et nom du fichier
+ * @return boolean retourne vrai si l'écriture s'est bien déroulée
+ **/
+ public static function write($xml, $filename) {
+
+ if(file_exists($filename)) {
+ $f = fopen($filename.'.tmp', 'w'); # On ouvre le fichier temporaire
+ fwrite($f, trim($xml)); # On écrit
+ fclose($f); # On ferme
+ unlink($filename);
+ rename($filename.'.tmp', $filename); # On renomme le fichier temporaire avec le nom de l'ancien
+ } else {
+ $f = fopen($filename, 'w'); # On ouvre le fichier
+ fwrite($f, trim($xml)); # On écrit
+ fclose($f); # On ferme
+ }
+ # On place les bons droits
+ chmod($filename,0644);
+ # On vérifie le résultat
+ if(file_exists($filename) AND !file_exists($filename.'.tmp'))
+ return true;
+ else
+ return false;
+ }
+
+ /**
+ * Méthode qui formate l'affichage de la taille d'un fichier
+ *
+ * @param filsize taille en octets d'un fichier
+ * @return string chaine d'affichage formatée
+ **/
+ public static function formatFilesize($bytes) {
+
+ if ($bytes < 1024) return $bytes.' B';
+ elseif ($bytes < 1048576) return round($bytes / 1024, 2).' Kb';
+ elseif ($bytes < 1073741824) return round($bytes / 1048576, 2).' Mb';
+
+ }
+
+ /**
+ * Méthode qui crée la miniature d'une image
+ *
+ * @param src_image emplacement et nom du fichier source
+ * @param dest_image emplacement et nom de la miniature créée
+ * @param thumb_width largeur de la miniature
+ * @param thumb_height hauteur de la miniature
+ * @param quality qualité de l'image
+ * @return boolean vrai si image créée
+ **/
+ public static function makeThumb($src_image, $dest_image, $thumb_width = 48, $thumb_height = 48, $jpg_quality = 90) {
+
+ if(!function_exists('imagecreatetruecolor')) return false;
+
+ // Get dimensions of existing image
+ $image = getimagesize($src_image);
+
+ // Check for valid dimensions
+ if($image[0] <= 0 || $image[1] <= 0) return false;
+
+ // Determine format from MIME-Type
+ $image['format'] = strtolower(preg_replace('/^.*?\//', '', $image['mime']));
+
+ // calcul du ration si nécessaire
+ if($thumb_width!=$thumb_height) {
+ # Calcul du ratio
+ $x_offset = $y_offset = 0;
+ $square_size_w = $image[0];
+ $square_size_h = $image[1];
+ $ratio_w = $thumb_width / $image[0];
+ $ratio_h = $thumb_height / $image[1];
+ if($thumb_width == 0)
+ $thumb_width = $image[0] * $ratio_h;
+ elseif($thumb_height == 0)
+ $thumb_height = $image[1] * $ratio_w;
+ elseif($ratio_w < $ratio_h AND $ratio_w < 1) {
+ $thumb_width = $ratio_w * $image[0];
+ $thumb_height = $ratio_w * $image[1];
+ } elseif($ratio_h < 1) {
+ $thumb_width = $ratio_h * $image[0];
+ $thumb_height = $ratio_h * $image[1];
+ } else {
+ $thumb_width = $image[0];
+ $thumb_height = $image[1];
+ }
+ }
+
+ $canvas = imagecreatetruecolor($thumb_width, $thumb_height);
+
+ // Import image
+ switch( $image['format'] ) {
+ case 'jpg':
+ case 'jpeg':
+ $image_data = imagecreatefromjpeg($src_image);
+ break;
+ case 'png':
+ $image_data = imagecreatefrompng($src_image);
+ $color = imagecolortransparent($canvas, imagecolorallocatealpha($canvas, 0, 0, 0, 127));
+ imagefill($canvas, 0, 0, $color);
+ imagesavealpha($canvas, true);
+ break;
+ case 'gif':
+ $image_data = imagecreatefromgif($src_image);
+ $color = imagecolortransparent($canvas, imagecolorallocatealpha($canvas, 0, 0, 0, 127));
+ imagefill($canvas, 0, 0, $color);
+ imagesavealpha($canvas, true);
+ break;
+ default:
+ return false; // Unsupported format
+ break;
+ }
+
+ // Verify import
+ if($image_data == false) return false;
+
+ // Calculate measurements (square crop)
+ if($thumb_width==$thumb_height) {
+ if($image[0] > $image[1]) {
+ // For landscape images
+ $x_offset = ($image[0] - $image[1]) / 2;
+ $y_offset = 0;
+ $square_size_w = $square_size_h = $image[0] - ($x_offset * 2);
+ } else {
+ // For portrait and square images
+ $x_offset = 0;
+ $y_offset = ($image[1] - $image[0]) / 2;
+ $square_size_w = $square_size_h = $image[1] - ($y_offset * 2);
+ }
+ }
+
+ // Resize and crop
+ if( imagecopyresampled(
+ $canvas,
+ $image_data,
+ 0,
+ 0,
+ $x_offset,
+ $y_offset,
+ $thumb_width,
+ $thumb_height,
+ $square_size_w,
+ $square_size_h
+ )) {
+
+ // Create thumbnail
+ switch( strtolower(preg_replace('/^.*\./', '', $dest_image)) ) {
+ case 'jpg':
+ case 'jpeg':
+ return (imagejpeg($canvas, $dest_image, $jpg_quality) AND is_file($dest_image));
+ break;
+ case 'png':
+ return (imagepng($canvas, $dest_image) AND is_file($dest_image));
+ break;
+ case 'gif':
+ return (imagegif($canvas, $dest_image) AND is_file($dest_image));
+ break;
+ default:
+ return false; // Unsupported format
+ break;
+ }
+
+ } else {
+ return false;
+ }
+
+ }
+
+ /**
+ * Méthode qui affiche un message
+ *
+ * @param string message à afficher
+ * @param string classe css à utiliser pour formater l'affichage du message
+ * @param string format des balises avant le message
+ * @param string format des balises après le message
+ * @return stdout
+ **/
+ public static function showMsg($msg, $class='',$format_start='',$format_end='
') {
+ $format_start = str_replace('#CLASS',($class != '' ? $class : 'msg'),$format_start);
+ echo $format_start.$msg.$format_end;
+ }
+
+ /**
+ * Méthode qui retourne l'url de base du site
+ *
+ * @return string url de base du site
+ **/
+ public static function getRacine() {
+
+ $protocol = (!empty($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS']) == 'on') || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) AND strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' )? 'https://' : "http://";
+ $servername = $_SERVER['HTTP_HOST'];
+ $serverport = (preg_match('/:[0-9]+/', $servername) OR $_SERVER['SERVER_PORT'])=='80' ? '' : ':'.$_SERVER['SERVER_PORT'];
+ $dirname = preg_replace('/\/(core|plugins)\/(.*)/', '', dirname($_SERVER['SCRIPT_NAME']));
+ $racine = rtrim($protocol.$servername.$serverport.$dirname, '/\\').'/';
+ if(!plxUtils::checkSite($racine, false))
+ die('Error: wrong or invalid url');
+ return $racine;
+ }
+
+ /**
+ * Méthode qui retourne une chaine de caractères au hasard
+ *
+ * @param taille nombre de caractère de la chaine à retourner (par défaut sur 10 caractères)
+ * @return string chaine de caractères au hasard
+ **/
+ public static function charAleatoire($taille='10') {
+
+ $string = '';
+ $chaine = 'abcdefghijklmnpqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ mt_srand((float)microtime()*1000000);
+ for($i=0; $i<$taille; $i++)
+ $string .= $chaine[ mt_rand()%strlen($chaine) ];
+ return $string;
+ }
+
+ /**
+ * Méthode qui coupe une chaine de caractères sur n caractères ou sur n mots
+ *
+ * @param str chaine de caractères à couper
+ * @param length nombre de caractères ou nombre de mots à garder (par défaut 25)
+ * @param type à renseigner avec la valeur 'word' pour couper en nombre de mots. Par défaut la césure se fait en nombre de caractères
+ * @param add_text texte à ajouter après la chaine coupée (par défaut '...' est ajouté)
+ * @return string chaine de caractères coupée
+ **/
+ public static function strCut($str='', $length=25, $type='', $add_text='...') {
+ if($type == 'word') { # On coupe la chaine en comptant le nombre de mots
+ $content = explode(' ',$str);
+ $length = sizeof($content) < $length ? sizeof($content) : $length;
+ return implode(' ',array_slice($content,0,$length)).$add_text;
+ } else { # On coupe la chaine en comptant le nombre de caractères
+ return strlen($str) > $length ? utf8_decode(substr(utf8_encode($str), 0, $length)).$add_text : $str;
+ }
+ }
+
+ /**
+ * Méthode qui retourne une chaine de caractères formatée en fonction du charset
+ *
+ * @param str chaine de caractères
+ * @return string chaine de caractères tenant compte du charset
+ **/
+ public static function strCheck($str) {
+
+ return htmlspecialchars($str,ENT_QUOTES,PLX_CHARSET);
+ }
+
+ /**
+ * Méthode qui retourne une chaine de caractères nettoyée des cdata
+ *
+ * @param str chaine de caractères à nettoyer
+ * @return string chaine de caractères nettoyée
+ * @author Stephane F
+ **/
+ public static function cdataCheck($str) {
+ $str = str_ireplace('!CDATA', '!CDATA', $str);
+ return str_replace(']]>', ']]>', $str);
+ }
+
+ /**
+ * Méthode qui retourne une chaine de caractères HTML en fonction du charset
+ *
+ * @param str chaine de caractères
+ * @return string chaine de caractères tenant compte du charset
+ **/
+ public static function strRevCheck($str) {
+
+ return html_entity_decode($str,ENT_QUOTES,PLX_CHARSET);
+ }
+
+ /**
+ * Méthode qui retourne le type de compression disponible
+ *
+ * @return stout
+ * @author Stephane F., Amaury Graillat
+ **/
+ public static function httpEncoding() {
+ if(headers_sent()){
+ $encoding = false;
+ }elseif(isset($_SERVER['HTTP_ACCEPT_ENCODING']) AND strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip') !== false){
+ $encoding = 'gzip';
+ }else{
+ $encoding = false;
+ }
+ return $encoding;
+ }
+
+ /**
+ * Méthode qui converti les liens relatifs en liens absolus
+ *
+ * @param base url du site qui sera rajoutée devant les liens relatifs
+ * @param html chaine de caractères à convertir
+ * @return string chaine de caractères modifiée
+ * @author Stephane F., Amaury Graillat, J.P. Pourrez
+ **/
+ public static function rel2abs($base, $html) {
+
+ if (substr($base, -1) != '/')
+ $base .= '/';
+
+ # réécriture des liens commençant uniquement par une ancre
+ $url = plxUtils::getRacine().plxUtils::getGets();
+ $html = preg_replace('/(href=["|\'])#/', '$1'.$url.'#', $html);
+
+ # on protège tous les liens externes au site, et on transforme tous les liens relatifs en absolus
+ # on ajoute le hostname si nécessaire
+ $mask = '=<<>>=';
+ $protect = '(\#|javascript|data|callto|content|fax|file|ftp|imap|irc|jabber|mailto|mms|news|pop|sip|smb|sms|ssh|tel|telnet|vnc|xmpp):?';
+ $patterns = array('#(href|src)=("|\')('.$protect.':)#i', '#(href|src)=("|\')([a-z]+://)#i', '#(href|src)=("|\')(?:\./)?([^/])#i');
+ $replaces = array('$1'.$mask.'$2$3', '$1'.$mask.'$2$3', '$1=$2'.$base.'$3');
+ if (preg_match('#^[a-z]+://#i', $base)) {
+ $patterns[] = '#(href|src)=("|\')/([^/])#i';
+ $replaces[] = '$1=$2'.$base.'$3';
+ }
+ $result = preg_replace($patterns, $replaces, $html);
+ # on retire la protection des liens externes. Expressions régulières lentes et inutiles
+ $result = str_replace($mask, '=', $result);
+ return $result;
+
+ }
+
+ /**
+ * Méthode qui retourne la liste des langues disponibles dans un tableau
+ *
+ * @return string chaine de caractères modifiée
+ * @author Stephane F.
+ **/
+ public static function getLangs() {
+ $array = array();
+ $glob = plxGlob::getInstance(PLX_CORE.'lang', true);
+ if($aFolders = $glob->query("/[a-z]+/i")) {
+ foreach($aFolders as $folder) {
+ $array[$folder] = $folder;
+ }
+ }
+ ksort($array);
+ return $array;
+ }
+
+ /**
+ * Méthode qui empeche de mettre en cache une page
+ *
+ * @return stdio
+ * @author Stephane F.
+ **/
+ public static function cleanHeaders() {
+ @header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
+ @header('Last-Modified: '.gmdate( 'D, d M Y H:i:s' ).' GMT');
+ @header('Cache-Control: no-cache, must-revalidate, max-age=0');
+ @header('Cache: no-cache');
+ @header('Pragma: no-cache');
+ @header('Content-Type: text/html; charset='.PLX_CHARSET);
+ }
+
+ /**
+ * Méthode d'envoi de mail
+ *
+ * @param name string Nom de l'expéditeur
+ * @param from string Email de l'expéditeur
+ * @param to array/string Adresse(s) du(des) destinataires(s)
+ * @param subject string Objet du mail
+ * @param body string contenu du mail
+ * @return boolean renvoie FAUX en cas d'erreur d'envoi
+ * @author Amaury Graillat
+ **/
+ public static function sendMail($name, $from, $to, $subject, $body, $contentType="text", $cc=false, $bcc=false) {
+
+ if(is_array($to))
+ $to = implode(', ', $to);
+ if(is_array($cc))
+ $cc = implode(', ', $cc);
+ if(is_array($bcc))
+ $bcc = implode(', ', $bcc);
+
+ $headers = "From: ".$name." <".$from.">\r\n";
+ $headers .= "Reply-To: ".$from."\r\n";
+ $headers .= 'MIME-Version: 1.0'."\r\n";
+ // Content-Type
+ if($contentType == 'html')
+ $headers .= 'Content-type: text/html; charset="'.PLX_CHARSET.'"'."\r\n";
+ else
+ $headers .= 'Content-type: text/plain; charset="'.PLX_CHARSET.'"'."\r\n";
+
+ $headers .= 'Content-transfer-encoding: 8bit'."\r\n";
+ $headers .= 'Date: '.date("D, j M Y G:i:s O")."\r\n"; // Sat, 7 Jun 2001 12:35:58 -0700
+
+ if($cc != "")
+ $headers .= 'Cc: '.$cc."\r\n";
+ if($bcc != "")
+ $headers .= 'Bcc: '.$bcc."\r\n";
+
+ return mail($to, $subject, $body, $headers);
+ }
+
+ /**
+ * Méthode qui formate un lien pour la barre des menus
+ *
+ * @param name string titre du menu
+ * @param href string lien du menu
+ * @param title string contenu de la balise title
+ * @param class string contenu de la balise class
+ * @param onclick string contenu de la balise onclick
+ * @param extra string extra texte à afficher
+ * @return string balise formatée
+ * @author Stephane F.
+ **/
+ public static function formatMenu($name, $href, $title=false, $class=false, $onclick=false, $extra='', $highlight=true) {
+ $menu = '';
+ $basename = explode('?', basename($href));
+ $active = ($highlight AND ($basename[0] == basename($_SERVER['SCRIPT_NAME']))) ? ' active':'';
+ if($basename[0]=='plugin.php' AND isset($_GET['p']) AND $basename[1]!='p='.$_GET['p']) $active='';
+ $title = $title ? ' title="'.$title.'"':'';
+ $class = $class ? ' '.$class:'';
+ $onclick = $onclick ? ' onclick="'.$onclick.'"':'';
+ $menu = '';
+ return $menu;
+ }
+
+ /**
+ * Truncates text.
+ *
+ * Cuts a string to the length of $length and replaces the last characters
+ * with the ending if the text is longer than length.
+ *
+ * @param string $text String to truncate.
+ * @param integer $length Length of returned string, including ellipsis.
+ * @param string $ending Ending to be appended to the trimmed string.
+ * @param boolean $exact If false, $text will not be cut mid-word
+ * @param boolean $considerHtml If true, HTML tags would be handled correctly
+ * @return string Trimmed string.
+ */
+ public static function truncate($text, $length = 100, $ending = '...', $exact = true, $considerHtml = false) {
+ if ($considerHtml) {
+ // if the plain text is shorter than the maximum length, return the whole text
+ if (strlen(preg_replace('/<.*?>/', '', $text)) <= $length) {
+ return $text;
+ }
+
+ // splits all html-tags to scanable lines
+ preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
+
+ $total_length = strlen($ending);
+ $open_tags = array();
+ $truncate = '';
+
+ foreach ($lines as $line_matchings) {
+ // if there is any html-tag in this line, handle it and add it (uncounted) to the output
+ if (!empty($line_matchings[1])) {
+ // if it's an "empty element" with or without xhtml-conform closing slash (f.e. )
+ if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) {
+ // do nothing
+ // if tag is a closing tag (f.e. )
+ } else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) {
+ // delete tag from $open_tags list
+ $pos = array_search($tag_matchings[1], $open_tags);
+ if ($pos !== false) {
+ unset($open_tags[$pos]);
+ }
+ // if tag is an opening tag (f.e. )
+ } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {
+ // add tag to the beginning of $open_tags list
+ array_unshift($open_tags, strtolower($tag_matchings[1]));
+ }
+ // add html-tag to $truncate'd text
+ $truncate .= $line_matchings[1];
+ }
+
+ // calculate the length of the plain text part of the line; handle entities as one character
+ $content_length = strlen(preg_replace('/&[0-9a-z]{2,8};|[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
+ if ($total_length+$content_length> $length) {
+ // the number of characters which are left
+ $left = $length - $total_length;
+ $entities_length = 0;
+ // search for html entities
+ if (preg_match_all('/&[0-9a-z]{2,8};|[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) {
+ // calculate the real length of all entities in the legal range
+ foreach ($entities[0] as $entity) {
+ if ($entity[1]+1-$entities_length <= $left) {
+ $left--;
+ $entities_length += strlen($entity[0]);
+ } else {
+ // no more characters left
+ break;
+ }
+ }
+ }
+ $truncate .= substr($line_matchings[2], 0, $left+$entities_length);
+ // maximum lenght is reached, so get off the loop
+ break;
+ } else {
+ $truncate .= $line_matchings[2];
+ $total_length += $content_length;
+ }
+
+ // if the maximum length is reached, get off the loop
+ if($total_length>= $length) {
+ break;
+ }
+ }
+ } else {
+ if (strlen($text) <= $length) {
+ return $text;
+ } else {
+ $truncate = substr($text, 0, $length - strlen($ending));
+ }
+ }
+
+ // if the words shouldn't be cut in the middle...
+ if (!$exact) {
+ // ...search the last occurance of a space...
+ $spacepos = strrpos($truncate, ' ');
+ if (isset($spacepos)) {
+ // ...and cut the text in this position
+ $truncate = substr($truncate, 0, $spacepos);
+ }
+ }
+
+ // add the defined ending to the text
+ $truncate .= $ending;
+ /*
+ if($considerHtml) {
+ // close all unclosed html-tags
+ foreach ($open_tags as $tag) {
+ $truncate .= '' . $tag . '>';
+ }
+ }
+ */
+ return $truncate;
+
+ }
+
+ /**
+ * Protège une chaine contre un null byte
+ *
+ * @param string chaine à nettoyer
+ * @return string chaine nettoyée
+ */
+ public static function nullbyteRemove($string) {
+ return str_replace("\0", '', $string);
+ }
+
+ /**
+ * Contrôle le nom d'un fichier ou d'un dossier
+ *
+ * @param string nom d'un fichier
+ * @return boolean validité du nom du fichier ou du dossier
+ */
+ public static function checkSource($src, $type='dir') {
+
+ if (is_null($src) OR !strlen($src) OR substr($src,-1,1)=="." OR false!==strpos($src, "..")) {
+ return false;
+ }
+
+ if($type=='dir')
+ $regex = ",(/\.)|[[:cntrl:]]|(//)|(\\\\)|([\\:\*\?\"\<\>\|]),";
+ elseif($type=='file')
+ $regex = ",[[:cntrl:]]|[/\\:\*\?\"\<\>\|],";
+
+ if (preg_match($regex, $src)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Formate le nom d'une miniature à partir d'un nom de fichier
+ *
+ * @param string nom d'un fichier
+ * @return string nom de la miniature au format fichier.tb.ext
+ */
+ public static function thumbName($filename) {
+ if(preg_match('/^(.*\.)([^.]+)$/D', $filename, $matches)) {
+ return $matches[1].'tb.'.$matches[2];
+ } else {
+ return $filename;
+ }
+ }
+
+ /**
+ * Méthode qui minifie un buffer
+ *
+ * @param string chaine de caractères à minifier
+ * @return string chaine de caractères minifiée
+ * @author Frédéric Kaplon
+ **/
+ public static function minify($buffer) {
+ /* Supprime les commentaires */
+ $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
+ /* Supprime les tabs, espaces, saut de ligne, etc. */
+ $buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
+ return $buffer;
+ }
+
+ /**
+ * Méthode qui converti les urls contenus dans une chaine en liens cliquables.
+ *
+ * @param string chaîne d'entrée
+ * @param string Optionnel. Si spécifié, ce paramètre doit être un tableau associatif de format $arr['attribute'] = $value.
+ * @return string Retourne une copie de la chaîne str dont les urls ont été encapsulées dans des balises .
+ * @author http://code.seebz.net/p/autolink-php/
+ * Exemple 1:
+ * $str = 'A link : http://example.com/?param=value#anchor.';
+ * $str = autolink($str);
+ * echo $str; // A link : http://example.com/?param=value#anchor .
+ * Exemple 2:
+ * $str = 'http://example.com/';
+ * $str = autolink($str, array("target"=>"_blank","rel"=>"nofollow"));
+ * echo $str; // http://example.com/
+ **/
+ public static function autolink($str, $attributes=array()) {
+ $attrs = '';
+ foreach ($attributes as $attribute => $value) {
+ $attrs .= " {$attribute}=\"{$value}\"";
+ }
+ $str = ' ' . $str;
+ $str = preg_replace('#([^"=\'>])((http|https|ftp)://[^\s<]+[^\s<\.)])#i', '$1$2 ', $str);
+ $str = substr($str, 1);
+ return $str;
+ }
+
+/*
+ function arrayRemoveDuplicate($array, $field) {
+ foreach ($array as $element)
+ $cmp[] = $element[$field];
+ $unique = array_unique($cmp);
+ foreach ($unique as $k => $v)
+ $new[] = $array[$k];
+ return $new;
+ }
+*/
+
+ public static function debug($obj) {
+ echo "";
+ if(is_array($obj))
+ print_r($obj);
+ else
+ echo $obj;
+ echo " ";
+ }
+}
+?>
diff --git a/data/articles/.htaccess b/data/articles/.htaccess
index 51d1a8668..5400168a5 100644
--- a/data/articles/.htaccess
+++ b/data/articles/.htaccess
@@ -1,4 +1,4 @@
-
- Order allow,deny
- Deny from all
-
+
+ Order allow,deny
+ Deny from all
+
diff --git a/data/commentaires/.htaccess b/data/commentaires/.htaccess
index 51d1a8668..5400168a5 100644
--- a/data/commentaires/.htaccess
+++ b/data/commentaires/.htaccess
@@ -1,4 +1,4 @@
-
- Order allow,deny
- Deny from all
-
+
+ Order allow,deny
+ Deny from all
+
diff --git a/data/statiques/.htaccess b/data/statiques/.htaccess
index 51d1a8668..5400168a5 100644
--- a/data/statiques/.htaccess
+++ b/data/statiques/.htaccess
@@ -1,4 +1,4 @@
-
- Order allow,deny
- Deny from all
-
+
+ Order allow,deny
+ Deny from all
+
diff --git a/index.php b/index.php
index d8f693677..6dca4a7ac 100644
--- a/index.php
+++ b/index.php
@@ -1,97 +1,97 @@
-aConf['default_lang'];
-
-# Hook Plugins
-eval($plxMotor->plxPlugins->callHook('Index'));
-
-# chargement du fichier de langue
-loadLang(PLX_CORE.'lang/'.$lang.'/core.php');
-
-$plxMotor->prechauffage();
-$plxMotor->demarrage();
-
-# Creation de l'objet d'affichage
-$plxShow = plxShow::getInstance();
-
-eval($plxMotor->plxPlugins->callHook('IndexBegin'));
-
-# On démarre la bufferisation
-ob_start();
-ob_implicit_flush(0);
-
-# Traitements du thème
-if($plxMotor->style == '' or !is_dir(PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style)) {
- header('Content-Type: text/plain; charset='.PLX_CHARSET);
- echo L_ERR_THEME_NOTFOUND.' ('.PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.') !';
-} elseif(file_exists(PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.'/'.$plxMotor->template)) {
- # On impose le charset
- header('Content-Type: text/html; charset='.PLX_CHARSET);
- # Insertion du template
- include(PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.'/'.$plxMotor->template);
-} else {
- header('Content-Type: text/plain; charset='.PLX_CHARSET);
- echo L_ERR_FILE_NOTFOUND.' ('.PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.'/'.$plxMotor->template.') !';
-}
-
-# Récuperation de la bufférisation
-$output = ob_get_clean();
-
-# Hooks spécifiques au thème
-ob_start();
-eval($plxMotor->plxPlugins->callHook('ThemeEndHead'));
-$output = str_replace('', ob_get_clean().'', $output);
-ob_start();
-eval($plxMotor->plxPlugins->callHook('ThemeEndBody'));
-$output = str_replace('
-
-
-
-
-
-
-
-
-
- '.$msg.''; ?>
-
-
-
-
-
-
-
-', ob_get_clean().'', $output);
-
-# Hook Plugins
-eval($plxMotor->plxPlugins->callHook('IndexEnd'));
-
-# On applique la réécriture d'url si nécessaire
-if($plxMotor->aConf['urlrewriting']) {
- $output = plxUtils::rel2abs($plxMotor->aConf['racine'], $output);
-}
-
-# On applique la compression gzip si nécessaire et disponible
-if($plxMotor->aConf['gzip']) {
- if($encoding=plxUtils::httpEncoding()) {
- header('Content-Encoding: '.$encoding);
- $output = gzencode($output,-1,FORCE_GZIP);
- }
-}
-
-# Restitution écran
-echo $output;
-exit;
+aConf['default_lang'];
+
+# Hook Plugins
+eval($plxMotor->plxPlugins->callHook('Index'));
+
+# chargement du fichier de langue
+loadLang(PLX_CORE.'lang/'.$lang.'/core.php');
+
+$plxMotor->prechauffage();
+$plxMotor->demarrage();
+
+# Creation de l'objet d'affichage
+$plxShow = plxShow::getInstance();
+
+eval($plxMotor->plxPlugins->callHook('IndexBegin'));
+
+# On démarre la bufferisation
+ob_start();
+ob_implicit_flush(0);
+
+# Traitements du thème
+if($plxMotor->style == '' or !is_dir(PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style)) {
+ header('Content-Type: text/plain; charset='.PLX_CHARSET);
+ echo L_ERR_THEME_NOTFOUND.' ('.PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.') !';
+} elseif(file_exists(PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.'/'.$plxMotor->template)) {
+ # On impose le charset
+ header('Content-Type: text/html; charset='.PLX_CHARSET);
+ # Insertion du template
+ include(PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.'/'.$plxMotor->template);
+} else {
+ header('Content-Type: text/plain; charset='.PLX_CHARSET);
+ echo L_ERR_FILE_NOTFOUND.' ('.PLX_ROOT.$plxMotor->aConf['racine_themes'].$plxMotor->style.'/'.$plxMotor->template.') !';
+}
+
+# Récuperation de la bufférisation
+$output = ob_get_clean();
+
+# Hooks spécifiques au thème
+ob_start();
+eval($plxMotor->plxPlugins->callHook('ThemeEndHead'));
+$output = str_replace('', ob_get_clean().'', $output);
+ob_start();
+eval($plxMotor->plxPlugins->callHook('ThemeEndBody'));
+$output = str_replace('', ob_get_clean().'', $output);
+
+# Hook Plugins
+eval($plxMotor->plxPlugins->callHook('IndexEnd'));
+
+# On applique la réécriture d'url si nécessaire
+if($plxMotor->aConf['urlrewriting']) {
+ $output = plxUtils::rel2abs($plxMotor->aConf['racine'], $output);
+}
+
+# On applique la compression gzip si nécessaire et disponible
+if($plxMotor->aConf['gzip']) {
+ if($encoding=plxUtils::httpEncoding()) {
+ header('Content-Encoding: '.$encoding);
+ $output = gzencode($output,-1,FORCE_GZIP);
+ }
+}
+
+# Restitution écran
+echo $output;
+exit;
?>
\ No newline at end of file
diff --git a/install.php b/install.php
index 0731eb4ad..0f7657bac 100644
--- a/install.php
+++ b/install.php
@@ -1,342 +1,342 @@
-'PluXml',
- 'description'=>plxUtils::strRevCheck(L_SITE_DESCRIPTION),
- 'meta_description'=>'',
- 'meta_keywords'=>'',
- 'timezone'=>$timezone,
- 'allow_com'=>1,
- 'mod_com'=>0,
- 'mod_art'=>0,
- 'capcha'=>1,
- 'style'=>'defaut',
- 'clef'=>plxUtils::charAleatoire(15),
- 'bypage'=>5,
- 'bypage_archives'=>5,
- 'bypage_tags'=>5,
- 'bypage_admin'=>10,
- 'bypage_admin_coms'=>10,
- 'bypage_feed'=>8,
- 'tri'=>'desc',
- 'tri_coms'=>'asc',
- 'images_l'=>800,
- 'images_h'=>600,
- 'miniatures_l'=>200,
- 'miniatures_h'=>100,
- 'thumbs'=>0,
- 'medias'=>'data/medias/',
- 'racine_articles'=>'data/articles/',
- 'racine_commentaires'=>'data/commentaires/',
- 'racine_statiques'=>'data/statiques/',
- 'racine_themes'=>'themes/',
- 'racine_plugins'=>'plugins/',
- 'homestatic'=>'',
- 'hometemplate'=>'home.php',
- 'urlrewriting'=>0,
- 'gzip'=>0,
- 'feed_chapo'=>0,
- 'feed_footer'=>'',
- 'version'=>PLX_VERSION,
- 'default_lang'=>$lang,
- 'userfolders'=>0,
- 'display_empty_cat'=>0,
- 'custom_admincss_file'=>''
- );
-
-function install($content, $config) {
-
- # gestion du timezone
- date_default_timezone_set($config['timezone']);
-
- # Création du fichier de configuration
- $xml = ''."\n";
- $xml .= ''."\n";
- foreach($config as $k=>$v) {
- if(is_numeric($v))
- $xml .= "\t".$v." \n";
- else
- $xml .= "\t \n";
- }
- $xml .= ' ';
- plxUtils::write($xml,path('XMLFILE_PARAMETERS'));
-
- # Création du fichier des utilisateurs
- $salt = plxUtils::charAleatoire(10);
- $xml = ''."\n";
- $xml .= "\n";
- $xml .= "\t".''."\n";
- $xml .= "\t\t".' '."\n";
- $xml .= "\t\t".' '."\n";
- $xml .= "\t\t".' '."\n";
- $xml .= "\t\t".' '."\n";
- $xml .= "\t\t".' '."\n";
- $xml .= "\t\t".' '."\n";
- $xml .= "\t\t".' '."\n";
- $xml .= "\t \n";
- $xml .= " ";
- plxUtils::write($xml,path('XMLFILE_USERS'));
-
- # Création du fichier des categories
- $xml = ''."\n";
- $xml .= ''."\n";
- $xml .= "\t".' '."\n";
- $xml .= ' ';
- plxUtils::write($xml,path('XMLFILE_CATEGORIES'));
-
- # Création du fichier des pages statiques
- $xml = ''."\n";
- $xml .= ''."\n";
- $xml .= "\t".' '."\n";
- $xml .= ' ';
- plxUtils::write($xml,path('XMLFILE_STATICS'));
- plxUtils::write(file_get_contents(PLX_CORE.'/lib/html.static.txt'),PLX_ROOT.$config['racine_statiques'].'001.'.L_DEFAULT_STATIC_URL.'.php');
-
- # Création du premier article
- $html = explode('-----', file_get_contents(PLX_CORE.'/lib/html.article.txt'));
- $xml = ''."\n";
- $xml .= '
-
- 1
-
-
-
-
-
-
-
-
-
-
- ';
- plxUtils::write($xml,PLX_ROOT.$config['racine_articles'].'0001.001.001.'.date('YmdHi').'.'.L_DEFAULT_ARTICLE_URL.'.xml');
-
- # Création du fichier des tags servant de cache
- $xml = ''."\n";
- $xml .= ''."\n";
- $xml .= "\t".' '."\n";
- $xml .= ' ';
- plxUtils::write($xml,path('XMLFILE_TAGS'));
-
- # Création du fichier des plugins
- $xml = ''."\n";
- $xml .= ''."\n";
- $xml .= ' ';
- plxUtils::write($xml,path('XMLFILE_PLUGINS'));
-
- # Création du premier commentaire
- $xml = ''."\n";
- $xml .= '
-
- normal
- 127.0.0.1
-
-
-
- ';
- plxUtils::write($xml,PLX_ROOT.$config['racine_commentaires'].'0001.'.date('U').'-1.xml');
-
-}
-
-$msg='';
-if(!empty($_POST['install'])) {
-
- if(trim($_POST['name']=='')) $msg = L_ERR_MISSING_USER;
- elseif(trim($_POST['login']=='')) $msg = L_ERR_MISSING_LOGIN;
- elseif(trim($_POST['pwd']=='')) $msg = L_ERR_MISSING_PASSWORD;
- elseif($_POST['pwd']!=$_POST['pwd2']) $msg = L_ERR_PASSWORD_CONFIRMATION;
- else {
- install($_POST, $config);
- header('Location: '.plxUtils::getRacine());
- exit;
- }
- $name=$_POST['name'];
- $login=$_POST['login'];
-}
-else {
- $name='';
- $login='';
-}
-plxUtils::cleanHeaders();
-?>
-
-