Merge branch 'master' into master

This commit is contained in:
Dave 2018-12-03 21:31:15 +01:00 committed by GitHub
commit 2d90b91027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
146 changed files with 2167 additions and 1448 deletions

5
.gitignore vendored
View File

@ -14,3 +14,8 @@ bl-themes/editorial
bl-themes/mediumish bl-themes/mediumish
bl-themes/clean-blog bl-themes/clean-blog
bl-themes/grayscale bl-themes/grayscale
bl-themes/massively
bl-themes/hyperspace
bl-themes/striped
bl-themes/log
bl-themes/micro

View File

@ -5,6 +5,8 @@
// ============================================================================ // ============================================================================
function updateBludit() { function updateBludit() {
global $site; global $site;
global $syslog;
// New installation // New installation
if ($site->currentBuild()==0) { if ($site->currentBuild()==0) {
$site->set(array('currentBuild'=>BLUDIT_BUILD)); $site->set(array('currentBuild'=>BLUDIT_BUILD));
@ -36,6 +38,12 @@ function updateBludit() {
// Set the current build number // Set the current build number
$site->set(array('currentBuild'=>BLUDIT_BUILD)); $site->set(array('currentBuild'=>BLUDIT_BUILD));
Log::set('UPDATE SYSTEM - Finished.'); Log::set('UPDATE SYSTEM - Finished.');
// Add to syslog
$syslog->add(array(
'dictionaryKey'=>'system-updated',
'notes'=>'Bludit v'.BLUDIT_VERSION
));
} }
} }

View File

@ -19,20 +19,24 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
unset($_POST['role']); unset($_POST['role']);
} }
if (isset($_POST['deleteUserAndDeleteContent'])) { if (isset($_POST['deleteUserAndDeleteContent']) && ($login->role()==='admin')) {
$_POST['deleteContent'] = true; $_POST['deleteContent'] = true;
deleteUser($_POST); deleteUser($_POST);
} elseif (isset($_POST['deleteUserAndKeepContent'])) { } elseif (isset($_POST['deleteUserAndKeepContent']) && ($login->role()==='admin')) {
$_POST['deleteContent'] = false; $_POST['deleteContent'] = false;
deleteUser($_POST); deleteUser($_POST);
} elseif (isset($_POST['disableUser'])) { } elseif (isset($_POST['disableUser']) && ($login->role()==='admin')) {
disableUser(array('username'=>$_POST['username'])); disableUser(array('username'=>$_POST['username']));
} else { } else {
editUser($_POST); editUser($_POST);
} }
Alert::set($L->g('The changes have been saved')); Alert::set($L->g('The changes have been saved'));
if ($login->role()==='admin') {
Redirect::page('users'); Redirect::page('users');
}
Redirect::page('edit-user/'.$login->username());
} }
// ============================================================================ // ============================================================================

View File

@ -21,20 +21,10 @@ checkRole(array('admin'));
// ============================================================================ // ============================================================================
// Main after POST // Main after POST
// ============================================================================ // ============================================================================
$themeDirname = $layout['parameters']; $themeDirectory = $layout['parameters'];
if (Sanitize::pathFile(PATH_THEMES.$themeDirname)) { // Activate theme
$site->set(array('theme'=>$themeDirname)); activateTheme($themeDirectory);
// Add to syslog
$syslog->add(array(
'dictionaryKey'=>'new-theme-configured',
'notes'=>$themeDirname
));
// Create an alert
Alert::set( $L->g('The changes have been saved') );
}
// Redirect // Redirect
Redirect::page('themes'); Redirect::page('themes');

View File

@ -19,7 +19,7 @@ checkRole(array('admin'));
// ============================================================================ // ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (createCategory($_POST['category'])) { if (createCategory($_POST)) {
Redirect::page('categories'); Redirect::page('categories');
} }
} }

View File

@ -20,8 +20,11 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
'newPassword'=>$_POST['newPassword'], 'newPassword'=>$_POST['newPassword'],
'confirmPassword'=>$_POST['confirmPassword'] 'confirmPassword'=>$_POST['confirmPassword']
))) { ))) {
if ($login->role()==='admin') {
Redirect::page('users'); Redirect::page('users');
} }
Redirect::page('edit-user/'.$login->username());
}
} }
// ============================================================================ // ============================================================================

View File

@ -81,9 +81,22 @@ code {
cursor: pointer; cursor: pointer;
} }
.modal-body {
padding: 2rem;
}
.modal-footer {
background-color: rgb(247, 247, 247);
}
.modal-dialog .btn-link {
color: #000;
}
/* /*
LOGIN LOGIN
*/ */
body.login { body.login {
background: rgb(255,255,255); background: rgb(255,255,255);
background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 53%); background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 53%);
@ -140,7 +153,6 @@ body.login {
/* Create a dashed line with a pattern */ /* Create a dashed line with a pattern */
} }
/* This selector overrides the points style on line charts. Points on line charts are actually just very short strokes. This allows you to customize even the point size in CSS */
.ct-series-a .ct-point { .ct-series-a .ct-point {
/* Colour of your points */ /* Colour of your points */
stroke: #4a90e2; stroke: #4a90e2;
@ -151,6 +163,7 @@ body.login {
/* /*
ALERT ALERT
*/ */
#alert { #alert {
display: none; display: none;
position: fixed; position: fixed;
@ -165,17 +178,20 @@ body.login {
.alert-success { .alert-success {
background-color: #4586d4; background-color: #4586d4;
border-left: 6px solid #abd1ff !important;
color: #ffffff; color: #ffffff;
} }
.alert-danger { .alert-danger {
background-color: #d44545; background-color: #d44545;
border-left: 6px solid #ff9c9c !important;
color: #ffffff; color: #ffffff;
} }
/* /*
SIDEBAR SIDEBAR
*/ */
div.sidebar .nav-item a { div.sidebar .nav-item a {
padding-left:0; padding-left:0;
padding-right:0; padding-right:0;
@ -204,6 +220,7 @@ div.sidebar .nav-item span.oi {
/* /*
PLUGINS PLUGINS
*/ */
.plugin-form label { .plugin-form label {
display: block; display: block;
margin-top: 1rem !important; margin-top: 1rem !important;
@ -256,3 +273,70 @@ td.child {
line-height: 1.5em; line-height: 1.5em;
} }
#jseditorSidebar {
display: none;
height: calc(100% - 45px);
width: 50%;
max-width: 350px;
position: absolute;
z-index: 50;
top: 45px;
right: 15px;
background-color: #fff;
overflow-x: hidden;
transition: 0.5s;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-top: 1px solid #ccc;
}
@media (max-width: 575.98px) {
#jseditorSidebar {
width: 100%;
max-width: 100%;
right: 0;
}
#jseditorToolbarRight button {
font-size: 0px !important;
}
#jseditorToolbarRight button span {
font-size: 16px !important;
}
}
#jseditorSidebar nav {
background: #f3f3f3;
}
#jseditorSidebar nav a {
color: #000;
}
#jseditorSidebar .nav-tabs .nav-link {
border: none;
}
#jseditorSidebar .nav-link.active {
background: none;
border: none;
border-bottom: 3px solid #ccc;
}
#jsshadow {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(255,255,255,0.7);
z-index: 10;
display: none;
}
img.profilePicture {
width: 30px;
border-radius: 30px;
border: 1px solid #ccc;
}

View File

@ -17,10 +17,13 @@
</li> </li>
<?php if (checkRole(array('editor'),false)): ?> <?php if (checkRole(array('editor'),false)): ?>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="oi oi-layers"></span><?php $L->p('Content') ?></a> <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="oi oi-layers"></span><?php $L->p('Content') ?></a>
</li> </li>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$login->username() ?>"><span class="oi oi-person"></span><?php $L->p('Profile') ?></a>
</li>
<?php endif; ?> <?php endif; ?>
<?php if (checkRole(array('admin'),false)): ?> <?php if (checkRole(array('admin'),false)): ?>

View File

@ -51,6 +51,9 @@
echo '</script>'.PHP_EOL; echo '</script>'.PHP_EOL;
?> ?>
<!-- Overlay background -->
<div id="jsshadow"></div>
<!-- Alert --> <!-- Alert -->
<?php include('html/alert.php'); ?> <?php include('html/alert.php'); ?>

View File

@ -24,8 +24,8 @@ return <<<EOF
<p>$modalText</p> <p>$modalText</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="$buttonSecondaryClass btn btn-secondary" data-dismiss="modal">$buttonSecondary</button> <button type="button" class="btn $buttonSecondaryClass" data-dismiss="modal">$buttonSecondary</button>
<button type="button" class="$buttonPrimaryClass btn btn-primary">$buttonPrimary</button> <button type="button" class="btn $buttonPrimaryClass">$buttonPrimary</button>
</div> </div>
</div> </div>
</div> </div>
@ -96,37 +96,49 @@ EOF;
{ {
$title = $args['title']; $title = $args['title'];
return <<<EOF return <<<EOF
<h4 class="mt-4 mb-3 font-weight-normal">$title</h4> <h6 class="mt-4 mb-2 pb-2 border-bottom text-uppercase">$title</h6>
EOF; EOF;
} }
public static function formInputTextBlock($args) public static function formInputTextBlock($args)
{ {
$id = 'js'.$args['name']; $name = $args['name'];
$disabled = empty($args['disabled'])?'':'disabled';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$value = isset($args['value'])?$args['value']:'';
$id = 'js'.$name;
if (isset($args['id'])) { if (isset($args['id'])) {
$id = $args['id']; $id = $args['id'];
} }
$tip = '';
if (isset($args['tip'])) {
$tip = '<small class="form-text text-muted">'.$args['tip'].'</small>';
}
$label = '';
if (isset($args['label'])) {
$label = '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100" for="'.$id.'">'.$args['label'].'</label>';
}
$class = 'form-control'; $class = 'form-control';
if (isset($args['class'])) { if (isset($args['class'])) {
$class = $class.' '.$args['class']; $class = $class.' '.$args['class'];
} }
$html = '<div class="form-group">'; $type = 'text';
if (isset($args['type'])) {
if (isset($args['label'])) { $type = $args['type'];
$html .= '<label for="'.$id.'">'.$args['label'].'</label>';
} }
$html .= '<input type="text" value="'.$args['value'].'" class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" placeholder="'.$args['placeholder'].'">'; return <<<EOF
<div class="form-group m-0">
if (isset($args['tip'])) { $label
$html .= '<small class="form-text text-muted">'.$args['tip'].'</small>'; <input type="text" value="$value" class="$class" id="$id" name="$name" placeholder="$placeholder" $disabled>
} $tip
</div>
$html .= '</div>'; EOF;
return $html;
} }
public static function formInputFile($args) public static function formInputFile($args)
@ -168,7 +180,7 @@ EOF;
} }
$html .= '<div class="col-sm-10">'; $html .= '<div class="col-sm-10">';
$html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'"></textarea>'; $html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'">'.$args['value'].'</textarea>';
if (isset($args['tip'])) { if (isset($args['tip'])) {
$html .= '<small class="form-text text-muted">'.$args['tip'].'</small>'; $html .= '<small class="form-text text-muted">'.$args['tip'].'</small>';
} }
@ -190,9 +202,9 @@ EOF;
$class = $class.' '.$args['class']; $class = $class.' '.$args['class'];
} }
$html = '<div class="form-group">'; $html = '<div class="form-group m-0">';
if (!empty($args['label'])) { if (!empty($args['label'])) {
$html .= '<label for="'.$id.'">'.$args['label'].'</label>'; $html .= '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100" for="'.$id.'">'.$args['label'].'</label>';
} }
$html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'">'.$args['value'].'</textarea>'; $html .= '<textarea class="'.$class.'" id="'.$id.'" name="'.$args['name'].'" rows="'.$args['rows'].'" placeholder="'.$args['placeholder'].'">'.$args['value'].'</textarea>';
@ -204,45 +216,27 @@ EOF;
return $html; return $html;
} }
public static function formInputGroupText($args)
{
$label = $args['label'];
$labelInside = $args['labelInside'];
$tip = $args['tip'];
$value = $args['value'];
$name = $args['name'];
$id = 'js'.$name;
if (isset($args['id'])) {
$id = $args['id'];
}
$disabled = isset($args['disabled'])?'disabled':'';
return <<<EOF
<div class="form-group">
<label for="$id">$label</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="$id">$labelInside</span>
</div>
<input id="$id" name="$name" value="$value" type="text" class="form-control" $disabled>
</div>
<small class="form-text text-muted">$tip</small>
</div>
EOF;
}
public static function formInputText($args) public static function formInputText($args)
{ {
$label = isset($args['label'])?$args['label']:'';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$tip = isset($args['tip'])?$args['tip']:'&nbsp;';
$value = isset($args['value'])?$args['value']:'';
$name = $args['name']; $name = $args['name'];
$disabled = empty($args['disabled'])?'':'disabled';
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$value = isset($args['value'])?$args['value']:'';
$id = 'js'.$name; $id = 'js'.$name;
if (isset($args['id'])) { if (isset($args['id'])) {
$id = $args['id']; $id = $args['id'];
} }
$disabled = empty($args['disabled'])?'':'disabled';
$tip = '';
if (isset($args['tip'])) {
$tip = '<small class="form-text text-muted">'.$args['tip'].'</small>';
}
$label = '';
if (isset($args['label'])) {
$label = '<label for="'.$id.'" class="col-sm-2 col-form-label">'.$args['label'].'</label>';
}
$class = 'form-control'; $class = 'form-control';
if (isset($args['class'])) { if (isset($args['class'])) {
@ -256,10 +250,10 @@ EOF;
return <<<EOF return <<<EOF
<div class="form-group row"> <div class="form-group row">
<label for="$id" class="col-sm-2 col-form-label">$label</label> $label
<div class="col-sm-10"> <div class="col-sm-10">
<input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" $disabled> <input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" $disabled>
<small class="form-text text-muted">$tip</small> $tip
</div> </div>
</div> </div>
EOF; EOF;
@ -267,7 +261,6 @@ EOF;
public static function formCheckbox($args) public static function formCheckbox($args)
{ {
$label = isset($args['label'])?$args['label']:'';
$labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:''; $labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:'';
$placeholder = isset($args['placeholder'])?$args['placeholder']:''; $placeholder = isset($args['placeholder'])?$args['placeholder']:'';
$tip = isset($args['tip'])?$args['tip']:'&nbsp;'; $tip = isset($args['tip'])?$args['tip']:'&nbsp;';
@ -279,7 +272,7 @@ EOF;
} }
$disabled = isset($args['disabled'])?'disabled':''; $disabled = isset($args['disabled'])?'disabled':'';
$class = 'form-group row'; $class = 'form-group';
if (isset($args['class'])) { if (isset($args['class'])) {
$class = $class.' '.$args['class']; $class = $class.' '.$args['class'];
} }
@ -289,18 +282,21 @@ EOF;
$type = $args['type']; $type = $args['type'];
} }
$label = '';
if (!empty($args['label'])) {
$label = '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100">'.$args['label'].'</label>';
}
$checked = $args['checked']?'checked':''; $checked = $args['checked']?'checked':'';
return <<<EOF return <<<EOF
<div class="$class"> <div class="$class">
<label for="$id" class="col-sm-2">$label</label> $label
<div class="col-sm-10">
<div class="form-check"> <div class="form-check">
<input name="$name" class="form-check-input" type="checkbox" id="$id" $checked> <input name="$name" class="form-check-input" type="checkbox" id="$id" $checked>
<label class="form-check-label" for="$id">$labelForCheckbox</label> <label class="form-check-label" for="$id">$labelForCheckbox</label>
<small class="form-text text-muted">$tip</small> <small class="form-text text-muted">$tip</small>
</div> </div>
</div>
</div> </div>
EOF; EOF;
} }
@ -353,7 +349,7 @@ EOF;
$html = '<div class="form-group m-0">'; $html = '<div class="form-group m-0">';
if (!empty($args['label'])) { if (!empty($args['label'])) {
$html .= '<label for="'.$id.'">'.$args['label'].'</label>'; $html .= '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100" for="'.$id.'">'.$args['label'].'</label>';
} }
$html .= '<select id="'.$id.'" name="'.$args['name'].'" class="'.$class.'">'; $html .= '<select id="'.$id.'" name="'.$args['name'].'" class="'.$class.'">';

