Installer improves

This commit is contained in:
dignajar 2015-08-16 23:33:49 -03:00
parent 5d70ba3171
commit b97b26a977
13 changed files with 115 additions and 77 deletions

View File

@ -50,7 +50,7 @@
</div> </div>
<div class="dashboardBox"> <div class="dashboardBox">
<h2>Drafts</h2> <h2><?php $Language->p('Drafts') ?></h2>
<div class="content"> <div class="content">
<nav class="nav"> <nav class="nav">
<ul> <ul>

View File

@ -24,7 +24,7 @@
<label> <label>
<?php $Language->p('Site slogan') ?> <?php $Language->p('Site slogan') ?>
<input type="text" name="slogan" class="width-50" value="<?php echo $Site->slogan() ?>"> <input type="text" name="slogan" class="width-50" value="<?php echo $Site->slogan() ?>">
<div class="forms-desc"><?php $Language->p('use-this-field-to-add-a-catchy-prhase') ?></div> <div class="forms-desc"><?php $Language->p('use-this-field-to-add-a-catchy-phrase') ?></div>
</label> </label>
<label> <label>

View File

@ -31,12 +31,10 @@ define('PATH_BOOT', PATH_ROOT.'kernel'.DS.'boot'.DS);
require(PATH_BOOT.'init.php'); require(PATH_BOOT.'init.php');
// Admin area // Admin area
if($Url->whereAmI()==='admin') if($Url->whereAmI()==='admin') {
{
require(PATH_BOOT.'admin.php'); require(PATH_BOOT.'admin.php');
} }
// Site // Site
else else {
{
require(PATH_BOOT.'site.php'); require(PATH_BOOT.'site.php');
} }

View File

@ -320,7 +320,7 @@ function checkPOST($args)
// Check invalid email // Check invalid email
if( !Valid::email($args['email']) && ($args['noCheckEmail']=='0') ) if( !Valid::email($args['email']) && ($args['noCheckEmail']=='0') )
{ {
return '<div>Your email address is invalid.</div><div id="jscompleteEmail">Proceed anyway!</div>'; return '<div>'.$Language->g('Your email address is invalid').'</div><div id="jscompleteEmail">'.$Language->g('Proceed anyway').'</div>';
} }
// Sanitize email // Sanitize email

View File

@ -19,8 +19,8 @@ $layout['parameters'] = implode('/', $explodeSlug);
// Thanks, http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting // Thanks, http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting
if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) ) if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) )
{ {
$_POST = array_map('stripslashes', $_POST); $_POST = array_map('stripslashes', $_POST);
$_GET = array_map('stripslashes', $_GET); $_GET = array_map('stripslashes', $_GET);
$_COOKIE = array_map('stripslashes', $_COOKIE); $_COOKIE = array_map('stripslashes', $_COOKIE);
} }
@ -28,11 +28,12 @@ if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) )
if( $Login->isLogged() && ($layout['slug']==='ajax') ) if( $Login->isLogged() && ($layout['slug']==='ajax') )
{ {
// Boot rules // Boot rules
// Ajax doesn't needs load rules // Ajax doesn't load rules
// Load AJAX file // Load AJAX file
if( Sanitize::pathFile(PATH_AJAX, $layout['parameters'].'.php') ) if( Sanitize::pathFile(PATH_AJAX, $layout['parameters'].'.php') ) {
include(PATH_AJAX.$layout['parameters'].'.php'); include(PATH_AJAX.$layout['parameters'].'.php');
}
} }
// ADMIN AREA // ADMIN AREA
else else
@ -56,16 +57,19 @@ else
Theme::plugins('beforeAdminLoad'); Theme::plugins('beforeAdminLoad');
// Admin theme init.php // Admin theme init.php
if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.'init.php') ) if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.'init.php') ) {
include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.'init.php'); include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.'init.php');
}
// Load controller // Load controller
if( Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'].'.php') ) if( Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'].'.php') ) {
include(PATH_ADMIN_CONTROLLERS.$layout['controller'].'.php'); include(PATH_ADMIN_CONTROLLERS.$layout['controller'].'.php');
}
// Load view and theme // Load view and theme
if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.$layout['template']) ) if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.$layout['template']) ) {
include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.$layout['template']); include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.$layout['template']);
}
// Plugins after admin area loaded // Plugins after admin area loaded
Theme::plugins('afterAdminLoad'); Theme::plugins('afterAdminLoad');

