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 class="dashboardBox">
<h2>Drafts</h2>
<h2><?php $Language->p('Drafts') ?></h2>
<div class="content">
<nav class="nav">
<ul>

View File

@ -24,7 +24,7 @@
<label>
<?php $Language->p('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>

View File

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

View File

@ -320,7 +320,7 @@ function checkPOST($args)
// Check invalid email
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

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
if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) )
{
$_POST = array_map('stripslashes', $_POST);
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_GET = array_map('stripslashes', $_GET);
$_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') )
{
// Boot rules
// Ajax doesn't needs load rules
// Ajax doesn't load rules
// 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');
}
}
// ADMIN AREA
else
@ -56,16 +57,19 @@ else
Theme::plugins('beforeAdminLoad');
// 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');
}
// 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');
}
// 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']);
}
// Plugins after admin area loaded
Theme::plugins('afterAdminLoad');

View File

@ -12,12 +12,14 @@ include(PATH_RULES.'99.themes.php');
Theme::plugins('beforeSiteLoad');
// 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');
}
// 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');
}
// Plugins after site loaded
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.",
"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-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-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.",
@ -152,5 +152,7 @@
"install": "Install",
"choose-your-language": "Choose your language",
"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)",
"english-name": "Spanish",
"last-update": "2015-06-28",
"last-update": "2015-08-16",
"author": "Diego",
"email": "",
"website": ""
},
"username": "Usuario",
"username": "Nombre de usuario",
"password": "Contraseña",
"confirm-password": "Confirmar contraseña",
"editor": "Editor",
@ -29,17 +29,17 @@
"add-a-new-user": "Agregar nuevo usuario",
"parent": "Padre",
"friendly-url": "URL Amistosa",
"description": "Descripcion",
"description": "Descripción",
"posted-by": "Publicado por",
"tags": "Etiquetas",
"position": "Posicion",
"position": "Posición",
"save": "Guardar",
"draft": "Borrador",
"delete": "Eliminar",
"registered": "Registrado",
"Notifications": "Notificaciones",
"profile": "Perfil",
"email": "Correo electronico",
"email": "Correo electrónico",
"settings": "Ajustes",
"general": "General",
"advanced": "Avanzado",
@ -52,30 +52,30 @@
"prev-page": "Pag. anterior",
"next-page": "Pag. siguiente",
"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-slogan": "Slogan del sitio",
"site-description": "Descripcion del sitio",
"site-description": "Descripción del sitio",
"footer-text": "Texto de pie de pagina",
"posts-per-page": "Posts por pagina",
"site-url": "URL del sitio",
"writting-settings": "Ajustes de redaccion",
"writting-settings": "Ajustes de redacción",
"url-filters": "Filtros URL",
"page": "Pagina",
"pages": "Paginas",
"home": "Inicio",
"welcome-back": "Bienvenido",
"language": "Lenguage",
"language": "Lenguaje",
"website": "Sitio web",
"timezone": "Zona horaria",
"locale": "Locale",
"new-post": "Nuevo post",
"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",
"published-date": "Fecha de publicacion",
"modified-date": "Fecha de modificacion",
"empty-title": "Titulo vacio",
"published-date": "Fecha de publicación",
"modified-date": "Fecha de modificación",
"empty-title": "Titulo vacío",
"plugins": "Plugins",
"install-plugin": "Instalar plugin",
"uninstall-plugin": "Desinstalar plugin",
@ -84,7 +84,7 @@
"publish-now": "Publicar",
"first-name": "Nombre",
"last-name": "Apellido",
"bludit-version": "Bludit version",
"bludit-version": "Bludit versión",
"powered-by": "Corriendo con",
"recent-posts": "Posts recientes",
"manage-pages": "Administrar paginas",
@ -92,63 +92,66 @@
"user-deleted": "Usuario eliminado",
"page-added-successfully": "Página agregada con éxito",
"post-added-successfully": "Post agregado con éxito ",
"the-post-has-been-deleted-successfully": "El post fue eliminado con exito",
"the-page-has-been-deleted-successfully": "La pagina fue eliminada con exito",
"username-or-password-incorrect": "Usuario o contraseña icorrectos",
"the-post-has-been-deleted-successfully": "El post fue eliminado con éxito",
"the-page-has-been-deleted-successfully": "La pagina fue eliminada con éxito",
"username-or-password-incorrect": "Nombre de usuario o contraseña incorrectos",
"database-regenerated": "Base de datos regenerada",
"the-changes-have-been-saved": "Los cambios fueron guardados",
"enable-more-features-at": "Habilitar más funciones en",
"username-already-exists": "El usuario ya existe",
"username-field-is-empty": "El campo usuario esta vacio",
"the-password-and-confirmation-password-do-not-match":"Las contraseña no coiniciden",
"user-has-been-added-successfully": "El usuario fue creado con exito",
"username-already-exists": "El nombre de usuario ya existe",
"username-field-is-empty": "El campo nombre de usuario esta vacío",
"the-password-and-confirmation-password-do-not-match": "Las contraseña no coinciden",
"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.",
"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.",
"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.",
"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.",
"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.",
"number-of-posts-to-show-per-page": "Number of posts to show per page.",
"the-url-of-your-site": "The URL of your site.",
"add-or-edit-description-tags-or": "Add or edit description, tags or modify the friendly URL.",
"select-your-sites-language": "Seleccione el lenguage de su sitio.",
"select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.",
"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-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.",
"this-field-can-help-describe-the-content": "This field can help describe the content in a few words. No more than 150 characters.",
"write-the-tags-separeted-by-comma": "Write the tags separeted by comma. eg: tag1, tag2, tag3",
"delete-the-user-and-all-its-posts":"Delete the user and all its posts",
"delete-the-user-and-associate-its-posts-to-admin-user": "Delete the user and associate its posts to admin user",
"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": "El correo electrónico no será visible. Recomendado para recuperar la contraseña y notificaciones.",
"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-phrase": "Utilice este campo para agregar un slogan a 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 agregar un pequeño texto en el pie de pagina. ej: copyright, autor, fechas, etc.",
"number-of-posts-to-show-per-page": "Numero de posts a mostrar por pagina.",
"the-url-of-your-site": "URL de su sitio.",
"add-or-edit-description-tags-or": "Agregar o editar la descripción, tags y modificar la URL amigable.",
"select-your-sites-language": "Seleccione el lenguaje de su sitio.",
"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": "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": "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": "Este campo puede ayudar a describir el contenido en pocas palabras. No mas de 150 caracteres.",
"write-the-tags-separeted-by-comma": "Escribir los tags separados por comas. ej: tag1, tag2, tag3",
"delete-the-user-and-all-its-posts": "Eliminar el usuario y sus posts",
"delete-the-user-and-associate-its-posts-to-admin-user": "Eliminar el usuario y asociar los posts al usuario admin",
"read-more": "Leer mas",
"show-blog": "Mostrar blog",
"default-home-page": "Pagina de inicio predeterminada",
"version": "Version",
"there-are-no-drafts": "No hay borradores.",
"create-a-new-article-for-your-blog":"Create a new article for your blog.",
"create-a-new-page-for-your-website":"Create a new page for your website.",
"invite-a-friend-to-collaborate-on-your-website":"Invite a friend to collaborate on your website.",
"change-your-language-and-region-settings":"Change your language and region settings.",
"create-a-new-article-for-your-blog":"Crear un nuevo articulo para su blog.",
"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 un amigo para colaborar en el sitio web.",
"change-your-language-and-region-settings":"Cambiar la configuración de idioma y región.",
"language-and-timezone":"Lenguage y zona horaria",
"author": "Autor",
"start-here": "Comience aqui",
"start-here": "Comience aquí",
"install-theme": "Instalar tema",
"first-post": "Primer post",
"congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**",
"whats-next": "Que sigue",
"manage-your-bludit-from-the-admin-panel": "Manage your Bludit from the [admin area](./admin/)",
"congratulations-you-have-successfully-installed-your-bludit": "Felicitación, usted ha instalado **Bludit** exitosamente",
"whats-next": "Siguientes pasos",
"manage-your-bludit-from-the-admin-panel": "Administre su Bludit desde el [panel de administración](./admin/)",
"follow-bludit-on": "Siga Bludit en",
"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",
"share-with-your-friends-and-enjoy": "Comparti con tus amigos y a disfrutar",
"read-the-documentation-for-more-information": "Lea la [documentación](http://docs.bludit.com) para mas información",
"share-with-your-friends-and-enjoy": "Compartí con tus amigos y a disfrutar",
"the-page-has-not-been-found": "La pagina no fue encontrada.",
"error": "Error",
"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 »",
"password-visible-field": "Contraseña, este campo es visible!",
"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.",
"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-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-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.",

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.",
"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-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-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.",