View File

@ -1,9 +1,19 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'wrench')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
echo Bootstrap::formOpen(array('class'=>'plugin-form')); <div class="align-middle">
<?php if ($plugin->formButtons()): ?>
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php endif; ?>
<?php echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'cog')); ?>
</div>
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
@ -11,14 +21,6 @@ echo Bootstrap::formOpen(array('class'=>'plugin-form'));
// Print the plugin form // Print the plugin form
echo $plugin->form(); echo $plugin->form();
?>
if ($plugin->formButtons()) { <?php echo Bootstrap::formClose(); ?>
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'plugins" role="button">'.$L->g('Cancel').'</a>
</div>
';
}
echo Bootstrap::formClose();

View File

@ -85,9 +85,9 @@ function table($type) {
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key(); $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key();
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>'; echo '<td class="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 '<td class="pt-3 text-center d-none d-sm-table-cell w-25">'.PHP_EOL;
echo '<a class="btn btn-secondary btn-sm mb-1" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL; echo '<a class="btn btn-outline-secondary btn-sm mb-1" 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-danger btn-sm deletePageButton mb-1" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL; echo '<button type="button" class="btn btn-outline-danger btn-sm deletePageButton mb-1" 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 '</td>';
echo '</tr>'; echo '</tr>';
@ -109,9 +109,9 @@ function table($type) {
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$child->key() : '/'.$url->filters('page').'/'.$child->key(); $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$child->key() : '/'.$url->filters('page').'/'.$child->key();
echo '<td><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>'; echo '<td><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
echo '<td class="pt-3 text-center d-none d-sm-table-cell">'.PHP_EOL; echo '<td class="pt-3 text-center d-none d-sm-table-cell w-25">'.PHP_EOL;
echo '<a class="btn btn-secondary btn-sm mb-1" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL; echo '<a class="btn btn-outline-secondary btn-sm mb-1" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL;
echo '<button type="button" class="btn btn-danger btn-sm deletePageButton mb-1" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$child->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL; echo '<button type="button" class="btn btn-outline-danger btn-sm deletePageButton mb-1" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$child->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL;
echo '</td>'; echo '</td>';
echo '</tr>'; echo '</tr>';
@ -141,9 +141,9 @@ function table($type) {
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key(); $friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key();
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 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 '<td class="pt-3 text-center d-none d-sm-table-cell w-25">'.PHP_EOL;
echo '<a class="btn btn-secondary btn-sm mb-1" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL; echo '<a class="btn btn-outline-secondary btn-sm mb-1" 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-danger btn-sm deletePageButton mb-1" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL; echo '<button type="button" class="btn btn-outline-danger btn-sm deletePageButton mb-1" 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 '</td>';
echo '</tr>'; echo '</tr>';
@ -236,15 +236,16 @@ function table($type) {
</div> </div>
<!-- Modal for delete page --> <!-- Modal for delete page -->
<?php echo Bootstrap::modal(array( <?php
'modalId'=>'jsdeletePageModal', echo Bootstrap::modal(array(
'buttonPrimary'=>$L->g('Delete'),
'buttonPrimaryClass'=>'btn-danger deletePageModalAcceptButton',
'buttonSecondary'=>$L->g('Cancel'),
'buttonSecondaryClass'=>'btn-link',
'modalTitle'=>$L->g('Delete content'), 'modalTitle'=>$L->g('Delete content'),
'modalText'=>$L->g('Are you sure you want to delete this page'), 'modalText'=>$L->g('Are you sure you want to delete this page'),
'buttonPrimary'=>$L->g('Delete'), 'modalId'=>'jsdeletePageModal'
'buttonPrimaryClass'=>'deletePageModalAcceptButton', ));
'buttonSecondary'=>$L->g('Cancel'),
'buttonSecondaryClass'=>''
));
?> ?>
<script> <script>
$(document).ready(function() { $(document).ready(function() {

View File

@ -1,9 +1,18 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Edit Category'), 'icon'=>'tags')); <?php echo Bootstrap::formOpen(array('id'=>'jsform')); ?>
echo Bootstrap::formOpen(array('id'=>'jsform')); <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#jsdeleteModal"><?php $L->p('Delete') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit Category'), 'icon'=>'cog')); ?>
</div>
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
@ -19,7 +28,7 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'value'=>$categoryMap['key'] 'value'=>$categoryMap['key']
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'name', 'name'=>'name',
'label'=>$L->g('Name'), 'label'=>$L->g('Name'),
'value'=>$categoryMap['name'], 'value'=>$categoryMap['name'],
@ -28,7 +37,7 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formTextareaBlock(array( echo Bootstrap::formTextarea(array(
'name'=>'description', 'name'=>'description',
'label'=>$L->g('Description'), 'label'=>$L->g('Description'),
'value'=>isset($categoryMap['description'])?$categoryMap['description']:'', 'value'=>isset($categoryMap['description'])?$categoryMap['description']:'',
@ -38,7 +47,7 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'rows'=>3 'rows'=>3
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'template', 'name'=>'template',
'label'=>$L->g('Template'), 'label'=>$L->g('Template'),
'value'=>isset($categoryMap['template'])?$categoryMap['template']:'', 'value'=>isset($categoryMap['template'])?$categoryMap['template']:'',
@ -47,24 +56,15 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formInputGroupText(array( echo Bootstrap::formInputText(array(
'name'=>'newKey', 'name'=>'newKey',
'label'=>$L->g('Friendly URL'), 'label'=>$L->g('Friendly URL'),
'labelInside'=>DOMAIN_CATEGORIES,
'value'=>$categoryMap['key'], 'value'=>$categoryMap['key'],
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>DOMAIN_CATEGORIES.$categoryMap['key']
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">'.$L->g('Cancel').'</a>
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#jsdeleteModal">'.$L->g('Delete').'</button>
</div>
';
echo Bootstrap::formClose(); echo Bootstrap::formClose();
?> ?>
@ -73,9 +73,9 @@ echo Bootstrap::formClose();
<?php <?php
echo Bootstrap::modal(array( echo Bootstrap::modal(array(
'buttonPrimary'=>$L->g('Delete'), 'buttonPrimary'=>$L->g('Delete'),
'buttonPrimaryClass'=>'jsbuttonDeleteAccept', 'buttonPrimaryClass'=>'btn-danger jsbuttonDeleteAccept',
'buttonSecondary'=>$L->g('Cancel'), 'buttonSecondary'=>$L->g('Cancel'),
'buttonSecondaryClass'=>'', 'buttonSecondaryClass'=>'btn-link',
'modalTitle'=>$L->g('Delete category'), 'modalTitle'=>$L->g('Delete category'),
'modalText'=>$L->g('Are you sure you want to delete this category?'), 'modalText'=>$L->g('Are you sure you want to delete this category?'),
'modalId'=>'jsdeleteModal' 'modalId'=>'jsdeleteModal'

View File

@ -53,43 +53,79 @@ echo Bootstrap::formOpen(array(
?> ?>
<!-- TOOLBAR --> <!-- TOOLBAR -->
<div> <div id="jseditorToolbar">
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example"> <div id="jseditorToolbarRight" class="btn-group btn-group-sm float-right" role="group" aria-label="Toolbar right">
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><?php $L->p('Images') ?></button> <button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="oi oi-image"></span> <?php $L->p('Images') ?></button>
<button type="button" class="btn btn-light" id="jscoverImageOpenModal" data-toggle="modal" data-target="#jscoverImageModal"><?php $L->p('Cover image') ?></button> <button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="oi oi-cog"></span> <?php $L->p('Options') ?></button>
<button type="button" class="btn btn-light" id="jscategoryOpenModal" data-toggle="modal" data-target="#jscategoryModal"><?php $L->p('Category') ?><span class="option"></span></button>
<button type="button" class="btn btn-light" id="jsdescriptionOpenModal" data-toggle="modal" data-target="#jsdescriptionModal"><?php $L->p('Description') ?><span class="option"></span></button>
<button type="button" class="btn btn-light" id="jsoptionsOpenModal" data-toggle="modal" data-target="#jsoptionsModal"><?php $L->p('More options') ?></button>
</div> </div>
<div class="btn-group btn-group-sm float-right" role="group" aria-label="Basic example"> <div id="jseditorToolbarLeft">
<button type="button" class="btn btn-primary" id="jsbuttonSave"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button> <button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
<?php if(!$page->draft()): ?>
<button type="button" class="btn btn-secondary" id="jsbuttonDraft"><?php $L->p('Save as draft') ?></button> <?php if($page->draft()): ?>
<button type="button" class="btn btn-sm btn-secondary" id="jsbuttonDraft"><?php $L->p('Save as draft') ?></button>
<?php endif; ?> <?php endif; ?>
<?php if (count($page->children())===0): ?>
<button type="button" class="btn btn-danger" id="jsbuttonDelete" data-toggle="modal" data-target="#jsdeletePageModal"><?php $L->p('Delete') ?></button> <?php if (count($page->children())==0): ?>
<button type="button" class="btn btn-sm btn-danger" id="jsbuttonDelete" data-toggle="modal" data-target="#jsdeletePageModal"><?php $L->p('Delete') ?></button>
<?php endif; ?> <?php endif; ?>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php $L->p('Cancel') ?></a>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-sm btn-secondary"><?php $L->p('Cancel') ?></a>
</div> </div>
<?php if($page->draft()): ?>
<div class="alert alert-warning p-1 mt-1 mb-0"><?php $L->p('the-content-is-saved-as-a-draft-to-publish-it') ?></div>
<?php endif; ?>
</div> </div>
<script>
$(document).ready(function() {
$("#jsoptionsSidebar").on("click", function() {
$("#jseditorSidebar").toggle();
$("#jsshadow").toggle();
});
<!-- Title --> $("#jsshadow").on("click", function() {
<div class="form-group mt-1 mb-1"> $("#jseditorSidebar").toggle();
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="<?php echo $page->title() ?>" placeholder="<?php $L->p('Enter title') ?>"> $("#jsshadow").toggle();
</div> });
});
</script>
<!-- Editor --> <!-- SIDEBAR OPTIONS -->
<div id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(false) ?></div> <div id="jseditorSidebar">
<nav>
<!-- Modal for Cover Image --> <div class="nav nav-tabs" id="nav-tab" role="tablist">
<div id="jscoverImageModal" class="modal" tabindex="-1" role="dialog"> <a class="nav-link active show" id="nav-general-tab" data-toggle="tab" href="#nav-general" role="tab" aria-controls="general"><?php $L->p('General') ?></a>
<div class="modal-dialog"> <a class="nav-link" id="nav-advanced-tab" data-toggle="tab" href="#nav-advanced" role="tab" aria-controls="advanced"><?php $L->p('Advanced') ?></a>
<div class="modal-content"> <a class="nav-link" id="nav-seo-tab" data-toggle="tab" href="#nav-seo" role="tab" aria-controls="seo"><?php $L->p('SEO') ?></a>
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('Cover Image') ?></h5>
</div> </div>
<div class="modal-body"> </nav>
<div class="tab-content pr-3 pl-3 pb-3">
<div id="nav-general" class="tab-pane fade show active" role="tabpanel" aria-labelledby="general-tab">
<?php
// Category
echo Bootstrap::formSelectBlock(array(
'name'=>'category',
'label'=>$L->g('Category'),
'selected'=>$page->categoryKey(),
'class'=>'',
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
// Description
echo Bootstrap::formTextareaBlock(array(
'name'=>'description',
'label'=>$L->g('Description'),
'selected'=>'',
'class'=>'',
'value'=>$page->description(),
'rows'=>3,
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
));
?>
<!-- Cover Image -->
<?php <?php
$coverImage = $page->coverImage(false); $coverImage = $page->coverImage(false);
$externalCoverImage = ''; $externalCoverImage = '';
@ -98,39 +134,16 @@ echo Bootstrap::formOpen(array(
$externalCoverImage = $page->coverImage(false); $externalCoverImage = $page->coverImage(false);
} }
?> ?>
<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100"><?php $L->p('Cover Image') ?></label>
<div> <div>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="mx-auto d-block" alt="Cover image preview" src="<?php echo (empty($coverImage) ? HTML_PATH_ADMIN_THEME_IMG.'default.svg' : $page->coverImage() ) ?>" /> <img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo (empty($coverImage) ? HTML_PATH_ADMIN_THEME_IMG.'default.svg' : $page->coverImage() ) ?>" />
</div> </div>
<div class="mt-2 text-center"> <div class="mt-2 text-center">
<button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button> <button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button>
<button type="button" id="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button> <button type="button" id="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button>
</div> </div>
<hr>
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('External Cover Image')));
echo Bootstrap::formInputTextBlock(array(
'name'=>'externalCoverImage',
'placeholder'=>"https://",
'value'=>$externalCoverImage,
'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.')
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
$("#jscoverImagePreview").on("click", function() { $("#jscoverImagePreview").on("click", function() {
openMediaManager(); openMediaManager();
}); });
@ -145,122 +158,11 @@ echo Bootstrap::formOpen(array(
}); });
}); });
</script> </script>
</div>
<!-- Modal for Categories -->
<div id="jscategoryModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('Category') ?></h5>
</div> </div>
<div class="modal-body"> <div id="nav-advanced" class="tab-pane fade" role="tabpanel" aria-labelledby="advanced-tab">
<?php <?php
echo Bootstrap::formSelectBlock(array(
'name'=>'category',
'label'=>'',
'selected'=>$page->categoryKey(),
'class'=>'',
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script>
$(document).ready(function() {
function setCategoryBox(value) {
var selected = $("#jscategory option:selected");
var value = selected.val().trim();
if (value) {
$("#jscategoryOpenModal").find("span.option").html(": "+selected.text());
} else {
$("#jscategoryOpenModal").find("span.option").html("");
}
}
// Set the current category selected
setCategoryBox();
// When the user select the category update the category button
$("#jscategory").on("change", function() {
setCategoryBox();
});
});
</script>
</div>
<!-- Modal for Description -->
<div id="jsdescriptionModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('Description') ?></h5>
</div>
<div class="modal-body">
<?php
echo Bootstrap::formTextareaBlock(array(
'name'=>'description',
'label'=>'',
'selected'=>'',
'class'=>'',
'value'=>$page->description(),
'rows'=>3,
'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"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script>
$(document).ready(function() {
function setDescriptionBox(value) {
var value = $("#jsdescription").val();
if (value) {
value = ": "+$.trim(value).substring(0, 30).split(" ").slice(0, -1).join(" ") + "...";
}
$("#jsdescriptionOpenModal").find("span.option").html(value);
}
// Set the current description
setDescriptionBox();
// When the user write the description update the description button
$("#jsdescription").on("change", function() {
setDescriptionBox();
});
});
</script>
</div>
<!-- Modal for More options -->
<div id="jsoptionsModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('More options') ?></h5>
</div>
<div class="modal-body">
<?php
// Username
echo Bootstrap::formInputText(array(
'name'=>'',
'label'=>$L->g('Author'),
'placeholder'=>'',
'value'=>$page->username(),
'tip'=>'',
'disabled'=>true
));
// Date // Date
echo Bootstrap::formInputText(array( echo Bootstrap::formInputTextBlock(array(
'name'=>'date', 'name'=>'date',
'label'=>$L->g('Date'), 'label'=>$L->g('Date'),
'placeholder'=>'', 'placeholder'=>'',
@ -269,7 +171,7 @@ echo Bootstrap::formOpen(array(
)); ));
// Type // Type
echo Bootstrap::formSelect(array( echo Bootstrap::formSelectBlock(array(
'name'=>'typeTMP', 'name'=>'typeTMP',
'label'=>$L->g('Type'), 'label'=>$L->g('Type'),
'selected'=>$page->type(), 'selected'=>$page->type(),
@ -281,6 +183,23 @@ echo Bootstrap::formOpen(array(
'tip'=>'' 'tip'=>''
)); ));
// Position
echo Bootstrap::formInputTextBlock(array(
'name'=>'position',
'label'=>$L->g('Position'),
'tip'=>$L->g('Field used when ordering content by position'),
'value'=>$page->position()
));
// Tags
echo Bootstrap::formInputTextBlock(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma'),
'value'=>$page->tags()
));
// Parent // Parent
try { try {
$parentKey = $page->parent(); $parentKey = $page->parent();
@ -289,7 +208,7 @@ echo Bootstrap::formOpen(array(
} catch (Exception $e) { } catch (Exception $e) {
$parentValue = ''; $parentValue = '';
} }
echo Bootstrap::formInputText(array( echo Bootstrap::formInputTextBlock(array(
'name'=>'parentTMP', 'name'=>'parentTMP',
'label'=>$L->g('Parent'), 'label'=>$L->g('Parent'),
'placeholder'=>'', 'placeholder'=>'',
@ -297,87 +216,46 @@ echo Bootstrap::formOpen(array(
'value'=>$parentValue 'value'=>$parentValue
)); ));
// Position
echo Bootstrap::formInputText(array(
'name'=>'position',
'label'=>$L->g('Position'),
'tip'=>$L->g('Field used when ordering content by position'),
'value'=>$page->position()
));
// Template // Template
echo Bootstrap::formInputText(array( echo Bootstrap::formInputTextBlock(array(
'name'=>'template', 'name'=>'template',
'label'=>$L->g('Template'), 'label'=>$L->g('Template'),
'placeholder'=>'', 'placeholder'=>'',
'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.'), 'value'=>$page->template(),
'value'=>$page->template() 'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.')
)); ));
// Tags echo Bootstrap::formInputTextBlock(array(
echo Bootstrap::formInputText(array( 'name'=>'externalCoverImage',
'name'=>'tags', 'label'=>$L->g('External cover image'),
'label'=>$L->g('Tags'), 'placeholder'=>"https://",
'value'=>$externalCoverImage,
'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.')
));
// Username
echo Bootstrap::formInputTextBlock(array(
'name'=>'',
'label'=>$L->g('Author'),
'placeholder'=>'', 'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma'), 'value'=>$page->username(),
'value'=>$page->tags() 'tip'=>'',
)); 'disabled'=>true
echo Bootstrap::formTitle(array('title'=>$L->g('SEO')));
// Friendly URL
echo Bootstrap::formInputText(array(
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.'),
'value'=>$page->slug()
));
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'',
'class'=>'mt-4',
'checked'=>$page->noindex(),
'tip'=>$L->g('This tells search engines not to show this page in their search results.')
));
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-nofollow-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->nofollow(),
'tip'=>$L->g('This tells search engines not to follow links on this page.')
));
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-noarchive-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->noarchive(),
'tip'=>$L->g('This tells search engines not to save a cached copy of this page.')
)); ));
?> ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Generate slug when the user type the title // Changes in External cover image input
$("#jstitle").keyup(function() { $("#jsexternalCoverImage").change(function() {
var text = $(this).val(); $("#jscoverImage").val( $(this).val() );
var parent = $("#jsparent").val(); });
var currentKey = "";
var ajax = new bluditAjax(); // Parent
var callBack = $("#jsslug"); $("#jsparentTMP").change(function() {
ajax.generateSlug(text, parent, currentKey, callBack); var parent = $("#jsparentTMP").val();
if (parent.length===0) {
$("#jsparent").val("");
}
}); });
// Datepicker // Datepicker
@ -412,22 +290,72 @@ echo Bootstrap::formOpen(array(
}); });
}); });
</script> </script>
</div>
<div id="nav-seo" class="tab-pane fade" role="tabpanel" aria-labelledby="seo-tab">
<?php
// Friendly URL
echo Bootstrap::formInputTextBlock(array(
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.'),
'value'=>$page->slug()
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->noindex(),
'tip'=>$L->g('This tells search engines not to show this page in their search results.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-nofollow-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->nofollow(),
'tip'=>$L->g('This tells search engines not to follow links on this page.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-noarchive-code-to-this-page'),
'placeholder'=>'',
'checked'=>$page->noarchive(),
'tip'=>$L->g('This tells search engines not to save a cached copy of this page.')
));
?>
</div>
</div>
</div> </div>
<!-- Title -->
<div class="form-group mt-1 mb-1">
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="<?php echo $page->title() ?>" placeholder="<?php $L->p('Enter title') ?>">
</div>
<!-- Editor -->
<div id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(false) ?></div>
</form> </form>
<!-- Modal for Delete page --> <!-- Modal for Delete page -->
<div id="jsdeletePageModal" class="modal" tabindex="-1" role="dialog"> <div id="jsdeletePageModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('Delete content') ?></h5>
</div>
<div class="modal-body"> <div class="modal-body">
<?php $L->p('Are you sure you want to delete this page') ?> <h3><?php $L->p('Delete content') ?></h3>
<p><?php $L->p('Are you sure you want to delete this page') ?></p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php $L->p('Cancel') ?></button> <button type="button" class="btn btn-link" data-dismiss="modal"><?php $L->p('Cancel') ?></button>
<button type="button" class="btn btn-danger" data-dismiss="modal" id="jsbuttonDeleteAccept"><?php $L->p('Delete') ?></button> <button type="button" class="btn btn-danger" data-dismiss="modal" id="jsbuttonDeleteAccept"><?php $L->p('Delete') ?></button>
</div> </div>
</div> </div>
@ -481,10 +409,10 @@ $(document).ready(function() {
var uuid = $("#jsuuid").val(); var uuid = $("#jsuuid").val();
var title = $("#jstitle").val(); var title = $("#jstitle").val();
var content = editorGetContent(); var content = editorGetContent();
var ajax = new bluditAjax();
// Call autosave only when the user change the content // Call autosave only when the user change the content
if (currentContent!=content) { if (currentContent!=content) {
currentContent = content; currentContent = content;
var ajax = new bluditAjax();
// showAlert is the function to display an alert defined in alert.php // showAlert is the function to display an alert defined in alert.php
ajax.autosave(uuid, title, content, showAlert); ajax.autosave(uuid, title, content, showAlert);
} }

View File

@ -1,29 +1,44 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::formOpen(array()); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo ' <div class="align-middle">
<div> <div class="float-right mt-1">
<div class="float-right"> <button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<button type="submit" class="btn btn-primary btn-sm" name="save">'.$L->g('Save').'</button> <a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
<a class="btn btn-secondary btn-sm" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a>
</div> </div>
<h2 class="mt-0 mb-3"> <?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit user'), 'icon'=>'person')); ?>
<span class="oi oi-person" style="font-size: 0.7em;"></span> '.$L->g('Edit user').' </div>
</h2>
</div>
';
<!-- TABS -->
<nav class="mb-3">
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-item nav-link active" id="nav-profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="nav-profile" aria-selected="false"><?php $L->p('Profile') ?></a>
<a class="nav-item nav-link" id="nav-picture-tab" data-toggle="tab" href="#picture" role="tab" aria-controls="nav-picture" aria-selected="false"><?php $L->p('Profile picture') ?></a>
<a class="nav-item nav-link" id="nav-security-tab" data-toggle="tab" href="#security" role="tab" aria-controls="nav-security" aria-selected="false"><?php $L->p('Security') ?></a>
<a class="nav-item nav-link" id="nav-social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="nav-social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
</div>
</nav>
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
)); ));
// Username
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'username', 'name'=>'username',
'value'=>$user->username() 'value'=>$user->username()
)); ));
?>
<div class="tab-content" id="nav-tabContent">
<!-- Profile tab -->
<div class="tab-pane fade show active" id="profile" role="tabpanel" aria-labelledby="nav-profile-tab">
<?php
// Display username but disable the field
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'usernameDisabled', 'name'=>'usernameDisabled',
'label'=>$L->g('Username'), 'label'=>$L->g('Username'),
@ -38,7 +53,7 @@ echo Bootstrap::formOpen(array());
echo Bootstrap::formSelect(array( echo Bootstrap::formSelect(array(
'name'=>'role', 'name'=>'role',
'label'=>$L->g('Role'), 'label'=>$L->g('Role'),
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')), 'options'=>array('writer'=>$L->g('Writer'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
'selected'=>$user->role(), 'selected'=>$user->role(),
'class'=>'', 'class'=>'',
'tip'=>'' 'tip'=>''
@ -54,8 +69,6 @@ echo Bootstrap::formOpen(array());
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formTitle(array('title'=>$L->g('Profile')));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'nickname', 'name'=>'nickname',
'label'=>$L->g('Nickname'), 'label'=>$L->g('Nickname'),
@ -82,16 +95,48 @@ echo Bootstrap::formOpen(array());
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
?>
</div>
<!-- Profile picture tab -->
<div class="tab-pane fade" id="picture" role="tabpanel" aria-labelledby="nav-picture-tab">
<div class="custom-file mb-2">
<input type="file" class="custom-file-input" id="jsprofilePictureInputFile" name="profilePictureInputFile">
<label class="custom-file-label" for="jsprofilePictureInputFile"><?php $L->p('Choose images to upload'); ?></label>
</div>
<div>
<img id="jsprofilePicturePreview" class="img-fluid img-thumbnail" alt="Profile picture preview" src="<?php echo (Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png?version='.time():HTML_PATH_ADMIN_THEME_IMG.'default.svg') ?>" />
</div>
<script>
$("#jsprofilePictureInputFile").on("change", function() {
var formData = new FormData();
formData.append('tokenCSRF', tokenCSRF);
formData.append('profilePictureInputFile', $(this)[0].files[0]);
formData.append('username', $("#jsusername").val());
$.ajax({
url: HTML_PATH_ADMIN_ROOT+"ajax/profile-picture",
type: "POST",
data: formData,
cache: false,
contentType: false,
processData: false
}).done(function(json) {
console.log(json);
$("#jsprofilePicturePreview").attr('src',json.absoluteURL+"?time="+Math.random());
});
});
</script>
</div>
<!-- Security tab -->
<div class="tab-pane fade" id="security" role="tabpanel" aria-labelledby="nav-security-tab">
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Password'))); echo Bootstrap::formTitle(array('title'=>$L->g('Password')));
echo ' echo '
<div class="form-group row"> <div class="form-group">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<a href="'.HTML_PATH_ADMIN_ROOT.'user-password/'.$user->username().'" class="btn btn-primary mr-2">'.$L->g('Change password').'</a> <a href="'.HTML_PATH_ADMIN_ROOT.'user-password/'.$user->username().'" class="btn btn-primary mr-2">'.$L->g('Change password').'</a>
</div> </div>
</div>
'; ';
echo Bootstrap::formTitle(array('title'=>$L->g('Authentication Token'))); echo Bootstrap::formTitle(array('title'=>$L->g('Authentication Token')));
@ -104,6 +149,7 @@ echo Bootstrap::formOpen(array());
'tip'=>$L->g('this-token-is-similar-to-a-password-it-should-not-be-shared') 'tip'=>$L->g('this-token-is-similar-to-a-password-it-should-not-be-shared')
)); ));
if (checkRole(array('admin'),false)) {
echo Bootstrap::formTitle(array('title'=>$L->g('Status'))); echo Bootstrap::formTitle(array('title'=>$L->g('Status')));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
@ -120,21 +166,26 @@ echo Bootstrap::formOpen(array());
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-2"></div> <div class="col-sm-2"></div>
<div class="col-sm-10"> <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-warning 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="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>
</div> </div>
'; ';
} }
}
?>
</div>
echo Bootstrap::formTitle(array('title'=>$L->g('Social Networks'))); <!-- Social Networks tab -->
<div class="tab-pane fade" id="social" role="tabpanel" aria-labelledby="nav-social-tab">
<?php
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'twitter', 'name'=>'twitter',
'label'=>'Twitter', 'label'=>'Twitter',
'value'=>$user->twitter(), 'value'=>$user->twitter(),
'class'=>'', 'class'=>'',
'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
@ -143,14 +194,16 @@ echo Bootstrap::formOpen(array());
'label'=>'Facebook', 'label'=>'Facebook',
'value'=>$user->facebook(), 'value'=>$user->facebook(),
'class'=>'', 'class'=>'',
'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'googlePlus', 'name'=>'codepen',
'label'=>'Google+', 'label'=>'CodePen',
'value'=>$user->googlePlus(), 'value'=>$user->codepen(),
'class'=>'', 'class'=>'',
'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
@ -159,113 +212,47 @@ echo Bootstrap::formOpen(array());
'label'=>'Instagram', 'label'=>'Instagram',
'value'=>$user->instagram(), 'value'=>$user->instagram(),
'class'=>'', 'class'=>'',
'tip'=>'' 'placeholder'=>'',
));
echo Bootstrap::formInputText(array(
'name'=>'codepen',
'label'=>'Codepen',
'value'=>$user->codepen(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'linkedin',
'label'=>'Linkedin',
'value'=>$user->linkedin(),
'class'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'github',
'label'=>'Github',
'value'=>$user->github(),
'class'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'gitlab', 'name'=>'gitlab',
'label'=>'Gitlab', 'label'=>'GitLab',
'value'=>$user->gitlab(), 'value'=>$user->gitlab(),
'class'=>'', 'class'=>'',
'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo ' echo Bootstrap::formInputText(array(
<div class="form-group mt-4"> 'name'=>'github',
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button> 'label'=>'GitHub',
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a> 'value'=>$user->github(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'linkedin',
'label'=>'LinkedIn',
'value'=>$user->linkedin(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array(
'name'=>'mastodon',
'label'=>'Mastodon',
'value'=>$user->mastodon(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
?>
</div> </div>
';
echo Bootstrap::formClose();
echo Bootstrap::formTitle(array('title'=>$L->g('Profile picture')));
$src = (Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png':HTML_PATH_ADMIN_THEME_IMG.'default.svg');
echo '
<div class="form-group row">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<img id="jsprofilePictureImg" style="width: 350px; height: 200px;" class="img-thumbnail mb-2" alt="Profile Picture" src="'.$src.'" />
<form id="jsprofilePictureForm" name="profilePictureForm" enctype="multipart/form-data">
<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"></label>
</div>
</form>
</div> </div>
</div>
';
?> <?php echo Bootstrap::formClose(); ?>
<script>
$(document).ready(function() {
$("#jsdeleteUserAndDeleteContent").click(function() {
if(confirm("<?php $L->p('Confirm delete this action cannot be undone') ?>")==false) {
return false;
}
});
$("#jsdeleteUserAndKeepContent").click(function() {
if(confirm("<?php $L->p('Confirm delete this action cannot be undone') ?>")==false) {
return false;
}
});
$("#jsprofilePictureInputFile").on("change", function() {
$.ajax({
url: "<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/profile-picture",
type: "POST",
data: new FormData($("#jsprofilePictureForm")[0]),
cache: false,
contentType: false,
processData: false,
xhr: function() {
var xhr = $.ajaxSettings.xhr();
if (xhr.upload) {
xhr.upload.addEventListener("progress", function(e) {
if (e.lengthComputable) {
var percentComplete = (e.loaded / e.total)*100;
console.log("Uploading profile picture: "+percentComplete);
}
}, false);
}
return xhr;
}
}).done(function(e) {
$("#jsprofilePictureImg").attr('src',e.absoluteURL+"?time="+Math.random());
});
});
});
</script>

View File

@ -1,16 +1,23 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('New Category'), 'icon'=>'grid-three-up')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo Bootstrap::formOpen(array()); <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('New category'), 'icon'=>'tag')); ?>
</div>
<?php
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'category', 'name'=>'name',
'label'=>$L->g('Name'), 'label'=>$L->g('Name'),
'value'=>isset($_POST['category'])?$_POST['category']:'', 'value'=>isset($_POST['category'])?$_POST['category']:'',
'class'=>'', 'class'=>'',
@ -18,11 +25,15 @@ echo Bootstrap::formOpen(array());
'tip'=>'' 'tip'=>''
)); ));
echo ' echo Bootstrap::formTextarea(array(
<div class="form-group mt-4"> 'name'=>'description',
<button type="submit" class="btn btn-primary mr-2">'.$L->g('Save').'</button> 'label'=>$L->g('Description'),
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">'.$L->g('Cancel').'</a> 'value'=>isset($_POST['description'])?$_POST['description']:'',
</div> 'class'=>'',
'; 'placeholder'=>'',
'tip'=>'',
'rows'=>3
));
?>
echo Bootstrap::formClose(); <?php echo Bootstrap::formClose(); ?>

View File

@ -2,7 +2,7 @@
<?php <?php
// FORM START // Start form
echo Bootstrap::formOpen(array( echo Bootstrap::formOpen(array(
'id'=>'jsform', 'id'=>'jsform',
'class'=>'d-flex flex-column h-100' 'class'=>'d-flex flex-column h-100'
@ -47,70 +47,78 @@ echo Bootstrap::formOpen(array(
?> ?>
<!-- TOOLBAR --> <!-- TOOLBAR -->
<div> <div id="jseditorToolbar">
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example"> <div id="jseditorToolbarRight" class="btn-group btn-group-sm float-right" role="group" aria-label="Toolbar right">
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><?php $L->p('Images') ?></button> <button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="oi oi-image"></span> <?php $L->p('Images') ?></button>
<button type="button" class="btn btn-light" id="jscoverImageOpenModal" data-toggle="modal" data-target="#jscoverImageModal"><?php $L->p('Cover image') ?></button> <button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="oi oi-cog"></span> <?php $L->p('Options') ?></button>
<button type="button" class="btn btn-light" id="jscategoryOpenModal" data-toggle="modal" data-target="#jscategoryModal"><?php $L->p('Category') ?><span class="option"></span></button>
<button type="button" class="btn btn-light" id="jsdescriptionOpenModal" data-toggle="modal" data-target="#jsdescriptionModal"><?php $L->p('Description') ?><span class="option"></span></button>
<button type="button" class="btn btn-light" id="jsoptionsOpenModal" data-toggle="modal" data-target="#jsoptionsModal"><?php $L->p('More options') ?></button>
</div> </div>
<div class="btn-group btn-group-sm float-right" role="group" aria-label="Basic example"> <div id="jseditorToolbarLeft">
<button type="button" class="btn btn-primary" id="jsbuttonSave"><?php $L->p('Publish') ?></button> <button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php $L->p('Publish') ?></button>
<button type="button" class="btn btn-secondary" id="jsbuttonDraft"><?php $L->p('Save as draft') ?></button> <button type="button" class="btn btn-sm btn-secondary" id="jsbuttonDraft"><?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> <a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-sm btn-secondary"><?php $L->p('Cancel') ?></a>
</div> </div>
</div> </div>
<script>
$(document).ready(function() {
$("#jsoptionsSidebar").on("click", function() {
$("#jseditorSidebar").toggle();
$("#jsshadow").toggle();
});
<!-- Title --> $("#jsshadow").on("click", function() {
<div class="form-group mt-1 mb-1"> $("#jseditorSidebar").toggle();
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="" placeholder="<?php $L->p('Enter title') ?>"> $("#jsshadow").toggle();
</div> });
});
</script>
<!-- Editor --> <!-- SIDEBAR OPTIONS -->
<div id="jseditor" class="editable h-100 mb-1"></div> <div id="jseditorSidebar">
<nav>
<!-- Modal for Cover Image --> <div class="nav nav-tabs" id="nav-tab" role="tablist">
<div id="jscoverImageModal" class="modal" tabindex="-1" role="dialog"> <a class="nav-link active show" id="nav-general-tab" data-toggle="tab" href="#nav-general" role="tab" aria-controls="general"><?php $L->p('General') ?></a>
<div class="modal-dialog"> <a class="nav-link" id="nav-advanced-tab" data-toggle="tab" href="#nav-advanced" role="tab" aria-controls="advanced"><?php $L->p('Advanced') ?></a>
<div class="modal-content"> <a class="nav-link" id="nav-seo-tab" data-toggle="tab" href="#nav-seo" role="tab" aria-controls="seo"><?php $L->p('SEO') ?></a>
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('Cover Image') ?></h5>
</div> </div>
<div class="modal-body"> </nav>
<div class="tab-content pr-3 pl-3 pb-3">
<div id="nav-general" class="tab-pane fade show active" role="tabpanel" aria-labelledby="general-tab">
<?php
// Category
echo Bootstrap::formSelectBlock(array(
'name'=>'category',
'label'=>$L->g('Category'),
'selected'=>'',
'class'=>'',
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
// Description
echo Bootstrap::formTextareaBlock(array(
'name'=>'description',
'label'=>$L->g('Description'),
'selected'=>'',
'class'=>'',
'value'=>'',
'rows'=>3,
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
));
?>
<!-- Cover Image -->
<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100"><?php $L->p('Cover Image') ?></label>
<div> <div>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="mx-auto d-block" alt="Cover image preview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" /> <img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" />
</div> </div>
<div class="mt-2 text-center"> <div class="mt-2 text-center">
<button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button> <button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button>
<button type="button" id="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button> <button type="button" id="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button>
</div> </div>
<hr>
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('External Cover Image')));
echo Bootstrap::formInputTextBlock(array(
'name'=>'externalCoverImage',
'placeholder'=>"https://",
'value'=>'',
'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.')
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
$("#jscoverImagePreview").on("click", function() { $("#jscoverImagePreview").on("click", function() {
openMediaManager(); openMediaManager();
}); });
@ -125,122 +133,11 @@ echo Bootstrap::formOpen(array(
}); });
}); });
</script> </script>
</div>
<!-- Modal for Categories -->
<div id="jscategoryModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('Category') ?></h5>
</div> </div>
<div class="modal-body"> <div id="nav-advanced" class="tab-pane fade" role="tabpanel" aria-labelledby="advanced-tab">
<?php <?php
echo Bootstrap::formSelectBlock(array(
'name'=>'category',
'label'=>'',
'selected'=>'',
'class'=>'',
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
'options'=>$categories->getKeyNameArray()
));
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script>
$(document).ready(function() {
function setCategoryBox(value) {
var selected = $("#jscategory option:selected");
var value = selected.val().trim();
if (value) {
$("#jscategoryOpenModal").find("span.option").html(": "+selected.text());
} else {
$("#jscategoryOpenModal").find("span.option").html("");
}
}
// Set the current category selected
setCategoryBox();
// When the user select the category update the category button
$("#jscategory").on("change", function() {
setCategoryBox();
});
});
</script>
</div>
<!-- Modal for Description -->
<div id="jsdescriptionModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('Description') ?></h5>
</div>
<div class="modal-body">
<?php
echo Bootstrap::formTextareaBlock(array(
'name'=>'description',
'label'=>'',
'selected'=>'',
'class'=>'',
'value'=>'',
'rows'=>3,
'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"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script>
$(document).ready(function() {
function setDescriptionBox(value) {
var value = $("#jsdescription").val();
if (value) {
value = ": "+$.trim(value).substring(0, 30).split(" ").slice(0, -1).join(" ") + "...";
}
$("#jsdescriptionOpenModal").find("span.option").html(value);
}
// Set the current description
setDescriptionBox();
// When the user write the description update the description button
$("#jsdescription").on("change", function() {
setDescriptionBox();
});
});
</script>
</div>
<!-- Modal for More options -->
<div id="jsoptionsModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php $L->p('More options') ?></h5>
</div>
<div class="modal-body">
<?php
// Username
echo Bootstrap::formInputText(array(
'name'=>'',
'label'=>$L->g('Author'),
'placeholder'=>'',
'value'=>$login->username(),
'tip'=>'',
'disabled'=>true
));
// Date // Date
echo Bootstrap::formInputText(array( echo Bootstrap::formInputTextBlock(array(
'name'=>'date', 'name'=>'date',
'label'=>$L->g('Date'), 'label'=>$L->g('Date'),
'placeholder'=>'', 'placeholder'=>'',
@ -249,7 +146,7 @@ echo Bootstrap::formOpen(array(
)); ));
// Type // Type
echo Bootstrap::formSelect(array( echo Bootstrap::formSelectBlock(array(
'name'=>'typeTMP', 'name'=>'typeTMP',
'label'=>$L->g('Type'), 'label'=>$L->g('Type'),
'selected'=>'', 'selected'=>'',
@ -261,8 +158,24 @@ echo Bootstrap::formOpen(array(
'tip'=>'' 'tip'=>''
)); ));
// Position
echo Bootstrap::formInputTextBlock(array(
'name'=>'position',
'label'=>$L->g('Position'),
'tip'=>$L->g('Field used when ordering content by position'),
'value'=>$pages->nextPositionNumber()
));
// Tags
echo Bootstrap::formInputTextBlock(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma')
));
// Parent // Parent
echo Bootstrap::formInputText(array( echo Bootstrap::formInputTextBlock(array(
'name'=>'parentTMP', 'name'=>'parentTMP',
'label'=>$L->g('Parent'), 'label'=>$L->g('Parent'),
'placeholder'=>'', 'placeholder'=>'',
@ -270,16 +183,8 @@ echo Bootstrap::formOpen(array(
'value'=>'' 'value'=>''
)); ));
// Position
echo Bootstrap::formInputText(array(
'name'=>'position',
'label'=>$L->g('Position'),
'tip'=>$L->g('Field used when ordering content by position'),
'value'=>$pages->nextPositionNumber()
));
// Template // Template
echo Bootstrap::formInputText(array( echo Bootstrap::formInputTextBlock(array(
'name'=>'template', 'name'=>'template',
'label'=>$L->g('Template'), 'label'=>$L->g('Template'),
'placeholder'=>'', 'placeholder'=>'',
@ -287,60 +192,31 @@ echo Bootstrap::formOpen(array(
'tip'=>$L->g('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.')
)); ));
// Tags echo Bootstrap::formInputTextBlock(array(
echo Bootstrap::formInputText(array( 'name'=>'externalCoverImage',
'name'=>'tags', 'label'=>$L->g('External cover image'),
'label'=>$L->g('Tags'), 'placeholder'=>"https://",
'placeholder'=>'', 'value'=>'',
'tip'=>$L->g('Write the tags separated by comma') 'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.')
)); ));
echo Bootstrap::formTitle(array('title'=>$L->g('SEO'))); // Username
echo Bootstrap::formInputTextBlock(array(
// Friendly URL 'name'=>'',
echo Bootstrap::formInputText(array( 'label'=>$L->g('Author'),
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.')
));
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'', 'placeholder'=>'',
'class'=>'mt-4', 'value'=>$login->username(),
'checked'=>false, 'tip'=>'',
'tip'=>$L->g('This tells search engines not to show this page in their search results.') 'disabled'=>true
));
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-nofollow-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to follow links on this page.')
));
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-noarchive-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to save a cached copy of this page.')
)); ));
?> ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php $L->p('Done') ?></button>
</div>
</div>
</div>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Changes in External cover image input
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
// Generate slug when the user type the title // Generate slug when the user type the title
$("#jstitle").keyup(function() { $("#jstitle").keyup(function() {
var text = $(this).val(); var text = $(this).val();
@ -383,8 +259,59 @@ echo Bootstrap::formOpen(array(
}); });
}); });
</script> </script>
</div>
<div id="nav-seo" class="tab-pane fade" role="tabpanel" aria-labelledby="seo-tab">
<?php
// Friendly URL
echo Bootstrap::formInputTextBlock(array(
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to show this page in their search results.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'nofollow',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-nofollow-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to follow links on this page.')
));
// Robots
echo Bootstrap::formCheckbox(array(
'name'=>'noarchive',
'label'=>'',
'labelForCheckbox'=>$L->g('apply-code-noarchive-code-to-this-page'),
'placeholder'=>'',
'checked'=>false,
'tip'=>$L->g('This tells search engines not to save a cached copy of this page.')
));
?>
</div>
</div>
</div> </div>
<!-- Title -->
<div id="jseditorTitle" class="form-group mt-1 mb-1">
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="" placeholder="<?php $L->p('Enter title') ?>">
</div>
<!-- Editor -->
<div id="jseditor" class="editable h-100 mb-1"></div>
</form> </form>
<!-- Modal for Media Manager --> <!-- Modal for Media Manager -->

View File

@ -1,9 +1,16 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'person')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo Bootstrap::formOpen(array()); <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'person')); ?>
</div>
<?php
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
@ -55,12 +62,6 @@ echo Bootstrap::formOpen(array());
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
?>
echo ' <?php echo Bootstrap::formClose(); ?>
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();