View File

@ -12,12 +12,14 @@ include(PATH_RULES.'99.themes.php');
Theme::plugins('beforeSiteLoad'); Theme::plugins('beforeSiteLoad');
// Theme init.php // Theme init.php
if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php') ) if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php') ) {
include(PATH_THEMES.$Site->theme().DS.'init.php'); include(PATH_THEMES.$Site->theme().DS.'init.php');
}
// Theme HTML // Theme HTML
if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'index.php') ) if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'index.php') ) {
include(PATH_THEMES.$Site->theme().DS.'index.php'); include(PATH_THEMES.$Site->theme().DS.'index.php');
}
// Plugins after site loaded // Plugins after site loaded
Theme::plugins('afterSiteLoad'); Theme::plugins('afterSiteLoad');

View File

@ -108,7 +108,7 @@
"you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.", "you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.",
"email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.", "email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.",
"use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.", "use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.",
"use-this-field-to-add-a-catchy-prhase": "Use this field to add a catchy prhase on your site.", "use-this-field-to-add-a-catchy-phrase": "Use this field to add a catchy phrase on your site.",
"you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.", "you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.",
"you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.", "you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.",
"number-of-posts-to-show-per-page": "Number of posts to show per page.", "number-of-posts-to-show-per-page": "Number of posts to show per page.",
@ -152,5 +152,7 @@
"install": "Install", "install": "Install",
"choose-your-language": "Choose your language", "choose-your-language": "Choose your language",
"next": "Next", "next": "Next",
"the-password-field-is-empty": "The password field is empty" "the-password-field-is-empty": "The password field is empty",
"your-email-address-is-invalid":"Your email address is invalid.",
"proceed-anyway": "Proceed anyway!"
} }

View File

