Change on variable name to , include new words to the dictionary

This commit is contained in:
Diego Najar 2018-08-05 17:54:20 +02:00
parent 96f44aa286
commit d89e742fdf
69 changed files with 489 additions and 394 deletions

View File

@ -220,7 +220,7 @@ class Plugin {
// Create database
$this->dbFields['position'] = $position;
$this->setDb($this->dbFields);
$this->db = $this->dbFields;
return true;
}

View File

@ -1,4 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// Title of the page
$layout['title'] = $language->g('About') . ' - ' . $layout['title'];
$layout['title'] = $L->g('About') . ' - ' . $layout['title'];

View File

@ -23,4 +23,4 @@ checkRole(array('admin'));
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('Categories');
$layout['title'] .= ' - '.$L->g('Categories');

View File

@ -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'];
$layout['title'] = $L->g('Plugin').' - '.$plugin->name().' - '.$layout['title'];

View File

@ -39,4 +39,4 @@ $static = $pages->getStaticDB(true);
$sticky = $pages->getStickyDB(true);
// Title of the page
$layout['title'] .= ' - '.$language->g('Manage content');
$layout['title'] .= ' - '.$L->g('Manage content');

View File

@ -36,4 +36,4 @@ function updateBludit() {
updateBludit();
// Title of the page
$layout['title'] .= ' - '.$language->g('Dashboard');
$layout['title'] .= ' - '.$L->g('Dashboard');

View File

@ -48,4 +48,4 @@ function printTable($title, $array) {
// Main after POST
// ============================================================================
$layout['title'] .= ' - '.$language->g('Developers');
$layout['title'] .= ' - '.$L->g('Developers');

View File

@ -41,4 +41,4 @@ if (!$categories->exists($categoryKey)) {
$categoryMap = $categories->getMap($categoryKey);
// Title of the page
$layout['title'] .= ' - '.$language->g('Edit Category').' [ '.$categoryMap['name'] . ' ] ';
$layout['title'] .= ' - '.$L->g('Edit Category').' [ '.$categoryMap['name'] . ' ] ';

View File

@ -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();
$layout['title'] .= ' - '.$L->g('Edit content').' - '.$page->title();

View File

@ -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'];
$layout['title'] = $L->g('Edit user').' - '.$layout['title'];

View File

@ -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

View File

@ -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').'<br>'.$language->g('Try again in a few minutes'), ALERT_STATUS_FAIL);
Alert::set($L->g('IP address has been blocked').'<br>'.$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;
}

View File

@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('New category');
$layout['title'] .= ' - '.$L->g('New category');

View File

@ -33,4 +33,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================
// Title of the page
$layout['title'] = $language->g('New content').' - '.$layout['title'];
$layout['title'] = $L->g('New content').' - '.$layout['title'];

View File

@ -29,4 +29,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('Add a new user');
$layout['title'] .= ' - '.$L->g('Add a new user');

View File

@ -26,4 +26,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('Plugins');
$layout['title'] .= ' - '.$L->g('Plugins');

View File

@ -23,4 +23,4 @@ checkRole(array('admin'));
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('Plugins');
$layout['title'] .= ' - '.$L->g('Plugins');

View File

@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('General Settings');
$layout['title'] .= ' - '.$L->g('General Settings');

View File

@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('Language and timezone');
$layout['title'] .= ' - '.$L->g('Language and timezone');

View File

@ -28,4 +28,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('Advanced Settings');
$layout['title'] .= ' - '.$L->g('Advanced Settings');

View File

@ -21,4 +21,4 @@ checkRole(array('admin'));
$themes = buildThemes();
// Title of the page
$layout['title'] .= ' - '.$language->g('Themes');
$layout['title'] .= ' - '.$L->g('Themes');

View File

@ -41,4 +41,4 @@ try {
}
// Title of the page
$layout['title'] = $language->g('Change password').' - '.$layout['title'];
$layout['title'] = $L->g('Change password').' - '.$layout['title'];

View File

@ -28,4 +28,4 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$language->g('Users');
$layout['title'] .= ' - '.$L->g('Users');

View File

@ -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 '<p class="mt-4 text-muted">';
echo $language->g('There are no pages at this moment.');
echo $L->g('There are no pages at this moment.');
echo '</p>';
return false;
}
@ -23,7 +23,7 @@ function table($type) {
$list = $drafts;
if (empty($list)) {
echo '<p class="mt-4 text-muted">';
echo $language->g('There are no draft pages at this moment.');
echo $L->g('There are no draft pages at this moment.');
echo '</p>';
return false;
}
@ -31,7 +31,7 @@ function table($type) {
$list = $scheduled;
if (empty($list)) {
echo '<p class="mt-4 text-muted">';
echo $language->g('There are no scheduled pages at this moment.');
echo $L->g('There are no scheduled pages at this moment.');
echo '</p>';
return false;
}
@ -39,7 +39,7 @@ function table($type) {
$list = $static;
if (empty($list)) {
echo '<p class="mt-4 text-muted">';
echo $language->g('There are no static pages at this moment.');
echo $L->g('There are no static pages at this moment.');
echo '</p>';
return false;
}
@ -47,7 +47,7 @@ function table($type) {
$list = $sticky;
if (empty($list)) {
echo '<p class="mt-4 text-muted">';
echo $language->g('There are no sticky pages at this moment.');
echo $L->g('There are no sticky pages at this moment.');
echo '</p>';
return false;
}
@ -57,9 +57,9 @@ function table($type) {
<table class="table mt-3">
<thead>
<tr>
<th style="font-size: 0.8em;" class="border-0 text-uppercase text-muted" scope="col">'.$language->g('Title').'</th>
<th style="font-size: 0.8em;" class="border-0 d-none d-lg-table-cell text-uppercase text-muted" scope="col">'.$language->g('URL').'</th>
<th style="font-size: 0.8em;" class="border-0 text-center d-none d-sm-table-cell text-uppercase text-muted" scope="col">Actions</th>
<th style="font-size: 0.8em;" class="border-0 text-uppercase text-muted" scope="col">'.$L->g('Title').'</th>
<th style="font-size: 0.8em;" class="border-0 d-none d-lg-table-cell text-uppercase text-muted" scope="col">'.$L->g('URL').'</th>
<th style="font-size: 0.8em;" class="border-0 text-center d-none d-sm-table-cell text-uppercase text-muted" scope="col">'.$L->g('Actions').'</th>
</tr>
</thead>
<tbody>
@ -73,7 +73,7 @@ function table($type) {
echo '<tr>
<td>
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
.($page->title()?$page->title():'<span>'.$language->g('Empty title').'</span> ')
.($page->title()?$page->title():'<span>'.$L->g('Empty title').'</span> ')
.'</a>
</td>';
@ -89,7 +89,7 @@ function table($type) {
echo '<tr>
<td>
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'">'
.($child->title()?$child->title():'<span>'.$language->g('Empty title').'</span> ')
.($child->title()?$child->title():'<span>'.$L->g('Empty title').'</span> ')
.'</a>
</td>';
@ -114,7 +114,7 @@ function table($type) {
echo '<td class="pt-3">
<div>
<a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
.($page->title()?$page->title():'<span class="label-empty-title">'.$language->g('Empty title').'</span> ')
.($page->title()?$page->title():'<span class="label-empty-title">'.$L->g('Empty title').'</span> ')
.'</a>
</div>
<div>
@ -126,8 +126,8 @@ function table($type) {
echo '<td class="pt-3 d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
echo '<td class="pt-3 text-center d-none d-sm-table-cell">'.PHP_EOL;
echo '<a class="btn btn-secondary btn-sm" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><span class="oi oi-pencil"></span> Edit</a>'.PHP_EOL;
echo '<button type="button" class="btn btn-secondary btn-sm deletePageButton" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><span class="oi oi-trash"></span> Delete</button>'.PHP_EOL;
echo '<a class="btn btn-secondary btn-sm" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL;
echo '<button type="button" class="btn btn-secondary btn-sm deletePageButton" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL;
echo '</td>';
echo '</tr>';
@ -148,19 +148,19 @@ function table($type) {
<!-- TABS -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="pages-tab" data-toggle="tab" href="#pages" role="tab">Pages</a>
<a class="nav-link active" id="pages-tab" data-toggle="tab" href="#pages" role="tab"><?php $L->p('Pages') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="static-tab" data-toggle="tab" href="#static" role="tab">Static</a>
<a class="nav-link" id="static-tab" data-toggle="tab" href="#static" role="tab"><?php $L->p('Static') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="sticky-tab" data-toggle="tab" href="#sticky" role="tab">Sticky</a>
<a class="nav-link" id="sticky-tab" data-toggle="tab" href="#sticky" role="tab"><?php $L->p('Sticky') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab">Schedule <?php if (count($scheduled)>0) { echo '<span class="badge badge-danger">'.count($scheduled).'</span>'; } ?></a>
<a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab"><?php $L->p('Scheduled') ?> <?php if (count($scheduled)>0) { echo '<span class="badge badge-danger">'.count($scheduled).'</span>'; } ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab">Draft <?php if (count($drafts)>0) { echo '<span class="badge badge-danger">'.count($drafts).'</span>'; } ?></a>
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab"><?php $L->p('Draft') ?> <?php if (count($drafts)>0) { echo '<span class="badge badge-danger">'.count($drafts).'</span>'; } ?></a>
</li>
</ul>
<div class="tab-content">
@ -175,22 +175,22 @@ function table($type) {
<!-- First button -->
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><span class="align-middle oi oi-media-skip-backward"></span> <?php echo $language->get('First'); ?></a>
<a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><span class="align-middle oi oi-media-skip-backward"></span> <?php echo $L->get('First'); ?></a>
</li>
<!-- Previous button -->
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>"><?php echo $language->get('Previous'); ?></a>
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>"><?php echo $L->get('Previous'); ?></a>
</li>
<!-- Next button -->
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $language->get('Next'); ?></a>
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?></a>
</li>
<!-- Last button -->
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $language->get('Last'); ?> <span class="align-middle oi oi-media-skip-forward"></span></a>
<a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $L->get('Last'); ?> <span class="align-middle oi oi-media-skip-forward"></span></a>
</li>
</ul>
@ -222,11 +222,11 @@ function table($type) {
<!-- Modal for delete page -->
<?php echo Bootstrap::modal(array(
'modalId'=>'jsdeletePageModal',
'modalTitle'=>'<span class="oi oi-trash"></span> ' . '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'=>''
));
?>

View File

@ -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 '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary">'.$L->g('Save').'</button>
@ -72,12 +72,12 @@ echo Bootstrap::formClose();
<!-- Modal for delete category -->
<?php
echo Bootstrap::modal(array(
'buttonPrimary'=>'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'
));
?>

View File

@ -3,13 +3,13 @@
<!-- TABS -->
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true">Content</a>
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true"><?php $L->p('Editor') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false">Images</a>
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false"><?php $L->p('Images') ?></a>
</li>
<li class="nav-item">
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false">Options</a>
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false"><?php $L->p('Options') ?></a>
</li>
</ul>
<?php
@ -65,13 +65,13 @@
<div class="tab-pane show active" id="content" role="tabpanel" aria-labelledby="content-tab">
<div class="form-group m-0">
<input value="<?php echo $page->title() ?>" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="Enter title" type="text">
<input value="<?php echo $page->title() ?>" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="<?php $L->p('Enter title') ?>" type="text">
</div>
<div class="form-group m-0 mt-1">
<button id="jsmediaManagerButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> Media Manager</button>
<button id="jscategoryButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> Category: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> Description: <span class="option">-</span></button>
<button id="jsmediaManagerButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> <?php $L->p('Media Manager') ?></button>
<button id="jscategoryButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> <?php $L->p('Category') ?>: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> <?php $L->p('Description') ?>: <span class="option">-</span></button>
</div>
<div class="form-group mt-1">
@ -79,13 +79,13 @@
</div>
<?php if($page->draft()): ?>
<div class="alert alert-primary mt-2 mb-2">The content is saved as a draft. To publish it click on the button <b>Publish</b> or if you still working on it click on <b>Save as draft</b>.</div>
<div class="alert alert-primary mt-2 mb-2"><?php $L->p('The content is saved as a draft. To publish it click on the button <b>Publish</b> or if you still working on it click on <b>Save as draft</b>.') ?></div>
<?php endif; ?>
<div class="form-group mt-2">
<button type="button" class="jsbuttonSave btn btn-primary"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Update')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary"><?php echo $L->g('Save as draft') ?></button>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php echo $L->g('Cancel') ?></a>
<button type="button" class="jsbuttonSave btn btn-primary"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary"><?php $L->p('Save as draft') ?></button>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php $L->p('Cancel') ?></a>
<?php
if (count($page->children())===0) {
echo '<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#jsdeletePageModal">'.$L->g('Delete').'</button>';
@ -100,10 +100,10 @@
<div>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Update')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php $L->p('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal">Cover Image</h4>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('Cover image') ?></h4>
</div>
<?php
@ -118,13 +118,13 @@
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" />
<?php
echo Bootstrap::formTitle(array('title'=>'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 @@
<div>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Update')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php $L->p('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal">General</h4>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('General') ?></h4>
</div>
<?php
// Username
echo Bootstrap::formInputText(array(
'name'=>'',
'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: <code>YYYY-MM-DD Hours:Minutes:Seconds</code>'
'tip'=>$L->g('Date format: <code>YYYY-MM-DD Hours:Minutes:Seconds</code>')
));
// 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 <code>noindex</code> to this page',
'labelForCheckbox'=>$L->g('Apply <code>noindex</code> 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 <code>nofollow</code> to this page',
'labelForCheckbox'=>$L->g('Apply <code>nofollow</code> 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 <code>noarchive</code> to this page',
'labelForCheckbox'=>$L->g('Apply <code>noarchive</code> 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 @@
<!-- Modal for delete page -->
<?php echo Bootstrap::modal(array(
'buttonPrimary'=>'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: <b>'.$page->title().'</b>',
'modalTitle'=>$L->g('Delete content'),
'modalText'=>$L->g('Are you sure you want to delete this page'),
'modalId'=>'jsdeletePageModal'
));
?>
@ -286,7 +286,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Category</h5>
<h5 class="modal-title"><?php $L->p('Category') ?></h5>
</div>
<div class="modal-body">
<?php
@ -295,13 +295,13 @@
'label'=>'',
'selected'=>$page->categoryKey(),
'class'=>'',
'emptyOption'=>'- Uncategorized -',
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button>
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
@ -333,7 +333,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Description</h5>
<h5 class="modal-title"><?php $L->p('Description') ?></h5>
</div>
<div class="modal-body">
<?php
@ -344,12 +344,12 @@
'class'=>'',
'value'=>$page->description(),
'rows'=>3,
'placeholder'=>$language->get('this-field-can-help-describe-the-content')
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button>
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>

View File

@ -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());
<div class="col-sm-10">
<button type="submit" class="btn btn-primary mr-2" id="jsdisableUser" name="disableUser">'.$L->g('Disable user').'</button>
<button type="submit" class="btn btn-danger mr-2" id="jsdeleteUserAndKeepContent" name="deleteUserAndKeepContent">'.$L->g('Delete user and keep content').'</button>
<button type="submit" class="btn btn-danger mr-2" id="jsdeleteUserAndDeleteContent" name="deleteUserAndDeleteContent">'.$L->g('Delete user and delete content !!!').'</button>
<button type="submit" class="btn btn-danger mr-2" id="jsdeleteUserAndDeleteContent" name="deleteUserAndDeleteContent">'.$L->g('Delete user and delete content').'</button>
</div>
</div>
';
@ -216,7 +216,7 @@ echo '
<input type="hidden" name="tokenCSRF" value="'.$security->getTokenCSRF().'">
<div class="custom-file">
<input type="file" class="custom-file-input" id="jsprofilePictureInputFile" name="profilePictureInputFile">
<label class="custom-file-label" for="jsprofilePictureInputFile">Choose images</label>
<label class="custom-file-label" for="jsprofilePictureInputFile"></label>
</div>
</form>
</div>
@ -229,13 +229,13 @@ echo '
$(document).ready(function() {
$("#jsdeleteUserAndDeleteContent").click(function() {
if(confirm("<?php $language->p('Confirm delete this action cannot be undone') ?>")==false) {
if(confirm("<?php $L->p('Confirm delete this action cannot be undone') ?>")==false) {
return false;
}
});
$("#jsdeleteUserAndKeepContent").click(function() {
if(confirm("<?php $language->p('Confirm delete this action cannot be undone') ?>")==false) {
if(confirm("<?php $L->p('Confirm delete this action cannot be undone') ?>")==false) {
return false;
}
});

View File

@ -3,13 +3,13 @@
<!-- TABS -->
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true">Editor</a>
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true"><?php $L->p('Editor') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false">Images</a>
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false"><?php $L->p('Images') ?></a>
</li>
<li class="nav-item">
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false">Options</a>
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false"><?php $L->p('Options') ?></a>
</li>
</ul>
<?php
@ -59,13 +59,13 @@
<div class="tab-pane show active" id="content" role="tabpanel" aria-labelledby="content-tab">
<div class="form-group m-0">
<input value="" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="Enter title" type="text">
<input value="" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="<?php $L->p('Enter title') ?>" type="text">
</div>
<div class="form-group m-0 mt-1">
<button id="jsmediaManagerButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> Media Manager</button>
<button id="jscategoryButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> Category: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> Description: <span class="option">-</span></button>
<button id="jsmediaManagerButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> <?php $L->p('Media Manager') ?></button>
<button id="jscategoryButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> <?php $L->p('Category') ?>: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> <?php $L->p('Description') ?>: <span class="option">-</span></button>
</div>
<div class="form-group mt-1">
@ -88,7 +88,7 @@
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal">Cover Image</h4>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('Cover image') ?></h4>
</div>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" />
@ -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 @@
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal">Advanced</h4>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('Advanced') ?></h4>
</div>
<?php
// Username
echo Bootstrap::formInputText(array(
'name'=>'',
'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: <code>YYYY-MM-DD Hours:Minutes:Seconds</code>'
'tip'=>$L->g('Date format: <code>YYYY-MM-DD Hours:Minutes:Seconds</code>')
));
// 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 <code>noindex</code> to this page',
'labelForCheckbox'=>$L->g('Apply <code>noindex</code> 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 <code>nofollow</code> to this page',
'labelForCheckbox'=>$L->g('Apply <code>nofollow</code> 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 <code>noarchive</code> to this page',
'labelForCheckbox'=>$L->g('Apply <code>noarchive</code> 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 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Category</h5>
<h5 class="modal-title"><?php $L->p('Category') ?></h5>
</div>
<div class="modal-body">
<?php
@ -229,13 +239,13 @@
'label'=>'',
'selected'=>'',
'class'=>'',
'emptyOption'=>'- Uncategorized -',
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button>
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
@ -267,7 +277,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Description</h5>
<h5 class="modal-title"><?php $L->p('Description') ?></h5>
</div>
<div class="modal-body">
<?php
@ -278,12 +288,12 @@
'class'=>'',
'value'=>'',
'rows'=>3,
'placeholder'=>$language->get('this-field-can-help-describe-the-content')
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Done</button>
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>

View File

@ -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'=>''
));

View File

@ -1,6 +1,6 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
echo Bootstrap::pageTitle(array('title'=>$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')));

View File

@ -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: <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'tip'=>$L->g('Variables allowed').' <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'placeholder'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'titleFormatPages',
'label'=>'Pages',
'label'=>$L->g('Pages'),
'value'=>$site->titleFormatPages(),
'class'=>'',
'placeholder'=>'',
'tip'=>'Variables allowed: <code>{{page-title}}</code> <code>{{page-description}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'tip'=>$L->g('Variables allowed').' <code>{{page-title}}</code> <code>{{page-description}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'placeholder'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'titleFormatCategory',
'label'=>'Category',
'label'=>$L->g('Category'),
'value'=>$site->titleFormatCategory(),
'class'=>'',
'placeholder'=>'',
'tip'=>'Variables allowed: <code>{{category-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'tip'=>$L->g('Variables allowed').' <code>{{category-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'placeholder'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'titleFormatTag',
'label'=>'Tag',
'label'=>$L->g('Tag'),
'value'=>$site->titleFormatTag(),
'class'=>'',
'placeholder'=>'',
'tip'=>'Variables allowed: <code>{{tag-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'tip'=>$L->g('Variables allowed').' <code>{{tag-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
'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')

View File

@ -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

View File

@ -85,6 +85,6 @@ if( Sanitize::pathFile($languageFilename) )
// Load words from the theme language
if(!empty($database)) {
$language->add($database);
$L->add($database);
}
}

View File

@ -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

View File

@ -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;

View File

@ -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);
}

View File

@ -104,7 +104,7 @@ class Paginator {
public static function html($textPrevPage=false, $textNextPage=false, $showPageNumber=false)
{
global $language;
global $L;
$html = '<div id="paginator">';
$html .= '<ul>';
@ -112,7 +112,7 @@ class Paginator {
if(self::get('showNext'))
{
if($textPrevPage===false) {
$textPrevPage = '« '.$language->g('Previous page');
$textPrevPage = '« '.$L->g('Previous page');
}
$html .= '<li class="left">';
@ -127,7 +127,7 @@ class Paginator {
if(self::get('showPrev'))
{
if($textNextPage===false) {
$textNextPage = $language->g('Next page').' »';
$textNextPage = $L->g('Next page').' »';
}
$html .= '<li class="right">';

View File

@ -126,7 +126,7 @@ class Text {
// This function can return an empty string
public static function cleanUrl($string, $separator='-')
{
global $language;
global $L;
if (EXTREME_FRIENDLY_URL) {
$string = self::lowercase($string);
@ -137,7 +137,7 @@ class Text {
}
// Transliterate characters to ASCII
$specialCharsFromDictionary = $language->getSpecialChars();
$specialCharsFromDictionary = $L->getSpecialChars();
$string = str_replace(array_keys($specialCharsFromDictionary), $specialCharsFromDictionary, $string);
$string = str_replace(array_keys(self::$specialChars), self::$specialChars, $string);

View File

@ -74,6 +74,7 @@ class Language extends dbJSON {
{
$key = Text::lowercase($string);
$key = Text::replace(' ', '-', $key);
$key = Text::replace('.', '', $key);
//file_put_contents(DEBUG_FILE, $key.PHP_EOL, FILE_APPEND);
@ -81,7 +82,8 @@ class Language extends dbJSON {
return $this->db[$key];
}
//file_put_contents(DEBUG_FILE, $key.PHP_EOL, FILE_APPEND);
$line = '"'.$key.'": "'.$string.'",';
file_put_contents(DEBUG_FILE, $line.PHP_EOL, FILE_APPEND);
return $string;
}

View File

@ -484,7 +484,7 @@ class Page {
// Returns the amount of minutes takes to read the page
public function readingTime() {
global $language;
global $L;
$words = $this->content(true);
$words = strip_tags($words);
@ -493,10 +493,10 @@ class Page {
$minutes = round($average);
if ($minutes>0) {
return $minutes.' '.$language->get('minutes');
return $minutes.' '.$L->get('minutes');
}
return '~1 '.$language->get('minute');
return '~1 '.$L->get('minute');
}
// Returns relative time (e.g. "1 minute ago")

View File

@ -39,7 +39,7 @@ class Syslog extends dbJSON {
public function add($args)
{
global $language;
global $L;
$data = array();
$data['date'] = Date::current(DB_DATE_FORMAT);

View File

@ -6,7 +6,7 @@ class Users extends dbJSON {
'firstName'=>'',
'lastName'=>'',
'nickname'=>'',
'role'=>'editor', // admin, editor, reader
'role'=>'editor', // admin, editor
'password'=>'',
'salt'=>'!Pink Floyd!Welcome to the machine!',
'email'=>'',

View File

@ -192,7 +192,7 @@
"page-not-found": "Page not found",
"predefined-pages": "Predefined pages",
"returning-page-when-the-page-doesnt-exist": "Returning page when the page doesn't exist, by default returns a default message.",
"returning-page-for-the-main-page": "Returning page for the main page, by default shows the latest content order by date or position.",
"returning-page-for-the-main-page": "Returning page for the main page, by default, shows the latest content order by date or position.",
"full-url-of-your-site": "Full URL of your site. Complete with the protocol HTTP or HTTPS (only if you have enabled SSL on your server).",
"with-the-locales-you-can-set-the-regional-user-interface": "With the locales, you can set the regional user interface, such as the dates in your language. The locales need to be installed on your system.",
"bludit-installer": "Bludit Installer",
@ -296,5 +296,51 @@
"example-page-4-slug": "about",
"example-page-4-title": "About",
"example-page-4-content": "Your About page is typically one of the most visited pages on your site, need to be simple with a few key things, such as your name, who are you, how can contact you, a small story, etc.",
"the-extension-zip-is-not-installed": "The extension zip is not installed, to use this plugin you need to install the extension."
"the-extension-zip-is-not-installed": "The extension zip is not installed, to use this plugin you need to install the extension.",
"there-are-no-sticky-pages-at-this-moment": "There are no sticky pages at this moment.",
"there-are-no-scheduled-pages-at-this-moment": "There are no scheduled pages at this moment.",
"update": "Update",
"template": "Template",
"nickname": "Nickname",
"disable-user": "Disable user",
"delete-user-and-keep-content": "Delete user and keep content",
"delete-user-and-delete-content": "Delete user and delete content (Warning)",
"social-networks": "Social Networks",
"interval": "Interval",
"number-in-minutes-for-every-execution-of-autosave": "Number in minutes for every execution of autosave.",
"extreme-friendly-url": "Extreme friendly URL",
"title-formats": "Title formats",
"delete-content": "Delete content",
"are-you-sure-you-want-to-delete-this-page": "Are you sure you want to delete this page?",
"sticky": "Sticky",
"actions": "Actions",
"edit": "Edit",
"options": "Options",
"enter-title": "Enter title",
"media-manager": "Media Manager",
"set-a-cover-image-from-external-url,-such-as-a-cdn-or-some-server-dedicated-for-images": "Set a cover image from an external URL, such as a CDN or some server dedicated for images.",
"user": "User",
"date-format:-<code>yyyy-mm-dd-hours:minutes:seconds</code>": "Date format: <code>YYYY-MM-DD Hours:Minutes:Seconds</code>",
"start-typing-a-page-title-to-see-a-list-of-suggestions": "Start typing a page title to see a list of suggestions.",
"field-used-when-ordering-content-by-position": "Field used when ordering content by position",
"write-a-template-name-to-filter-the-page-in-the-theme-and-change-the-style-of-the-page": "Write a template name to filter the page in the theme and change the style of the page.",
"write-the-tags-separated-by-comma": "Write the tags separated by comma.",
"apply-<code>noindex</code>-to-this-page": "Apply <code>noindex</code> to this page.",
"this-tells-search-engines-not-to-show-this-page-in-their-search-results": "This tells search engines not to show this page in their search results.",
"apply-<code>nofollow</code>-to-this-page": "Apply <code>nofollow</code> to this page.",
"this-tells-search-engines-not-to-follow-links-on-this-page": "This tells search engines not to follow links on this page.",
"apply-<code>noarchive</code>-to-this-page": "Apply <code>noarchive</code> to this page.",
"this-tells-search-engines-not-to-save-a-cached-copy-of-this-page": "This tells search engines not to save a cached copy of this page.",
"uncategorized": "Uncategorized",
"done": "Done",
"delete-category": "Delete category",
"are-you-sure-you-want-to-delete-this-category?": "Are you sure you want to delete this category?",
"confirm-new-password": "Confirm new password",
"the-nickname-is-almost-used-in-the-themes-to-display-the-author-of-the-content": "The nickname is almost used in the themes to display the author of the content",
"allow-unicode": "Allow Unicode",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Allow Unicode characters in the URL and some part of the system.",
"variables-allowed": "Variables allowed",
"tag": "Tag",
"drag-and-drop-to-sort-the-plugins": "Drag and Drop to sort the plugins."
}

View File

@ -191,8 +191,8 @@
"page-not-found": "Página no encontrada",
"predefined-pages": "Páginas predefinidas",
"returning-page-when-the-page-doesnt-exist": "Cuando la página no existe se retorna esta página, de forma predeterminada devuelve un mensaje predefinido.",
"returning-page-for-the-main-page": "Returning page for the main page, by default shows the latest content order by date or position.",
"full-url-of-your-site": "Full URL of your site. Complete with the protocol HTTP or HTTPS (only if you have enabled SSL on your server).",
"returning-page-for-the-main-page": "La página de devolución de la Página principal, de forma predeterminada, muestra el último orden de contenido por fecha o posición.",
"full-url-of-your-site": "URL completa de su sitio. Completa con el protocolo http o https (sólo si has habilitado SSL en tu servidor).",
"with-the-locales-you-can-set-the-regional-user-interface": "Con locales, puede establecer la interfaz de usuario regional, como las fechas en su idioma. Los locales deben estar instalados en su sistema.",
"bludit-installer": "Bludit Instalador",
"choose-your-language": "Seleccione su idioma",
@ -294,5 +294,51 @@
"example-page-3-content": "Seguinos en las redes sociales [Facebook](https:\/\/www.facebook.com\/bluditcms\/), [Twitter](https:\/\/www.twitter.com\/bludit) y [GooglePlus](https:\/\/plus.google.com\/+bluditcms) para estar informado de las ultimas noticias, nuevos plugins, nuevos temas, y las ultimas versiones. También podes seguir nuestro [blog](https:\/\/blog.bludit.com).",
"example-page-4-slug": "acerca-de",
"example-page-4-title": "Acerca de",
"example-page-4-content": "Su página `Acerca de` es una de las páginas más visitadas en su sitio, necesita ser simple con algunas claves, como su nombre, quién es usted, cómo puede ponerse en contacto con usted o una pequeña historia."
"example-page-4-content": "Su página `Acerca de` es una de las páginas más visitadas en su sitio, necesita ser simple con algunas claves, como su nombre, quién es usted, cómo puede ponerse en contacto con usted o una pequeña historia.",
"there-are-no-sticky-pages-at-this-moment": "No hay páginas sticky en este momento.",
"there-are-no-scheduled-pages-at-this-moment": "No hay páginas programadas en este momento.",
"update": "Actualizar",
"template": "Plantilla",
"nickname": "Apodo",
"disable-user": "Deshabilitar usuario",
"delete-user-and-keep-content": "Eliminar usuario y mantener contenido",
"delete-user-and-delete-content": "Eliminar usuario y eliminar contenido (Precaución)",
"social-networks": "Redes sociales",
"interval": "Intervalo",
"number-in-minutes-for-every-execution-of-autosave": "Número en minutos para cada ejecución de Autoguardar.",
"extreme-friendly-url": "Extreme friendly URL",
"title-formats": "Formatos de los títulos",
"delete-content": "Eliminar contenido",
"are-you-sure-you-want-to-delete-this-page": "¿Confirma que desea eliminar esta página?",
"sticky": "Sticky",
"actions": "Acciones",
"edit": "Editar",
"options": "Opciones",
"enter-title": "Ingrese el título",
"media-manager": "Media Manager",
"set-a-cover-image-from-external-url,-such-as-a-cdn-or-some-server-dedicated-for-images": "Defina una imagen de portada desde una dirección URL externa, como una CDN o algún servidor dedicado a las imágenes.",
"user": "Usuario",
"date-format:-<code>yyyy-mm-dd-hours:minutes:seconds</code>": "Formato de fecha: <code>AAAA-MM-DD Horas:Minutos:Segundos</code>",
"start-typing-a-page-title-to-see-a-list-of-suggestions": "Empiece a escribir un título de página para ver una lista de sugerencias.",
"field-used-when-ordering-content-by-position": "Este campo es utilizado al ordenar el contenido por posición.",
"write-a-template-name-to-filter-the-page-in-the-theme-and-change-the-style-of-the-page": "Escriba un nombre de plantilla para cambiar el estilo de la página.",
"write-the-tags-separated-by-comma": "Escribe las etiquetas separadas por coma.",
"apply-<code>noindex</code>-to-this-page": "Aplicar <code>noindex</code> a esta pagina.",
"this-tells-search-engines-not-to-show-this-page-in-their-search-results": "Indica a los motores de búsqueda que no muestren esta página en sus resultados de búsqueda.",
"apply-<code>nofollow</code>-to-this-page": "Aplicar <code>nofollow</code> a esta pagina.",
"this-tells-search-engines-not-to-follow-links-on-this-page": "Indica a los motores de búsqueda que no sigan los enlaces de esta página.",
"apply-<code>noarchive</code>-to-this-page": "Aplicar <code>noarchive</code> a esta pagina.",
"this-tells-search-engines-not-to-save-a-cached-copy-of-this-page": "Indica a los motores de búsqueda que no guarden una copia almacenada en caché de esta página.",
"uncategorized": "Sin categoría",
"done": "Hecho",
"delete-category": "Eliminar categoría",
"are-you-sure-you-want-to-delete-this-category?": "¿Confirma que desea eliminar esta categoría?",
"confirm-new-password": "Confirmar nueva contraseña",
"the-nickname-is-almost-used-in-the-themes-to-display-the-author-of-the-content": "El apodo casi siempre es utilizado en los temas para mostrar el autor del contenido.",
"allow-unicode": "Permitir Unicode",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Permitir caracteres Unicode en la dirección URL y en alguna parte del sistema.",
"variables-allowed": "Variables permitidas",
"tag": "Etiqueta",
"drag-and-drop-to-sort-the-plugins": "Arrastrar y soltar para ordenar los plugins."
}

View File

@ -12,20 +12,20 @@ class pluginAbout extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Label').'</label>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('About').'</label>';
$html .= '<label>'.$L->get('About').'</label>';
$html .= '<textarea name="text" id="jstext">'.$this->getValue('text').'</textarea>';
$html .= '</div>';

View File

@ -17,22 +17,22 @@ class pluginAPI extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('API Token').'</label>';
$html .= '<label>'.$L->get('API Token').'</label>';
$html .= '<input name="token" type="text" value="'.$this->getValue('token').'">';
$html .= '<span class="tip">'.$language->get('This token is for read only and is regenerated every time you install the plugin').'</span>';
$html .= '<span class="tip">'.$L->get('This token is for read only and is regenerated every time you install the plugin').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Amount of pages').'</label>';
$html .= '<label>'.$L->get('Amount of pages').'</label>';
$html .= '<input id="jsamountOfItems" name="amountOfItems" type="text" value="'.$this->getValue('amountOfItems').'">';
$html .= '<span class="tip">'.$language->get('This is the maximum of pages to return when you call to').'</span>';
$html .= '<span class="tip">'.$L->get('This is the maximum of pages to return when you call to').'</span>';
$html .= '</div>';
return $html;

View File

@ -64,19 +64,19 @@ class pluginBackup extends Plugin {
public function form()
{
global $language;
global $L;
$backups = $this->backupList();
$html = '';
if (empty($backups)) {
$html .= '<div class="alert alert-primary" role="alert">';
$html .= $language->get('There are no backups for the moment');
$html .= $L->get('There are no backups for the moment');
$html .= '</div>';
}
$html .= '<div>';
$html .= '<button name="createBackup" value="true" class="btn btn-primary" type="submit"><span class="oi oi-play-circle"></span> '.$language->get('create-backup').'</button>';
$html .= '<button name="createBackup" value="true" class="btn btn-primary" type="submit"><span class="oi oi-play-circle"></span> '.$L->get('create-backup').'</button>';
$html .= '</div>';
$html .= '<hr>';
@ -88,10 +88,10 @@ class pluginBackup extends Plugin {
$html .= '<h4 class="font-weight-normal">'.Date::format($filename, BACKUP_DATE_FORMAT, 'F j, Y, g:i a').'</h4>';
// Allow download if a zip file
if ($this->zip) {
$html .= '<a class="btn btn-secondary mr-3" href="'.DOMAIN_CONTENT.'backup/'.$filename.'.zip"><span class="oi oi-data-transfer-download"></span> '.$language->get('download').'</a>';
$html .= '<a class="btn btn-secondary mr-3" href="'.DOMAIN_CONTENT.'backup/'.$filename.'.zip"><span class="oi oi-data-transfer-download"></span> '.$L->get('download').'</a>';
}
$html .= '<button name="restoreBackup" value="'.$filename.'" class="btn btn-secondary mr-3" type="submit"><span class="oi oi-timer"></span> '.$language->get('restore-backup').'</button>';
$html .= '<button name="deleteBackup" value="'.$filename.'" class="btn btn-secondary mr-3" type="submit"><span class="oi oi-delete"></span> '.$language->get('delete-backup').'</button>';
$html .= '<button name="restoreBackup" value="'.$filename.'" class="btn btn-secondary mr-3" type="submit"><span class="oi oi-timer"></span> '.$L->get('restore-backup').'</button>';
$html .= '<button name="deleteBackup" value="'.$filename.'" class="btn btn-secondary mr-3" type="submit"><span class="oi oi-delete"></span> '.$L->get('delete-backup').'</button>';
$html .= '</div>';
$html .= '<hr>';
}

View File

@ -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 = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Label').'</label>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Hide Categories without content').'</label>';
$html .= '<label>'.$L->get('Hide Categories without content').'</label>';
$html .= '<select name="hideCero">';
$html .= '<option value="true" '.($this->getValue('hideCero')===true?'selected':'').'>'.$language->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('hideCero')===false?'selected':'').'>'.$language->get('Disabled').'</option>';
$html .= '<option value="true" '.($this->getValue('hideCero')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('hideCero')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
$html .= '</select>';
$html .= '</div>';
@ -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

View File

@ -13,29 +13,29 @@ class pluginDisqus extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('disqus-shortname').'</label>';
$html .= '<label>'.$L->get('disqus-shortname').'</label>';
$html .= '<input name="shortname" id="jsshortname" type="text" value="'.$this->getValue('shortname').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('enable-disqus-on-pages').'</label>';
$html .= '<label>'.$L->get('enable-disqus-on-pages').'</label>';
$html .= '<select name="enablePages">';
$html .= '<option value="true" '.($this->getValue('enablePages')===true?'selected':'').'>'.$language->get('enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('enablePages')===false?'selected':'').'>'.$language->get('disabled').'</option>';
$html .= '<option value="true" '.($this->getValue('enablePages')===true?'selected':'').'>'.$L->get('enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('enablePages')===false?'selected':'').'>'.$L->get('disabled').'</option>';
$html .= '</select>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('enable-disqus-on-posts').'</label>';
$html .= '<label>'.$L->get('enable-disqus-on-posts').'</label>';
$html .= '<select name="enablePosts">';
$html .= '<option value="true" '.($this->getValue('enablePosts')===true?'selected':'').'>'.$language->get('enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('enablePosts')===false?'selected':'').'>'.$language->get('disabled').'</option>';
$html .= '<option value="true" '.($this->getValue('enablePosts')===true?'selected':'').'>'.$L->get('enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('enablePosts')===false?'selected':'').'>'.$L->get('disabled').'</option>';
$html .= '</select>';
$html .= '</div>';

View File

@ -13,7 +13,7 @@ class pluginHTMLCode extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
@ -22,19 +22,19 @@ class pluginHTMLCode extends Plugin {
$html .= '<div>';
$html .= '<label>Site Head</label>';
$html .= '<textarea name="head" id="jshead">'.$this->getValue('head').'</textarea>';
$html .= '<span class="tip">'.$language->get('insert-code-in-the-theme-inside-the-tag-head').'</span>';
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-inside-the-tag-head').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>Site Header</label>';
$html .= '<textarea name="header" id="jsheader">'.$this->getValue('header').'</textarea>';
$html .= '<span class="tip">'.$language->get('insert-code-in-the-theme-at-the-top').'</span>';
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-top').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>Site Footer</label>';
$html .= '<textarea name="footer" id="jsfooter">'.$this->getValue('footer').'</textarea>';
$html .= '<span class="tip">'.$language->get('insert-code-in-the-theme-at-the-bottom').'</span>';
$html .= '<span class="tip">'.$L->get('insert-code-in-the-theme-at-the-bottom').'</span>';
$html .= '</div>';
return $html;

View File

@ -62,54 +62,54 @@ class pluginLinks extends Plugin {
// Method called on plugin settings on the admin area
public function form()
{
global $language;
global $L;
$html = '<div>';
$html .= '<label>'.$language->get('Label').'</label>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<button name="save" class="btn btn-primary" type="submit">'.$language->get('Save').'</button>';
$html .= '<button name="save" class="btn btn-primary" type="submit">'.$L->get('Save').'</button>';
$html .= '</div>';
// New link, when the user click on save button this call the method post()
// and the new link is added to the database
$html .= '<legend>'.$language->get('Add a new link').'</legend>';
$html .= '<legend>'.$L->get('Add a new link').'</legend>';
$html .= '<div>';
$html .= '<label>'.$language->get('Name').'</label>';
$html .= '<label>'.$L->get('Name').'</label>';
$html .= '<input name="linkName" type="text" value="">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Url').'</label>';
$html .= '<label>'.$L->get('Url').'</label>';
$html .= '<input name="linkURL" type="text" value="">';
$html .= '</div>';
$html .= '<div>';
$html .= '<button name="addLink" class="blue" type="submit">'.$language->get('Add').'</button>';
$html .= '<button name="addLink" class="blue" type="submit">'.$L->get('Add').'</button>';
$html .= '</div>';
$html .= '<legend>'.$language->get('Links').'</legend>';
$html .= '<legend>'.$L->get('Links').'</legend>';
// Get the JSON DB, getValue() with the option unsanitized HTML code
$jsondb = $this->getValue('jsondb', $unsanitized=false);
$links = json_decode($jsondb, true);
foreach($links as $name=>$url) {
$html .= '<div>';
$html .= '<label>'.$language->get('Name').'</label>';
$html .= '<label>'.$L->get('Name').'</label>';
$html .= '<input type="text" value="'.$name.'" disabled>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Url').'</label>';
$html .= '<label>'.$L->get('Url').'</label>';
$html .= '<input type="text" value="'.$url.'" disabled>';
$html .= '</div>';
$html .= '<div>';
$html .= '<button name="deleteLink" type="submit" value="'.$name.'">'.$language->get('Delete').'</button>';
$html .= '<button name="deleteLink" type="submit" value="'.$name.'">'.$L->get('Delete').'</button>';
$html .= '</div>';
$html .= '</br>';
@ -121,7 +121,7 @@ class pluginLinks extends Plugin {
// Method called on the sidebar of the website
public function siteSidebar()
{
global $language;
global $L;
// HTML for sidebar
$html = '<div class="plugin plugin-pages">';

View File

@ -12,14 +12,14 @@ class pluginMaintenanceMode extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Enable maintenance mode').'</label>';
$html .= '<label>'.$L->get('Enable maintenance mode').'</label>';
$html .= '<select name="enable">';
$html .= '<option value="true" '.($this->getValue('enable')===true?'selected':'').'>Enabled</option>';
$html .= '<option value="false" '.($this->getValue('enable')===false?'selected':'').'>Disabled</option>';
@ -27,7 +27,7 @@ class pluginMaintenanceMode extends Plugin {
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Message').'</label>';
$html .= '<label>'.$L->get('Message').'</label>';
$html .= '<input name="message" id="jsmessage" type="text" value="'.$this->getValue('message').'">';
$html .= '</div>';

View File

@ -15,30 +15,30 @@ class pluginNavigation extends Plugin {
// Method called on the settings of the plugin on the admin area
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Label').'</label>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Home link').'</label>';
$html .= '<label>'.$L->get('Home link').'</label>';
$html .= '<select name="homeLink">';
$html .= '<option value="true" '.($this->getValue('homeLink')===true?'selected':'').'>'.$language->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('homeLink')===false?'selected':'').'>'.$language->get('Disabled').'</option>';
$html .= '<option value="true" '.($this->getValue('homeLink')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('homeLink')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
$html .= '</select>';
$html .= '<span class="tip">'.$language->get('Show the home link on the sidebar').'</span>';
$html .= '<span class="tip">'.$L->get('Show the home link on the sidebar').'</span>';
$html .= '</div>';
if (ORDER_BY=='date') {
$html .= '<div>';
$html .= '<label>'.$language->get('Amount of items').'</label>';
$html .= '<label>'.$L->get('Amount of items').'</label>';
$html .= '<input id="jsamountOfItems" name="amountOfItems" type="text" value="'.$this->getValue('amountOfItems').'">';
$html .= '</div>';
}
@ -49,7 +49,7 @@ class pluginNavigation extends Plugin {
// Method called on the sidebar of the website
public function siteSidebar()
{
global $language;
global $L;
global $url;
global $site;
global $pages;
@ -69,7 +69,7 @@ class pluginNavigation extends Plugin {
// Show Home page link
if ($this->getValue('homeLink')) {
$html .= '<li>';
$html .= '<a href="' . $site->url() . '">' . $language->get('Home page') . '</a>';
$html .= '<a href="' . $site->url() . '">' . $L->get('Home page') . '</a>';
$html .= '</li>';
}

View File

@ -12,14 +12,14 @@ class pluginOpenGraph extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Default image').'</label>';
$html .= '<label>'.$L->get('Default image').'</label>';
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'" placeholder="https://">';
$html .= '<span class="tip">Set a default image for the content without pictures.</span>';
$html .= '</div>';

View File

@ -13,21 +13,21 @@ class pluginRSS extends Plugin {
// Method called on the settings of the plugin on the admin area
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('RSS URL').'</label>';
$html .= '<label>'.$L->get('RSS URL').'</label>';
$html .= '<a href="'.Theme::rssUrl().'">'.Theme::rssUrl().'</a>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Amount of items').'</label>';
$html .= '<label>'.$L->get('Amount of items').'</label>';
$html .= '<input id="jsamountOfItems" name="amountOfItems" type="text" value="'.$this->getValue('amountOfItems').'">';
$html .= '<span class="tip">'.$language->get('Amount of items to show on the feed').'</span>';
$html .= '<span class="tip">'.$L->get('Amount of items to show on the feed').'</span>';
$html .= '</div>';
return $html;

View File

@ -20,24 +20,24 @@ class pluginSimpleStats extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Label').'</label>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
if (defined('BLUDIT_PRO')) {
$html .= '<div>';
$html .= '<label>'.$language->get('Exclude administrators users').'</label>';
$html .= '<label>'.$L->get('Exclude administrators users').'</label>';
$html .= '<select name="excludeAdmins">';
$html .= '<option value="true" '.($this->getValue('excludeAdmins')===true?'selected':'').'>'.$language->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('excludeAdmins')===false?'selected':'').'>'.$language->get('Disabled').'</option>';
$html .= '<option value="true" '.($this->getValue('excludeAdmins')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('excludeAdmins')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
$html .= '</select>';
$html .= '</div>';
}

View File

@ -18,23 +18,23 @@ class pluginsimpleMDE extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div>';
$html .= '<label>'.$language->get('toolbar').'</label>';
$html .= '<label>'.$L->get('toolbar').'</label>';
$html .= '<input name="toolbar" id="jstoolbar" type="text" value="'.$this->getValue('toolbar').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('tab-size').'</label>';
$html .= '<label>'.$L->get('tab-size').'</label>';
$html .= '<input name="tabSize" id="jstabSize" type="text" value="'.$this->getValue('tabSize').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('spell-checker').'</label>';
$html .= '<label>'.$L->get('spell-checker').'</label>';
$html .= '<select name="spellChecker">';
$html .= '<option value="true" '.($this->getValue('spellChecker')===true?'selected':'').'>'.$language->get('enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('spellChecker')===false?'selected':'').'>'.$language->get('disabled').'</option>';
$html .= '<option value="true" '.($this->getValue('spellChecker')===true?'selected':'').'>'.$L->get('enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('spellChecker')===false?'selected':'').'>'.$L->get('disabled').'</option>';
$html .= '</select>';
$html .= '</div>';
@ -55,7 +55,7 @@ class pluginsimpleMDE extends Plugin {
public function adminBodyEnd()
{
global $language;
global $L;
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
return false;
@ -85,7 +85,7 @@ class pluginsimpleMDE extends Plugin {
// Function required for Media Manager
// Insert an image on the editor in the cursor position
$html .= 'function editorInsertMedia(filename) {
addContentSimpleMDE("!['.$language->get('Image description').']("+filename+")");
addContentSimpleMDE("!['.$L->get('Image description').']("+filename+")");
}'.PHP_EOL;
$html .= '$(document).ready(function() { '.PHP_EOL;
@ -96,7 +96,7 @@ class pluginsimpleMDE extends Plugin {
toolbarTips: true,
toolbarGuideIcon: true,
autofocus: false,
placeholder: "'.$language->get('content-here-supports-markdown-and-html-code').'",
placeholder: "'.$L->get('content-here-supports-markdown-and-html-code').'",
lineWrapping: true,
autoDownloadFontAwesome: false,
indentWithTabs: true,
@ -112,7 +112,7 @@ class pluginsimpleMDE extends Plugin {
cm.replaceSelection(output);
},
className: "oi oi-crop",
title: "'.$language->get('Pagebreak').'",
title: "'.$L->get('Pagebreak').'",
}]
});';
$html .= '}); </script>';

View File

@ -10,10 +10,10 @@ class pluginSitemap extends Plugin {
// Method called on the settings of the plugin on the admin area
public function form()
{
global $language;
global $L;
$html = '<div>';
$html .= '<label>'.$language->get('Sitemap URL').'</label>';
$html .= '<label>'.$L->get('Sitemap URL').'</label>';
$html .= '<a href="'.Theme::sitemapUrl().'">'.Theme::sitemapUrl().'</a>';
$html .= '</div>';

View File

@ -14,25 +14,25 @@ class pluginStaticPages extends Plugin {
// Method called on the settings of the plugin on the admin area
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Label').'</label>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Home link').'</label>';
$html .= '<label>'.$L->get('Home link').'</label>';
$html .= '<select name="homeLink">';
$html .= '<option value="true" '.($this->getValue('homeLink')===true?'selected':'').'>'.$language->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('homeLink')===false?'selected':'').'>'.$language->get('Disabled').'</option>';
$html .= '<option value="true" '.($this->getValue('homeLink')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('homeLink')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
$html .= '</select>';
$html .= '<span class="tip">'.$language->get('show-the-home-link-on-the-sidebar').'</span>';
$html .= '<span class="tip">'.$L->get('show-the-home-link-on-the-sidebar').'</span>';
$html .= '</div>';
return $html;
@ -41,7 +41,7 @@ class pluginStaticPages extends Plugin {
// Method called on the sidebar of the website
public function siteSidebar()
{
global $language;
global $L;
global $url;
global $site;
global $pages;
@ -61,7 +61,7 @@ class pluginStaticPages extends Plugin {
// Show Home page link
if ($this->getValue('homeLink')) {
$html .= '<li>';
$html .= '<a href="' . $site->url() . '">' . $language->get('Home page') . '</a>';
$html .= '<a href="' . $site->url() . '">' . $L->get('Home page') . '</a>';
$html .= '</li>';
}

View File

@ -11,16 +11,16 @@ class pluginTags extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Label').'</label>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
return $html;
@ -28,7 +28,7 @@ class pluginTags extends Plugin {
public function siteSidebar()
{
global $language;
global $L;
global $tags;
global $url;

View File

@ -18,20 +18,20 @@ class pluginTinymce extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div>';
$html .= '<label>'.$language->get('Toolbar top').'</label>';
$html .= '<label>'.$L->get('Toolbar top').'</label>';
$html .= '<input name="toolbar1" id="jstoolbar1" type="text" value="'.$this->getValue('toolbar1').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Toolbar bottom').'</label>';
$html .= '<label>'.$L->get('Toolbar bottom').'</label>';
$html .= '<input name="toolbar2" id="jstoolbar2" type="text" value="'.$this->getValue('toolbar2').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Plugins').'</label>';
$html .= '<label>'.$L->get('Plugins').'</label>';
$html .= '<input name="plugins" id="jsplugins" type="text" value="'.$this->getValue('plugins').'">';
$html .= '</div>';
@ -53,17 +53,17 @@ class pluginTinymce extends Plugin {
return false;
}
global $language;
global $L;
$toolbar1 = $this->getValue('toolbar1');
$toolbar2 = $this->getValue('toolbar2');
$plugins = $this->getValue('plugins');
$lang = 'en';
if (file_exists($this->phpPath().'tinymce'.DS.'langs'.DS.$language->currentLanguage().'.js')) {
$lang = $language->currentLanguage();
} elseif (file_exists($this->phpPath().'tinymce'.DS.'langs'.DS.$language->currentLanguageShortVersion().'.js')) {
$lang = $language->currentLanguageShortVersion();
if (file_exists($this->phpPath().'tinymce'.DS.'langs'.DS.$L->currentLanguage().'.js')) {
$lang = $L->currentLanguage();
} elseif (file_exists($this->phpPath().'tinymce'.DS.'langs'.DS.$L->currentLanguageShortVersion().'.js')) {
$lang = $L->currentLanguageShortVersion();
}
$script = <<<EOF

File diff suppressed because one or more lines are too long

View File

@ -12,14 +12,14 @@ class pluginTwitterCards extends Plugin {
public function form()
{
global $language;
global $L;
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$language->get('Default image').'</label>';
$html .= '<label>'.$L->get('Default image').'</label>';
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'" placeholder="https://">';
$html .= '</div>';

View File

@ -104,7 +104,7 @@ class pluginUpdater extends Plugin {
public function form()
{
global $language;
global $L;
return '<div class="alert alert-success">This plugin is not yet complete</div>';
@ -113,7 +113,7 @@ class pluginUpdater extends Plugin {
}
$html = '<div>';
$html .= '<button name="updateNow" value="true" class="btn btn-primary" type="submit">'.$language->get('Update Now').'</button>';
$html .= '<button name="updateNow" value="true" class="btn btn-primary" type="submit">'.$L->get('Update Now').'</button>';
$html .= '</div>';
return $html;

View File

@ -4,9 +4,9 @@ class pluginVersion extends Plugin {
public function adminSidebar()
{
global $language;
global $L;
$html = '<a id="current-version" class="nav-link" href="'.HTML_PATH_ADMIN_ROOT.'about'.'">Version '.(defined('BLUDIT_PRO')?'<span class="oi oi-heart" style="color: #ffc107"></span>':'').'<span class="badge badge-warning badge-pill">'.BLUDIT_VERSION.'</span></a>';
$html .= '<a id="new-version" style="display: none;" target="_blank" href="https://www.bludit.com">'.$language->get('New version available').' <span class="oi oi-bell" style="color: red"></span></a>';
$html .= '<a id="new-version" style="display: none;" target="_blank" href="https://www.bludit.com">'.$L->get('New version available').' <span class="oi oi-bell" style="color: red"></span></a>';
return $html;
}

View File

@ -33,7 +33,7 @@
<!-- Shows "read more" button if necessary -->
<?php if ($page->readMore()): ?>
<div class="text-right pt-3">
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $language->get('Read more'); ?></a>
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $L->get('Read more'); ?></a>
</div>
<?php endif ?>
@ -52,7 +52,7 @@
<!-- Previous button -->
<li class="page-item mr-2 <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">&#9664; <?php echo $language->get('Previous'); ?></a>
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">&#9664; <?php echo $L->get('Previous'); ?></a>
</li>
<!-- Home button -->
@ -64,7 +64,7 @@
<!-- Next button -->
<li class="page-item ml-2 <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $language->get('Next'); ?> &#9658;</a>
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> &#9658;</a>
</li>
</ul>

View File

@ -18,14 +18,14 @@
</a>
<!-- Creation date -->
<h6 class="card-subtitle mb-3 text-muted"><?php echo $page->date(); ?> - <?php echo $language->get('Reading time') . ': ' . $page->readingTime(); ?></h6>
<h6 class="card-subtitle mb-3 text-muted"><?php echo $page->date(); ?> - <?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?></h6>
<!-- Breaked content -->
<?php echo $page->contentBreak(); ?>
<!-- "Read more" button -->
<?php if ($page->readMore()): ?>
<a href="<?php echo $page->permalink(); ?>"><?php echo $language->get('Read more'); ?></a>
<a href="<?php echo $page->permalink(); ?>"><?php echo $L->get('Read more'); ?></a>
<?php endif ?>
</div>
@ -46,7 +46,7 @@
<!-- Previous button -->
<li class="page-item mr-2 <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">&#9664; <?php echo $language->get('Previous'); ?></a>
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">&#9664; <?php echo $L->get('Previous'); ?></a>
</li>
<!-- Home button -->
@ -56,7 +56,7 @@
<!-- Next button -->
<li class="page-item ml-2 <?php if (!Paginator::showNext()) echo 'disabled' ?>">
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $language->get('Next'); ?> &#9658;</a>
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> &#9658;</a>
</li>
</ul>

View File

@ -17,7 +17,7 @@
<?php if (!$page->isStatic() && !$url->notFound()): ?>
<!-- Creation date -->
<h6 class="card-subtitle mb-3 text-muted"><?php echo $page->date(); ?> - <?php echo $language->get('Reading time') . ': ' . $page->readingTime() ?></h6>
<h6 class="card-subtitle mb-3 text-muted"><?php echo $page->date(); ?> - <?php echo $L->get('Reading time') . ': ' . $page->readingTime() ?></h6>
<?php endif ?>
<!-- Full content -->

View File

@ -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') {
<!DOCTYPE html>
<html>
<head>
<title><?php echo $language->get('Bludit Installer') ?></title>
<title><?php echo $L->get('Bludit Installer') ?></title>
<meta charset="<?php echo CHARSET ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex,nofollow">
@ -576,7 +576,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
<div class="container">
<div class="row justify-content-md-center pt-5">
<div class="col-md-4 pt-5">
<h1 class="text-center mb-5 mt-5 font-weight-normal text-uppercase" style="color: #555;"><?php echo $language->get('Bludit Installer') ?></h1>
<h1 class="text-center mb-5 mt-5 font-weight-normal text-uppercase" style="color: #555;"><?php echo $L->get('Bludit Installer') ?></h1>
<?php
$system = checkSystem();
if (!empty($system)) {
@ -591,7 +591,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
elseif (isset($_GET['language']))
{
?>
<p><?php echo $language->get('Choose a password for the username admin') ?></p>
<p><?php echo $L->get('Choose a password for the username admin') ?></p>
<form id="jsformInstaller" method="post" action="" autocomplete="off">
<input type="hidden" name="timezone" id="jstimezone" value="UTC">
@ -601,12 +601,12 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
</div>
<div class="form-group mb-0">
<input type="password" class="form-control form-control-lg" id="jspassword" name="password" placeholder="<?php $language->p('Password') ?>">
<input type="password" class="form-control form-control-lg" id="jspassword" name="password" placeholder="<?php $L->p('Password') ?>">
</div>
<div id="jsshowPassword" style="cursor: pointer;" class="text-center pt-0 text-muted"><?php $language->p('Show password') ?></div>
<div id="jsshowPassword" style="cursor: pointer;" class="text-center pt-0 text-muted"><?php $L->p('Show password') ?></div>
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2 w-100" name="install"><?php $language->p('Install') ?></button>
<button type="submit" class="btn btn-primary mr-2 w-100" name="install"><?php $L->p('Install') ?></button>
</div>
</form>
<?php
@ -615,7 +615,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
{
?>
<form id="jsformLanguage" method="get" action="" autocomplete="off">
<label for="jslanguage"><?php echo $language->get('Choose your language') ?></label>
<label for="jslanguage"><?php echo $L->get('Choose your language') ?></label>
<select id="jslanguage" name="language" class="form-control form-control-lg">
<?php
$htmlOptions = getLanguageList();
@ -626,7 +626,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
</select>
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2 w-100"><?php $language->p('Next') ?></button>
<button type="submit" class="btn btn-primary mr-2 w-100"><?php $L->p('Next') ?></button>
</div>
</form>
<?php