View File

@ -1,11 +1,18 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins position'), 'icon'=>'tags')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
echo Bootstrap::alert(array('class'=>'alert-primary', 'text'=>$L->g('Drag and Drop to sort the plugins'))); <div class="align-middle">
<div class="float-right mt-1">
<button type="button" class="btn btn-primary btn-sm jsbuttonSave" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins position'), 'icon'=>'tags')); ?>
</div>
echo Bootstrap::formOpen(array('id'=>'jsform')); <div class="alert alert-primary"><?php $L->p('Drag and Drop to sort the plugins') ?></div>
<?php
// Token CSRF // Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
@ -22,21 +29,12 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="oi oi-move"></span> '.$Plugin->name().'</li>'; echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="oi oi-move"></span> '.$Plugin->name().'</li>';
} }
echo '</ul>'; echo '</ul>';
echo '
<div class="form-group mt-3">
<button type="button" class="jsbuttonSave btn btn-primary">'.$L->g('Save').'</button>
<a href="'.HTML_PATH_ADMIN_ROOT.'plugins" class="btn btn-secondary">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();
?> ?>
<?php echo Bootstrap::formClose(); ?>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('.list-group-sortable').sortable({ $('.list-group-sortable').sortable({
placeholderClass: 'list-group-item' placeholderClass: 'list-group-item'
}); });