@ -3,13 +3,13 @@
{ {
"native": "Español (Argentina)", "native": "Español (Argentina)",
"english-name": "Spanish", "english-name": "Spanish",
"last-update": "2015-06-28", "last-update": "2015-08-16",
"author": "Diego", "author": "Diego",
"email": "", "email": "",
"website": "" "website": ""
}, },
"username": "Usuario", "username": "Nombre de usuario",
"password": "Contraseña", "password": "Contraseña",
"confirm-password": "Confirmar contraseña", "confirm-password": "Confirmar contraseña",
"editor": "Editor", "editor": "Editor",
@ -29,17 +29,17 @@
"add-a-new-user": "Agregar nuevo usuario", "add-a-new-user": "Agregar nuevo usuario",
"parent": "Padre", "parent": "Padre",
"friendly-url": "URL Amistosa", "friendly-url": "URL Amistosa",
"description": "Descripcion", "description": "Descripción",
"posted-by": "Publicado por", "posted-by": "Publicado por",
"tags": "Etiquetas", "tags": "Etiquetas",
"position": "Posicion", "position": "Posición",
"save": "Guardar", "save": "Guardar",
"draft": "Borrador", "draft": "Borrador",
"delete": "Eliminar", "delete": "Eliminar",
"registered": "Registrado", "registered": "Registrado",
"Notifications": "Notificaciones", "Notifications": "Notificaciones",
"profile": "Perfil", "profile": "Perfil",
"email": "Correo electronico", "email": "Correo electrónico",
"settings": "Ajustes", "settings": "Ajustes",
"general": "General", "general": "General",
"advanced": "Avanzado", "advanced": "Avanzado",
@ -52,30 +52,30 @@
"prev-page": "Pag. anterior", "prev-page": "Pag. anterior",
"next-page": "Pag. siguiente", "next-page": "Pag. siguiente",
"configure-plugin": "Configurar plugin", "configure-plugin": "Configurar plugin",
"confirm-delete-this-action-cannot-be-undone": "Confirmar eliminacion, esta operacion no se puede deshacer.", "confirm-delete-this-action-cannot-be-undone": "Confirmar eliminación, esta operación no se puede deshacer.",
"site-title": "Titulo del sitio", "site-title": "Titulo del sitio",
"site-slogan": "Slogan del sitio", "site-slogan": "Slogan del sitio",
"site-description": "Descripcion del sitio", "site-description": "Descripción del sitio",
"footer-text": "Texto de pie de pagina", "footer-text": "Texto de pie de pagina",
"posts-per-page": "Posts por pagina", "posts-per-page": "Posts por pagina",
"site-url": "URL del sitio", "site-url": "URL del sitio",
"writting-settings": "Ajustes de redaccion", "writting-settings": "Ajustes de redacción",
"url-filters": "Filtros URL", "url-filters": "Filtros URL",
"page": "Pagina", "page": "Pagina",
"pages": "Paginas", "pages": "Paginas",
"home": "Inicio", "home": "Inicio",
"welcome-back": "Bienvenido", "welcome-back": "Bienvenido",
"language": "Lenguage", "language": "Lenguaje",
"website": "Sitio web", "website": "Sitio web",
"timezone": "Zona horaria", "timezone": "Zona horaria",
"locale": "Locale", "locale": "Locale",
"new-post": "Nuevo post", "new-post": "Nuevo post",
"new-page": "Nueva pagina", "new-page": "Nueva pagina",
"html-and-markdown-code-supported": "Codigo HTML y Markdown soportado", "html-and-markdown-code-supported": "Código HTML y Markdown soportado",
"manage-posts": "Administrar posts", "manage-posts": "Administrar posts",
"published-date": "Fecha de publicacion", "published-date": "Fecha de publicación",
"modified-date": "Fecha de modificacion", "modified-date": "Fecha de modificación",
"empty-title": "Titulo vacio", "empty-title": "Titulo vacío",
"plugins": "Plugins", "plugins": "Plugins",
"install-plugin": "Instalar plugin", "install-plugin": "Instalar plugin",
"uninstall-plugin": "Desinstalar plugin", "uninstall-plugin": "Desinstalar plugin",
@ -84,7 +84,7 @@
"publish-now": "Publicar", "publish-now": "Publicar",
"first-name": "Nombre", "first-name": "Nombre",
"last-name": "Apellido", "last-name": "Apellido",
"bludit-version": "Bludit version", "bludit-version": "Bludit versión",
"powered-by": "Corriendo con", "powered-by": "Corriendo con",
"recent-posts": "Posts recientes", "recent-posts": "Posts recientes",
"manage-pages": "Administrar paginas", "manage-pages": "Administrar paginas",
@ -92,63 +92,66 @@
"user-deleted": "Usuario eliminado", "user-deleted": "Usuario eliminado",
"page-added-successfully": "Página agregada con éxito", "page-added-successfully": "Página agregada con éxito",
"post-added-successfully": "Post agregado con éxito ", "post-added-successfully": "Post agregado con éxito ",
"the-post-has-been-deleted-successfully": "El post fue eliminado con exito", "the-post-has-been-deleted-successfully": "El post fue eliminado con éxito",
"the-page-has-been-deleted-successfully": "La pagina fue eliminada con exito", "the-page-has-been-deleted-successfully": "La pagina fue eliminada con éxito",
"username-or-password-incorrect": "Usuario o contraseña icorrectos", "username-or-password-incorrect": "Nombre de usuario o contraseña incorrectos",
"database-regenerated": "Base de datos regenerada", "database-regenerated": "Base de datos regenerada",
"the-changes-have-been-saved": "Los cambios fueron guardados", "the-changes-have-been-saved": "Los cambios fueron guardados",
"enable-more-features-at": "Habilitar más funciones en", "enable-more-features-at": "Habilitar más funciones en",
"username-already-exists": "El usuario ya existe", "username-already-exists": "El nombre de usuario ya existe",
"username-field-is-empty": "El campo usuario esta vacio", "username-field-is-empty": "El campo nombre de usuario esta vacío",
"the-password-and-confirmation-password-do-not-match":"Las contraseña no coiniciden", "the-password-and-confirmation-password-do-not-match": "Las contraseña no coinciden",
"user-has-been-added-successfully": "El usuario fue creado con exito", "user-has-been-added-successfully": "El usuario fue creado con éxito",
"you-do-not-have-sufficient-permissions": "No tiene suficientes permisos para acceder a esta pagina, contacte al administrador.", "you-do-not-have-sufficient-permissions": "No tiene suficientes permisos para acceder a esta pagina, contacte al administrador.",
"settings-advanced-writting-settings": "Ajustes->Avanzado->Ajustes de redaccion", "settings-advanced-writting-settings": "Ajustes->Avanzado->Ajustes de redacción",
"new-posts-and-pages-synchronized": "Nuevos posts y paginas sincronizados.", "new-posts-and-pages-synchronized": "Nuevos posts y paginas sincronizados.",
"you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.", "you-can-choose-the-users-privilege": "Puede elegir los privilegios del usuario. El rol editor solo puede redactar paginas y post.",
"email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.", "email-will-not-be-publicly-displayed": "El correo electrónico no será visible. Recomendado para recuperar la contraseña y notificaciones.",
"use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.", "use-this-field-to-name-your-site": "Utilice este campo para nombrar su sitio, aparecerá en la parte superior de cada página de su sitio.",
"use-this-field-to-add-a-catchy-prhase": "Use this field to add a catchy prhase on your site.", "use-this-field-to-add-a-catchy-phrase": "Utilice este campo para agregar un slogan a su sitio.",
"you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.", "you-can-add-a-site-description-to-provide": "Puede agregar una descripción del sitio para proporcionar una breve biografía o descripción de su sitio.",
"you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.", "you-can-add-a-small-text-on-the-bottom": "Puede agregar un pequeño texto en el pie de pagina. ej: copyright, autor, fechas, etc.",
"number-of-posts-to-show-per-page": "Number of posts to show per page.", "number-of-posts-to-show-per-page": "Numero de posts a mostrar por pagina.",
"the-url-of-your-site": "The URL of your site.", "the-url-of-your-site": "URL de su sitio.",
"add-or-edit-description-tags-or": "Add or edit description, tags or modify the friendly URL.", "add-or-edit-description-tags-or": "Agregar o editar la descripción, tags y modificar la URL amigable.",
"select-your-sites-language": "Seleccione el lenguage de su sitio.", "select-your-sites-language": "Seleccione el lenguaje de su sitio.",
"select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.", "select-a-timezone-for-a-correct": "Seleccione la zona horaria para una correcta visualización de las fechas.",
"you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.", "you-can-use-this-field-to-define-a-set-of": "Puede utilizar este campo para definir un conjunto de parámetros relacionados con el idioma, país y preferencias especiales.",
"you-can-modify-the-url-which-identifies":"You can modify the URL which identifies a page or post using human-readable keywords. No more than 150 characters.", "you-can-modify-the-url-which-identifies": "Puede modificar la dirección URL que identifica una página o post usando palabras clave legible. No mas de 150 caracteres.",
"this-field-can-help-describe-the-content": "This field can help describe the content in a few words. No more than 150 characters.", "this-field-can-help-describe-the-content": "Este campo puede ayudar a describir el contenido en pocas palabras. No mas de 150 caracteres.",
"write-the-tags-separeted-by-comma": "Write the tags separeted by comma. eg: tag1, tag2, tag3", "write-the-tags-separeted-by-comma": "Escribir los tags separados por comas. ej: tag1, tag2, tag3",
"delete-the-user-and-all-its-posts":"Delete the user and all its posts", "delete-the-user-and-all-its-posts": "Eliminar el usuario y sus posts",
"delete-the-user-and-associate-its-posts-to-admin-user": "Delete the user and associate its posts to admin user", "delete-the-user-and-associate-its-posts-to-admin-user": "Eliminar el usuario y asociar los posts al usuario admin",
"read-more": "Leer mas", "read-more": "Leer mas",
"show-blog": "Mostrar blog", "show-blog": "Mostrar blog",
"default-home-page": "Pagina de inicio predeterminada", "default-home-page": "Pagina de inicio predeterminada",
"version": "Version", "version": "Version",
"there-are-no-drafts": "No hay borradores.", "there-are-no-drafts": "No hay borradores.",
"create-a-new-article-for-your-blog":"Create a new article for your blog.", "create-a-new-article-for-your-blog":"Crear un nuevo articulo para su blog.",
"create-a-new-page-for-your-website":"Create a new page for your website.", "create-a-new-page-for-your-website":"Crear una nueva pagina para su sitio web.",
"invite-a-friend-to-collaborate-on-your-website":"Invite a friend to collaborate on your website.", "invite-a-friend-to-collaborate-on-your-website":"Invite a un amigo para colaborar en el sitio web.",
"change-your-language-and-region-settings":"Change your language and region settings.", "change-your-language-and-region-settings":"Cambiar la configuración de idioma y región.",
"language-and-timezone":"Lenguage y zona horaria", "language-and-timezone":"Lenguage y zona horaria",
"author": "Autor", "author": "Autor",
"start-here": "Comience aqui", "start-here": "Comience aquí",
"install-theme": "Instalar tema", "install-theme": "Instalar tema",
"first-post": "Primer post", "first-post": "Primer post",
"congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**", "congratulations-you-have-successfully-installed-your-bludit": "Felicitación, usted ha instalado **Bludit** exitosamente",
"whats-next": "Que sigue", "whats-next": "Siguientes pasos",
"manage-your-bludit-from-the-admin-panel": "Manage your Bludit from the [admin area](./admin/)", "manage-your-bludit-from-the-admin-panel": "Administre su Bludit desde el [panel de administración](./admin/)",
"follow-bludit-on": "Siga Bludit en", "follow-bludit-on": "Siga Bludit en",
"visit-the-support-forum": "Visite el [foro](http://forum.bludit.com) para soporte", "visit-the-support-forum": "Visite el [foro](http://forum.bludit.com) para soporte",
"read-the-documentation-for-more-information": "Lea la [documentacion](http://docs.bludit.com) para mas informacion", "read-the-documentation-for-more-information": "Lea la [documentación](http://docs.bludit.com) para mas información",
"share-with-your-friends-and-enjoy": "Comparti con tus amigos y a disfrutar", "share-with-your-friends-and-enjoy": "Compartí con tus amigos y a disfrutar",
"the-page-has-not-been-found": "La pagina no fue encontrada.", "the-page-has-not-been-found": "La pagina no fue encontrada.",
"error": "Error", "error": "Error",
"bludit-installer": "Bludit Instalador", "bludit-installer": "Bludit Instalador",
"welcome-to-the-bludit-installer": "Bienvenido al asistente para la instalación de Bludit.", "welcome-to-the-bludit-installer": "Bienvenido al asistente para la instalación de Bludit",
"complete-the-form-choose-a-password-for-the-username-admin": "Complete el formulario y elija una contraseña para el usuario « admin »", "complete-the-form-choose-a-password-for-the-username-admin": "Complete el formulario y elija una contraseña para el usuario « admin »",
"password-visible-field": "Contraseña, este campo es visible!", "password-visible-field": "Contraseña, este campo es visible!",
"install": "Instalar", "install": "Instalar",
"the-password-field-is-empty": "Debe completar el campo contraseña" "the-password-field-is-empty": "Debe completar el campo contraseña",
"your-email-address-is-invalid":"Su dirección de correo es invalida.",
"proceed-anyway": "Continuar de todas formas!",
"drafts":"Borradores"
} }

