More change

Plugin page:
* Add label for display in theme
* Add french lang pack
* Add label in install.php

Update french lang pack
Add a space in Plugin name and version
This commit is contained in:
Frédéric K 2015-07-27 13:33:55 +02:00
parent c75ec1a1f1
commit 1b598734e8
6 changed files with 37 additions and 8 deletions

View File

@ -5,7 +5,7 @@
{
echo '<div class="pluginBox">';
echo '<p>'.$Plugin->name().'<span class="version">'.$Language->g('Version').': '.$Plugin->version().'</span></p>';
echo '<p>'.$Plugin->name().' <span class="version">'.$Language->g('Version').': '.$Plugin->version().'</span></p>';
echo '<p>'.$Plugin->description().'</p>';
if($Plugin->installed()) {

View File

@ -212,7 +212,8 @@ function install($adminPassword, $email)
// File plugins/pages/db.php
$data = array(
'homeLink'=>true
'homeLink'=>true,
'label'=>'Pages'
);
file_put_contents(PATH_PLUGINS_DATABASES.'pages'.DS.'db.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);

View File

@ -35,7 +35,7 @@
"position": "Position",
"save": "Sauvegarder",
"draft": "Brouillon",
"delete": "Supprimer",
"delete": "Supprimer", // First String delete
"registered": "Inscrit",
"Notifications": "Notifications",
"profile": "Profil",
@ -72,7 +72,7 @@
"locale": "Localisation",
"notifications": "Notifications",
"new-post": "Nouvel article",
"html-and-markdown-code-supported": "Code HTML et Markdown pris en charge.",
"html-and-markdown-code-supported": "Code HTML et Markdown pris en charge.", // First Sring html-and-markdown.....
"new-page": "Nouvelle page",
"manage-posts": "Gestion des articles",
"published-date": "Date de publication",
@ -99,6 +99,7 @@
"username-or-password-incorrect": "Nom dutilisateur ou mot de passe incorrect.",
"database-regenerated": "Base de données régénérée.",
"the-changes-have-been-saved": "Les modifications on était sauvegardées.",
"html-markdown-code-supported": "Code HTML et Markdown pris en charge.", // Double Sring html-and-markdown.....
"enable-more-features-at": "Activer plus de fonctionnalités en vous rendant vers ",
"username-already-exists-or-is-empty": "Le nom dutilisateur existe déjà ou est inexistant.",
"username-field-is-empty": "Le champ utilisateur est vide !",
@ -122,9 +123,12 @@
"you-can-modify-the-url-which-identifies":"Vous pouvez modifier l'URL qui identifie une page ou un article, en utilisant des mots-clés lisibles. Pas plus de 150 caractères.",
"this-field-can-help-describe-the-content": "Ce champ peut aider à décrire le contenu en quelques mots. Pas plus de 150 caractères.",
"write-the-tags-separeted-by-comma": "Écrivez les tags en les séparant par une virgule. par exemple : tag1, tag2, tag3",
"delete": "Supprimer", // Double String delete
"delete-the-user-and-all-its-posts":"Supprimer lutilisateur et tous ses messages associés.",
"delete-the-user-and-associate-its-posts-to-admin-user": "Supprimez lutilisateur et associez ses messages à ladministrateur principal.",
"read-more": "Lire la suite...",
"show-blog": "Afficher le Blog",
"default-home-page": "Page daccueil par défaut"
"default-home-page": "Page daccueil par défaut",
"version": "Version",
"there-are-no-drafts": "Aucun article en attente de publication"
}

3
plugins/pages/language/en_US.json Normal file → Executable file
View File

@ -12,5 +12,6 @@
"pages": "Pages",
"home": "Home",
"show-home-link": "Show home link"
"show-home-link": "Show home link",
"label-text-to-display": "Label text to display"
}

View File

@ -0,0 +1,17 @@
{
"plugin-data":
{
"name": "Page navigation",
"description": "Constitue un menu avec les liens des pages dans la colonne du thème.",
"author": "Diego",
"email": "",
"website": "",
"version": "0.1",
"releaseDate": ""
},
"pages": "Pages",
"home": "Accueil",
"show-home-link": "Afficher le lien de la page daccueil",
"label-text-to-display": "Texte à afficher"
}

10
plugins/pages/plugin.php Normal file → Executable file
View File

@ -5,7 +5,8 @@ class pluginPages extends Plugin {
public function init()
{
$this->dbFields = array(
'homeLink'=>true
'homeLink'=>true,
'label'=> 'Pages'
);
}
@ -17,6 +18,11 @@ class pluginPages extends Plugin {
$html .= '<input name="homeLink" id="jshomeLink" type="checkbox" value="true" '.($this->getDbField('homeLink')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jshomeLink">'.$Language->get('Show home link').'</label>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label for="label">'.$Language->get('Label text to display');
$html .= '<input type="text" name="label" value="'.$this->getDbField('label').'" />';
$html .= '</label>';
$html .= '</div>';
return $html;
}
@ -28,7 +34,7 @@ class pluginPages extends Plugin {
global $Site;
$html = '<div class="plugin plugin-pages">';
$html .= '<h2>'.$Language->get('Pages').'</h2>';
$html .= '<h2>'.$this->getDbField('label').'</h2>';
$html .= '<div class="plugin-content">';
$parents = $pagesParents[NO_PARENT_CHAR];