View File

@ -1,33 +1,28 @@
<?php <?php defined('BLUDIT') or die('Bludit CMS.'); ?>
echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); <?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
?> <div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); ?>
</div>
<!-- TABS --> <!-- TABS -->
<ul class="nav nav-tabs" id="dynamicTab" role="tablist"> <nav class="mb-3">
<li class="nav-item"> <div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-link active" id="general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="general" aria-selected="true"><?php $L->p('Site') ?></a> <a class="nav-item nav-link active" id="nav-general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="nav-general" aria-selected="false"><?php $L->p('General') ?></a>
</li> <a class="nav-item nav-link" id="nav-advanced-tab" data-toggle="tab" href="#advanced" role="tab" aria-controls="nav-advanced" aria-selected="false"><?php $L->p('Advanced') ?></a>
<li class="nav-item"> <a class="nav-item nav-link" id="nav-seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="nav-seo" aria-selected="false"><?php $L->p('SEO') ?></a>
<a class="nav-link " id="advanced-tab" data-toggle="tab" href="#advanced" role="tab" aria-controls="advanced" aria-selected="false"><?php $L->p('Advanced') ?></a> <a class="nav-item nav-link" id="nav-social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="nav-social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
</li> <a class="nav-item nav-link" id="nav-images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="nav-images" aria-selected="false"><?php $L->p('Images') ?></a>
<li class="nav-item"> <a class="nav-item nav-link" id="nav-language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="nav-language" aria-selected="false"><?php $L->p('Language') ?></a>
<a class="nav-link " id="seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="seo" aria-selected="false"><?php $L->p('SEO') ?></a> </div>
</li> </nav>
<li class="nav-item">
<a class="nav-link " id="social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="language" aria-selected="false"><?php $L->p('Language') ?></a>
</li>
</ul>
<?php
echo Bootstrap::formOpen(array(
'id'=>'dynamicTabContent',
'class'=>'tab-content mt-4'
));
<?php
// Token CSRF // Token CSRF
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
@ -41,9 +36,11 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
)); ));
?> ?>
<!-- TABS GENERAL --> <!-- General tab -->
<div class="tab-pane show active" id="general" role="tabpanel" aria-labelledby="general-tab"> <div class="tab-pane show active" id="general" role="tabpanel" aria-labelledby="general-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Site')));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'title', 'name'=>'title',
'label'=>$L->g('Site title'), 'label'=>$L->g('Site title'),
@ -79,17 +76,10 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'placeholder'=>'', 'placeholder'=>'',
'tip'=>$L->g('you-can-add-a-small-text-on-the-bottom') 'tip'=>$L->g('you-can-add-a-small-text-on-the-bottom')
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<!-- TABS ADVANCED --> <!-- Advanced tab -->
<div class="tab-pane" id="advanced" role="tabpanel" aria-labelledby="advanced-tab"> <div class="tab-pane" id="advanced" role="tabpanel" aria-labelledby="advanced-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Content'))); echo Bootstrap::formTitle(array('title'=>$L->g('Content')));
@ -214,18 +204,10 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'tip'=>DOMAIN.$site->uriFilters('blog'), 'tip'=>DOMAIN.$site->uriFilters('blog'),
'disabled'=>Text::isEmpty($site->uriFilters('blog')) 'disabled'=>Text::isEmpty($site->uriFilters('blog'))
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<!-- SEO tab -->
<!-- TABS SEO -->
<div class="tab-pane" id="seo" role="tabpanel" aria-labelledby="seo-tab"> <div class="tab-pane" id="seo" role="tabpanel" aria-labelledby="seo-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Extreme friendly URL'))); echo Bootstrap::formTitle(array('title'=>$L->g('Extreme friendly URL')));
@ -280,17 +262,53 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'tip'=>$L->g('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'=>'' 'placeholder'=>''
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<script>
$(document).ready(function() {
<!-- TABS SOCIAL NETWORKS --> // Parent autocomplete
var homepageXHR;
var homepageList; // Keep the parent list returned to get the key by the title page
$("#jshomepageTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { homepageXHR.abort(); } catch(e){}
homepageXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-published", {query: term},
function(data) {
homepageList = data;
term = term.toLowerCase();
var matches = [];
for (var title in data) {
if (~title.toLowerCase().indexOf(term))
matches.push(title);
}
response(matches);
});
},
onSelect: function(e, term, item) {
// homepageList = array( pageTitle => pageKey )
var key = homepageList[term];
$("#jshomepage").attr("value", key);
}
});
$("#jshomepageTMP").change(function() {
if ($(this).val()) {
$("#jsuriBlog").removeAttr('disabled');
$("#jsuriBlog").attr('value', '/blog/');
} else {
$("#jsuriBlog").attr('value', '');
$("#jsuriBlog").attr('disabled', 'disabled');
$("#jshomepage").attr("value", '');
}
});
});
</script>
<!-- Social Network tab -->
<div class="tab-pane" id="social" role="tabpanel" aria-labelledby="social-tab"> <div class="tab-pane" id="social" role="tabpanel" aria-labelledby="social-tab">
<?php <?php
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
@ -320,15 +338,6 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formInputText(array(
'name'=>'googlePlus',
'label'=>'Google+',
'value'=>$site->googlePlus(),
'class'=>'',
'placeholder'=>'',
'tip'=>''
));
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'instagram', 'name'=>'instagram',
'label'=>'Instagram', 'label'=>'Instagram',
@ -373,19 +382,47 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<!-- TABS TIMEZONE AND LANGUAGES --> <!-- Images tab -->
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab">
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('Thumbnails')));
echo Bootstrap::formInputText(array(
'name'=>'thumbnailWidth',
'label'=>$L->g('Width'),
'value'=>$site->thumbnailWidth(),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('Thumbnail width in pixels')
));
echo Bootstrap::formInputText(array(
'name'=>'thumbnailHeight',
'label'=>$L->g('Height'),
'value'=>$site->thumbnailHeight(),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('Thumbnail height in pixels')
));
echo Bootstrap::formInputText(array(
'name'=>'thumbnailQuality',
'label'=>$L->g('Quality'),
'value'=>$site->thumbnailQuality(),
'class'=>'',
'placeholder'=>'',
'tip'=>$L->g('Thumbnail quality in percentage')
));
?>
</div>
<!-- Timezone and language tab -->
<div class="tab-pane" id="language" role="tabpanel" aria-labelledby="language-tab"> <div class="tab-pane" id="language" role="tabpanel" aria-labelledby="language-tab">
<?php <?php
echo Bootstrap::formTitle(array('title'=>$L->g('Language and timezone')));
echo Bootstrap::formSelect(array( echo Bootstrap::formSelect(array(
'name'=>'language', 'name'=>'language',
@ -424,59 +461,7 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
'placeholder'=>'', 'placeholder'=>'',
'tip'=>$L->g('Current format').': '.Date::current($site->dateFormat()) 'tip'=>$L->g('Current format').': '.Date::current($site->dateFormat())
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'dashboard" role="button">'.$L->g('Cancel').'</a>
</div>
';
?> ?>
</div> </div>
<?php
echo Bootstrap::formClose();
?>
<script> <?php echo Bootstrap::formClose(); ?>
$(document).ready(function() {
// Parent autocomplete
var homepageXHR;
var homepageList; // Keep the parent list returned to get the key by the title page
$("#jshomepageTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { homepageXHR.abort(); } catch(e){}
homepageXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-published", {query: term},
function(data) {
homepageList = data;
term = term.toLowerCase();
var matches = [];
for (var title in data) {
if (~title.toLowerCase().indexOf(term))
matches.push(title);
}
response(matches);
});
},
onSelect: function(e, term, item) {
// homepageList = array( pageTitle => pageKey )
var key = homepageList[term];
$("#jshomepage").attr("value", key);
}
});
$("#jshomepageTMP").change(function() {
if ($(this).val()) {
$("#jsuriBlog").removeAttr('disabled');
$("#jsuriBlog").attr('value', '/blog/');
} else {
$("#jsuriBlog").attr('value', '');
$("#jsuriBlog").attr('disabled', 'disabled');
$("#jshomepage").attr("value", '');
}
});
});
</script>

View File

@ -1,19 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
<div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$user->username() ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'person')); ?>
</div>
<?php <?php
// Token CSRF
echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'person'));
echo Bootstrap::formOpen(array());
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF', 'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF() 'value'=>$security->getTokenCSRF()
)); ));
// Username
echo Bootstrap::formInputHidden(array( echo Bootstrap::formInputHidden(array(
'name'=>'username', 'name'=>'username',
'value'=>$user->username() 'value'=>$user->username()
)); ));
// Username disabled
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'usernameDisabled', 'name'=>'usernameDisabled',
'label'=>$L->g('Username'), 'label'=>$L->g('Username'),
@ -24,6 +34,7 @@ echo Bootstrap::formOpen(array());
'tip'=>'' 'tip'=>''
)); ));
// New password
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'newPassword', 'name'=>'newPassword',
'label'=>$L->g('New password'), 'label'=>$L->g('New password'),
@ -34,6 +45,7 @@ echo Bootstrap::formOpen(array());
'tip'=>'' 'tip'=>''
)); ));
// Confirm password
echo Bootstrap::formInputText(array( echo Bootstrap::formInputText(array(
'name'=>'confirmPassword', 'name'=>'confirmPassword',
'label'=>$L->g('Confirm new password'), 'label'=>$L->g('Confirm new password'),
@ -43,14 +55,6 @@ echo Bootstrap::formOpen(array());
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>''
)); ));
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$user->username().'" role="button">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();
?> ?>
<?php echo Bootstrap::formClose(); ?>