View File

@ -111,7 +111,7 @@
"you-can-choose-the-users-privilege": "Usted puede elegir los privilegios del usuario. El papel del editor sólo puede escribir páginas y mensajes.", "you-can-choose-the-users-privilege": "Usted puede elegir los privilegios del usuario. El papel del editor sólo puede escribir páginas y mensajes.",
"email-will-not-be-publicly-displayed": "El correo electrónico no se mostrará públicamente. Recomendado para notificaciones y recuperación contraseña.", "email-will-not-be-publicly-displayed": "El correo electrónico no se mostrará públicamente. Recomendado para notificaciones y recuperación contraseña.",
"use-this-field-to-name-your-site": "Use este campo para el nombre de su sitio, aparecerá en la parte superior de cada página de su sitio.", "use-this-field-to-name-your-site": "Use este campo para el nombre de su sitio, aparecerá en la parte superior de cada página de su sitio.",
"use-this-field-to-add-a-catchy-prhase": "Use este campo para agregar una frase pegadiza en su sitio.", "use-this-field-to-add-a-catchy-phrase": "Use este campo para agregar una frase pegadiza en su sitio.",
"you-can-add-a-site-description-to-provide": "Puede agregar una descripción del sitio para proporcionar una breve biografía o descripción de su sitio.", "you-can-add-a-site-description-to-provide": "Puede agregar una descripción del sitio para proporcionar una breve biografía o descripción de su sitio.",
"you-can-add-a-small-text-on-the-bottom": "Puede añadir un pequeño texto en la parte inferior de cada página. por ejemplo: derechos de autor, propietario, fechas, etc.", "you-can-add-a-small-text-on-the-bottom": "Puede añadir un pequeño texto en la parte inferior de cada página. por ejemplo: derechos de autor, propietario, fechas, etc.",
"number-of-posts-to-show-per-page": "Número de mensajes a mostrar por página.", "number-of-posts-to-show-per-page": "Número de mensajes a mostrar por página.",

