diff --git a/bl-kernel/abstract/plugin.class.php b/bl-kernel/abstract/plugin.class.php index fe6e74fb..09186108 100644 --- a/bl-kernel/abstract/plugin.class.php +++ b/bl-kernel/abstract/plugin.class.php @@ -220,7 +220,7 @@ class Plugin { // Create database $this->dbFields['position'] = $position; - $this->setDb($this->dbFields); + $this->db = $this->dbFields; return true; } diff --git a/bl-kernel/admin/controllers/about.php b/bl-kernel/admin/controllers/about.php index 0952dfa0..a27002e5 100644 --- a/bl-kernel/admin/controllers/about.php +++ b/bl-kernel/admin/controllers/about.php @@ -1,4 +1,4 @@ g('About') . ' - ' . $layout['title']; \ No newline at end of file +$layout['title'] = $L->g('About') . ' - ' . $layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/categories.php b/bl-kernel/admin/controllers/categories.php index 60facd80..3a22161b 100644 --- a/bl-kernel/admin/controllers/categories.php +++ b/bl-kernel/admin/controllers/categories.php @@ -23,4 +23,4 @@ checkRole(array('admin')); // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('Categories'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Categories'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/configure-plugin.php b/bl-kernel/admin/controllers/configure-plugin.php index 3cc69501..9ce387c8 100644 --- a/bl-kernel/admin/controllers/configure-plugin.php +++ b/bl-kernel/admin/controllers/configure-plugin.php @@ -41,10 +41,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Call the method post of the plugin if ($plugin->post()) { - Alert::set( $language->g('The changes have been saved') ); + Alert::set( $L->g('The changes have been saved') ); Redirect::page('configure-plugin/'.$plugin->className()); } else { - Alert::set( $language->g('Complete all fields') ); + Alert::set( $L->g('Complete all fields') ); } } @@ -53,4 +53,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] = $language->g('Plugin').' - '.$plugin->name().' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $L->g('Plugin').' - '.$plugin->name().' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/content.php b/bl-kernel/admin/controllers/content.php index 4690e4fd..a4342a7c 100644 --- a/bl-kernel/admin/controllers/content.php +++ b/bl-kernel/admin/controllers/content.php @@ -39,4 +39,4 @@ $static = $pages->getStaticDB(true); $sticky = $pages->getStickyDB(true); // Title of the page -$layout['title'] .= ' - '.$language->g('Manage content'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Manage content'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/dashboard.php b/bl-kernel/admin/controllers/dashboard.php index 04da6450..2d45bf1b 100644 --- a/bl-kernel/admin/controllers/dashboard.php +++ b/bl-kernel/admin/controllers/dashboard.php @@ -36,4 +36,4 @@ function updateBludit() { updateBludit(); // Title of the page -$layout['title'] .= ' - '.$language->g('Dashboard'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Dashboard'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/developers.php b/bl-kernel/admin/controllers/developers.php index f27918bb..37b37c9c 100644 --- a/bl-kernel/admin/controllers/developers.php +++ b/bl-kernel/admin/controllers/developers.php @@ -48,4 +48,4 @@ function printTable($title, $array) { // Main after POST // ============================================================================ -$layout['title'] .= ' - '.$language->g('Developers'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Developers'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/edit-category.php b/bl-kernel/admin/controllers/edit-category.php index 842e0b56..9df8f48c 100644 --- a/bl-kernel/admin/controllers/edit-category.php +++ b/bl-kernel/admin/controllers/edit-category.php @@ -41,4 +41,4 @@ if (!$categories->exists($categoryKey)) { $categoryMap = $categories->getMap($categoryKey); // Title of the page -$layout['title'] .= ' - '.$language->g('Edit Category').' [ '.$categoryMap['name'] . ' ] '; \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Edit Category').' [ '.$categoryMap['name'] . ' ] '; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/edit-content.php b/bl-kernel/admin/controllers/edit-content.php index 1caaeca5..71a2f02f 100644 --- a/bl-kernel/admin/controllers/edit-content.php +++ b/bl-kernel/admin/controllers/edit-content.php @@ -9,7 +9,7 @@ if (!checkRole(array('admin','editor'), false)) { $pageKey = isset($_POST['key']) ? $_POST['key'] : $layout['parameters']; $page = new Page($pageKey); } catch (Exception $e) { - Alert::set($language->g('You do not have sufficient permissions')); + Alert::set($L->g('You do not have sufficient permissions')); Redirect::page('dashboard'); } @@ -20,7 +20,7 @@ if (!checkRole(array('admin','editor'), false)) { 'notes'=>$login->username() )); - Alert::set($language->g('You do not have sufficient permissions')); + Alert::set($L->g('You do not have sufficient permissions')); Redirect::page('dashboard'); } } @@ -40,7 +40,7 @@ if (!checkRole(array('admin','editor'), false)) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['type']==='delete') { if (deletePage($_POST['key'])) { - Alert::set( $language->g('The changes have been saved') ); + Alert::set( $L->g('The changes have been saved') ); } } else { // If the checkbox is not selected the form doesn't send the field @@ -50,7 +50,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { $key = editPage($_POST); if ($key!==false) { - Alert::set( $language->g('The changes have been saved') ); + Alert::set( $L->g('The changes have been saved') ); Redirect::page('edit-content/'.$key); } } @@ -70,4 +70,4 @@ try { } // Title of the page -$layout['title'] .= ' - '.$language->g('Edit content').' - '.$page->title(); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Edit content').' - '.$page->title(); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/edit-user.php b/bl-kernel/admin/controllers/edit-user.php index c2ffb32c..9e23f6b1 100644 --- a/bl-kernel/admin/controllers/edit-user.php +++ b/bl-kernel/admin/controllers/edit-user.php @@ -31,7 +31,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { editUser($_POST); } - Alert::set($language->g('The changes have been saved')); + Alert::set($L->g('The changes have been saved')); Redirect::page('users'); } @@ -53,4 +53,4 @@ try { } // Title of the page -$layout['title'] = $language->g('Edit user').' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $L->g('Edit user').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/install-theme.php b/bl-kernel/admin/controllers/install-theme.php index 6fa573ab..1a3dabfa 100644 --- a/bl-kernel/admin/controllers/install-theme.php +++ b/bl-kernel/admin/controllers/install-theme.php @@ -33,7 +33,7 @@ if (Sanitize::pathFile(PATH_THEMES.$themeDirname)) { )); // Create an alert - Alert::set( $language->g('The changes have been saved') ); + Alert::set( $L->g('The changes have been saved') ); } // Redirect diff --git a/bl-kernel/admin/controllers/login.php b/bl-kernel/admin/controllers/login.php index ff2b2e8f..9b9da20c 100644 --- a/bl-kernel/admin/controllers/login.php +++ b/bl-kernel/admin/controllers/login.php @@ -12,10 +12,10 @@ function checkLogin($args) { global $security; global $login; - global $language; + global $L; if ($security->isBlocked()) { - Alert::set($language->g('IP address has been blocked').'
'.$language->g('Try again in a few minutes'), ALERT_STATUS_FAIL); + Alert::set($L->g('IP address has been blocked').'
'.$L->g('Try again in a few minutes'), ALERT_STATUS_FAIL); return false; } @@ -26,12 +26,6 @@ function checkLogin($args) // Renew the token. This token will be the same inside the session for multiple forms. $security->generateTokenCSRF(); - // Users with the role reader do not need access to dashboard - if ($login->role()=='reader') { - Redirect::home(); - } - - // Other user without the role reader redirect to dashboard Redirect::page('dashboard'); return true; } @@ -40,7 +34,7 @@ function checkLogin($args) $security->addToBlacklist(); // Create alert - Alert::set($language->g('Username or password incorrect'), ALERT_STATUS_FAIL); + Alert::set($L->g('Username or password incorrect'), ALERT_STATUS_FAIL); return false; } diff --git a/bl-kernel/admin/controllers/new-category.php b/bl-kernel/admin/controllers/new-category.php index 5151cee6..22ac496f 100644 --- a/bl-kernel/admin/controllers/new-category.php +++ b/bl-kernel/admin/controllers/new-category.php @@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('New category'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('New category'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/new-content.php b/bl-kernel/admin/controllers/new-content.php index 92edd450..fd119222 100644 --- a/bl-kernel/admin/controllers/new-content.php +++ b/bl-kernel/admin/controllers/new-content.php @@ -33,4 +33,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] = $language->g('New content').' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $L->g('New content').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/new-user.php b/bl-kernel/admin/controllers/new-user.php index ea52e1b3..e2a8ea9e 100644 --- a/bl-kernel/admin/controllers/new-user.php +++ b/bl-kernel/admin/controllers/new-user.php @@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('Add a new user'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Add a new user'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/plugins-position.php b/bl-kernel/admin/controllers/plugins-position.php index 3d914421..164e113f 100644 --- a/bl-kernel/admin/controllers/plugins-position.php +++ b/bl-kernel/admin/controllers/plugins-position.php @@ -26,4 +26,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('Plugins'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Plugins'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/plugins.php b/bl-kernel/admin/controllers/plugins.php index 8cea2044..074f555a 100644 --- a/bl-kernel/admin/controllers/plugins.php +++ b/bl-kernel/admin/controllers/plugins.php @@ -23,4 +23,4 @@ checkRole(array('admin')); // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('Plugins'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Plugins'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/settings-general.php b/bl-kernel/admin/controllers/settings-general.php index e3e13e45..0f7dbcee 100644 --- a/bl-kernel/admin/controllers/settings-general.php +++ b/bl-kernel/admin/controllers/settings-general.php @@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('General Settings'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('General Settings'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/settings-regional.php b/bl-kernel/admin/controllers/settings-regional.php index 7767fb80..98b4ded3 100644 --- a/bl-kernel/admin/controllers/settings-regional.php +++ b/bl-kernel/admin/controllers/settings-regional.php @@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('Language and timezone'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Language and timezone'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/settings.php b/bl-kernel/admin/controllers/settings.php index 0da3a3c5..60c99564 100644 --- a/bl-kernel/admin/controllers/settings.php +++ b/bl-kernel/admin/controllers/settings.php @@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('Advanced Settings'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Advanced Settings'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/themes.php b/bl-kernel/admin/controllers/themes.php index b7892759..43e3dbf3 100644 --- a/bl-kernel/admin/controllers/themes.php +++ b/bl-kernel/admin/controllers/themes.php @@ -21,4 +21,4 @@ checkRole(array('admin')); $themes = buildThemes(); // Title of the page -$layout['title'] .= ' - '.$language->g('Themes'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Themes'); \ No newline at end of file diff --git a/bl-kernel/admin/controllers/user-password.php b/bl-kernel/admin/controllers/user-password.php index ed93e187..bc92811b 100644 --- a/bl-kernel/admin/controllers/user-password.php +++ b/bl-kernel/admin/controllers/user-password.php @@ -41,4 +41,4 @@ try { } // Title of the page -$layout['title'] = $language->g('Change password').' - '.$layout['title']; \ No newline at end of file +$layout['title'] = $L->g('Change password').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/controllers/users.php b/bl-kernel/admin/controllers/users.php index b22cebf6..a9a00232 100644 --- a/bl-kernel/admin/controllers/users.php +++ b/bl-kernel/admin/controllers/users.php @@ -28,4 +28,4 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' ) // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$language->g('Users'); \ No newline at end of file +$layout['title'] .= ' - '.$L->g('Users'); \ No newline at end of file diff --git a/bl-kernel/admin/views/content.php b/bl-kernel/admin/views/content.php index 2d0f8134..489171e8 100644 --- a/bl-kernel/admin/views/content.php +++ b/bl-kernel/admin/views/content.php @@ -4,7 +4,7 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'layers')); function table($type) { global $url; - global $language; + global $L; global $published; global $drafts; global $scheduled; @@ -15,7 +15,7 @@ function table($type) { $list = $published; if (empty($list)) { echo '

'; - echo $language->g('There are no pages at this moment.'); + echo $L->g('There are no pages at this moment.'); echo '

'; return false; } @@ -23,7 +23,7 @@ function table($type) { $list = $drafts; if (empty($list)) { echo '

'; - echo $language->g('There are no draft pages at this moment.'); + echo $L->g('There are no draft pages at this moment.'); echo '

'; return false; } @@ -31,7 +31,7 @@ function table($type) { $list = $scheduled; if (empty($list)) { echo '

'; - echo $language->g('There are no scheduled pages at this moment.'); + echo $L->g('There are no scheduled pages at this moment.'); echo '

'; return false; } @@ -39,7 +39,7 @@ function table($type) { $list = $static; if (empty($list)) { echo '

'; - echo $language->g('There are no static pages at this moment.'); + echo $L->g('There are no static pages at this moment.'); echo '

'; return false; } @@ -47,7 +47,7 @@ function table($type) { $list = $sticky; if (empty($list)) { echo '

'; - echo $language->g('There are no sticky pages at this moment.'); + echo $L->g('There are no sticky pages at this moment.'); echo '

'; return false; } @@ -57,9 +57,9 @@ function table($type) { - - - + + + @@ -73,7 +73,7 @@ function table($type) { echo ''; @@ -89,7 +89,7 @@ function table($type) { echo ''; @@ -114,7 +114,7 @@ function table($type) { echo ''; echo ''; echo ''; @@ -148,19 +148,19 @@ function table($type) {
@@ -175,22 +175,22 @@ function table($type) {
  • - get('First'); ?> + get('First'); ?>
  • - get('Previous'); ?> + get('Previous'); ?>
  • - get('Next'); ?> + get('Next'); ?>
  • - get('Last'); ?> + get('Last'); ?>
  • @@ -222,11 +222,11 @@ function table($type) { 'jsdeletePageModal', - 'modalTitle'=>' ' . 'Delete content', - 'modalText'=>'Are you sure you want to delete this page?', - 'buttonPrimary'=>'Delete', + 'modalTitle'=>$L->g('Delete content'), + 'modalText'=>$L->g('Are you sure you want to delete this page'), + 'buttonPrimary'=>$L->g('Delete'), 'buttonPrimaryClass'=>'deletePageModalAcceptButton', - 'buttonSecondary'=>'Cancel', + 'buttonSecondary'=>$L->g('Cancel'), 'buttonSecondaryClass'=>'' )); ?> diff --git a/bl-kernel/admin/views/edit-category.php b/bl-kernel/admin/views/edit-category.php index 7a5ea5b8..18028d7c 100644 --- a/bl-kernel/admin/views/edit-category.php +++ b/bl-kernel/admin/views/edit-category.php @@ -21,26 +21,16 @@ echo Bootstrap::formOpen(array('id'=>'jsform')); echo Bootstrap::formInputTextBlock(array( 'name'=>'name', - 'label'=>$L->g('Category name'), + 'label'=>$L->g('Name'), 'value'=>$categoryMap['name'], 'class'=>'', 'placeholder'=>'', 'tip'=>'' )); - echo Bootstrap::formInputGroupText(array( - 'name'=>'newKey', - 'label'=>$L->g('Category key'), - 'labelInside'=>DOMAIN_CATEGORIES, - 'value'=>$categoryMap['key'], - 'class'=>'', - 'placeholder'=>'', - 'tip'=>'' - )); - echo Bootstrap::formTextareaBlock(array( 'name'=>'description', - 'label'=>$L->g('Category description'), + 'label'=>$L->g('Description'), 'value'=>isset($categoryMap['description'])?$categoryMap['description']:'', 'class'=>'', 'placeholder'=>'', @@ -50,13 +40,23 @@ echo Bootstrap::formOpen(array('id'=>'jsform')); echo Bootstrap::formInputTextBlock(array( 'name'=>'template', - 'label'=>$L->g('Category template'), + 'label'=>$L->g('Template'), 'value'=>isset($categoryMap['template'])?$categoryMap['template']:'', 'class'=>'', 'placeholder'=>'', 'tip'=>'' )); + echo Bootstrap::formInputGroupText(array( + 'name'=>'newKey', + 'label'=>$L->g('Friendly URL'), + 'labelInside'=>DOMAIN_CATEGORIES, + 'value'=>$categoryMap['key'], + 'class'=>'', + 'placeholder'=>'', + 'tip'=>'' + )); + echo '
    @@ -72,12 +72,12 @@ echo Bootstrap::formClose(); 'Delete', + 'buttonPrimary'=>$L->g('Delete'), 'buttonPrimaryClass'=>'jsbuttonDeleteAccept', - 'buttonSecondary'=>'Cancel', + 'buttonSecondary'=>$L->g('Cancel'), 'buttonSecondaryClass'=>'', - 'modalTitle'=>'Delete category', - 'modalText'=>'Are you sure you want to delete the category ?', + 'modalTitle'=>$L->g('Delete category'), + 'modalText'=>$L->g('Are you sure you want to delete this category?'), 'modalId'=>'jsdeleteModal' )); ?> diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index 432c9888..5ada6d71 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -3,13 +3,13 @@
    - +
    - - - + + +
    @@ -79,13 +79,13 @@
    draft()): ?> -
    The content is saved as a draft. To publish it click on the button Publish or if you still working on it click on Save as draft.
    +
    p('The content is saved as a draft. To publish it click on the button Publish or if you still working on it click on Save as draft.') ?>
    - - - g('Cancel') ?> + + + p('Cancel') ?> children())===0) { echo ''; @@ -100,10 +100,10 @@
    - - + +
    -

    Cover Image

    +

    p('Cover image') ?>

    default.svg" /> 'External Cover image')); + echo Bootstrap::formTitle(array('title'=>$L->g('External Cover image'))); echo Bootstrap::formInputTextBlock(array( 'name'=>'externalCoverImage', 'placeholder'=>'https://', 'value'=>$externalCoverImage, - 'tip'=>'Set a cover image from external URL, such as a CDN or some server dedicated for images.' + 'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.') )); ?> @@ -135,17 +135,17 @@
    - - + +
    -

    General

    +

    p('General') ?>

    '', - 'label'=>'User', + 'label'=>$L->g('User'), 'placeholder'=>'', 'value'=>$page->username(), 'tip'=>'', @@ -155,23 +155,23 @@ // Date echo Bootstrap::formInputText(array( 'name'=>'date', - 'label'=>'Date', + 'label'=>$L->g('Date'), 'placeholder'=>'', 'value'=>$page->dateRaw(), - 'tip'=>'Date format: YYYY-MM-DD Hours:Minutes:Seconds' + 'tip'=>$L->g('Date format: YYYY-MM-DD Hours:Minutes:Seconds') )); // Type echo Bootstrap::formSelect(array( 'name'=>'typeTMP', - 'label'=>'Type', + 'label'=>$L->g('Type'), 'selected'=>$page->type(), 'options'=>array( - 'published'=>'- Default -', - 'sticky'=>'Sticky', - 'static'=>'Static' + 'published'=>'- '.$L->g('Default').' -', + 'sticky'=>$L->g('Sticky'), + 'static'=>$L->g('Static') ), - 'tip'=>'???' + 'tip'=>'' )); // Parent @@ -187,7 +187,7 @@ 'name'=>'parentTMP', 'label'=>$L->g('Parent'), 'placeholder'=>'', - 'tip'=>'Start typing a page title to see a list of suggestions.', + 'tip'=>$L->g('Start typing a page title to see a list of suggestions.'), 'value'=>$parentOption )); @@ -195,17 +195,17 @@ echo Bootstrap::formInputText(array( 'name'=>'position', 'label'=>$L->g('Position'), - 'tip'=>'Field used when ordering content by position', + 'tip'=>$L->g('Field used when ordering content by position'), 'value'=>$page->position() )); // Template echo Bootstrap::formInputText(array( 'name'=>'template', - 'label'=>'Template', + 'label'=>$L->g('Template'), 'placeholder'=>'', 'value'=>$page->template(), - 'tip'=>'Write a template name to filter the page in the theme and change the style of the page.' + 'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.') )); echo Bootstrap::formTitle(array('title'=>'SEO')); @@ -213,10 +213,10 @@ // Tags echo Bootstrap::formInputText(array( 'name'=>'tags', - 'label'=>'Tags', + 'label'=>$L->g('Tags'), 'placeholder'=>'', 'value'=>$page->tags(), - 'tip'=>'Write the tags separated by comma' + 'tip'=>$L->g('Write the tags separated by comma') )); // Friendly URL @@ -224,36 +224,36 @@ 'name'=>'slug', 'tip'=>$L->g('URL associated with the content'), 'label'=>$L->g('Friendly URL'), - 'placeholder'=>'Leave empty for autocomplete by Bludit.', + 'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.'), 'value'=>$page->slug() )); echo Bootstrap::formCheckbox(array( 'name'=>'noindex', 'label'=>'Robots', - 'labelForCheckbox'=>'Apply noindex to this page', + 'labelForCheckbox'=>$L->g('Apply noindex to this page'), 'placeholder'=>'', 'class'=>'mt-4', 'checked'=>$page->noindex(), - 'tip'=>'This tells search engines not to show this page in their search results.' + 'tip'=>$L->g('This tells search engines not to show this page in their search results.') )); echo Bootstrap::formCheckbox(array( 'name'=>'nofollow', 'label'=>'', - 'labelForCheckbox'=>'Apply nofollow to this page', + 'labelForCheckbox'=>$L->g('Apply nofollow to this page'), 'placeholder'=>'', 'checked'=>$page->nofollow(), - 'tip'=>'This tells search engines not to follow links on this page.' + 'tip'=>$L->g('This tells search engines not to follow links on this page.') )); echo Bootstrap::formCheckbox(array( 'name'=>'noarchive', 'label'=>'', - 'labelForCheckbox'=>'Apply noarchive to this page', + 'labelForCheckbox'=>$L->g('Apply noarchive to this page'), 'placeholder'=>'', 'checked'=>$page->noarchive(), - 'tip'=>'This tells search engines not to save a cached copy of this page.' + 'tip'=>$L->g('This tells search engines not to save a cached copy of this page.') )); ?> @@ -261,12 +261,12 @@ 'Delete', + 'buttonPrimary'=>$L->g('Delete'), 'buttonPrimaryClass'=>'jsbuttonDeleteAccept', - 'buttonSecondary'=>'Cancel', + 'buttonSecondary'=>$L->g('Cancel'), 'buttonSecondaryClass'=>'', - 'modalTitle'=>'Delete content', - 'modalText'=>'Are you sure you want to delete: '.$page->title().'', + 'modalTitle'=>$L->g('Delete content'), + 'modalText'=>$L->g('Are you sure you want to delete this page'), 'modalId'=>'jsdeletePageModal' )); ?> @@ -286,7 +286,7 @@ @@ -333,7 +333,7 @@ diff --git a/bl-kernel/admin/views/edit-user.php b/bl-kernel/admin/views/edit-user.php index 30fa3e69..2f5c150b 100644 --- a/bl-kernel/admin/views/edit-user.php +++ b/bl-kernel/admin/views/edit-user.php @@ -38,7 +38,7 @@ echo Bootstrap::formOpen(array()); echo Bootstrap::formSelect(array( 'name'=>'role', 'label'=>$L->g('Role'), - 'options'=>array('reader'=>$L->g('Reader'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')), + 'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')), 'selected'=>$user->role(), 'class'=>'', 'tip'=>'' @@ -62,7 +62,7 @@ echo Bootstrap::formOpen(array()); 'value'=>$user->nickname(), 'class'=>'', 'placeholder'=>'', - 'tip'=>'The nickname is almost used in the themes to display the author of the content' + 'tip'=>$L->g('The nickname is almost used in the themes to display the author of the content') )); echo Bootstrap::formInputText(array( @@ -122,7 +122,7 @@ echo Bootstrap::formOpen(array());
    - +
    '; @@ -216,7 +216,7 @@ echo '
    - +
    @@ -229,13 +229,13 @@ echo ' $(document).ready(function() { $("#jsdeleteUserAndDeleteContent").click(function() { - if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { + if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { return false; } }); $("#jsdeleteUserAndKeepContent").click(function() { - if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { + if(confirm("p('Confirm delete this action cannot be undone') ?>")==false) { return false; } }); diff --git a/bl-kernel/admin/views/new-content.php b/bl-kernel/admin/views/new-content.php index 57d5d8d8..64b5fb59 100644 --- a/bl-kernel/admin/views/new-content.php +++ b/bl-kernel/admin/views/new-content.php @@ -3,13 +3,13 @@
    - +
    - - - + + +
    @@ -88,7 +88,7 @@
    -

    Cover Image

    +

    p('Cover image') ?>

    coverImagePreview @@ -100,7 +100,7 @@ 'name'=>'externalCoverImage', 'placeholder'=>"https://", 'value'=>'', - 'tip'=>'Set a cover image from external URL, such as a CDN or some server dedicated for images.' + 'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.') )); ?> @@ -114,30 +114,40 @@ -

    Advanced

    +

    p('Advanced') ?>

    '', + 'label'=>$L->g('User'), + 'placeholder'=>'', + 'value'=>$login->username(), + 'tip'=>'', + 'disabled'=>true + )); + // Date echo Bootstrap::formInputText(array( 'name'=>'date', - 'label'=>'Date', + 'label'=>$L->g('Date'), 'placeholder'=>'', 'value'=>Date::current(DB_DATE_FORMAT), - 'tip'=>'Date format: YYYY-MM-DD Hours:Minutes:Seconds' + 'tip'=>$L->g('Date format: YYYY-MM-DD Hours:Minutes:Seconds') )); // Type echo Bootstrap::formSelect(array( 'name'=>'typeTMP', - 'label'=>'Type', + 'label'=>$L->g('Type'), 'selected'=>'', 'options'=>array( - 'published'=>'- Default -', - 'sticky'=>'Sticky', - 'static'=>'Static' + 'published'=>'- '.$L->g('Default').' -', + 'sticky'=>$L->g('Sticky'), + 'static'=>$L->g('Static') ), - 'tip'=>'???' + 'tip'=>'' )); // Parent @@ -145,7 +155,7 @@ 'name'=>'parentTMP', 'label'=>$L->g('Parent'), 'placeholder'=>'', - 'tip'=>'Start typing a page title to see a list of suggestions.', + 'tip'=>$L->g('Start typing a page title to see a list of suggestions.'), 'value'=>'' )); @@ -153,17 +163,17 @@ echo Bootstrap::formInputText(array( 'name'=>'position', 'label'=>$L->g('Position'), - 'tip'=>'Field used when ordering content by position', + 'tip'=>$L->g('Field used when ordering content by position'), 'value'=>$pages->nextPositionNumber() )); // Template echo Bootstrap::formInputText(array( 'name'=>'template', - 'label'=>'Template', + 'label'=>$L->g('Template'), 'placeholder'=>'', 'value'=>'', - 'tip'=>'Write a template name to filter the page in the theme and change the style of the page.' + 'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.') )); echo Bootstrap::formTitle(array('title'=>'SEO')); @@ -171,9 +181,9 @@ // Tags echo Bootstrap::formInputText(array( 'name'=>'tags', - 'label'=>'Tags', + 'label'=>$L->g('Tags'), 'placeholder'=>'', - 'tip'=>'Write the tags separated by comma' + 'tip'=>$L->g('Write the tags separated by comma') )); // Friendly URL @@ -187,29 +197,29 @@ echo Bootstrap::formCheckbox(array( 'name'=>'noindex', 'label'=>'Robots', - 'labelForCheckbox'=>'Apply noindex to this page', + 'labelForCheckbox'=>$L->g('Apply noindex to this page'), 'placeholder'=>'', 'class'=>'mt-4', 'checked'=>false, - 'tip'=>'This tells search engines not to show this page in their search results.' + 'tip'=>$L->g('This tells search engines not to show this page in their search results.') )); echo Bootstrap::formCheckbox(array( 'name'=>'nofollow', 'label'=>'', - 'labelForCheckbox'=>'Apply nofollow to this page', + 'labelForCheckbox'=>$L->g('Apply nofollow to this page'), 'placeholder'=>'', 'checked'=>false, - 'tip'=>'This tells search engines not to follow links on this page.' + 'tip'=>$L->g('This tells search engines not to follow links on this page.') )); echo Bootstrap::formCheckbox(array( 'name'=>'noarchive', 'label'=>'', - 'labelForCheckbox'=>'Apply noarchive to this page', + 'labelForCheckbox'=>$L->g('Apply noarchive to this page'), 'placeholder'=>'', 'checked'=>false, - 'tip'=>'This tells search engines not to save a cached copy of this page.' + 'tip'=>$L->g('This tells search engines not to save a cached copy of this page.') )); ?> @@ -220,7 +230,7 @@ @@ -267,7 +277,7 @@ diff --git a/bl-kernel/admin/views/new-user.php b/bl-kernel/admin/views/new-user.php index 5ab59f3b..16126eb4 100644 --- a/bl-kernel/admin/views/new-user.php +++ b/bl-kernel/admin/views/new-user.php @@ -41,8 +41,8 @@ echo Bootstrap::formOpen(array()); echo Bootstrap::formSelect(array( 'name'=>'role', 'label'=>$L->g('Role'), - 'options'=>array('reader'=>$L->g('Reader'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')), - 'selected'=>'reader', + 'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')), + 'selected'=>'Editor', 'class'=>'', 'tip'=>'' )); diff --git a/bl-kernel/admin/views/plugins-position.php b/bl-kernel/admin/views/plugins-position.php index 07ed5577..2fb49064 100644 --- a/bl-kernel/admin/views/plugins-position.php +++ b/bl-kernel/admin/views/plugins-position.php @@ -1,6 +1,6 @@ $L->g('Plugin position'), 'icon'=>'tags')); +echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins position'), 'icon'=>'tags')); echo Bootstrap::alert(array('class'=>'alert-primary', 'text'=>$L->g('Drag and Drop to sort the plugins'))); diff --git a/bl-kernel/admin/views/settings.php b/bl-kernel/admin/views/settings.php index 6c6813d5..2021f87a 100644 --- a/bl-kernel/admin/views/settings.php +++ b/bl-kernel/admin/views/settings.php @@ -217,52 +217,52 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); echo Bootstrap::formSelect(array( 'name'=>'extremeFriendly', - 'label'=>'Allow Unicode', - 'options'=>array('true'=>'Enabled', 'false'=>'Disable'), + 'label'=>$L->g('Allow Unicode'), + 'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')), 'selected'=>($site->extremeFriendly()?'true':'false'), 'class'=>'', - 'tip'=>'Allow unicode characters in the URL and some part of the system.' + 'tip'=>$L->g('Allow unicode characters in the URL and some part of the system.') )); echo Bootstrap::formTitle(array('title'=>$L->g('Title formats'))); echo Bootstrap::formInputText(array( 'name'=>'titleFormatHomepage', - 'label'=>'Homepage', + 'label'=>$L->g('Homepage'), 'value'=>$site->titleFormatHomepage(), 'class'=>'', 'placeholder'=>'', - 'tip'=>'Variables allowed: {{site-title}}{{site-slogan}}{{site-description}}', + 'tip'=>$L->g('Variables allowed').' {{site-title}}{{site-slogan}}{{site-description}}', 'placeholder'=>'' )); echo Bootstrap::formInputText(array( 'name'=>'titleFormatPages', - 'label'=>'Pages', + 'label'=>$L->g('Pages'), 'value'=>$site->titleFormatPages(), 'class'=>'', 'placeholder'=>'', - 'tip'=>'Variables allowed: {{page-title}}{{page-description}}{{site-title}}{{site-slogan}}{{site-description}}', + 'tip'=>$L->g('Variables allowed').' {{page-title}}{{page-description}}{{site-title}}{{site-slogan}}{{site-description}}', 'placeholder'=>'' )); echo Bootstrap::formInputText(array( 'name'=>'titleFormatCategory', - 'label'=>'Category', + 'label'=>$L->g('Category'), 'value'=>$site->titleFormatCategory(), 'class'=>'', 'placeholder'=>'', - 'tip'=>'Variables allowed: {{category-name}}{{site-title}}{{site-slogan}}{{site-description}}', + 'tip'=>$L->g('Variables allowed').' {{category-name}}{{site-title}}{{site-slogan}}{{site-description}}', 'placeholder'=>'' )); echo Bootstrap::formInputText(array( 'name'=>'titleFormatTag', - 'label'=>'Tag', + 'label'=>$L->g('Tag'), 'value'=>$site->titleFormatTag(), 'class'=>'', 'placeholder'=>'', - 'tip'=>'Variables allowed: {{tag-name}}{{site-title}}{{site-slogan}}{{site-description}}', + 'tip'=>$L->g('Variables allowed').' {{tag-name}}{{site-title}}{{site-slogan}}{{site-description}}', 'placeholder'=>'' )); @@ -366,7 +366,7 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); echo Bootstrap::formSelect(array( 'name'=>'language', 'label'=>$L->g('Language'), - 'options'=>$language->getLanguageList(), + 'options'=>$L->getLanguageList(), 'selected'=>$site->language(), 'class'=>'', 'tip'=>$L->g('select-your-sites-language') diff --git a/bl-kernel/boot/rules/60.plugins.php b/bl-kernel/boot/rules/60.plugins.php index 9685e665..89f7cccb 100644 --- a/bl-kernel/boot/rules/60.plugins.php +++ b/bl-kernel/boot/rules/60.plugins.php @@ -50,7 +50,7 @@ function buildPlugins() { global $plugins; global $pluginsEvents; - global $language; + global $L; global $site; // List plugins directories @@ -90,7 +90,7 @@ function buildPlugins() // This function overwrite the key=>value unset($database['plugin-data']); if (!empty($database)) { - $language->add($database); + $L->add($database); } // $plugins['all'] Array with all plugins, installed and not installed diff --git a/bl-kernel/boot/rules/99.themes.php b/bl-kernel/boot/rules/99.themes.php index 67b1547f..315694f2 100644 --- a/bl-kernel/boot/rules/99.themes.php +++ b/bl-kernel/boot/rules/99.themes.php @@ -85,6 +85,6 @@ if( Sanitize::pathFile($languageFilename) ) // Load words from the theme language if(!empty($database)) { - $language->add($database); + $L->add($database); } } \ No newline at end of file diff --git a/bl-kernel/boot/site.php b/bl-kernel/boot/site.php index 4df94f5d..424ec3ee 100644 --- a/bl-kernel/boot/site.php +++ b/bl-kernel/boot/site.php @@ -31,7 +31,7 @@ if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'init.php')) { if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) { include(PATH_THEMES.$site->theme().DS.'index.php'); } else { - $language->p('Please check your theme configuration'); + $L->p('Please check your theme configuration'); } // Plugins after site loaded diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index caef3c1a..54104bc6 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -17,15 +17,15 @@ function reindexTags() { // Generate the page 404 Not found function buildErrorPage() { global $site; - global $language; + global $L; try { $pageNotFoundKey = $site->pageNotFound(); $pageNotFound = New Page($pageNotFoundKey); } catch (Exception $e) { $pageNotFound = New Page(false); - $pageNotFound->setField('title', $language->get('page-not-found')); - $pageNotFound->setField('content', $language->get('page-not-found-content')); + $pageNotFound->setField('title', $L->get('page-not-found')); + $pageNotFound->setField('content', $L->get('page-not-found-content')); $pageNotFound->setField('username', 'admin'); } @@ -197,7 +197,7 @@ function pluginActivated($pluginClassName) { function activatePlugin($pluginClassName) { global $plugins; global $syslog; - global $language; + global $L; // Check if the plugin exists if (isset($plugins['all'][$pluginClassName])) { @@ -210,7 +210,7 @@ function activatePlugin($pluginClassName) { )); // Create an alert - Alert::set($language->g('plugin-activated')); + Alert::set($L->g('plugin-activated')); return true; } } @@ -220,7 +220,7 @@ function activatePlugin($pluginClassName) { function deactivatePlugin($pluginClassName) { global $plugins; global $syslog; - global $language; + global $L; // Check if the plugin exists if (isset($plugins['all'][$pluginClassName])) { @@ -234,7 +234,7 @@ function deactivatePlugin($pluginClassName) { )); // Create an alert - Alert::set($language->g('plugin-deactivated')); + Alert::set($L->g('plugin-deactivated')); return true; } } @@ -244,7 +244,7 @@ function deactivatePlugin($pluginClassName) { function changePluginsPosition($pluginClassList) { global $plugins; global $syslog; - global $language; + global $L; foreach ($pluginClassList as $position=>$pluginClassName) { if (isset($plugins['all'][$pluginClassName])) { @@ -259,14 +259,14 @@ function changePluginsPosition($pluginClassList) { 'notes'=>'' )); - Alert::set($language->g('The changes have been saved')); + Alert::set($L->g('The changes have been saved')); return true; } function createPage($args) { global $pages; global $syslog; - global $language; + global $L; // Check if the autosave page exists for this new page and delete it if (isset($args['uuid'])) { @@ -298,7 +298,7 @@ function createPage($args) { 'notes'=>$args['title'] )); - Alert::set( $language->g('new-content-created') ); + Alert::set( $L->g('new-content-created') ); return $key; } @@ -488,30 +488,30 @@ function deleteUser($args) { function createUser($args) { global $users; - global $language; + global $L; global $syslog; // Check empty username if (Text::isEmpty($args['new_username'])) { - Alert::set($language->g('username-field-is-empty'), ALERT_STATUS_FAIL); + Alert::set($L->g('username-field-is-empty'), ALERT_STATUS_FAIL); return false; } // Check already exist username if ($users->exists($args['new_username'])) { - Alert::set($language->g('username-already-exists'), ALERT_STATUS_FAIL); + Alert::set($L->g('username-already-exists'), ALERT_STATUS_FAIL); return false; } // Password length if (Text::length($args['new_password']) < PASSWORD_LENGTH) { - Alert::set($language->g('Password must be at least '.PASSWORD_LENGTH.' characters long'), ALERT_STATUS_FAIL); + Alert::set($L->g('Password must be at least '.PASSWORD_LENGTH.' characters long'), ALERT_STATUS_FAIL); return false; } // Check new password and confirm password are equal if ($args['new_password'] != $args['confirm_password']) { - Alert::set($language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); + Alert::set($L->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); return false; } @@ -539,7 +539,7 @@ function createUser($args) { function editSettings($args) { global $site; global $syslog; - global $language; + global $L; global $pages; if (isset($args['language'])) { @@ -591,7 +591,7 @@ function editSettings($args) { )); // Create alert - Alert::set($language->g('The changes have been saved')); + Alert::set($L->g('The changes have been saved')); return true; } @@ -600,7 +600,7 @@ function editSettings($args) { function changeUserPassword($args) { global $users; - global $language; + global $L; global $syslog; // Arguments @@ -610,12 +610,12 @@ function changeUserPassword($args) { // Password length if (Text::length($newPassword) < 6) { - Alert::set($language->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL); + Alert::set($L->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL); return false; } if ($newPassword!=$confirmPassword) { - Alert::set($language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); + Alert::set($L->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL); return false; } @@ -626,7 +626,7 @@ function changeUserPassword($args) { 'notes'=>$username )); - Alert::set($language->g('The changes have been saved'), ALERT_STATUS_OK); + Alert::set($L->g('The changes have been saved'), ALERT_STATUS_OK); return true; } @@ -636,7 +636,7 @@ function changeUserPassword($args) { // Returns true if the user is allowed to procceded function checkRole($allowRoles, $redirect=true) { global $login; - global $language; + global $L; global $syslog; $userRole = $login->role(); @@ -651,10 +651,7 @@ function checkRole($allowRoles, $redirect=true) { 'notes'=>$login->username() )); - Alert::set($language->g('You do not have sufficient permissions')); - if ($userRole=='reader') { - Redirect::home(); - } + Alert::set($L->g('You do not have sufficient permissions')); Redirect::page('dashboard'); } return false; @@ -664,11 +661,11 @@ function checkRole($allowRoles, $redirect=true) { // Returns TRUE is successfully added, FALSE otherwise function createCategory($category) { global $categories; - global $language; + global $L; global $syslog; if (Text::isEmpty($category)) { - Alert::set($language->g('Category name is empty'), ALERT_STATUS_FAIL); + Alert::set($L->g('Category name is empty'), ALERT_STATUS_FAIL); return false; } @@ -679,29 +676,29 @@ function createCategory($category) { 'notes'=>$category )); - Alert::set($language->g('Category added'), ALERT_STATUS_OK); + Alert::set($L->g('Category added'), ALERT_STATUS_OK); return true; } - Alert::set($language->g('The category already exists'), ALERT_STATUS_FAIL); + Alert::set($L->g('The category already exists'), ALERT_STATUS_FAIL); return false; } function editCategory($args) { - global $language; + global $L; global $pages; global $categories; global $syslog; if (Text::isEmpty($args['name']) || Text::isEmpty($args['newKey']) ) { - Alert::set($language->g('Empty fields')); + Alert::set($L->g('Empty fields')); return false; } $newCategoryKey = $categories->edit($args); if ($newCategoryKey==false) { - Alert::set($language->g('The category already exists')); + Alert::set($L->g('The category already exists')); return false; } @@ -714,12 +711,12 @@ function editCategory($args) { 'notes'=>$newCategoryKey )); - Alert::set($language->g('The changes have been saved')); + Alert::set($L->g('The changes have been saved')); return true; } function deleteCategory($args) { - global $language; + global $L; global $categories; global $syslog; @@ -734,7 +731,7 @@ function deleteCategory($args) { 'notes'=>$args['oldKey'] )); - Alert::set($language->g('The changes have been saved')); + Alert::set($L->g('The changes have been saved')); return true; } @@ -796,7 +793,7 @@ function activateTheme($themeDirectory) { 'notes'=>$themeDirname )); - Alert::set( $language->g('The changes have been saved') ); + Alert::set( $L->g('The changes have been saved') ); return true; } return false; diff --git a/bl-kernel/helpers/date.class.php b/bl-kernel/helpers/date.class.php index 511175a3..1282c151 100644 --- a/bl-kernel/helpers/date.class.php +++ b/bl-kernel/helpers/date.class.php @@ -6,15 +6,15 @@ class Date { // Example: $date = 'Mon, 27th March' > 'Lun, 27th Marzo' public static function translate($date) { - global $language; + global $L; // If English default language don't translate - if ($language->currentLanguage()=='en') { + if ($L->currentLanguage()=='en') { return $date; } // Get the array of dates from the language file - $dates = $language->getDates(); + $dates = $L->getDates(); foreach ($dates as $english=>$anotherLang) { $date = preg_replace('/\b'.$english.'\b/u', $anotherLang, $date); } diff --git a/bl-kernel/helpers/paginator.class.php b/bl-kernel/helpers/paginator.class.php index 3591afc5..fd86737b 100644 --- a/bl-kernel/helpers/paginator.class.php +++ b/bl-kernel/helpers/paginator.class.php @@ -104,7 +104,7 @@ class Paginator { public static function html($textPrevPage=false, $textNextPage=false, $showPageNumber=false) { - global $language; + global $L; $html = '
    '; $html .= '
    '; $html .= '
    '; } diff --git a/bl-plugins/categories/plugin.php b/bl-plugins/categories/plugin.php index 63cc6679..7a0135ab 100644 --- a/bl-plugins/categories/plugin.php +++ b/bl-plugins/categories/plugin.php @@ -14,23 +14,23 @@ class pluginCategories extends Plugin { // Method called on the settings of the plugin on the admin area public function form() { - global $language; + global $L; $html = ''; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; - $html .= ''.$language->get('This title is almost always used in the sidebar of the site').''; + $html .= ''.$L->get('This title is almost always used in the sidebar of the site').''; $html .= '
    '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; @@ -40,7 +40,7 @@ class pluginCategories extends Plugin { // Method called on the sidebar of the website public function siteSidebar() { - global $language; + global $L; global $categories; // HTML for sidebar diff --git a/bl-plugins/disqus/plugin.php b/bl-plugins/disqus/plugin.php index a0a9bed6..7f45bd01 100644 --- a/bl-plugins/disqus/plugin.php +++ b/bl-plugins/disqus/plugin.php @@ -13,29 +13,29 @@ class pluginDisqus extends Plugin { public function form() { - global $language; + global $L; $html = ''; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; diff --git a/bl-plugins/html-code/plugin.php b/bl-plugins/html-code/plugin.php index daaeb81c..8fdf809f 100644 --- a/bl-plugins/html-code/plugin.php +++ b/bl-plugins/html-code/plugin.php @@ -13,7 +13,7 @@ class pluginHTMLCode extends Plugin { public function form() { - global $language; + global $L; $html = '":/^(UL|OL)$/.test(n.nodeName)&&(r="
  • "+a+"
  • "),(i=rc(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='
    '),Bx(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=of({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=xo(er.fromDom(n))?r:Yt.trim(r),Bx(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Px=hi.DOM,Lx=function(e){return A.from(e).each(function(e){return e.destroy()})},Ix=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save(),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Px.remove(o.nextSibling),!e.inline&&r&&(i=e,Px.setStyle(i.id,"display",i.orgDisplay)),Gg(e),e.editorManager.remove(e),Px.remove(e.getContainer()),Lx(t),Lx(n),e.destroy()}var i},Mx=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Lx(i),Lx(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Px.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Fx=hi.DOM,Ux=Yt.extend,zx=Yt.each,Vx=Yt.resolve,qx=Re.ie,Hx=function(e,t,n){var r,o,i,a,u,s,c,l=this,f=l.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=l,o=e,i=f,a=n.defaultSettings,u=t,c={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s,ie7_compat:!0},t=yf(df,c,a,u),l.settings=t,Ei.language=t.language||"en",Ei.languageLoad=t.language_load,Ei.baseURL=n.baseURL,l.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new kx(t.document_base_url,{base_uri:d}),l.baseURI=d,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new mp(l),l.loadedCSS={},l.editorCommands=new qg(l),l.suffix=n.suffix,l.editorManager=n,l.inline=t.inline,l.buttons={},l.menuItems={},t.cache_suffix&&(Re.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(Re.overrideViewPort=!1),n.fire("SetupEditor",{editor:l}),l.execCallback("setup",l),l.$=pn.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})};Ux(Hx.prototype={render:function(){xx(this)},focus:function(e){Np(this,e)},hasFocus:function(){return Ep(this)},execCallback:function(e){for(var t=[],n=1;n=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=Nw(e.x,t.x),r=Nw(e.y,t.y),o=ww(e.x+e.w,t.x+t.w),i=ww(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:Tw(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=Nw(0,t.x-u),o=Nw(0,t.y-s),i=Nw(0,c-f),a=Nw(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),Tw(u,s,(c-=i)-u,(l-=a)-s)},create:Tw,fromClientRect:function(e){return Tw(e.left,e.top,e.width,e.height)}},Aw={},_w={add:function(e,t){Aw[e.toLowerCase()]=t},has:function(e){return!!Aw[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=Aw.hasOwnProperty(t)?Aw[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=Aw[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},Rw=Yt.each,Dw=Yt.extend,Bw=function(){};Bw.extend=yw=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!Cw&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in Cw=!0,e=new this,Cw=!1,n.Mixins&&(Rw(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&Rw(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&Rw(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&Rw(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=Dw({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=yw,i};var Ow=Math.min,Pw=Math.max,Lw=Math.round,Iw=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"===t){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";r+~]|"+ut+")"+ut+"*"),gt=new RegExp("="+ut+"*([^\\]'\"]*?)"+ut+"*\\]","g"),pt=new RegExp(lt),ht=new RegExp("^"+st+"$"),vt={ID:new RegExp("^#("+st+")"),CLASS:new RegExp("^\\.("+st+")"),TAG:new RegExp("^("+st+"|[*])"),ATTR:new RegExp("^"+ct),PSEUDO:new RegExp("^"+lt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ut+"*(even|odd|(([+-]|)(\\d*)n|)"+ut+"*(?:([+-]|)"+ut+"*(\\d+)|))"+ut+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+ut+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ut+"*((?:-\\d)?\\d*)"+ut+"*\\)|)(?=[^-]|$)","i")},bt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,Ct=/^[^{]+\{\s*\[native \w/,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wt=/[+~]/,Nt=/'|\\/g,Et=new RegExp("\\\\([\\da-f]{1,6}"+ut+"?|("+ut+")|.)","ig"),St=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{ot.apply(tt=it.call(We.childNodes),We.childNodes),tt[We.childNodes.length].nodeType}catch(Kw){ot={apply:tt.length?function(e,t){rt.apply(e,it.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Tt=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:We)!==Ee&&Ne(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Ee).nodeType)&&9!==u)return[];if(Te&&!r){if(o=xt.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&_e(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return ot.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&me.getElementsByClassName)return ot.apply(n,t.getElementsByClassName(a)),n}if(me.qsa&&(!ke||!ke.test(e))){if(f=l=$e,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=ve(e),(l=t.getAttribute("id"))?f=l.replace(Nt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Lt(c[s]);d=wt.test(e)&&Ot(t.parentNode)||t,m=c.join(",")}if(m)try{return ot.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||t.removeAttribute("id")}}}return ye(e.replace(ft,"$1"),t,n,r)};function kt(){var r=[];return function e(t,n){return r.push(t+" ")>ge.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function At(e){return e[$e]=!0,e}function _t(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function Rt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Dt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Bt(a){return At(function(i){return i=+i,At(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ot(e){return e&&typeof e.getElementsByTagName!==Ze&&e}for(de in me=Tt.support={},he=Tt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Ne=Tt.setDocument=function(e){var t,s=e?e.ownerDocument||e:We,n=s.defaultView;return s!==Ee&&9===s.nodeType&&s.documentElement?(Se=(Ee=s).documentElement,Te=!he(s),n&&n!==function(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Ne()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Ne()})),me.attributes=!0,me.getElementsByTagName=!0,me.getElementsByClassName=Ct.test(s.getElementsByClassName),me.getById=!0,ge.find.ID=function(e,t){if(typeof t.getElementById!==Ze&&Te){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},ge.filter.ID=function(e){var t=e.replace(Et,St);return function(e){return e.getAttribute("id")===t}},ge.find.TAG=me.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Ze)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},ge.find.CLASS=me.getElementsByClassName&&function(e,t){if(Te)return t.getElementsByClassName(e)},Ae=[],ke=[],me.disconnectedMatch=!0,ke=ke.length&&new RegExp(ke.join("|")),Ae=Ae.length&&new RegExp(Ae.join("|")),t=Ct.test(Se.compareDocumentPosition),_e=t||Ct.test(Se.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Qe=t?function(e,t){if(e===t)return we=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!me.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===We&&_e(We,e)?-1:t===s||t.ownerDocument===We&&_e(We,t)?1:xe?at.call(xe,e)-at.call(xe,t):0:4&n?-1:1)}:function(e,t){if(e===t)return we=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:xe?at.call(xe,e)-at.call(xe,t):0;if(o===i)return _t(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?_t(a[r],u[r]):a[r]===We?-1:u[r]===We?1:0},s):Ee},Tt.matches=function(e,t){return Tt(e,null,null,t)},Tt.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Ee&&Ne(e),t=t.replace(gt,"='$1']"),me.matchesSelector&&Te&&(!Ae||!Ae.test(t))&&(!ke||!ke.test(t)))try{var n=(void 0).call(e,t);if(n||me.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(Kw){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Et,St),e[3]=(e[3]||e[4]||e[5]||"").replace(Et,St),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Tt.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Tt.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return vt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pt.test(n)&&(t=ve(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Et,St).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Ye[e+" "];return t||(t=new RegExp("(^|"+ut+")"+e+"("+ut+"|$)"))&&Ye(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Ze&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Tt.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1)[^>]*$|#([\w\-]*)$)/,en=je.Event,tn=Yt.makeMap("children,contents,next,prev"),nn=function(e){return void 0!==e},rn=function(e){return"string"==typeof e},on=function(e,t){var n,r,o;for(o=(t=t||Gt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},an=function(e,t,n,r){var o;if(rn(t))t=on(t,Cn(e[0]));else if(t.length&&!t.nodeType){if(t=pn.makeArray(t),r)for(o=t.length-1;0<=o;o--)an(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Zt.exec(e)))return pn(t).find(e);if(n[1])for(r=on(e,Cn(t)).firstChild;r;)Jt.call(o,r),r=r.nextSibling;else{if(!(r=Cn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Yt.toArray(this)},add:function(e,t){var n,r,o=this;if(rn(e))return o.add(pn(e));if(!1!==t)for(n=pn.unique(o.toArray().concat(pn.makeArray(e))),o.length=n.length,r=0;r=a.length&&r(o)}))})})},to=function(e){return eo(e,Zr.nu)},no=function(n){return{is:function(e){return n===e},isValue:C,isError:y,getOr:H(n),getOrThunk:H(n),getOrDie:H(n),or:function(e){return no(n)},orThunk:function(e){return no(n)},fold:function(e,t){return t(n)},map:function(e){return no(e(n))},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return A.some(n)}}},ro=function(n){return{is:y,isValue:y,isError:C,getOr:j,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return ro(n)},each:v,bind:function(e){return ro(n)},exists:y,forall:C,toOption:A.none}},oo={value:no,error:ro};function io(e,u){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==u){if(o=e[n])return o;for(i=e.parentNode;i&&i!==u;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],u&&o===u)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==u)return i}}(t,"lastChild","previousSibling",e)}}var ao,uo,so,co=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fo=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Uo=/[<>&\"\']/g,zo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Vo={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};uo={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},so={"<":"<",">":">","&":"&",""":'"',"'":"'"};var qo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):Vo[t]||String.fromCharCode(t):so[e]||ao[e]||(n=e,(r=er.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Ko={},Xo={},Yo=Yt.makeMap,Go=Yt.each,Jo=Yt.extend,Qo=Yt.explode,Zo=Yt.inArray,ei=function(e,t){return(e=Yt.trim(e))?e.split(t||" "):[]},ti=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n":/^(UL|OL)$/.test(n.nodeName)&&(r="
  • "+a+"
  • "),(i=rc(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='
    '),Bx(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=of({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=xo(er.fromDom(n))?r:Yt.trim(r),Bx(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Px=hi.DOM,Lx=function(e){return A.from(e).each(function(e){return e.destroy()})},Ix=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Px.remove(o.nextSibling),!e.inline&&r&&(i=e,Px.setStyle(i.id,"display",i.orgDisplay)),Gg(e),e.editorManager.remove(e),Px.remove(e.getContainer()),Lx(t),Lx(n),e.destroy()}var i},Mx=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Lx(i),Lx(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Px.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Fx=hi.DOM,Ux=Yt.extend,zx=Yt.each,Vx=Yt.resolve,qx=Re.ie,Hx=function(e,t,n){var r,o,i,a,u,s,c,l=this,f=l.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=l,o=e,i=f,a=n.defaultSettings,u=t,c={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s,ie7_compat:!0},t=yf(df,c,a,u),l.settings=t,Ei.language=t.language||"en",Ei.languageLoad=t.language_load,Ei.baseURL=n.baseURL,l.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new kx(t.document_base_url,{base_uri:d}),l.baseURI=d,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new mp(l),l.loadedCSS={},l.editorCommands=new qg(l),l.suffix=n.suffix,l.editorManager=n,l.inline=t.inline,l.buttons={},l.menuItems={},t.cache_suffix&&(Re.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(Re.overrideViewPort=!1),n.fire("SetupEditor",{editor:l}),l.execCallback("setup",l),l.$=pn.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})};Ux(Hx.prototype={render:function(){xx(this)},focus:function(e){Np(this,e)},hasFocus:function(){return Ep(this)},execCallback:function(e){for(var t=[],n=1;n=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=Nw(e.x,t.x),r=Nw(e.y,t.y),o=ww(e.x+e.w,t.x+t.w),i=ww(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:Tw(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=Nw(0,t.x-u),o=Nw(0,t.y-s),i=Nw(0,c-f),a=Nw(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),Tw(u,s,(c-=i)-u,(l-=a)-s)},create:Tw,fromClientRect:function(e){return Tw(e.left,e.top,e.width,e.height)}},Aw={},_w={add:function(e,t){Aw[e.toLowerCase()]=t},has:function(e){return!!Aw[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=Aw.hasOwnProperty(t)?Aw[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=Aw[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},Rw=Yt.each,Dw=Yt.extend,Bw=function(){};Bw.extend=yw=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!Cw&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in Cw=!0,e=new this,Cw=!1,n.Mixins&&(Rw(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&Rw(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&Rw(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&Rw(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=Dw({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=yw,i};var Ow=Math.min,Pw=Math.max,Lw=Math.round,Iw=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"===t){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";rdescription(); $html .= ''; $html .= '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; diff --git a/bl-plugins/updater/plugin.php b/bl-plugins/updater/plugin.php index 5a55846e..4fa32e1a 100644 --- a/bl-plugins/updater/plugin.php +++ b/bl-plugins/updater/plugin.php @@ -104,7 +104,7 @@ class pluginUpdater extends Plugin { public function form() { - global $language; + global $L; return '
    This plugin is not yet complete
    '; @@ -113,7 +113,7 @@ class pluginUpdater extends Plugin { } $html = '
    '; - $html .= ''; + $html .= ''; $html .= '
    '; return $html; diff --git a/bl-plugins/version/plugin.php b/bl-plugins/version/plugin.php index 41825747..cc7bbdf9 100644 --- a/bl-plugins/version/plugin.php +++ b/bl-plugins/version/plugin.php @@ -4,9 +4,9 @@ class pluginVersion extends Plugin { public function adminSidebar() { - global $language; + global $L; $html = 'Version '.(defined('BLUDIT_PRO')?'':'').''.BLUDIT_VERSION.''; - $html .= ''; + $html .= ''; return $html; } diff --git a/bl-themes/alternative/php/home.php b/bl-themes/alternative/php/home.php index 9132140f..182f8a24 100644 --- a/bl-themes/alternative/php/home.php +++ b/bl-themes/alternative/php/home.php @@ -33,7 +33,7 @@ readMore()): ?> @@ -52,7 +52,7 @@
  • - get('Previous'); ?> + get('Previous'); ?>
  • @@ -64,7 +64,7 @@
  • - get('Next'); ?> ► + get('Next'); ?> ►
  • diff --git a/bl-themes/blogx/php/home.php b/bl-themes/blogx/php/home.php index 70f32992..c153ca6e 100644 --- a/bl-themes/blogx/php/home.php +++ b/bl-themes/blogx/php/home.php @@ -18,14 +18,14 @@ -
    date(); ?> - get('Reading time') . ': ' . $page->readingTime(); ?>
    +
    date(); ?> - get('Reading time') . ': ' . $page->readingTime(); ?>
    contentBreak(); ?> readMore()): ?> - get('Read more'); ?> + get('Read more'); ?> @@ -46,7 +46,7 @@
  • - get('Previous'); ?> + get('Previous'); ?>
  • @@ -56,7 +56,7 @@
  • - get('Next'); ?> ► + get('Next'); ?> ►
  • diff --git a/bl-themes/blogx/php/page.php b/bl-themes/blogx/php/page.php index 54138a39..7b60f3d1 100644 --- a/bl-themes/blogx/php/page.php +++ b/bl-themes/blogx/php/page.php @@ -17,7 +17,7 @@ isStatic() && !$url->notFound()): ?> -
    date(); ?> - get('Reading time') . ': ' . $page->readingTime() ?>
    +
    date(); ?> - get('Reading time') . ': ' . $page->readingTime() ?>
    diff --git a/install.php b/install.php index 7eb042ab..f0a32f6b 100644 --- a/install.php +++ b/install.php @@ -253,7 +253,7 @@ RewriteRule ^(.*) index.php [PT,L] // Install Bludit function install($adminPassword, $timezone) { - global $language; + global $L; if (!date_default_timezone_set($timezone)) { date_default_timezone_set('UTC'); @@ -268,8 +268,8 @@ function install($adminPassword, $timezone) // Directories for initial pages $pagesToInstall = array('example-page-1-slug', 'example-page-2-slug', 'example-page-3-slug', 'example-page-4-slug'); foreach ($pagesToInstall as $page) { - if (!mkdir(PATH_PAGES.$language->get($page), DIR_PERMISSIONS, true)) { - $errorText = 'Error when trying to created the directory=>'.PATH_PAGES.$language->get($page); + if (!mkdir(PATH_PAGES.$L->get($page), DIR_PERMISSIONS, true)) { + $errorText = 'Error when trying to created the directory=>'.PATH_PAGES.$L->get($page); error_log('[ERROR] '.$errorText, 0); } } @@ -312,8 +312,8 @@ function install($adminPassword, $timezone) $title = Text::replace('slug','title', $slug); $content = Text::replace('slug','content', $slug); - $data[$language->get($slug)]= array( - 'title'=>$language->get($title), + $data[$L->get($slug)]= array( + 'title'=>$L->get($title), 'description'=>'', 'username'=>'admin', 'tags'=>array(), @@ -333,7 +333,7 @@ function install($adminPassword, $timezone) 'noarchive'=>false ); - file_put_contents(PATH_PAGES.$language->get($slug).DS.FILENAME, $language->get($content), LOCK_EX); + file_put_contents(PATH_PAGES.$L->get($slug).DS.FILENAME, $L->get($content), LOCK_EX); } file_put_contents(PATH_DATABASES.'pages.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX); @@ -349,12 +349,12 @@ function install($adminPassword, $timezone) } $data = array( 'title'=>'BLUDIT', - 'slogan'=>$language->get('welcome-to-bludit'), - 'description'=>$language->get('congratulations-you-have-successfully-installed-your-bludit'), + 'slogan'=>$L->get('welcome-to-bludit'), + 'description'=>$L->get('congratulations-you-have-successfully-installed-your-bludit'), 'footer'=>'Copyright © '.Date::current('Y'), 'itemsPerPage'=>6, - 'language'=>$language->currentLanguage(), - 'locale'=>$language->locale(), + 'language'=>$L->currentLanguage(), + 'locale'=>$L->locale(), 'timezone'=>$timezone, 'theme'=>'alternative', 'adminTheme'=>'booty', @@ -394,7 +394,7 @@ function install($adminPassword, $timezone) $data = array( 'admin'=>array( 'nickname'=>'Admin', - 'firstName'=>$language->get('Administrator'), + 'firstName'=>$L->get('Administrator'), 'lastName'=>'', 'role'=>'admin', 'password'=>$passwordHash, @@ -458,8 +458,8 @@ function install($adminPassword, $timezone) $dataHead.json_encode( array( 'position'=>1, - 'label'=>$language->get('About'), - 'text'=>$language->get('this-is-a-brief-description-of-yourself-our-your-site') + 'label'=>$L->get('About'), + 'text'=>$L->get('this-is-a-brief-description-of-yourself-our-your-site') ), JSON_PRETTY_PRINT), LOCK_EX @@ -471,7 +471,7 @@ function install($adminPassword, $timezone) $dataHead.json_encode( array( 'position'=>2, - 'label'=>$language->get('Tags') + 'label'=>$L->get('Tags') ), JSON_PRETTY_PRINT), LOCK_EX @@ -483,7 +483,7 @@ function install($adminPassword, $timezone) $dataHead.json_encode( array( 'numberOfDays'=>7, - 'label'=>$language->get('Visits'), + 'label'=>$L->get('Visits'), 'excludeAdmins'=>false, 'position'=>1 ), @@ -555,7 +555,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { - <?php echo $language->get('Bludit Installer') ?> + <?php echo $L->get('Bludit Installer') ?> @@ -576,7 +576,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    -

    get('Bludit Installer') ?>

    +

    get('Bludit Installer') ?>

    -

    get('Choose a password for the username admin') ?>

    +

    get('Choose a password for the username admin') ?>

    @@ -601,12 +601,12 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    - +
    -
    p('Show password') ?>
    +
    p('Show password') ?>
    - +
    - +
    '.$language->g('Title').''.$language->g('URL').'Actions'.$L->g('Title').''.$L->g('URL').''.$L->g('Actions').'
    ' - .($page->title()?$page->title():''.$language->g('Empty title').' ') + .($page->title()?$page->title():''.$L->g('Empty title').' ') .'
    ' - .($child->title()?$child->title():''.$language->g('Empty title').' ') + .($child->title()?$child->title():''.$L->g('Empty title').' ') .'
    ' - .($page->title()?$page->title():''.$language->g('Empty title').' ') + .($page->title()?$page->title():''.$L->g('Empty title').' ') .'
    @@ -126,8 +126,8 @@ function table($type) { echo '
    '.$friendlyURL.''.PHP_EOL; - echo ' Edit'.PHP_EOL; - echo ''.PHP_EOL; + echo ' '.$L->g('Edit').''.PHP_EOL; + echo ''.PHP_EOL; echo '
    "+a+"
    "+a+"