View File

@ -1,3 +1,5 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<?php <?php
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'people')); echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'people'));
@ -13,8 +15,7 @@ echo '
<thead> <thead>
<tr> <tr>
<th class="border-bottom-0" scope="col">'.$L->g('Username').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Username').'</th>
<th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('First name').'</th> <th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Nickname').'</th>
<th class="border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Last name').'</th>
<th class="border-bottom-0" scope="col">'.$L->g('Email').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Email').'</th>
<th class="border-bottom-0" scope="col">'.$L->g('Status').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Status').'</th>
<th class="border-bottom-0" scope="col">'.$L->g('Role').'</th> <th class="border-bottom-0" scope="col">'.$L->g('Role').'</th>
@ -29,9 +30,8 @@ foreach ($list as $username) {
try { try {
$user = new User($username); $user = new User($username);
echo '<tr>'; echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>'; echo '<td><img class="profilePicture mr-1" alt="" src="'.(Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png':HTML_PATH_ADMIN_THEME_IMG.'default.svg').'" /><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
echo '<td class="d-none d-lg-table-cell">'.$user->firstName().'</td>'; echo '<td class="d-none d-lg-table-cell">'.$user->nickname().'</td>';
echo '<td class="d-none d-lg-table-cell">'.$user->lastName().'</td>';
echo '<td>'.$user->email().'</td>'; echo '<td>'.$user->email().'</td>';
echo '<td>'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>'; echo '<td>'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>';
if ($user->role()=='admin') { if ($user->role()=='admin') {

View File

@ -1,6 +1,19 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json'); header('Content-Type: application/json');
// $_POST
// ----------------------------------------------------------------------------
// (string) $_POST['username']
$username = empty($_POST['username']) ? false : $_POST['username'];
// ----------------------------------------------------------------------------
if ($username===false) {
exit (json_encode(array(
'status'=>1,
'message'=>'Error in username.'
)));
}
if (!isset($_FILES['profilePictureInputFile'])) { if (!isset($_FILES['profilePictureInputFile'])) {
exit (json_encode(array( exit (json_encode(array(
'status'=>1, 'status'=>1,
@ -10,8 +23,6 @@ if (!isset($_FILES['profilePictureInputFile'])) {
// File extension // File extension
$fileExtension = pathinfo($_FILES['profilePictureInputFile']['name'], PATHINFO_EXTENSION); $fileExtension = pathinfo($_FILES['profilePictureInputFile']['name'], PATHINFO_EXTENSION);
// Username who is uploading the image
$username = $login->username();
// Tmp filename // Tmp filename
$tmpFilename = $username.'.'.$fileExtension; $tmpFilename = $username.'.'.$fileExtension;
// Final filename // Final filename

View File

@ -44,6 +44,7 @@ foreach ($_FILES['bluditInputFiles']['name'] as $key=>$filename) {
// Check file extension // Check file extension
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION); $fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
$fileExtension = Text::lowercase($fileExtension);
if (!in_array($fileExtension, $allowedExtensions) ) { if (!in_array($fileExtension, $allowedExtensions) ) {
$message = 'Extension file not supported.'; $message = 'Extension file not supported.';
Log::set($message, LOG_TYPE_ERROR); Log::set($message, LOG_TYPE_ERROR);
@ -53,7 +54,7 @@ foreach ($_FILES['bluditInputFiles']['name'] as $key=>$filename) {
))); )));
} }
// Get the next filename to not overwrite the original file // Generate the next filename to not overwrite the original file
$nextFilename = Filesystem::nextFilename($uploadDirectory, $filename); $nextFilename = Filesystem::nextFilename($uploadDirectory, $filename);
// Move from temporary directory to uploads folder // Move from temporary directory to uploads folder
@ -66,8 +67,8 @@ foreach ($_FILES['bluditInputFiles']['name'] as $key=>$filename) {
symlink($uploadDirectory.$nextFilename, $thumbnailDirectory.$nextFilename); symlink($uploadDirectory.$nextFilename, $thumbnailDirectory.$nextFilename);
} else { } else {
$Image = new Image(); $Image = new Image();
$Image->setImage($uploadDirectory.$nextFilename, $GLOBALS['THUMBNAILS_WIDTH'], $GLOBALS['THUMBNAILS_HEIGHT'], 'crop'); $Image->setImage($uploadDirectory.$nextFilename, $site->thumbnailWidth(), $site->thumbnailHeight(), 'crop');
$Image->saveImage($thumbnailDirectory.$nextFilename, $GLOBALS['THUMBNAILS_QUALITY'], true); $Image->saveImage($thumbnailDirectory.$nextFilename, $site->thumbnailQuality(), true);
} }
} }

View File

@ -1,10 +1,10 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
// Bludit version // Bludit version
define('BLUDIT_VERSION', '3.2'); define('BLUDIT_VERSION', '3.5');
define('BLUDIT_CODENAME', 'Yeast'); define('BLUDIT_CODENAME', 'IPA');
define('BLUDIT_RELEASE_DATE', '2018-10-20'); define('BLUDIT_RELEASE_DATE', '2018-12-01');
define('BLUDIT_BUILD', '20181020'); define('BLUDIT_BUILD', '201811201');
// Debug mode // Debug mode
// Change to FALSE, for prevent warning or errors on browser // Change to FALSE, for prevent warning or errors on browser

View File

@ -101,8 +101,3 @@ $GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES'] = 5;
// Sort the image by date // Sort the image by date
$GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'] = true; $GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'] = true;
// Thubmnails size
$GLOBALS['THUMBNAILS_WIDTH'] = 400;
$GLOBALS['THUMBNAILS_HEIGHT'] = 400;
$GLOBALS['THUMBNAILS_QUALITY'] = 100;

View File

@ -668,21 +668,21 @@ function checkRole($allowRoles, $redirect=true) {
// Add a new category to the system // Add a new category to the system
// Returns TRUE is successfully added, FALSE otherwise // Returns TRUE is successfully added, FALSE otherwise
function createCategory($category) { function createCategory($args) {
global $categories; global $categories;
global $L; global $L;
global $syslog; global $syslog;
if (Text::isEmpty($category)) { if (Text::isEmpty($args['name'])) {
Alert::set($L->g('Category name is empty'), ALERT_STATUS_FAIL); Alert::set($L->g('Category name is empty'), ALERT_STATUS_FAIL);
return false; return false;
} }
if ($categories->add(array('name'=>$category))) { if ($categories->add(array('name'=>$args['name'], 'description'=>$args['description']))) {
// Add to syslog // Add to syslog
$syslog->add(array( $syslog->add(array(
'dictionaryKey'=>'new-category-created', 'dictionaryKey'=>'new-category-created',
'notes'=>$category 'notes'=>$args['name']
)); ));
Alert::set($L->g('Category added'), ALERT_STATUS_OK); Alert::set($L->g('Category added'), ALERT_STATUS_OK);
@ -790,16 +790,18 @@ function getTag($key) {
} }
} }
// Activate a theme
function activateTheme($themeDirectory) { function activateTheme($themeDirectory) {
global $site; global $site;
global $syslog; global $syslog;
global $L;
if (Sanitize::pathFile(PATH_THEMES.$themeDirectory)) { if (Sanitize::pathFile(PATH_THEMES.$themeDirectory)) {
$site->set(array('theme'=>$themeDirname)); $site->set(array('theme'=>$themeDirectory));
$syslog->add(array( $syslog->add(array(
'dictionaryKey'=>'new-theme-configured', 'dictionaryKey'=>'new-theme-configured',
'notes'=>$themeDirname 'notes'=>$themeDirectory
)); ));
Alert::set( $L->g('The changes have been saved') ); Alert::set( $L->g('The changes have been saved') );

View File

@ -206,8 +206,8 @@ class Filesystem {
// Returns the next filename if the filename already exist // Returns the next filename if the filename already exist
public static function nextFilename($path=PATH_UPLOADS, $filename) { public static function nextFilename($path=PATH_UPLOADS, $filename) {
// Clean filename and get extension // Clean filename and get extension
$filename = Text::lowercase($filename);
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION); $fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
$fileExtension = Text::lowercase($fileExtension);
$filename = pathinfo($filename, PATHINFO_FILENAME); $filename = pathinfo($filename, PATHINFO_FILENAME);
$filename = Text::replace(' ', '', $filename); $filename = Text::replace(' ', '', $filename);
$filename = Text::replace('_', '', $filename); $filename = Text::replace('_', '', $filename);

View File

@ -28,15 +28,13 @@ class Image {
$path_complete = $filename.'.'.$extension; $path_complete = $filename.'.'.$extension;
if($forcePNG) { if ($forcePNG) {
$extension = 'png'; $extension = 'png';
} } elseif ($forceJPG) {
elseif($forceJPG) {
$extension = 'jpg'; $extension = 'jpg';
} }
switch($extension) switch ($extension) {
{
case 'jpg': case 'jpg':
case 'jpeg': case 'jpeg':
// Checking for JPG support // Checking for JPG support

View File

@ -2,6 +2,26 @@
class Theme { class Theme {
public static function socialNetworks()
{
global $site;
$socialNetworks = array(
'github'=>'Github',
'twitter'=>'Twitter',
'facebook'=>'Facebook',
'instagram'=>'Instagram',
'codepen'=>'Codepen',
'linkedin'=>'Linkedin'
);
foreach ($socialNetworks as $key=>$label) {
if (!$site->{$key}()) {
unset($socialNetworks[$key]);
}
}
return $socialNetworks;
}
public static function title() public static function title()
{ {
global $site; global $site;

View File

@ -111,18 +111,6 @@ class Language extends dbJSON {
$this->db = array_merge($array, $this->db); $this->db = array_merge($array, $this->db);
} }
/*
// Returns the item from language-data
public function getData($key)
{
if (isset($this->data[$key])) {
return $this->data[$key];
}
return false;
}
*/
// Returns an array with all dictionaries // Returns an array with all dictionaries
public function getLanguageList() public function getLanguageList()
{ {

View File

@ -280,6 +280,9 @@ class Pages extends dbJSON {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to delete the directory '.PATH_PAGES.$key); Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to delete the directory '.PATH_PAGES.$key);
} }
// Delete page images directory; The function already check if exists the directory
Filesystem::deleteRecursive(PATH_UPLOADS_PAGES.$this->db[$key]['uuid']);
// Remove from database // Remove from database
unset($this->db[$key]); unset($this->db[$key]);

View File

@ -304,20 +304,20 @@ class Page {
// Returns the endpoint of the thumbnail cover image, FALSE if the page doesn't have a cover image // Returns the endpoint of the thumbnail cover image, FALSE if the page doesn't have a cover image
public function thumbCoverImage() public function thumbCoverImage()
{ {
$coverImageFilename = $this->coverImage(false); $filename = $this->coverImage(false);
if ($coverImageFilename==false) { if ($filename==false) {
return false; return false;
} }
// Check is external cover image // Check is external cover image
if (filter_var($coverImageFilename, FILTER_VALIDATE_URL)) { if (filter_var($filename, FILTER_VALIDATE_URL)) {
return $coverImageFilename; return $filename;
} }
if (IMAGE_RESTRICT) { if (IMAGE_RESTRICT) {
return DOMAIN_UPLOADS_PAGES.$this->uuid().'/thumbnails/'.$filename; return DOMAIN_UPLOADS_PAGES.$this->uuid().'/thumbnails/'.$filename;
} }
return DOMAIN_UPLOADS_THUMBNAILS.$coverImageFilename; return DOMAIN_UPLOADS_THUMBNAILS.$filename;
} }
// Returns TRUE if the content has the text splited // Returns TRUE if the content has the text splited

View File

@ -10,8 +10,8 @@ class Site extends dbJSON {
'language'=> 'en', 'language'=> 'en',
'locale'=> 'en, en_US, en_AU, en_CA, en_GB, en_IE, en_NZ', 'locale'=> 'en, en_US, en_AU, en_CA, en_GB, en_IE, en_NZ',
'timezone'=> 'America/Argentina/Buenos_Aires', 'timezone'=> 'America/Argentina/Buenos_Aires',
'theme'=> 'pure', 'theme'=> 'alternative',
'adminTheme'=> 'default', 'adminTheme'=> 'booty',
'homepage'=> '', 'homepage'=> '',
'pageNotFound'=> '', 'pageNotFound'=> '',
'uriPage'=> '/', 'uriPage'=> '/',
@ -26,7 +26,6 @@ class Site extends dbJSON {
'twitter'=> '', 'twitter'=> '',
'facebook'=> '', 'facebook'=> '',
'codepen'=> '', 'codepen'=> '',
'googlePlus'=> '',
'instagram'=> '', 'instagram'=> '',
'github'=> '', 'github'=> '',
'gitlab'=> '', 'gitlab'=> '',
@ -40,7 +39,10 @@ class Site extends dbJSON {
'titleFormatCategory'=> '{{category-name}} | {{site-title}}', 'titleFormatCategory'=> '{{category-name}} | {{site-title}}',
'titleFormatTag'=> '{{tag-name}} | {{site-title}}', 'titleFormatTag'=> '{{tag-name}} | {{site-title}}',
'imageRestrict'=> true, 'imageRestrict'=> true,
'imageRelativeToAbsolute'=> false 'imageRelativeToAbsolute'=> false,
'thumbnailWidth' => 400, // px
'thumbnailHeight' => 400, // px
'thumbnailQuality' => 100
); );
function __construct() function __construct()
@ -110,6 +112,21 @@ class Site extends dbJSON {
return DOMAIN_BASE.'sitemap.xml'; return DOMAIN_BASE.'sitemap.xml';
} }
public function thumbnailWidth()
{
return $this->getField('thumbnailWidth');
}
public function thumbnailHeight()
{
return $this->getField('thumbnailHeight');
}
public function thumbnailQuality()
{
return $this->getField('thumbnailQuality');
}
public function autosaveInterval() public function autosaveInterval()
{ {
return $this->getField('autosaveInterval'); return $this->getField('autosaveInterval');

View File

@ -13,7 +13,7 @@ class User {
$row = $users->getDefaultFields(); $row = $users->getDefaultFields();
} else { } else {
if (Text::isEmpty($username) || !$users->exists($username)) { if (Text::isEmpty($username) || !$users->exists($username)) {
$errorMessage = 'User not found in database by username ['.$username.']'; $errorMessage = 'User not found in the database by username ['.$username.']';
Log::set(__METHOD__.LOG_SEP.$errorMessage); Log::set(__METHOD__.LOG_SEP.$errorMessage);
throw new Exception($errorMessage); throw new Exception($errorMessage);
} }
@ -140,6 +140,11 @@ class User {
return $this->getValue('linkedin'); return $this->getValue('linkedin');
} }
public function mastodon()
{
return $this->getValue('mastodon');
}
public function profilePicture() public function profilePicture()
{ {
$filename = $this->getValue('username').'.png'; $filename = $this->getValue('username').'.png';

View File

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

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -3,7 +3,7 @@
"native": "Deutsch (Schweiz)", "native": "Deutsch (Schweiz)",
"english-name": "German", "english-name": "German",
"locale": "de, de_CH", "locale": "de, de_CH",
"last-update": "2018-10-08", "last-update": "2018-11-28",
"authors": [ "authors": [
"Clickwork https:\/\/clickwork.ch", "Clickwork https:\/\/clickwork.ch",
"blog2read https:\/\/github.com\/blog2read", "blog2read https:\/\/github.com\/blog2read",
@ -360,10 +360,21 @@
"good-morning": "Guten Morgen", "good-morning": "Guten Morgen",
"good-afternoon": "Guten Nachmittag", "good-afternoon": "Guten Nachmittag",
"good-evening": "Guten Abend", "good-evening": "Guten Abend",
"good-night": "Good night", "good-night": "Gute Nacht",
"hello": "Hallo", "hello": "Hallo",
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "Für diesen Inhalt sind keine Bilder vorhanden.",
"select-cover-image": "Select cover image", "select-cover-image": "Wähle ein Hauptbild",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "Um dieses Plugin zu verwenden, braucht es auch folgendes Plugin:",
"no-pages-found": "No pages found" "no-pages-found": "Es wurden keine Seiten gefunden",
"system-updated": "Das System wurde aufdatiert",
"security": "Sicherheit",
"remove-cover-image": "Hauptbild entfernen",
"width": "Breite",
"height": "Höhe",
"quality": "Qualität",
"thumbnails": "Vorschaubilder",
"thumbnail": "Vorschaubild",
"thumbnail-width-in-pixels": "Breite der Vorschaubilder in Pixel (px).",
"thumbnail-height-in-pixels": "Höhe der Vorschaubilder in Pixel (px).",
"thumbnail-quality-in-percentage": "Qualität der Vorschaubilder in Prozent (%)."
} }

View File

@ -3,7 +3,7 @@
"native": "Deutsch (Deutschland)", "native": "Deutsch (Deutschland)",
"english-name": "German", "english-name": "German",
"locale": "de, de_DE", "locale": "de, de_DE",
"last-update": "2018-10-08", "last-update": "2018-11-28",
"authors": [ "authors": [
"Clickwork https:\/\/clickwork.ch", "Clickwork https:\/\/clickwork.ch",
"blog2read https:\/\/github.com\/blog2read", "blog2read https:\/\/github.com\/blog2read",
@ -362,8 +362,19 @@
"good-evening": "Guten Abend", "good-evening": "Guten Abend",
"good-night": "Gute Nacht", "good-night": "Gute Nacht",
"hello": "Hallo", "hello": "Hallo",
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "Für diesen Inhalt sind keine Bilder vorhanden.",
"select-cover-image": "Select cover image", "select-cover-image": "Wähle ein Hauptbild",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "Um dieses Plugin zu verwenden, braucht es auch folgendes Plugin:",
"no-pages-found": "No pages found" "no-pages-found": "Es wurden keine Seiten gefunden",
"system-updated": "Das System wurde aufdatiert",
"security": "Sicherheit",
"remove-cover-image": "Hauptbild entfernen",
"width": "Breite",
"height": "Höhe",
"quality": "Qualität",
"thumbnails": "Vorschaubilder",
"thumbnail": "Vorschaubild",
"thumbnail-width-in-pixels": "Breite der Vorschaubilder in Pixel (px).",
"thumbnail-height-in-pixels": "Höhe der Vorschaubilder in Pixel (px).",
"thumbnail-quality-in-percentage": "Qualität der Vorschaubilder in Prozent (%)."
} }

View File

@ -318,7 +318,7 @@
"user": "User", "user": "User",
"date-format-format": "Date format: <code>YYYY-MM-DD Hours:Minutes:Seconds<\/code>", "date-format-format": "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.", "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", "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-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.", "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.", "apply-code-noindex-code-to-this-page": "Apply <code>noindex<\/code> to this page.",
@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found.",
"system-updated": "System updated.",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -313,18 +313,18 @@
"options": "Opciones", "options": "Opciones",
"enter-title": "Ingrese el título", "enter-title": "Ingrese el título",
"media-manager": "Administrar imagenes", "media-manager": "Administrar imagenes",
"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.", "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 imágenes.",
"user": "Usuario", "user": "Usuario",
"date-format-format": "Date format: <code>YYYY-MM-DD Hours:Minutes:Seconds<\/code>", "date-format-format": "Formato: <code>YYYY-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.", "start-typing-a-page-title-to-see-a-list-of-suggestions": "Escriba 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.", "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-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.", "write-the-tags-separated-by-comma": "Escribe las etiquetas separadas por coma.",
"apply-code-noindex-code-to-this-page": "Apply <code>noindex<\/code> to this page.", "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.", "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": "Apply <code>nofollow<\/code> to this page.", "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.", "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": "Apply <code>noarchive<\/code> to this page.", "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.", "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", "uncategorized": "Sin categoría",
"done": "Hecho", "done": "Hecho",
@ -345,7 +345,7 @@
"leave-empty-for-autocomplete-by-bludit": "Deje vacío para ser autocompletado por Bludit.", "leave-empty-for-autocomplete-by-bludit": "Deje vacío para ser autocompletado por Bludit.",
"choose-a-password-for-the-user-admin": "Elija una contraseña para el usuario <code>admin<\/code>", "choose-a-password-for-the-user-admin": "Elija una contraseña para el usuario <code>admin<\/code>",
"access-denied": "Acceso denegado", "access-denied": "Acceso denegado",
"choose-images-to-upload": "Elige imágenes para subir", "choose-images-to-upload": "Seleccione una image para subir",
"insert": "Insertar", "insert": "Insertar",
"upload": "Subir", "upload": "Subir",
"autosave": "Autoguardado", "autosave": "Autoguardado",
@ -362,7 +362,18 @@
"good-night": "Buenas noches", "good-night": "Buenas noches",
"hello": "Hola", "hello": "Hola",
"there-are-no-images-for-the-page": "No hay imágenes para la página.", "there-are-no-images-for-the-page": "No hay imágenes para la página.",
"select-cover-image": "Seleccionar imagen de portada", "select-cover-image": "Seleccionar portada",
"this-plugin-depends-on-the-following-plugins": "Este plugin depende de los siguientes plugins.", "this-plugin-depends-on-the-following-plugins": "Este plugin depende de los siguientes plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No se han encontrado páginas.",
"system-updated": "Sistema actualizado.",
"security": "Seguridad",
"remove-cover-image": "Eliminar portada",
"width": "Ancho",
"height": "Alto",
"quality": "Calidad",
"thumbnails": "Miniaturas",
"thumbnail": "Miniatura",
"thumbnail-width-in-pixels": "Ancho de miniatura en píxeles (px).",
"thumbnail-height-in-pixels": "Altura de miniaturas en píxeles (px).",
"thumbnail-quality-in-percentage": "Calidad de la miniatura en porcentaje (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "Il ny a aucune images pour cette page.", "there-are-no-images-for-the-page": "Il ny a aucune images pour cette page.",
"select-cover-image": "Sélectionnez une image daccroche.", "select-cover-image": "Sélectionnez une image daccroche.",
"this-plugin-depends-on-the-following-plugins": "Ce plugin dépend des plugins suivants.", "this-plugin-depends-on-the-following-plugins": "Ce plugin dépend des plugins suivants.",
"no-pages-found": "Aucune page trouvée" "no-pages-found": "Aucune page trouvée",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -365,5 +365,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -361,5 +361,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -5,9 +5,9 @@
"locale": "ru, ru_RU", "locale": "ru, ru_RU",
"last-update": "2018-08-27", "last-update": "2018-08-27",
"authors": [ "authors": [
"Сергей Ворон http:\/\/voron.pw", "Сергей Ворон https:\/\/voron.pw",
"Макс Костиков https:\/\/kostikov.co", "Макс Костиков https:\/\/kostikov.co",
"", "Paul https:\/\/r-e-d.red",
"" ""
] ]
}, },
@ -60,7 +60,7 @@
"language": "Язык", "language": "Язык",
"plugin": "Плагин", "plugin": "Плагин",
"plugins": "Плагины", "plugins": "Плагины",
"developers": "Разработчики", "developers": "Информация для разработчиков",
"themes": "Темы", "themes": "Темы",
"about": "О системе", "about": "О системе",
"url": "URL", "url": "URL",
@ -76,13 +76,13 @@
"settings": "Настройки", "settings": "Настройки",
"general": "Основные", "general": "Основные",
"advanced": "Расширенные", "advanced": "Расширенные",
"new-content": "Новый контент", "new-content": "Новая запись",
"manage-content": "Управление контентом", "manage-content": "Управление записями",
"add-new-content": "Добавить новый контент", "add-new-content": "Добавить новую запись",
"new-category": "Новая категория", "new-category": "Новая категория",
"you-do-not-have-sufficient-permissions": "У вас недостаточно прав для доступа к этой странице, обратитесь к администратору.", "you-do-not-have-sufficient-permissions": "У вас недостаточно прав для доступа к этой странице, обратитесь к администратору.",
"add-a-new-user": "Добавить пользователя", "add-a-new-user": "Добавить пользователя",
"url-associated-with-the-content": "Связанный с контентом URL", "url-associated-with-the-content": "URL данной записи",
"language-and-timezone": "Язык и часовой пояс", "language-and-timezone": "Язык и часовой пояс",
"change-your-language-and-region-settings": "Изменить настройки языка и региона", "change-your-language-and-region-settings": "Изменить настройки языка и региона",
"notifications": "Оповещения", "notifications": "Оповещения",
@ -132,7 +132,7 @@
"username": "Логин", "username": "Логин",
"first-name": "Имя", "first-name": "Имя",
"last-name": "Фамилия", "last-name": "Фамилия",
"to-schedule-the-content-select-the-date-and-time": "Укажите дату и время когда этот контент будет \"Опубликован\".", "to-schedule-the-content-select-the-date-and-time": "Укажите дату и время когда эта запись будет \"Опубликована\".",
"email": "Email", "email": "Email",
"role": "Роль", "role": "Роль",
"registered": "Зарегистрирован", "registered": "Зарегистрирован",
@ -169,14 +169,14 @@
"editor": "Редактор", "editor": "Редактор",
"administrator": "Администратор", "administrator": "Администратор",
"edit-user": "Редактирование пользователя", "edit-user": "Редактирование пользователя",
"edit-content": "Редактировать контент", "edit-content": "Редактировать запись",
"profile": "Профиль", "profile": "Профиль",
"change-password": "Изменить пароль", "change-password": "Изменить пароль",
"enabled": "Включен", "enabled": "Включен",
"disable-the-user": "Отключить пользователя", "disable-the-user": "Отключить пользователя",
"profile-picture": "Изображение профиля", "profile-picture": "Изображение профиля",
"edit-or-delete-your-categories": "Редактировать или удалить Ваши категории", "edit-or-delete-your-categories": "Редактировать или удалить Ваши категории",
"create-a-new-category-to-organize-your-content": "Создать новую категорию для упорядочивания Вашего контента", "create-a-new-category-to-organize-your-content": "Создать новую категорию для упорядочивания Ваших записей",
"confirm-delete-this-action-cannot-be-undone": "Подтвердите удаление, это действие не обратимо.", "confirm-delete-this-action-cannot-be-undone": "Подтвердите удаление, это действие не обратимо.",
"do-you-want-to-disable-the-user": "Вы хотите отключить пользователя?", "do-you-want-to-disable-the-user": "Вы хотите отключить пользователя?",
"new-password": "Новый пароль", "new-password": "Новый пароль",
@ -185,9 +185,9 @@
"invite-a-friend-to-collaborate-on-your-site": "Пригласить друга для совместной работы на сайте", "invite-a-friend-to-collaborate-on-your-site": "Пригласить друга для совместной работы на сайте",
"number-of-items-to-show-per-page": "Количество элементов, отображаемых на странице.", "number-of-items-to-show-per-page": "Количество элементов, отображаемых на странице.",
"website-or-blog": "«Веб-сайт» или «Блог»", "website-or-blog": "«Веб-сайт» или «Блог»",
"order-content-by": "Сортировать контент по", "order-content-by": "Сортировать записи по",
"edit-or-delete-content-from-your-site": "Редактировать или удалить контент на Вашем сайте", "edit-or-delete-content-from-your-site": "Редактировать или удалить запись на Вашем сайте",
"order-the-content-by-date-to-build-a-blog": "Сортировать контент по дате для режима «Блог» или по содержимому для режима «Веб-сайт».", "order-the-content-by-date-to-build-a-blog": "Сортировать записи по дате для режима «Блог» или по содержимому для режима «Веб-сайт».",
"page-not-found-content": "Привет! Похоже, что страница не существует", "page-not-found-content": "Привет! Похоже, что страница не существует",
"page-not-found": "Страница не найдена", "page-not-found": "Страница не найдена",
"predefined-pages": "Предопределенные страницы", "predefined-pages": "Предопределенные страницы",
@ -228,26 +228,26 @@
"password-must-be-at-least-6-characters-long": "Пароль должен содержать как минимум 6 символов", "password-must-be-at-least-6-characters-long": "Пароль должен содержать как минимум 6 символов",
"ip-address-has-been-blocked": "IP адрес заблокирован.", "ip-address-has-been-blocked": "IP адрес заблокирован.",
"try-again-in-a-few-minutes": "Попробуйте еще раз через несколько минут.", "try-again-in-a-few-minutes": "Попробуйте еще раз через несколько минут.",
"content-published-from-scheduler": "Запланированный контент опубликован", "content-published-from-scheduler": "Запланированная запись опубликована",
"blog": "Блог", "blog": "Блог",
"complete-all-fields": "Заполните все поля", "complete-all-fields": "Заполните все поля",
"static": "Статические", "static": "Статическая",
"about-your-site-or-yourself": "О Вас или Вашем сайте", "about-your-site-or-yourself": "О Вас или Вашем сайте",
"homepage": "Домашняя страница", "homepage": "Домашняя страница",
"disabled": "Отключен", "disabled": "Отключен",
"to-enable-the-user-you-must-set-a-new-password": "Для активации пользователя Вы должны задать новый пароль.", "to-enable-the-user-you-must-set-a-new-password": "Для активации пользователя Вы должны задать новый пароль.",
"delete-the-user-and-associate-his-content-to-admin-user": "Удалить пользователя и связать его контент с учётной записью администратора", "delete-the-user-and-associate-his-content-to-admin-user": "Удалить пользователя и связать его записи с учётной записью администратора",
"delete-the-user-and-all-his-content": "Удалить пользователя и весь его контент", "delete-the-user-and-all-his-content": "Удалить пользователя и все его записи",
"user-disabled": "Пользователь отключен", "user-disabled": "Пользователь отключен",
"user-password-changed": "Пароль пользователя изменен", "user-password-changed": "Пароль пользователя изменен",
"the-password-and-confirmation-password-do-not-match": "Пароль и его подтверждение не совпадают", "the-password-and-confirmation-password-do-not-match": "Пароль и его подтверждение не совпадают",
"scheduled-content": "Запланированный контент", "scheduled-content": "Запланированная запись",
"there-are-no-scheduled-content": "Нет запланированного контента", "there-are-no-scheduled-content": "Нет запланированных записей",
"new-content-created": "Новый контент создан", "new-content-created": "Новая запись создана",
"content-edited": "Контент отредактирован", "content-edited": "Запись отредактирована",
"content-deleted": "Контент удалён", "content-deleted": "Запись удалена",
"undefined": "Неопределено", "undefined": "Неопределено",
"create-new-content-for-your-site": "Создать новый контент для сайта", "create-new-content-for-your-site": "Создать новую запись для сайта",
"there-are-no-draft-content": "Черновиков нет", "there-are-no-draft-content": "Черновиков нет",
"order-items-by": "Упорядочить по", "order-items-by": "Упорядочить по",
"all-content": "Всё содержимое", "all-content": "Всё содержимое",
@ -256,7 +256,7 @@
"draft-content": "Содержимое черновика", "draft-content": "Содержимое черновика",
"post": "Опубликовать", "post": "Опубликовать",
"default": "По умолчанию", "default": "По умолчанию",
"latest-content": "Последний контент", "latest-content": "Последняя запись",
"default-message": "Сообщение по умолчанию", "default-message": "Сообщение по умолчанию",
"no-parent": "Нет родителя", "no-parent": "Нет родителя",
"have-you-seen-my-ball": "Ты мой мячик видел?", "have-you-seen-my-ball": "Ты мой мячик видел?",
@ -280,9 +280,9 @@
"reading-time": "Время чтения", "reading-time": "Время чтения",
"minutes": "минуты", "minutes": "минуты",
"minute": "минут", "minute": "минут",
"example-page-1-slug": "создайте-свой-собственный-контент", "example-page-1-slug": "создайте-свою-собственную-запись",
"example-page-1-title": "Создайте свой собственный контент", "example-page-1-title": "Создайте свою собственную запись",
"example-page-1-content": "Начните писать свой собственный контент или отредактируйте текущий, чтобы он соответствовал вашим потребностям. Для создания, редактирования или удаления контента вам необходимо войти в [панель управления](.\/admin) с именем пользователя `admin` и паролем, который вы установили в процессе установки.", "example-page-1-content": "Начните писать свой собственный контент или отредактируйте текущий, чтобы он соответствовал вашим потребностям. Для создания, редактирования или удаления записей вам необходимо войти в [панель управления](.\/admin) с именем пользователя `admin` и паролем, который вы установили в процессе установки.",
"example-page-2-slug": "настройте-свой-новый-сайт", "example-page-2-slug": "настройте-свой-новый-сайт",
"example-page-2-title": "Настройте свой новый сайт", "example-page-2-title": "Настройте свой новый сайт",
"example-page-2-content": "Обновите настройки своего сайта в [панели управления](.\/admin), вы можете изменить название, описание и социальные сети в [Настройки > Общие](.\/admin\/settings-general).", "example-page-2-content": "Обновите настройки своего сайта в [панели управления](.\/admin), вы можете изменить название, описание и социальные сети в [Настройки > Общие](.\/admin\/settings-general).",
@ -335,7 +335,7 @@
"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": "Разрешить Unicode", "allow-unicode": "Разрешить Unicode",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Разрешить символы Unicode в URL и других частях системы.", "allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Разрешить символы Unicode в URL и других частях системы.",
"variables-allowed": "Разрешённые переменные", "variables-allowed": "Переменные разрешены",
"tag": "Тег", "tag": "Тег",
"drag-and-drop-to-sort-the-plugins": "Отсортируйте плагин перетаскиванием.", "drag-and-drop-to-sort-the-plugins": "Отсортируйте плагин перетаскиванием.",
"seo": "SEO", "seo": "SEO",
@ -354,16 +354,27 @@
"site": "Сайт", "site": "Сайт",
"first": "Первый", "first": "Первый",
"last": "Последний", "last": "Последний",
"there-are-no-pages-at-this-moment": "В настоящее время страниц нет.", "there-are-no-pages-at-this-moment": "На данный момент записей нет.",
"there-are-no-static-pages-at-this-moment": "В настоящее время статических страниц нет.", "there-are-no-static-pages-at-this-moment": "На данный момент статических записей нет.",
"there-are-no-draft-pages-at-this-moment": "В настоящее время черновиков нет.", "there-are-no-draft-pages-at-this-moment": "На данный момент черновиков нет.",
"good-morning": "Доброе утро", "good-morning": "Доброе утро",
"good-afternoon": "Добрый день", "good-afternoon": "Добрый день",
"good-evening": "Добрый вечер", "good-evening": "Добрый вечер",
"good-night": "Доброй ночи", "good-night": "Доброй ночи",
"hello": "Привет", "hello": "Привет",
"there-are-no-images-for-the-page": "На вашей странице нет изображений.", "there-are-no-images-for-the-page": "Для этой страницы нет изображений.",
"select-cover-image": "Выбрать изображение обложки", "select-cover-image": "Выберите обложку записи",
"this-plugin-depends-on-the-following-plugins": "Этот плагин зависит от следующих плагинов.", "this-plugin-depends-on-the-following-plugins": "Этот плагин зависит от следующих плагинов.",
"no-pages-found": "Страниц не найдено" "no-pages-found": "Страниц не найдено",
"system-updated": "Система обновлена",
"security": "Безопасность",
"remove-cover-image": "Удалить изображение обложки",
"width": "Ширина",
"height": "Высота",
"quality": "Качество",
"thumbnails": "Миниатюры",
"thumbnail": "Миниатюра изображения",
"thumbnail-width-in-pixels": "Ширина миниатюры изображения в пикселях (px).",
"thumbnail-height-in-pixels": "Высота миниатюры изображения в пикселях (px).",
"thumbnail-quality-in-percentage": "Качество миниатюры изображения в процентах (%)."
} }

View File

@ -3,7 +3,7 @@
"native": "Türkçe", "native": "Türkçe",
"english-name": "Turkish", "english-name": "Turkish",
"locale": "tr, tr_TR", "locale": "tr, tr_TR",
"last-update": "2018-09-18", "last-update": "2018-11-24",
"authors": [ "authors": [
"Ali Demirtas", "Ali Demirtas",
"guleyc", "guleyc",
@ -366,5 +366,16 @@
"there-are-no-images-for-the-page": "Sayfa için resim yok.", "there-are-no-images-for-the-page": "Sayfa için resim yok.",
"select-cover-image": "Kapak resmini seç", "select-cover-image": "Kapak resmini seç",
"this-plugin-depends-on-the-following-plugins": "Bu eklenti aşağıdaki eklentilere bağlıdır.", "this-plugin-depends-on-the-following-plugins": "Bu eklenti aşağıdaki eklentilere bağlıdır.",
"no-pages-found": "No pages found" "no-pages-found": "Sayfa bulunamadı",
"system-updated": "Sistem güncellendi",
"security": "Güvenlik",
"remove-cover-image": "Kapak resmini kaldır",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -3,11 +3,11 @@
"native": "Українська (Україна)", "native": "Українська (Україна)",
"english-name": "Ukrainian", "english-name": "Ukrainian",
"locale": "uk_UA", "locale": "uk_UA",
"last-update": "2018-09-09", "last-update": "2018-11-30",
"authors": [ "authors": [
"Aleksei86 https:\/\/aleksei86.info\/", "Aleksei86 https:\/\/aleksei86.info\/",
"Alek Belta https:\/\/alekbelta.com\/", "Alek Belta https:\/\/alekbelta.com\/",
"", "Paul https:\/\/r-e-d.red\/",
"" ""
] ]
}, },
@ -354,16 +354,27 @@
"site": "Сайт", "site": "Сайт",
"first": "Перший", "first": "Перший",
"last": "Останній", "last": "Останній",
"there-are-no-pages-at-this-moment": "There are no pages at this moment.", "there-are-no-pages-at-this-moment": "Наразі немає сторінок.",
"there-are-no-static-pages-at-this-moment": "There are no static pages at this moment.", "there-are-no-static-pages-at-this-moment": "Наразі статичних сторінок немає.",
"there-are-no-draft-pages-at-this-moment": "There are no draft pages at this moment.", "there-are-no-draft-pages-at-this-moment": "Наразі немає чернеток сторінок.",
"good-morning": "Доброго ранку", "good-morning": "Доброго ранку",
"good-afternoon": "Доброго дня", "good-afternoon": "Доброго дня",
"good-evening": "Доброго вечора", "good-evening": "Доброго вечора",
"good-night": "Good night", "good-night": "Надобраніч",
"hello": "Вітаю", "hello": "Вітаю",
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "Немає сторінок зображення.",
"select-cover-image": "Select cover image", "select-cover-image": "Виберіть обкладинку записи",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "Цей плагін залежить від наступних плагінів.",
"no-pages-found": "No pages found" "no-pages-found": "Сторінок не знайдено",
"system-updated": "Система оновлена",
"security": "Безпека",
"remove-cover-image": "Видалити обкладинку записи",
"width": "Ширина",
"height": "Висота",
"quality": "Якість",
"thumbnails": "Мініатюри",
"thumbnail": "Мініатюра",
"thumbnail-width-in-pixels": "Ширина мініатюри в пікселях (px).",
"thumbnail-height-in-pixels": "Висота мініатюри в пікселях (px).",
"thumbnail-quality-in-percentage": "Якість мініатюри у відсотках (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -364,5 +364,16 @@
"there-are-no-images-for-the-page": "There are no images for the page.", "there-are-no-images-for-the-page": "There are no images for the page.",
"select-cover-image": "Select cover image", "select-cover-image": "Select cover image",
"this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.", "this-plugin-depends-on-the-following-plugins": "This plugin depends on the following plugins.",
"no-pages-found": "No pages found" "no-pages-found": "No pages found",
"system-updated": "System updated",
"security": "Security",
"remove-cover-image": "Remove cover image",
"width": "Width",
"height": "Height",
"quality": "Quality",
"thumbnails": "Thumbnails",
"thumbnail": "Thumbnail",
"thumbnail-width-in-pixels": "Thumbnail width in pixels (px).",
"thumbnail-height-in-pixels": "Thumbnail height in pixels (px).",
"thumbnail-quality-in-percentage": "Thumbnail quality in percentage (%)."
} }

View File

@ -2,6 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "О блоге", "name": "О блоге",
"description": "Небольшое описание о вашем сайте или о себя." "description": "Небольшое описание о вашем сайте или о себе."
} }
} }

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -2,10 +2,10 @@
"plugin-data": "plugin-data":
{ {
"name": "API", "name": "API",
"description": "Интерфейс для взаимодействия с Bludit по HTTP-протоколу. <br> Узнать больше про этот плагин <a href=\"https://docs.bludit.com/en/api/introduction\">API Introduction</a>." "description": "Интерфейс для взаимодействия с Bludit по HTTP-протоколу. <br> Узнайте больше про этот плагин в <a href=\"https://docs.bludit.com/en/api/introduction\">API Introduction</a>."
}, },
"api-token": "API Tтокен", "api-token": "API Tокен",
"amount-of-pages": "Количество страниц", "amount-of-pages": "Количество страниц",
"this-is-the-maximum-of-pages-to-return-when-you-call-to": "Максимальное количество возвращаемых страниц при обращении к /api/pages", "this-is-the-maximum-of-pages-to-return-when-you-call-to": "Максимальное количество возвращаемых страниц при обращении к /api/pages",
"this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "Данные токен используется только для чтения, он обновляется при каждой переустановке плагина" "this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "Данный токен используется только для чтения, он обновляется при каждой переустановке плагина"
} }

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -0,0 +1,12 @@
{
"plugin-data":
{
"name": "Резервные копии",
"description": "Самый простой способ создать резервную копию вашего сайта."
},
"create-backup": "Создать резервную копию",
"download": "Загрузить",
"restore-backup": "Восстановление из резервной копии",
"delete-backup": "Удалить резервную копию",
"there-are-no-backups-for-the-moment": "На данный момент резервных копий нет"
}

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -0,0 +1,8 @@
{
"plugin-data":
{
"name": "Hit Counter",
"description": "Anzeige der Anzahl der Seitenaufrufe oder der Besuche der Website in der Seitenleiste."
},
"show-unique-visitors": "Anzahl der Besuche"
}

View File

@ -0,0 +1,8 @@
{
"plugin-data":
{
"name": "Hit Counter",
"description": "Anzeige der Anzahl der Seitenaufrufe oder der Besuche der Website in der Seitenleiste."
},
"show-unique-visitors": "Anzahl der Besuche"
}

View File

@ -2,6 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Contador de visitas", "name": "Contador de visitas",
"description": "Muestre el número de visitas o visitantes únicos en la barra lateral de su sitio." "description": "Muestra el número de visitas o visitantes únicos en la barra lateral de su sitio."
} }
} }

View File

@ -0,0 +1,7 @@
{
"plugin-data":
{
"name": "Счётчик посещений",
"description": "Показывает количество посещений или уникальных посетителей на боковой панели вашего сайта."
}
}

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -0,0 +1,10 @@
{
"plugin-data":
{
"name": "HTML Код",
"description": "Добавьте код HTML, CSS или Javascript в метаданные заголовка, заголовок или нижний колонтитул вашего сайта."
},
"insert-code-in-the-theme-inside-the-tag-head": "Вставить код в тему внутри тега &#60;head&#62; &#60;/head&#62;",
"insert-code-in-the-theme-at-the-top": "Вставьте код в тему вверху.",
"insert-code-in-the-theme-at-the-bottom": "Вставьте код в тему внизу."
}

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -6,5 +6,5 @@
}, },
"enable-maintenance-mode": "Включить режим обслуживания", "enable-maintenance-mode": "Включить режим обслуживания",
"message": "Сообщение" "message": "Сообщение, которое увидят посетители сайта"
} }

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -0,0 +1,10 @@
{
"plugin-data":
{
"name": "Навигация",
"description": "Меню навигации с родительскими и дочерними страницами/записями для боковой панели."
},
"home-link": "Домашняя ссылка",
"show-the-home-link-on-the-sidebar": "Показать ссылку на домашнюю страницу на боковой панели.",
"amount-of-items": "Количество элементов"
}

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Open Graph ви позволява да свържете вашето съдържание със социални мрежи." "description": "Open Graph ви позволява да свържете вашето съдържание със социални мрежи."
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -4,5 +4,6 @@
"name": "Open Graph", "name": "Open Graph",
"description": "Plugin zur Verwendung des Open Graph Protocols (beispielsweise für Facebook)." "description": "Plugin zur Verwendung des Open Graph Protocols (beispielsweise für Facebook)."
}, },
"default-image": "Standardbild" "set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -4,5 +4,6 @@
"name": "Open Graph", "name": "Open Graph",
"description": "Plugin zur Verwendung des Open Graph Protocols (beispielsweise für Facebook)." "description": "Plugin zur Verwendung des Open Graph Protocols (beispielsweise für Facebook)."
}, },
"default-image": "Standardbild" "set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -4,5 +4,6 @@
"name": "Open Graph", "name": "Open Graph",
"description": "The Open Graph protocol enables any web page to become a rich object in a social graph." "description": "The Open Graph protocol enables any web page to become a rich object in a social graph."
}, },
"default-image": "Default image" "set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -4,5 +4,6 @@
"name": "Open Graph", "name": "Open Graph",
"description": "Este complemento mejora las publicaciones en las redes sociales con este plugin." "description": "Este complemento mejora las publicaciones en las redes sociales con este plugin."
}, },
"default-image": "Imagen predeterminada" "set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Permets à nimporte quelle page web de devenir lobjet enrichi dun graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que nimporte quel autre objet sur Facebook." "description": "Permets à nimporte quelle page web de devenir lobjet enrichi dun graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que nimporte quel autre objet sur Facebook."
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -4,5 +4,6 @@
"name": "Open Graph", "name": "Open Graph",
"description": "Il protocollo Open Graph permette a qualsiasi pagina web di diventare un rich object in un social graph." "description": "Il protocollo Open Graph permette a qualsiasi pagina web di diventare un rich object in un social graph."
}, },
"default-image": "Immagine predefinita" "set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Open Graph protocol(OGP)を有効にすると、Webページがソーシャルグラフ上のリッチなオブジェクトになります。" "description": "Open Graph protocol(OGP)を有効にすると、Webページがソーシャルグラフ上のリッチなオブジェクトになります。"
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "De Open Graph protocol kan van elke webpagina een rich object in een sociale grafiek maken." "description": "De Open Graph protocol kan van elke webpagina een rich object in een sociale grafiek maken."
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Protokół Open Graph zezwala stronie na stosowanie meta tagów używanych w serwisach społecznościowych." "description": "Protokół Open Graph zezwala stronie na stosowanie meta tagów używanych w serwisach społecznościowych."
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Протокол Open Graph дает возможность связывать свой контент с социальными сетями." "description": "Протокол Open Graph дает возможность связывать свой контент с социальными сетями."
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -4,5 +4,6 @@
"name": "Open Graph", "name": "Open Graph",
"description": "Open Graph protokolü sosyal bir grafikte zengin bir nesne halinde herhangi bir web sayfasını sağlar." "description": "Open Graph protokolü sosyal bir grafikte zengin bir nesne halinde herhangi bir web sayfasını sağlar."
}, },
"default-image": "Varsayılan resim" "set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Протокол Open Graph дозволяє ділитися будь-якою веб-сторінкою у соціальних мережах." "description": "Протокол Open Graph дозволяє ділитися будь-якою веб-сторінкою у соціальних мережах."
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -3,5 +3,7 @@
{ {
"name": "開放社交關係圖", "name": "開放社交關係圖",
"description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件" "description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件"
} },
"set-a-default-image-for-content": "Set a default image for the content without pictures.",
"set-your-facebook-app-id": "Set your Facebook App ID."
} }

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://plugins.bludit.com",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-10-20", "releaseDate": "2018-11-25",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