View File

@ -108,7 +108,7 @@
"you-can-choose-the-users-privilege": "Vous pouvez choisir les privilèges de lutilisateur. Le rôle en tant que « Rédacteur » permet uniquement de publier des pages et des articles.", "you-can-choose-the-users-privilege": "Vous pouvez choisir les privilèges de lutilisateur. Le rôle en tant que « Rédacteur » permet uniquement de publier des pages et des articles.",
"email-will-not-be-publicly-displayed": "Votre e-mail ne sera pas publié publiquement. Il est nécessaire pour la récupération du mot de passe et recevoir les notifications.", "email-will-not-be-publicly-displayed": "Votre e-mail ne sera pas publié publiquement. Il est nécessaire pour la récupération du mot de passe et recevoir les notifications.",
"use-this-field-to-name-your-site": "Utilisez ce champ pour que le nom de votre site apparaisse en haut de chaque page.", "use-this-field-to-name-your-site": "Utilisez ce champ pour que le nom de votre site apparaisse en haut de chaque page.",
"use-this-field-to-add-a-catchy-prhase": "Utilisez ce champ pour ajouter une phrase accrocheuse sur votre site.", "use-this-field-to-add-a-catchy-phrase": "Utilisez ce champ pour ajouter une phrase accrocheuse sur votre site.",
"you-can-add-a-site-description-to-provide": "Vous pouvez ajouter une description du site pour fournir une courte biographie ou la description de votre site.", "you-can-add-a-site-description-to-provide": "Vous pouvez ajouter une description du site pour fournir une courte biographie ou la description de votre site.",
"you-can-add-a-small-text-on-the-bottom": "Vous pouvez ajouter un court texte sur le pied de chaque page. par exemple: les droits d'auteurs, propriétaire, dates, etc.", "you-can-add-a-small-text-on-the-bottom": "Vous pouvez ajouter un court texte sur le pied de chaque page. par exemple: les droits d'auteurs, propriétaire, dates, etc.",
"number-of-posts-to-show-per-page": "Nombre darticles à afficher par page.", "number-of-posts-to-show-per-page": "Nombre darticles à afficher par page.",