View File

@ -108,7 +108,7 @@
"you-can-choose-the-users-privilege": "您可以選擇使用者的權限,作者角色只能撰寫頁面與文章",
"email-will-not-be-publicly-displayed": "Email將不會被公開顯示建議用於復原密碼或是通知",
"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-small-text-on-the-bottom": "您可以在每一頁的頁尾放置一些短短的文字,例如: 版權、所有人、日期...",
"number-of-posts-to-show-per-page": "每一頁會顯示幾篇文章的數量",

View File

@ -8,5 +8,9 @@
"website": "http://www.bludit.com",
"version": "0.1",
"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()
{
$this->dbFields = array(
'shortname'=>''
'shortname'=>'',
'enablePages'=>false,
'enablePosts'=>true,
'enableDefaultHomePage'=>false
);
}
@ -14,22 +17,44 @@ class pluginDisqus extends Plugin {
global $Language;
$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 .= '</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;
}
public function postEnd()
{
$html = '<div id="disqus_thread"></div>';
$html = '';
if( $this->getDbField('enablePosts') ) {
$html = '<div id="disqus_thread"></div>';
}
return $html;
}
public function pageEnd()
{
return $this->postEnd();
$html = '';
if( $this->getDbField('enablePages') ) {
$html = '<div id="disqus_thread"></div>';
}
return $html;
}
public function siteHead()