View File

@ -6,7 +6,8 @@ class pluginOpenGraph extends Plugin {
{ {
// Fields and default values for the database of this plugin // Fields and default values for the database of this plugin
$this->dbFields = array( $this->dbFields = array(
'defaultImage'=>'' 'defaultImage'=>'',
'fbAppId'=>''
); );
} }
@ -21,7 +22,13 @@ class pluginOpenGraph extends Plugin {
$html .= '<div>'; $html .= '<div>';
$html .= '<label>'.$L->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 .= '<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 .= '<span class="tip">'.$L->g('set-a-default-image-for-content').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$L->get('Facebook App ID').'</label>';
$html .= '<input name="fbAppId" type="text" value="'.$this->getValue('fbAppId').'" placeholder="App ID">';
$html .= '<span class="tip">'.$L->g('set-your-facebook-app-id').'</span>';
$html .= '</div>'; $html .= '</div>';
return $html; return $html;
@ -60,8 +67,10 @@ class pluginOpenGraph extends Plugin {
// The user is in the homepage // The user is in the homepage
default: default:
$pageContent = ''; $pageContent = '';
// The image it's from the first page if (Text::isNotEmpty($this->getValue('defaultImage'))) {
if (isset($content[0]) ) { $og['image'] = $this->getValue('defaultImage');
}
elseif (isset($content[0]) ) {
$og['image'] = $content[0]->coverImage($absolute=true); $og['image'] = $content[0]->coverImage($absolute=true);
$pageContent = $content[0]->content(); $pageContent = $content[0]->content();
} }
@ -74,7 +83,7 @@ class pluginOpenGraph extends Plugin {
$html .= '<meta property="og:title" content="'.$og['title'].'">'.PHP_EOL; $html .= '<meta property="og:title" content="'.$og['title'].'">'.PHP_EOL;
$html .= '<meta property="og:description" content="'.$og['description'].'">'.PHP_EOL; $html .= '<meta property="og:description" content="'.$og['description'].'">'.PHP_EOL;
$html .= '<meta property="og:url" content="'.$og['url'].'">'.PHP_EOL; $html .= '<meta property="og:url" content="'.$og['url'].'">'.PHP_EOL;
$html .= '<meta property="og:siteName" content="'.$og['siteName'].'">'.PHP_EOL; $html .= '<meta property="og:site_name" content="'.$og['siteName'].'">'.PHP_EOL;
// If the page doesn't have a coverImage try to get an image from the HTML content // If the page doesn't have a coverImage try to get an image from the HTML content
if (empty($og['image'])) { if (empty($og['image'])) {
@ -90,6 +99,9 @@ class pluginOpenGraph extends Plugin {
} }
$html .= '<meta property="og:image" content="'.$og['image'].'">'.PHP_EOL; $html .= '<meta property="og:image" content="'.$og['image'].'">'.PHP_EOL;
if (Text::isNotEmpty($this->getValue('fbAppId'))) {
$html .= '<meta property="fb:app_id" content="'. $this->getValue('fbAppId').'">'.PHP_EOL;
}
return $html; return $html;
} }

View File

@ -0,0 +1,12 @@
{
"plugin-data":
{
"name": "Remote Content",
"description": "Этот плагин обеспечивает простой способ синхронизации вашего сайта и Github или аналогичной платформы."
},
"webhook": "Вебхук",
"source": "Источник",
"keep-content": "Сохранять записи",
"complete-url-of-the-zip-file": "Полный URL-адрес zip-файла.",
"if-you-want-to-keep-the-content-generate-via-the-user-interface-enable-this-field": "Если вы хотите, чтобы записи генерировались через пользовательский интерфейс, включите это поле."
}

View File

@ -2,9 +2,9 @@
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com/plugin/remote-content", "website": "https://plugins.bludit.com/plugin/remote-content",
"version": "3.2", "version": "3.5",
"releaseDate": "2018-09-14", "releaseDate": "2018-09-14",
"license": "MIT", "license": "MIT",
"compatible": "3.2", "compatible": "3.5",
"notes": "" "notes": ""
} }

Some files were not shown because too many files have changed in this diff Show More