View File

@ -108,7 +108,7 @@
"you-can-choose-the-users-privilege": "您可以選擇使用者的權限,作者角色只能撰寫頁面與文章", "you-can-choose-the-users-privilege": "您可以選擇使用者的權限,作者角色只能撰寫頁面與文章",
"email-will-not-be-publicly-displayed": "Email將不會被公開顯示建議用於復原密碼或是通知", "email-will-not-be-publicly-displayed": "Email將不會被公開顯示建議用於復原密碼或是通知",
"use-this-field-to-name-your-site": "使用這個欄位來填寫您的網站名稱,它將會被顯示在每一個頁面的最上方", "use-this-field-to-name-your-site": "使用這個欄位來填寫您的網站名稱,它將會被顯示在每一個頁面的最上方",
"use-this-field-to-add-a-catchy-prhase": "使用這個欄位來幫您的網站添加一個可以朗朗上口的標語吧", "use-this-field-to-add-a-catchy-phrase": "使用這個欄位來幫您的網站添加一個可以朗朗上口的標語吧",
"you-can-add-a-site-description-to-provide": "您可以新增一段簡短的簡介來介紹您的網站", "you-can-add-a-site-description-to-provide": "您可以新增一段簡短的簡介來介紹您的網站",
"you-can-add-a-small-text-on-the-bottom": "您可以在每一頁的頁尾放置一些短短的文字,例如: 版權、所有人、日期...", "you-can-add-a-small-text-on-the-bottom": "您可以在每一頁的頁尾放置一些短短的文字,例如: 版權、所有人、日期...",
"number-of-posts-to-show-per-page": "每一頁會顯示幾篇文章的數量", "number-of-posts-to-show-per-page": "每一頁會顯示幾篇文章的數量",

View File

@ -8,5 +8,9 @@
"website": "http://www.bludit.com", "website": "http://www.bludit.com",
"version": "0.1", "version": "0.1",
"releaseDate": "2015-08-02" "releaseDate": "2015-08-02"
} },
"disqus-shortname": "Disqus shortname",
"enable-disqus-on-pages": "Enable Disqus on pages",
"enable-disqus-on-posts": "Enable Disqus on posts",
"enable-disqus-on-default-home-page": "Enable Disqus on default home page"
} }

View File

@ -5,7 +5,10 @@ class pluginDisqus extends Plugin {
public function init() public function init()
{ {
$this->dbFields = array( $this->dbFields = array(
'shortname'=>'' 'shortname'=>'',
'enablePages'=>false,
'enablePosts'=>true,
'enableDefaultHomePage'=>false
); );
} }
@ -14,22 +17,44 @@ class pluginDisqus extends Plugin {
global $Language; global $Language;
$html = '<div>'; $html = '<div>';
$html .= '<label>Disqus shortname</label>'; $html .= '<label>'.$Language->get('Disqus shortname').'</label>';
$html .= '<input name="shortname" id="jsshortname" type="text" value="'.$this->getDbField('shortname').'">'; $html .= '<input name="shortname" id="jsshortname" type="text" value="'.$this->getDbField('shortname').'">';
$html .= '</div>'; $html .= '</div>';
$html .= '<div>';
$html .= '<input name="enablePages" id="jsenablePages" type="checkbox" value="true" '.($this->getDbField('enablePages')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jsenablePages">'.$Language->get('Enable Disqus on pages').'</label>';
$html .= '</div>';
$html .= '<div>';
$html .= '<input name="enablePosts" id="jsenablePosts" type="checkbox" value="true" '.($this->getDbField('enablePosts')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jsenablePosts">'.$Language->get('Enable Disqus on posts').'</label>';
$html .= '</div>';
$html .= '<div>';
$html .= '<input name="enableDefaultHomePage" id="jsenableDefaultHomePage" type="checkbox" value="true" '.($this->getDbField('enableDefaultHomePage')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jsenableDefaultHomePage">'.$Language->get('Enable Disqus on default home page').'</label>';
$html .= '</div>';
return $html; return $html;
} }
public function postEnd() public function postEnd()
{ {
$html = '<div id="disqus_thread"></div>'; $html = '';
if( $this->getDbField('enablePosts') ) {
$html = '<div id="disqus_thread"></div>';
}
return $html; return $html;
} }
public function pageEnd() public function pageEnd()
{ {
return $this->postEnd(); $html = '';
if( $this->getDbField('enablePages') ) {
$html = '<div id="disqus_thread"></div>';
}
return $html;
} }
public function siteHead() public function siteHead()