Merge pull request #1 from bludit/master

upd
This commit is contained in:
Dave 2018-10-28 11:42:14 +01:00 committed by GitHub
commit ca26bcc80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
138 changed files with 2411 additions and 1324 deletions

7
.gitignore vendored
View File

@ -5,7 +5,12 @@ bl-plugins/timemachine
bl-plugins/timemachine-x
bl-plugins/discovery
bl-plugins/updater
bl-plugins/medium-editor
bl-plugins/quill
bl-kernel/bludit.pro.php
bl-themes/docs
bl-themes/docsx
bl-themes/mediumish
bl-themes/editorial
bl-themes/mediumish
bl-themes/clean-blog
bl-themes/grayscale

View File

@ -15,4 +15,4 @@ RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
</IfModule>

View File

@ -20,7 +20,6 @@ Social Networks
- [Twitter](https://twitter.com/bludit)
- [Facebook](https://www.facebook.com/bluditcms)
- [Google+](https://plus.google.com/+Bluditcms)
- [Youtube](https://www.youtube.com/channel/UCuLu0Z_CHBsTiYTDz129x9Q?view_as=subscriber)
Requirements

View File

@ -46,8 +46,6 @@ class dbList extends dbJSON
// Returns all the items from the list
if ($numberOfItems==-1) {
// Invert keys to values, is necesary returns as key the key pages
$list = array_flip($list);
return $list;
}

View File

@ -131,7 +131,7 @@ class Plugin {
return Sanitize::htmlDecode($this->db[$field]);
}
}
return false;
return $this->dbFields[$field];
}
public function label()
@ -216,10 +216,10 @@ class Plugin {
// Create workspace
$workspace = $this->workspace();
mkdir($workspace, 0755, true);
mkdir($workspace, DIR_PERMISSIONS, true);
// Create plugin directory for the database
mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, 0755, true);
mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, DIR_PERMISSIONS, true);
$this->dbFields['position'] = $position;
// Sanitize default values to store in the file

View File

@ -5,12 +5,17 @@
// ============================================================================
function updateBludit() {
global $site;
// Check if Bludit need to be update.
if( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
// New installation
if ($site->currentBuild()==0) {
$site->set(array('currentBuild'=>BLUDIT_BUILD));
}
// Check if Bludit need to be update
if ( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
Log::set('UPDATE SYSTEM - Starting.');
// Updates only for version less than Bludit v3.0 rc-3
if ($site->currentBuild()<'20180910') {
if ($site->currentBuild()<='20180910') {
@mkdir(PATH_WORKSPACES, DIR_PERMISSIONS, true);
$plugins = array('simple-stats', 'pluginRSS', 'pluginSitemap', 'pluginTimeMachineX', 'pluginBackup');
foreach ($plugins as $plugin) {
@ -22,6 +27,12 @@ function updateBludit() {
}
}
// Updates only for version less than Bludit v3.1
if ($site->currentBuild()<='20180921') {
@mkdir(PATH_UPLOADS_PAGES, DIR_PERMISSIONS, true);
$site->set(array('imageRelativeToAbsolute'=>true, 'imageRestrict'=>false));
}
// Set the current build number
$site->set(array('currentBuild'=>BLUDIT_BUILD));
Log::set('UPDATE SYSTEM - Finished.');

View File

@ -64,6 +64,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
try {
$pageKey = $layout['parameters'];
$page = new Page($pageKey);
$uuid = $page->uuid();
} catch (Exception $e) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$pageKey, LOG_TYPE_ERROR);
Redirect::page('content');

View File

@ -21,5 +21,5 @@
// ============================================================================
if ($login->logout()) {
Redirect::home();
Redirect::admin();
}

View File

@ -32,5 +32,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Main after POST
// ============================================================================
// UUID of the page is need it for autosave and media manager
$uuid = $pages->generateUUID();
// Title of the page
$layout['title'] = $L->g('New content').' - '.$layout['title'];

View File

@ -51,6 +51,12 @@ a:hover {
border-color: #4a90e2;
}
.btn-light {
color: #212529;
background-color: #f3f3f3;
border-color: #ced4d9;
}
.btn-form {
background-color: #F3F3F3;
border-color: #DDD;
@ -91,6 +97,10 @@ body.login {
#dashboard ul.list-group.list-group-striped li {
border: none;
word-break: break-word;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
#dashboard ul.list-group.list-group-striped li:nth-of-type(even) {
@ -112,6 +122,16 @@ body.login {
color: #4586d4;
}
#hello-message {
padding: 10px 0;
color: #777;
margin-bottom: 20px;
}
#hello-message span.oi {
top: 3px;
}
.ct-series-a .ct-line {
/* Set the colour of this series line */
stroke: #4a90e2;
@ -223,4 +243,16 @@ div.sidebar .nav-item span.oi {
td.child {
padding-left: 30px;
}
}
/*
Manage > New Content
*/
#jseditor {
background: #fff;
padding: 10px 5% !important;
font-size: 16px;
line-height: 1.5em;
}

View File

@ -1,18 +1,31 @@
<?php
// Preload the first 10 files to not call via AJAX when the user open the first time the media manager
$listOfFiles = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS, '*', '*', $GLOBALS['BLUDIT_MEDIA_MANAGER_SORT_BY_DATE'], false);
$listOfFilesByPage = array_chunk($listOfFiles, $GLOBALS['BLUDIT_MEDIA_MANAGER_AMOUNT_OF_FILES']);
if (IMAGE_RESTRICT) {
$imagesDirectory = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.$uuid.'/');
$imagesURL = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.$uuid.'/');
$thumbnailDirectory = PATH_UPLOADS_PAGES.$uuid.DS.'thumbnails'.DS;
$thumbnailHTML = HTML_PATH_UPLOADS_PAGES.$uuid.'/thumbnails/';
$thumbnailURL = DOMAIN_UPLOADS_PAGES.$uuid.'/thumbnails/';
} else {
$imagesDirectory = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS);
$imagesURL = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS);
$thumbnailDirectory = PATH_UPLOADS_THUMBNAILS;
$thumbnailHTML = HTML_PATH_UPLOADS_THUMBNAILS;
$thumbnailURL = DOMAIN_UPLOADS_THUMBNAILS;
}
$listOfFilesByPage = Filesystem::listFiles($thumbnailDirectory, '*', '*', $GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'], $GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES']);
$preLoadFiles = array();
if (!empty($listOfFilesByPage[0])) {
foreach ($listOfFilesByPage[0] as $file) {
array_push($preLoadFiles, basename($file));
$filename = basename($file);
array_push($preLoadFiles, $filename);
}
}
// Amount of pages for the paginator
$numberOfPages = count($listOfFilesByPage);
?>
<div id="jsbluditMediaModal" class="modal fade" tabindex="-1" role="dialog">
<div id="jsmediaManagerModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="container-fluid">
@ -26,7 +39,6 @@ $numberOfPages = count($listOfFilesByPage);
<!-- Form and Input file -->
<form name="bluditFormUpload" id="jsbluditFormUpload" enctype="multipart/form-data">
<input type="hidden" name="tokenCSRF" value="<?php echo $security->getTokenCSRF() ?>">
<div class="custom-file">
<input type="file" class="custom-file-input" id="jsbluditInputFiles" name="bluditInputFiles[]" multiple>
<label class="custom-file-label" for="jsbluditInputFiles"><?php $L->p('Choose images to upload'); ?></label>
@ -35,7 +47,7 @@ $numberOfPages = count($listOfFilesByPage);
<!-- Progress bar -->
<div class="progress mt-2">
<div id="jsbluditProgressBar" class="progress-bar bg-info" role="progressbar" style="width:0%"></div>
<div id="jsbluditProgressBar" class="progress-bar bg-primary" role="progressbar" style="width:0%"></div>
</div>
<!--
@ -73,65 +85,80 @@ echo 'var preLoadFiles = '.json_encode($preLoadFiles).';';
?>
function openMediaManager() {
$('#jsbluditMediaModal').modal('show');
$('#jsmediaManagerModal').modal('show');
}
function closeMediaManager() {
$('#jsbluditMediaModal').modal('hide');
$('#jsmediaManagerModal').modal('hide');
}
// Remove all files from the table
function cleanFiles() {
function cleanTable() {
$('#jsbluditMediaTable').empty();
}
// Show the files in the table
function displayFiles(files) {
// Clean table
cleanFiles();
cleanTable();
// Regenerate the table
$.each(files, function(key, filename) {
tableRow = '<tr id="js'+filename+'">'+
'<td style="width:80px"><img class="img-thumbnail" alt="200x200" src="<?php echo HTML_PATH_UPLOADS_THUMBNAILS ?>'+filename+'" style="width: 50px; height: 50px;"><\/td>'+
'<td class="information">'+
'<div class="pb-2">'+filename+'<\/div>'+
'<div>'+
'<button type="button" class="btn btn-primary btn-sm mr-2" onClick="editorInsertMedia(\''+filename+'\'); closeMediaManager();"><?php $L->p('Insert') ?><\/button>'+
'<button type="button" class="btn btn-primary btn-sm" onClick="setCoverImage(\''+filename+'\'); closeMediaManager();"><?php $L->p('Set as cover image') ?><\/button>'+
'<button type="button" class="btn btn-secondary btn-sm float-right" onClick="deleteMedia(\''+filename+'\')"><?php $L->p('Delete') ?><\/button>'+
'<\/div>'+
'<\/td>'+
'<\/tr>';
$('#jsbluditMediaTable').append(tableRow);
});
if (files.length > 0) {
$.each(files, function(key, filename) {
var thumbnail = "<?php echo $thumbnailURL; ?>"+filename;
var image = "<?php echo $imagesURL; ?>"+filename;
tableRow = '<tr id="js'+filename+'">'+
'<td style="width:80px"><img class="img-thumbnail" alt="200x200" src="'+thumbnail+'" style="width: 50px; height: 50px;"><\/td>'+
'<td class="information">'+
'<div class="pb-2">'+filename+'<\/div>'+
'<div>'+
'<button type="button" class="btn btn-primary btn-sm mr-2" onClick="editorInsertMedia(\''+image+'\'); closeMediaManager();"><?php $L->p('Insert') ?><\/button>'+
'<button type="button" class="btn btn-primary btn-sm" onClick="setCoverImage(\''+filename+'\'); closeMediaManager();"><?php $L->p('Set as cover image') ?><\/button>'+
'<button type="button" class="btn btn-danger btn-sm float-right" onClick="deleteMedia(\''+filename+'\')"><?php $L->p('Delete') ?><\/button>'+
'<\/div>'+
'<\/td>'+
'<\/tr>';
$('#jsbluditMediaTable').append(tableRow);
});
}
if (files.length == 0) {
$('#jsbluditMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
}
}
// Get the list of files via AJAX, filter by the page number
function getFiles(pageNumber) {
$.post("<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/list-files",
$.post(HTML_PATH_ADMIN_ROOT+"ajax/list-images",
{ tokenCSRF: tokenCSRF,
pageNumber: pageNumber,
path: "thumbnails" // the path are defined in the list-files
uuid: "<?php echo $uuid; ?>",
path: "thumbnails" // the paths are defined in the list-images.php
},
function(data) {
displayFiles(data.files);
});
}
);
}
// Delete the file and the thumbnail if exist
function deleteMedia(filename) {
$.post("<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/delete-file",
$.post(HTML_PATH_ADMIN_ROOT+"ajax/delete-image",
{ tokenCSRF: tokenCSRF,
filename: filename
filename: filename,
uuid: "<?php echo $uuid; ?>"
},
function(data) {
getFiles(1);
});
}
);
}
function setCoverImage(filename) {
var image = "<?php echo $imagesURL; ?>"+filename;
$("#jscoverImage").val(filename);
$("#jscoverImagePreview").attr("src", HTML_PATH_UPLOADS_THUMBNAILS+filename);
$("#jscoverImagePreview").attr("src", image);
}
$(document).ready(function() {
@ -144,10 +171,18 @@ $(document).ready(function() {
// Check file size ?
// Check file type/extension ?
$("#jsbluditProgressBar").width("1%");
// Data to send via AJAX
var uuid = $("#jsuuid").val();
var formData = new FormData($("#jsbluditFormUpload")[0]);
formData.append('uuid', uuid);
formData.append('tokenCSRF', tokenCSRF);
$.ajax({
url: "<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/upload-files",
url: HTML_PATH_ADMIN_ROOT+"ajax/upload-images",
type: "POST",
data: new FormData($("#jsbluditFormUpload")[0]),
data: formData,
cache: false,
contentType: false,
processData: false,

View File

@ -35,7 +35,7 @@
<?php Theme::plugins('adminHead') ?>
</head>
<body>
<body class="h-100">
<!-- Plugins -->
<?php Theme::plugins('adminBodyBegin') ?>
@ -57,9 +57,9 @@
<!-- Navbar, only for small devices -->
<?php include('html/navbar.php'); ?>
<div class="container">
<div class="container h-100">
<!-- 25%/75% split on large devices, small, medium devices hide -->
<div class="row">
<div class="row h-100">
<!-- LEFT SIDEBAR - Display only on large devices -->
<div class="sidebar col-lg-2 d-none d-lg-block">
@ -67,7 +67,7 @@
</div>
<!-- RIGHT MAIN -->
<div class="col-lg-10 pt-3">
<div class="col-lg-10 pt-3 pb-1 h-100">
<?php
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
@ -87,4 +87,4 @@
<?php Theme::plugins('adminBodyEnd') ?>
</body>
</html>
</html>

View File

@ -68,9 +68,10 @@ EOF;
$enctype = empty($args['enctype'])?'':'enctype="'.$args['enctype'].'"';
$action = empty($args['action'])?'action=""':'action="'.$args['action'].'"';
$method = empty($args['method'])?'method="post"':'method="'.$args['method'].'"';
$style = empty($args['style'])?'':'style="'.$args['style'].'"';
return <<<EOF
<form $class $enctype $id $method $action autocomplete="off">
<form $class $enctype $id $method $action $style autocomplete="off">
EOF;
}

View File

@ -87,7 +87,7 @@ function table($type) {
echo '<td class="pt-3 text-center d-none d-sm-table-cell">'.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 '<button type="button" class="btn btn-secondary 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-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 '</tr>';
@ -111,7 +111,7 @@ function table($type) {
echo '<td class="pt-3 text-center d-none d-sm-table-cell">'.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 '<button type="button" class="btn btn-secondary 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-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 '</tr>';
@ -143,7 +143,7 @@ function table($type) {
echo '<td class="pt-3 text-center d-none d-sm-table-cell">'.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 '<button type="button" class="btn btn-secondary 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-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 '</tr>';

View File

@ -2,6 +2,28 @@
<div class="row">
<div class="col-md-7 d-none d-sm-block">
<!-- Good message -->
<div>
<h2 id="hello-message"><?php echo $L->g('hello') ?></h2>
<script>
$( document ).ready(function() {
$("#hello-message").fadeOut(1000, function() {
var date = new Date()
var hours = date.getHours()
if (hours > 6 && hours < 12) {
$(this).html('<span class="oi oi-sun"></span> <?php echo $L->g('good-morning') ?>');
} else if (hours > 12 && hours < 18) {
$(this).html('<span class="oi oi-sun"></span> <?php echo $L->g('good-afternoon') ?>');
} else if (hours > 18 && hours < 22) {
$(this).html('<span class="oi oi-moon"></span> <?php echo $L->g('good-evening') ?>');
} else {
$(this).html('<span class="oi oi-moon"></span> <?php echo $L->g('good-night') ?>');
}
}).fadeIn(1000);
});
</script>
</div>
<!-- Quick Links -->
<div class="container border-bottom pb-4">
<h4 class="pb-3"><?php $L->p('Quick links') ?></h4>

View File

@ -1,308 +1,173 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<!-- TABS -->
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true"><?php $L->p('Editor') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false"><?php $L->p('Cover image') ?></a>
</li>
<li class="nav-item">
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false"><?php $L->p('Options') ?></a>
</li>
</ul>
<?php
echo Bootstrap::formOpen(array(
'id'=>'jsform',
'class'=>'tab-content mt-1'
));
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
// FORM START
echo Bootstrap::formOpen(array(
'id'=>'jsform',
'class'=>'d-flex flex-column h-100'
));
// Parent
echo Bootstrap::formInputHidden(array(
'name'=>'parent',
'value'=>$page->parent()
));
// UUID
echo Bootstrap::formInputHidden(array(
'name'=>'uuid',
'value'=>$page->uuid()
));
// Status = published, draft, sticky, static
echo Bootstrap::formInputHidden(array(
'name'=>'type',
'value'=>$page->type()
));
// Page current key
echo Bootstrap::formInputHidden(array(
'name'=>'key',
'value'=>$page->key()
));
// Cover image
echo Bootstrap::formInputHidden(array(
'name'=>'coverImage',
'value'=>$page->coverImage(false)
));
// Content
echo Bootstrap::formInputHidden(array(
'name'=>'content',
'value'=>''
));
?>
<!-- TABS CONTENT -->
<div class="tab-pane show active" id="content" role="tabpanel" aria-labelledby="content-tab">
<div class="form-group m-0">
<input value="<?php echo $page->title() ?>" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="<?php $L->p('Enter title') ?>" type="text">
</div>
<div class="form-group m-0 mt-1">
<button id="jsmediaManagerButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> <?php $L->p('Media Manager') ?></button>
<button id="jscategoryButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> <?php $L->p('Category') ?>: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> <?php $L->p('Description') ?>: <span class="option">-</span></button>
</div>
<div class="form-group mt-1">
<textarea id="jseditor" style="display:none;"><?php echo $page->contentRaw(false) ?></textarea>
</div>
<?php if($page->draft()): ?>
<div class="alert alert-primary mt-2 mb-2"><?php $L->p('the-content-is-saved-as-a-draft-to-publish-it') ?></div>
<?php endif; ?>
<div class="form-group mt-2">
<button type="button" class="jsbuttonSave btn btn-primary"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary"><?php $L->p('Save as draft') ?></button>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php $L->p('Cancel') ?></a>
<?php
if (count($page->children())===0) {
echo '<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#jsdeletePageModal">'.$L->g('Delete').'</button>';
}
?>
</div>
</div>
<!-- TABS IMAGES -->
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab">
<div>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php $L->p('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('Cover image') ?></h4>
</div>
<?php
$coverImage = $page->coverImage(false);
$externalCoverImage = '';
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
$coverImage = '';
$externalCoverImage = $page->coverImage(false);
}
?>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo (empty($coverImage) ? HTML_PATH_ADMIN_THEME_IMG.'default.svg' : $page->coverImage() ) ?>" />
<?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>
<!-- TABS OPTIONS -->
<div class="tab-pane" id="options" role="tabpanel" aria-labelledby="options-tab">
<div>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php $L->p('Save as draft') ?></button>
</div>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('General') ?></h4>
</div>
<?php
// Username
echo Bootstrap::formInputText(array(
'name'=>'',
'label'=>$L->g('User'),
'placeholder'=>'',
'value'=>$page->username(),
'tip'=>'',
'disabled'=>true
));
// Date
echo Bootstrap::formInputText(array(
'name'=>'date',
'label'=>$L->g('Date'),
'placeholder'=>'',
'value'=>$page->dateRaw(),
'tip'=>$L->g('date-format-format')
));
// Type
echo Bootstrap::formSelect(array(
'name'=>'typeTMP',
'label'=>$L->g('Type'),
'selected'=>$page->type(),
'options'=>array(
'published'=>'- '.$L->g('Default').' -',
'sticky'=>$L->g('Sticky'),
'static'=>$L->g('Static')
),
'tip'=>''
));
// Parent
try {
$parentKey = $page->parent();
$parent = new Page($parentKey);
$parentOption = $parent->title();
} catch (Exception $e) {
$parentOption = '';
}
echo Bootstrap::formInputText(array(
'name'=>'parentTMP',
'label'=>$L->g('Parent'),
'placeholder'=>'',
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
'value'=>$parentOption
));
// 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
echo Bootstrap::formInputText(array(
'name'=>'template',
'label'=>$L->g('Template'),
'placeholder'=>'',
'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::formInputText(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'value'=>$page->tags(),
'tip'=>$L->g('Write the tags separated by comma')
));
echo Bootstrap::formTitle(array('title'=>'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>
<!-- Modal for delete page -->
<?php echo Bootstrap::modal(array(
'buttonPrimary'=>$L->g('Delete'),
'buttonPrimaryClass'=>'jsbuttonDeleteAccept',
'buttonSecondary'=>$L->g('Cancel'),
'buttonSecondaryClass'=>'',
'modalTitle'=>$L->g('Delete content'),
'modalText'=>$L->g('Are you sure you want to delete this page'),
'modalId'=>'jsdeletePageModal'
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
?>
// Parent
echo Bootstrap::formInputHidden(array(
'name'=>'parent',
'value'=>$page->parent()
));
// UUID
// The UUID is generated in the controller
echo Bootstrap::formInputHidden(array(
'name'=>'uuid',
'value'=>$uuid
));
// Type = published, draft, sticky, static
echo Bootstrap::formInputHidden(array(
'name'=>'type',
'value'=>$page->type()
));
// Cover image
echo Bootstrap::formInputHidden(array(
'name'=>'coverImage',
'value'=>$page->coverImage(false)
));
// Content
echo Bootstrap::formInputHidden(array(
'name'=>'content',
'value'=>''
));
// Current page key
echo Bootstrap::formInputHidden(array(
'name'=>'key',
'value'=>$page->key()
));
?>
<!-- TOOLBAR -->
<div>
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
<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="jscoverImageOpenModal" data-toggle="modal" data-target="#jscoverImageModal"><?php $L->p('Cover image') ?></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 class="btn-group btn-group-sm float-right" role="group" aria-label="Basic example">
<button type="button" class="btn 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 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 endif; ?>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php $L->p('Cancel') ?></a>
</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>
<!-- Modal for Cover Image -->
<div id="jscoverImageModal" 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('Cover Image') ?></h5>
</div>
<div class="modal-body">
<?php
$coverImage = $page->coverImage(false);
$externalCoverImage = '';
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
$coverImage = '';
$externalCoverImage = $page->coverImage(false);
}
?>
<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() ) ?>" />
</div>
<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="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button>
</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>
$(document).ready(function() {
// Delete content
$(".jsbuttonDeleteAccept").on("click", function() {
$("#jstype").val("delete");
$("#jscontent").val("");
$("#jsform").submit();
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
$("#jscoverImagePreview").on("click", function() {
openMediaManager();
});
$("#jsbuttonSelectCoverImage").on("click", function() {
openMediaManager();
});
$("#jsbuttonRemoveCoverImage").on("click", function() {
$("#jscoverImage").val('');
$("#jscoverImagePreview").attr('src', HTML_PATH_ADMIN_THEME_IMG+'default.svg');
});
});
</script>
</div>
<!-- Modal for Categories -->
<div id="jscategoryModal" class="modal fade" 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 class="modal-body">
<?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>
<!-- 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 class="modal-body">
<?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>
@ -312,9 +177,9 @@
var selected = $("#jscategory option:selected");
var value = selected.val().trim();
if (value) {
$("#jscategoryButton").find("span.option").html(selected.text());
$("#jscategoryOpenModal").find("span.option").html(": "+selected.text());
} else {
$("#jscategoryButton").find("span.option").html("-");
$("#jscategoryOpenModal").find("span.option").html("");
}
}
@ -327,30 +192,30 @@
});
});
</script>
</div>
<!-- Modal for Description -->
<div id="jsdescriptionModal" class="modal fade" 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>
<!-- 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>
@ -358,12 +223,10 @@
$(document).ready(function() {
function setDescriptionBox(value) {
var value = $("#jsdescription").val();
if (!value) {
value = '-';
} else {
value = jQuery.trim(value).substring(0, 60).split(" ").slice(0, -1).join(" ") + "...";
if (value) {
value = ": "+$.trim(value).substring(0, 30).split(" ").slice(0, -1).join(" ") + "...";
}
$("#jsdescriptionButton").find("span.option").html(value);
$("#jsdescriptionOpenModal").find("span.option").html(value);
}
// Set the current description
@ -375,87 +238,257 @@
});
});
</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
echo Bootstrap::formInputText(array(
'name'=>'date',
'label'=>$L->g('Date'),
'placeholder'=>'',
'value'=>$page->dateRaw(),
'tip'=>$L->g('date-format-format')
));
// Type
echo Bootstrap::formSelect(array(
'name'=>'typeTMP',
'label'=>$L->g('Type'),
'selected'=>$page->type(),
'options'=>array(
'published'=>'- '.$L->g('Default').' -',
'sticky'=>$L->g('Sticky'),
'static'=>$L->g('Static')
),
'tip'=>''
));
// Parent
try {
$parentKey = $page->parent();
$parent = new Page($parentKey);
$parentValue = $parent->title();
} catch (Exception $e) {
$parentValue = '';
}
echo Bootstrap::formInputText(array(
'name'=>'parentTMP',
'label'=>$L->g('Parent'),
'placeholder'=>'',
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
'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
echo Bootstrap::formInputText(array(
'name'=>'template',
'label'=>$L->g('Template'),
'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()
));
// Tags
echo Bootstrap::formInputText(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma'),
'value'=>$page->tags()
));
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>
$(document).ready(function() {
// Generate slug when the user type the title
$("#jstitle").keyup(function() {
var text = $(this).val();
var parent = $("#jsparent").val();
var currentKey = "";
var ajax = new bluditAjax();
var callBack = $("#jsslug");
ajax.generateSlug(text, parent, currentKey, callBack);
});
// Datepicker
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
// Parent autocomplete
var parentsXHR;
var parentsList; // Keep the parent list returned to get the key by the title page
$("#jsparentTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { parentsXHR.abort(); } catch(e){}
// Get the list of parent pages by title (term)
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
function(data) {
parentsList = data;
term = term.toLowerCase();
var matches = [];
for (var title in data) {
if (~title.toLowerCase().indexOf(term))
matches.push(title);
}
response(matches);
});
},
onSelect: function(event, term, item) {
// parentsList = array( pageTitle => pageKey )
var parentKey = parentsList[term];
$("#jsparent").attr("value", parentKey);
}
});
});
</script>
</div>
</form>
<!-- Modal for Delete page -->
<div id="jsdeletePageModal" 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('Delete content') ?></h5>
</div>
<div class="modal-body">
<?php $L->p('Are you sure you want to delete this page') ?>
</div>
<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-danger" data-dismiss="modal" id="jsbuttonDeleteAccept"><?php $L->p('Delete') ?></button>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$("#jsbuttonDeleteAccept").on("click", function() {
$("#jstype").val("delete");
$("#jscontent").val("");
$("#jsform").submit();
});
});
</script>
</div>
<!-- Modal for Media Manager -->
<?php include(PATH_ADMIN_THEMES.'booty/html/media.php'); ?>
<script>
$(document).ready(function() {
// Datepicker
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
// Button Save
$(".jsbuttonSave").on("click", function() {
// Button Publish or Save
$("#jsbuttonSave").on("click", function() {
// Get the type
var type = $("#jstypeTMP option:selected").val();
$("#jstype").val(type);
// Get the content
$("#jscontent").val( editorGetContent() );
// Submit the form
$("#jsform").submit();
});
// Button Save as draft
$(".jsbuttonDraft").on("click", function() {
$("#jsbuttonDraft").on("click", function() {
// Set the type as draft
$("#jstype").val("draft");
// Get the content
$("#jscontent").val( editorGetContent() );
// Submit the form
$("#jsform").submit();
});
// External cover image
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
// Autosave interval
// Autosave
// Autosave works when the content of the page is bigger than 100 characters
var currentContent = editorGetContent();
setInterval(function() {
var uuid = $("#jsuuid").val();
var title = $("#jstitle").val();
var content = editorGetContent();
var ajax = new bluditAjax();
// showAlert is the function to display an alert defined in alert.php
ajax.autosave(uuid, title, content, showAlert);
// Call autosave only when the user change the content
if (currentContent!=content) {
currentContent = content;
var ajax = new bluditAjax();
// showAlert is the function to display an alert defined in alert.php
ajax.autosave(uuid, title, content, showAlert);
}
},1000*60*AUTOSAVE_INTERVAL);
// Template autocomplete
$('input[name="template"]').autoComplete({
minChars: 2,
source: function(term, suggest){
term = term.toLowerCase();
var choices = ['ActionScript', 'Acti', 'Asp'];
var matches = [];
for (i=0; i<choices.length; i++)
if (~choices[i].toLowerCase().indexOf(term)) matches.push(choices[i]);
suggest(matches);
}
});
// Parent autocomplete
var parentsXHR;
var parentsList; // Keep the parent list returned to get the key by the title page
$("#jsparentTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { parentsXHR.abort(); } catch(e){}
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
function(data) {
parentsList = 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) {
// parentsList = array( pageTitle => pageKey )
var parentKey = parentsList[term];
$("#jsparent").attr("value", parentKey);
}
});
});
</script>

View File

@ -9,7 +9,7 @@ echo Bootstrap::formOpen(array());
<a class="btn btn-secondary btn-sm" href="'.HTML_PATH_ADMIN_ROOT.'users" role="button">'.$L->g('Cancel').'</a>
</div>
<h2 class="mt-0 mb-3">
<span class="oi oi-person" style="font-size: 0.7em;"></span> Edit user
<span class="oi oi-person" style="font-size: 0.7em;"></span> '.$L->g('Edit user').'
</h2>
</div>
';
@ -269,4 +269,3 @@ $(document).ready(function() {
});
</script>

View File

@ -1,252 +1,153 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<!-- TABS -->
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true"><?php $L->p('Editor') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false"><?php $L->p('Cover image') ?></a>
</li>
<li class="nav-item">
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false"><?php $L->p('Options') ?></a>
</li>
</ul>
<?php
echo Bootstrap::formOpen(array(
'id'=>'jsform',
'class'=>'tab-content mt-1'
));
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
// FORM START
echo Bootstrap::formOpen(array(
'id'=>'jsform',
'class'=>'d-flex flex-column h-100'
));
// Parent
echo Bootstrap::formInputHidden(array(
'name'=>'parent',
'value'=>''
));
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
// UUID
echo Bootstrap::formInputHidden(array(
'name'=>'uuid',
'value'=>$pages->generateUUID()
));
// Parent
echo Bootstrap::formInputHidden(array(
'name'=>'parent',
'value'=>''
));
// Status = published, draft, sticky, static
echo Bootstrap::formInputHidden(array(
'name'=>'type',
'value'=>'published'
));
// UUID
// The UUID is generated in the controller
echo Bootstrap::formInputHidden(array(
'name'=>'uuid',
'value'=>$uuid
));
// Cover image
echo Bootstrap::formInputHidden(array(
'name'=>'coverImage',
'value'=>''
));
// Type = published, draft, sticky, static
echo Bootstrap::formInputHidden(array(
'name'=>'type',
'value'=>'published'
));
// Content
echo Bootstrap::formInputHidden(array(
'name'=>'content',
'value'=>''
));
?>
// Cover image
echo Bootstrap::formInputHidden(array(
'name'=>'coverImage',
'value'=>''
));
<!-- TABS CONTENT -->
<div class="tab-pane show active" id="content" role="tabpanel" aria-labelledby="content-tab">
<div class="form-group m-0">
<input value="" class="form-control form-control-lg rounded-0 " id="jstitle" name="title" placeholder="<?php $L->p('Enter title') ?>" type="text">
</div>
<div class="form-group m-0">
<button id="jsmediaManagerButton" type="button" class="mt-1 btn btn-form btn-sm d-block d-sm-inline d-sm-none" data-toggle="modal" data-target="#jsbluditMediaModal"><span class="oi oi-image"></span> <?php $L->p('Media Manager') ?></button>
<button id="jscategoryButton" type="button" class="mt-1 btn btn-form btn-sm" data-toggle="modal" data-target="#jscategoryModal"><span class="oi oi-tag"></span> <?php $L->p('Category') ?>: <span class="option">-</span></button>
<button id="jsdescriptionButton" type="button" class="mt-1 btn btn-form btn-sm" data-toggle="modal" data-target="#jsdescriptionModal"><span class="oi oi-tag"></span> <?php $L->p('Description') ?>: <span class="option">-</span></button>
</div>
<div class="form-group mt-1">
<textarea id="jseditor" style="display:none;"></textarea>
</div>
<div class="form-group mt-2">
<button type="button" class="jsbuttonSave btn btn-primary"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary"><?php echo $L->g('Save as draft') ?></button>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php echo $L->g('Cancel') ?></a>
</div>
// Content
echo Bootstrap::formInputHidden(array(
'name'=>'content',
'value'=>''
));
?>
<!-- TOOLBAR -->
<div>
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
<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="jscoverImageOpenModal" data-toggle="modal" data-target="#jscoverImageModal"><?php $L->p('Cover image') ?></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>
<!-- TABS IMAGES -->
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab">
<div class="btn-group btn-group-sm float-right" role="group" aria-label="Basic example">
<button type="button" class="btn 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>
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-secondary"><?php $L->p('Cancel') ?></a>
</div>
</div>
<div>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
<!-- 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="" placeholder="<?php $L->p('Enter title') ?>">
</div>
<!-- Editor -->
<div id="jseditor" class="editable h-100 mb-1"></div>
<!-- Modal for Cover Image -->
<div id="jscoverImageModal" 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('Cover Image') ?></h5>
</div>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('Cover image') ?></h4>
</div>
<div class="modal-body">
<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" />
</div>
<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="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button>
</div>
<img id="jscoverImagePreview" style="width: 350px; height: 200px;" class="img-thumbnail" alt="coverImagePreview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" />
<hr>
<?php
echo Bootstrap::formTitle(array('title'=>$L->g('External Cover Image')));
<?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>
<!-- TABS OPTIONS -->
<div class="tab-pane" id="options" role="tabpanel" aria-labelledby="options-tab">
<div>
<div class="float-right">
<button type="button" class="jsbuttonSave btn btn-primary btn-sm"><?php echo $L->g('Publish') ?></button>
<button type="button" class="jsbuttonDraft btn btn-secondary btn-sm"><?php echo $L->g('Save as draft') ?></button>
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>
<h4 class="mt-4 mb-4 font-weight-normal"><?php $L->p('Advanced') ?></h4>
</div>
<?php
// Username
echo Bootstrap::formInputText(array(
'name'=>'',
'label'=>$L->g('User'),
'placeholder'=>'',
'value'=>$login->username(),
'tip'=>'',
'disabled'=>true
));
// Date
echo Bootstrap::formInputText(array(
'name'=>'date',
'label'=>$L->g('Date'),
'placeholder'=>'',
'value'=>Date::current(DB_DATE_FORMAT),
'tip'=>$L->g('date-format-format')
));
// Type
echo Bootstrap::formSelect(array(
'name'=>'typeTMP',
'label'=>$L->g('Type'),
'selected'=>'',
'options'=>array(
'published'=>'- '.$L->g('Default').' -',
'sticky'=>$L->g('Sticky'),
'static'=>$L->g('Static')
),
'tip'=>''
));
// Parent
echo Bootstrap::formInputText(array(
'name'=>'parentTMP',
'label'=>$L->g('Parent'),
'placeholder'=>'',
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
'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
echo Bootstrap::formInputText(array(
'name'=>'template',
'label'=>$L->g('Template'),
'placeholder'=>'',
'value'=>'',
'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.')
));
// Tags
echo Bootstrap::formInputText(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma')
));
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.')
));
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'',
'class'=>'mt-4',
'checked'=>false,
'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'=>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>
<script>
$(document).ready(function() {
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
<!-- Modal for Categories -->
<div id="jscategoryModal" class="modal fade" 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 class="modal-body">
<?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>
$("#jscoverImagePreview").on("click", function() {
openMediaManager();
});
$("#jsbuttonSelectCoverImage").on("click", function() {
openMediaManager();
});
$("#jsbuttonRemoveCoverImage").on("click", function() {
$("#jscoverImage").val('');
$("#jscoverImagePreview").attr('src', HTML_PATH_ADMIN_THEME_IMG+'default.svg');
});
});
</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 class="modal-body">
<?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>
@ -256,9 +157,9 @@
var selected = $("#jscategory option:selected");
var value = selected.val().trim();
if (value) {
$("#jscategoryButton").find("span.option").html(selected.text());
$("#jscategoryOpenModal").find("span.option").html(": "+selected.text());
} else {
$("#jscategoryButton").find("span.option").html("-");
$("#jscategoryOpenModal").find("span.option").html("");
}
}
@ -271,30 +172,30 @@
});
});
</script>
</div>
<!-- Modal for Description -->
<div id="jsdescriptionModal" class="modal fade" 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>
<!-- 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>
@ -302,12 +203,10 @@
$(document).ready(function() {
function setDescriptionBox(value) {
var value = $("#jsdescription").val();
if (!value) {
value = '-';
} else {
value = jQuery.trim(value).substring(0, 60).split(" ").slice(0, -1).join(" ") + "...";
if (value) {
value = ": "+$.trim(value).substring(0, 30).split(" ").slice(0, -1).join(" ") + "...";
}
$("#jsdescriptionButton").find("span.option").html(value);
$("#jsdescriptionOpenModal").find("span.option").html(value);
}
// Set the current description
@ -319,6 +218,173 @@
});
});
</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
echo Bootstrap::formInputText(array(
'name'=>'date',
'label'=>$L->g('Date'),
'placeholder'=>'',
'value'=>Date::current(DB_DATE_FORMAT),
'tip'=>$L->g('date-format-format')
));
// Type
echo Bootstrap::formSelect(array(
'name'=>'typeTMP',
'label'=>$L->g('Type'),
'selected'=>'',
'options'=>array(
'published'=>'- '.$L->g('Default').' -',
'sticky'=>$L->g('Sticky'),
'static'=>$L->g('Static')
),
'tip'=>''
));
// Parent
echo Bootstrap::formInputText(array(
'name'=>'parentTMP',
'label'=>$L->g('Parent'),
'placeholder'=>'',
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
'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
echo Bootstrap::formInputText(array(
'name'=>'template',
'label'=>$L->g('Template'),
'placeholder'=>'',
'value'=>'',
'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.')
));
// Tags
echo Bootstrap::formInputText(array(
'name'=>'tags',
'label'=>$L->g('Tags'),
'placeholder'=>'',
'tip'=>$L->g('Write the tags separated by comma')
));
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.')
));
echo Bootstrap::formCheckbox(array(
'name'=>'noindex',
'label'=>'Robots',
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
'placeholder'=>'',
'class'=>'mt-4',
'checked'=>false,
'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'=>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>
$(document).ready(function() {
// Generate slug when the user type the title
$("#jstitle").keyup(function() {
var text = $(this).val();
var parent = $("#jsparent").val();
var currentKey = "";
var ajax = new bluditAjax();
var callBack = $("#jsslug");
ajax.generateSlug(text, parent, currentKey, callBack);
});
// Datepicker
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
// Parent autocomplete
var parentsXHR;
var parentsList; // Keep the parent list returned to get the key by the title page
$("#jsparentTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { parentsXHR.abort(); } catch(e){}
// Get the list of parent pages by title (term)
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
function(data) {
parentsList = data;
term = term.toLowerCase();
var matches = [];
for (var title in data) {
if (~title.toLowerCase().indexOf(term))
matches.push(title);
}
response(matches);
});
},
onSelect: function(event, term, item) {
// parentsList = array( pageTitle => pageKey )
var parentKey = parentsList[term];
$("#jsparent").attr("value", parentKey);
}
});
});
</script>
</div>
</form>
<!-- Modal for Media Manager -->
@ -327,39 +393,32 @@
<script>
$(document).ready(function() {
// Datepicker
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
// Button Save
$(".jsbuttonSave").on("click", function() {
// Button Publish or Save
$("#jsbuttonSave").on("click", function() {
// Get the type
var type = $("#jstypeTMP option:selected").val();
$("#jstype").val(type);
// Get the content
$("#jscontent").val( editorGetContent() );
// Submit the form
$("#jsform").submit();
});
// Button Save as draft
$(".jsbuttonDraft").on("click", function() {
$("#jsbuttonDraft").on("click", function() {
// Set the type as draft
$("#jstype").val("draft");
// Get the content
$("#jscontent").val( editorGetContent() );
// Submit the form
$("#jsform").submit();
});
// External cover image
$("#jsexternalCoverImage").change(function() {
$("#jscoverImage").val( $(this).val() );
});
// Generate slug when the user type the title
$("#jstitle").keyup(function() {
var text = $(this).val();
var parent = $("#jsparent").val();
var currentKey = "";
var ajax = new bluditAjax();
ajax.generateSlug(text, parent, currentKey, $("#jsslug"));
});
// Autosave interval
// Autosave
// Autosave works when the content of the page is bigger than 100 characters
setInterval(function() {
var uuid = $("#jsuuid").val();
@ -370,45 +429,5 @@ $(document).ready(function() {
ajax.autosave(uuid, title, content, showAlert);
},1000*60*AUTOSAVE_INTERVAL);
// Template autocomplete
$('input[name="template"]').autoComplete({
minChars: 2,
source: function(term, suggest){
term = term.toLowerCase();
var choices = ['ActionScript', 'Acti', 'Asp'];
var matches = [];
for (i=0; i<choices.length; i++)
if (~choices[i].toLowerCase().indexOf(term)) matches.push(choices[i]);
suggest(matches);
}
});
// Parent autocomplete
var parentsXHR;
var parentsList; // Keep the parent list returned to get the key by the title page
$("#jsparentTMP").autoComplete({
minChars: 1,
source: function(term, response) {
// Prevent call inmediatly another ajax request
try { parentsXHR.abort(); } catch(e){}
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
function(data) {
parentsList = 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) {
// parentsList = array( pageTitle => pageKey )
var parentKey = parentsList[term];
$("#jsparent").attr("value", parentKey);
}
});
});
</script>

View File

@ -5,6 +5,9 @@ header('Content-Type: application/json');
// ----------------------------------------------------------------------------
// (string) $_POST['path'] Name of file to delete, just the filename
$filename = isset($_POST['filename']) ? $_POST['filename'] : false;
// (string) $_POST['uuid']
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
// ----------------------------------------------------------------------------
if ($filename==false) {
@ -14,19 +17,27 @@ if ($filename==false) {
)));
}
// Check if the filename exist
if (Sanitize::pathFile(PATH_UPLOADS.$filename)) {
Filesystem::rmfile(PATH_UPLOADS.$filename);
if ($uuid && IMAGE_RESTRICT) {
$imagePath = PATH_UPLOADS_PAGES.$uuid.DS;
$thumbnailPath = PATH_UPLOADS_PAGES.$uuid.DS.'thumbnails'.DS;
} else {
$imagePath = PATH_UPLOADS;
$thumbnailPath = PATH_UPLOADS_THUMBNAILS;
}
// Check if the file has a thumbnail
if (Sanitize::pathFile(PATH_UPLOADS_THUMBNAILS.$filename)) {
Filesystem::rmfile(PATH_UPLOADS_THUMBNAILS.$filename);
// Delete image
if (Sanitize::pathFile($imagePath.$filename)) {
Filesystem::rmfile($imagePath.$filename);
}
// Delete thumbnail
if (Sanitize::pathFile($thumbnailPath.$filename)) {
Filesystem::rmfile($thumbnailPath.$filename);
}
exit (json_encode(array(
'status'=>0,
'message'=>'File deleted.'
'message'=>'Image deleted.'
)));
?>

View File

@ -2,7 +2,7 @@
header('Content-Type: application/json');
$text = isset($_POST['text']) ? $_POST['text'] : '';
$parent = isset($_POST['parentKey']) ? $_POST['parentKey'] : PARENT;
$parent = isset($_POST['parentKey']) ? $_POST['parentKey'] : '';
$oldKey = isset($_POST['currentKey']) ? $_POST['currentKey'] : '';
$slug = $pages->generateKey($text, $parent, $returnSlug=true, $oldKey);

View File

@ -13,12 +13,21 @@ if ($query===false) {
)));
}
$tmp = array();
$parents = buildParentPages();
foreach ($parents as $parent) {
$lowerTitle = Text::lowercase($parent->title());
if (Text::stringContains($lowerTitle, $query)) {
$tmp[$parent->title()] = $parent->key();
$list = array();
$published = $pages->getPublishedDB();
$statics = $pages->getStaticDB();
$pagesKey = array_merge($published, $statics);
foreach ($pagesKey as $pageKey) {
try {
$page = new Page($pageKey);
if ($page->isParent()) {
$lowerTitle = Text::lowercase($page->title());
if (Text::stringContains($lowerTitle, $query)) {
$tmp[$page->title()] = $page->key();
}
}
} catch (Exception $e) {
// continue
}
}

View File

@ -4,14 +4,23 @@ header('Content-Type: application/json');
// $_POST
// ----------------------------------------------------------------------------
// (integer) $_POST['pageNumber'] > 0
$pageNumber = !empty($_POST['pageNumber']) ? (int)$_POST['pageNumber'] : 1;
$pageNumber = empty($_POST['pageNumber']) ? 1 : (int)$_POST['pageNumber'];
$pageNumber = $pageNumber - 1;
// (string) $_POST['path']
$path = isset($_POST['path']) ? $_POST['path'] : false;
$path = empty($_POST['path']) ? false : $_POST['path'];
// (string) $_POST['uuid']
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
// ----------------------------------------------------------------------------
// Set the path to get the file list
if ($path=='thumbnails') {
$path = PATH_UPLOADS_THUMBNAILS;
if ($uuid && IMAGE_RESTRICT) {
$path = PATH_UPLOADS_PAGES.$uuid.DS.'thumbnails'.DS;
} else {
$path = PATH_UPLOADS_THUMBNAILS;
}
} else {
exit (json_encode(array(
'status'=>1,
@ -20,15 +29,17 @@ if ($path=='thumbnails') {
}
// Get all files from the directory $path, also split the array by numberOfItems
$listOfFilesByPage = Filesystem::listFiles($path, '*', '*', $GLOBALS['BLUDIT_MEDIA_MANAGER_SORT_BY_DATE'], $GLOBALS['BLUDIT_MEDIA_MANAGER_AMOUNT_OF_FILES']);
// The function listFiles split in chunks
$listOfFilesByPage = Filesystem::listFiles($path, '*', '*', $GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'], $GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES']);
// Check if the page number exists in the chunks
if (isset($listOfFilesByPage[$pageNumber])) {
// Get only the filename from the chunk
$tmp = array();
$files = array();
foreach ($listOfFilesByPage[$pageNumber] as $file) {
array_push($tmp, basename($file));
$filename = basename($file);
array_push($files, $filename);
}
// Returns the number of chunks for the paginator
@ -36,7 +47,7 @@ if (isset($listOfFilesByPage[$pageNumber])) {
exit (json_encode(array(
'status'=>0,
'numberOfPages'=>count($listOfFilesByPage),
'files'=>$tmp
'files'=>$files
)));
}

View File

@ -1,50 +0,0 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
foreach ($_FILES['bluditInputFiles']['name'] as $key=>$filename) {
if ($_FILES['bluditInputFiles']['error'][$key] != 0) {
$message = 'Error occurred uploading the image, max file size allowed: '.ini_get('upload_max_filesize');
Log::set($message, LOG_TYPE_ERROR);
exit (json_encode(array(
'status'=>1,
'message'=>$message
)));
}
// Get the next filename if already exist the file to not overwrite the original file
$nextFilename = Filesystem::nextFilename(PATH_UPLOADS, $filename);
// File extension
$fileExtension = pathinfo($nextFilename, PATHINFO_EXTENSION);
// Move from temporary directory to uploads folder
rename($_FILES['bluditInputFiles']['tmp_name'][$key], PATH_UPLOADS.$nextFilename);
chmod(PATH_UPLOADS.$nextFilename, 0644);
// Generate Thumbnail
// Exclude generate thumbnail for SVG format and generate a symlink to the svg
if ($fileExtension == 'svg') {
symlink(PATH_UPLOADS.$nextFilename, PATH_UPLOADS_THUMBNAILS.$nextFilename);
} else {
$Image = new Image();
$Image->setImage(PATH_UPLOADS.$nextFilename, $GLOBALS['THUMBNAILS_WIDTH'], $GLOBALS['THUMBNAILS_HEIGHT'], 'crop');
$Image->saveImage(PATH_UPLOADS_THUMBNAILS.$nextFilename, $GLOBALS['THUMBNAILS_QUALITY'], true);
}
}
$absoluteURL = DOMAIN_UPLOADS.$nextFilename;
$absoluteURLThumbnail = DOMAIN_UPLOADS_THUMBNAILS.$nextFilename;
$absolutePath = PATH_UPLOADS.$nextFilename;
exit (json_encode(array(
'status'=>0,
'message'=>'Image uploaded success.',
'filename'=>$nextFilename,
'absoluteURL'=>$absoluteURL,
'absoluteURLThumbnail'=>$absoluteURLThumbnail,
'absolutePath'=>$absolutePath
)));
?>

View File

@ -0,0 +1,80 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
header('Content-Type: application/json');
// $_POST
// ----------------------------------------------------------------------------
// (string) $_POST['uuid']
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
// ----------------------------------------------------------------------------
// Set upload directory
if ($uuid && IMAGE_RESTRICT) {
$uploadDirectory = PATH_UPLOADS_PAGES.$uuid.DS;
$thumbnailDirectory = $uploadDirectory.'thumbnails'.DS;
} else {
$uploadDirectory = PATH_UPLOADS;
$thumbnailDirectory = PATH_UPLOADS_THUMBNAILS;
}
// Create directory for images
if (!is_dir($uploadDirectory)){
Filesystem::mkdir($uploadDirectory, true);
}
// Create directory for thumbnails
if (!is_dir($thumbnailDirectory)){
Filesystem::mkdir($thumbnailDirectory, true);
}
// File extensions allowed
$allowedExtensions = array('gif', 'png', 'jpg', 'jpeg', 'svg');
// Upload all images
foreach ($_FILES['bluditInputFiles']['name'] as $key=>$filename) {
// Check for errors
if ($_FILES['bluditInputFiles']['error'][$key] != 0) {
$message = 'Error occurred uploading the image, max file size allowed: '.ini_get('upload_max_filesize');
Log::set($message, LOG_TYPE_ERROR);
exit (json_encode(array(
'status'=>1,
'message'=>$message
)));
}
// Check file extension
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
if (!in_array($fileExtension, $allowedExtensions) ) {
$message = 'Extension file not supported.';
Log::set($message, LOG_TYPE_ERROR);
exit (json_encode(array(
'status'=>1,
'message'=>$message
)));
}
// Get the next filename to not overwrite the original file
$nextFilename = Filesystem::nextFilename($uploadDirectory, $filename);
// Move from temporary directory to uploads folder
rename($_FILES['bluditInputFiles']['tmp_name'][$key], $uploadDirectory.$nextFilename);
chmod($uploadDirectory.$nextFilename, 0644);
// Generate Thumbnail
// Exclude generate thumbnail for SVG format and generate a symlink to the svg
if ($fileExtension == 'svg') {
symlink($uploadDirectory.$nextFilename, $thumbnailDirectory.$nextFilename);
} else {
$Image = new Image();
$Image->setImage($uploadDirectory.$nextFilename, $GLOBALS['THUMBNAILS_WIDTH'], $GLOBALS['THUMBNAILS_HEIGHT'], 'crop');
$Image->saveImage($thumbnailDirectory.$nextFilename, $GLOBALS['THUMBNAILS_QUALITY'], true);
}
}
exit (json_encode(array(
'status'=>0,
'message'=>'Image uploaded success.',
'filename'=>$nextFilename
)));
?>

View File

@ -61,7 +61,6 @@ else
// Page not found.
// User not logged.
// Slug is login.
// Slug is login-email.
if ($url->notFound() || !$login->isLogged() || ($url->slug()==='login') ) {
$layout['controller'] = 'login';
$layout['view'] = 'login';

View File

@ -1,10 +1,10 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// Bludit version
define('BLUDIT_VERSION', '3.0.0');
define('BLUDIT_CODENAME', 'Hops');
define('BLUDIT_RELEASE_DATE', '2018-09-21');
define('BLUDIT_BUILD', '20180921');
define('BLUDIT_VERSION', '3.2');
define('BLUDIT_CODENAME', 'Yeast');
define('BLUDIT_RELEASE_DATE', '2018-10-20');
define('BLUDIT_BUILD', '20181020');
// Debug mode
// Change to FALSE, for prevent warning or errors on browser
@ -12,10 +12,11 @@ define('DEBUG_MODE', TRUE);
error_reporting(0); // Turn off all error reporting
if (DEBUG_MODE) {
// Turn on all error reporting
ini_set("display_errors", 1);
ini_set('display_startup_errors',1);
ini_set("display_errors", 0);
ini_set('display_startup_errors',0);
ini_set("track_errors", 1);
ini_set("html_errors", 1);
ini_set('log_errors', 1);
error_reporting(E_ALL | E_STRICT | E_NOTICE);
}
@ -40,6 +41,7 @@ define('PATH_TMP', PATH_CONTENT.'tmp'.DS);
define('PATH_UPLOADS', PATH_CONTENT.'uploads'.DS);
define('PATH_WORKSPACES', PATH_CONTENT.'workspaces'.DS);
define('PATH_UPLOADS_PAGES', PATH_UPLOADS.'pages'.DS);
define('PATH_UPLOADS_PROFILES', PATH_UPLOADS.'profiles'.DS);
define('PATH_UPLOADS_THUMBNAILS', PATH_UPLOADS.'thumbnails'.DS);
@ -121,10 +123,10 @@ if (file_exists(PATH_KERNEL.'bludit.pro.php')) {
}
// Objects
$pages = new Pages(); // DEPRECATED v3.0.0 $dbPages
$users = new Users(); // DEPRECATED v3.0.0 $users
$tags = new Tags(); // DEPRECATED v3.0.0 $dbTags
$categories = new Categories(); // DEPRECATED v3.0.0 $dbCategories
$pages = new Pages();
$users = new Users();
$tags = new Tags();
$categories = new Categories();
$site = new Site();
$url = new Url();
$security = new Security();
@ -171,12 +173,13 @@ define('HTML_PATH_CORE_JS', HTML_PATH_ROOT.'bl-kernel/js/');
define('HTML_PATH_CORE_CSS', HTML_PATH_ROOT.'bl-kernel/css/');
define('HTML_PATH_CONTENT', HTML_PATH_ROOT.'bl-content/');
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'bl-content/uploads/');
define('HTML_PATH_UPLOADS_PAGES', HTML_PATH_UPLOADS.'pages/');
define('HTML_PATH_UPLOADS_PROFILES', HTML_PATH_UPLOADS.'profiles/');
define('HTML_PATH_UPLOADS_THUMBNAILS', HTML_PATH_UPLOADS.'thumbnails/');
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'bl-plugins/');
// --- Objects with dependency ---
$language = $Language = new Language( $site->language() );
$language = new Language( $site->language() );
$url->checkFilters( $site->uriFilters() );
// --- CONSTANTS with dependency ---
@ -199,6 +202,12 @@ define('EXTREME_FRIENDLY_URL', $site->extremeFriendly());
// Minutes to execute the autosave function
define('AUTOSAVE_INTERVAL', $site->autosaveInterval());
// TRUE for upload images restric to a pages, FALSE to upload images in common
define('IMAGE_RESTRICT', $site->imageRestrict());
// TRUE to convert relatives images to absoultes, FALSE No changes apply
define('IMAGE_RELATIVE_TO_ABSOLUTE', $site->imageRelativeToAbsolute());
// --- PHP paths with dependency ---
// This paths are absolutes for the OS
define('THEME_DIR', PATH_ROOT.'bl-themes'.DS.$site->theme().DS);
@ -222,6 +231,7 @@ define('DOMAIN_ADMIN_THEME', DOMAIN.HTML_PATH_ADMIN_THEME);
define('DOMAIN_ADMIN_THEME_CSS', DOMAIN.HTML_PATH_ADMIN_THEME_CSS);
define('DOMAIN_ADMIN_THEME_JS', DOMAIN.HTML_PATH_ADMIN_THEME_JS);
define('DOMAIN_UPLOADS', DOMAIN.HTML_PATH_UPLOADS);
define('DOMAIN_UPLOADS_PAGES', DOMAIN.HTML_PATH_UPLOADS_PAGES);
define('DOMAIN_UPLOADS_PROFILES', DOMAIN.HTML_PATH_UPLOADS_PROFILES);
define('DOMAIN_UPLOADS_THUMBNAILS', DOMAIN.HTML_PATH_UPLOADS_THUMBNAILS);
define('DOMAIN_PLUGINS', DOMAIN.HTML_PATH_PLUGINS);

View File

@ -24,10 +24,11 @@ $plugins = array(
'adminContentSidebar'=>array(),
'dashboard'=>array(),
'beforeRulesLoad'=>array(),
'beforeAll'=>array(),
'afterAll'=>array(),
'paginator'=>array(),
'afterPageCreate'=>array(),
'afterPageModify'=>array(),
'afterPageDelete'=>array(),

View File

@ -37,6 +37,9 @@ $staticContent = $staticPages = buildStaticPages();
// Execute the scheduler
if ($pages->scheduler()) {
// Execute plugins with the hook afterPageCreate
Theme::plugins('afterPageCreate');
reindexTags();
reindexCategories();

View File

@ -4,25 +4,25 @@
$currentPage = $url->pageNumber();
Paginator::set('currentPage', $currentPage);
if($url->whereAmI()=='admin') {
if ($url->whereAmI()=='admin') {
$itemsPerPage = ITEMS_PER_PAGE_ADMIN;
$numberOfItems = $pages->count(true);
}
elseif($url->whereAmI()=='tag') {
} elseif ($url->whereAmI()=='tag') {
$itemsPerPage = $site->itemsPerPage();
$tagKey = $url->slug();
$numberOfItems = $tags->numberOfPages($tagKey);
}
elseif($url->whereAmI()=='category') {
} elseif ($url->whereAmI()=='category') {
$itemsPerPage = $site->itemsPerPage();
$categoryKey = $url->slug();
$numberOfItems = $categories->numberOfPages($categoryKey);
}
else {
} else {
$itemsPerPage = $site->itemsPerPage();
$numberOfItems = $pages->count(true);
}
// Execute hook from plugins
Theme::plugins('paginator');
// Items per page
Paginator::set('itemsPerPage', $itemsPerPage);

View File

@ -33,4 +33,3 @@ Theme::plugins('afterSiteLoad');
// Plugins after all
Theme::plugins('afterAll');

View File

@ -20,19 +20,14 @@ define('ALERT_STATUS_OK', 0);
// Alert status fail
define('ALERT_STATUS_FAIL', 1);
// Amount of thumbnails shown on Bludit Quick images
define('THUMBNAILS_AMOUNT', 6);
// Thubmnails size
define('THUMBNAILS_WIDTH', 400);
define('THUMBNAILS_HEIGHT', 400);
define('THUMBNAILS_QUALITY', 100); // 100%
// Profile image size
define('PROFILE_IMG_WIDTH', 400);
define('PROFILE_IMG_HEIGHT', 400);
define('PROFILE_IMG_QUALITY', 100); // 100%
// Items per page for admin area
define('ITEMS_PER_PAGE_ADMIN', 20);
// Password length
define('PASSWORD_LENGTH', 6);
@ -42,18 +37,6 @@ define('SALT_LENGTH', 8);
// Page brake string
define('PAGE_BREAK', '<!-- pagebreak -->');
// Parent key for the array $pagesByParents
define('PARENT', 'BLUDIT3849abb4cb7abd24c2d8dac17b216f17');
// Items per page for admin area
define('ITEMS_PER_PAGE_ADMIN', 20);
// Cli mode, status for new pages
define('CLI_STATUS', 'published');
// Cli mode, username for new pages
define('CLI_USERNAME', 'admin');
// Remember me
define('REMEMBER_COOKIE_USERNAME', 'BLUDITREMEMBERUSERNAME');
define('REMEMBER_COOKIE_TOKEN', 'BLUDITREMEMBERTOKEN');
@ -109,15 +92,17 @@ define('SESSION_GC_MAXLIFETIME', 3600);
// The value 0 means until the browser is closed
define('SESSION_COOKIE_LIFE_TIME', 0);
// New Global Variables
$GLOBALS['BLUDIT_MEDIA_MANAGER_AMOUNT_OF_FILES'] = 5;
$GLOBALS['BLUDIT_MEDIA_MANAGER_SORT_BY_DATE'] = true;
// Alert notification dissappear in X seconds
$GLOBALS['ALERT_DISSAPEAR_IN'] = 3; // Seconds
// Number of images to show in the media manager per page
$GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES'] = 5;
// Sort the image by date
$GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'] = true;
// Thubmnails size
$GLOBALS['THUMBNAILS_WIDTH'] = 400;
$GLOBALS['THUMBNAILS_HEIGHT'] = 400;
$GLOBALS['THUMBNAILS_QUALITY'] = 100;
// Alert
$GLOBALS['ALERT_DISSAPEAR_IN'] = 3; // Seconds

View File

@ -123,6 +123,7 @@ function buildPagesFor($for, $categoryKey=false, $tagKey=false) {
// continue
}
}
return $content;
}

View File

@ -52,8 +52,7 @@ class Filesystem {
public static function mkdir($pathname, $recursive=false)
{
// DEBUG: Ver permisos si son correctos
return mkdir($pathname, 0755, $recursive);
return mkdir($pathname, DIR_PERMISSIONS, $recursive);
}
public static function rmdir($pathname)
@ -98,7 +97,7 @@ class Filesystem {
// Check $destionation directory if exists
if (!self::directoryExists($destination)) {
// Create the $destination directory
if (!mkdir($destination, 0755, true)) {
if (!mkdir($destination, DIR_PERMISSIONS, true)) {
return false;
}
}
@ -122,23 +121,26 @@ class Filesystem {
// Delete a file or directory recursive
// The directory is delete
public static function deleteRecursive($source)
public static function deleteRecursive($source, $deleteDirectory=true)
{
if (!self::directoryExists($source)) {
return false;
}
foreach(new RecursiveIteratorIterator(
foreach (new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($source, FilesystemIterator::SKIP_DOTS),
RecursiveIteratorIterator::CHILD_FIRST) as $item) {
if($item->isFile()) {
if ($item->isFile()) {
unlink($item);
} else {
rmdir($item);
}
}
return rmdir($source);
if ($deleteDirectory) {
return rmdir($source);
}
return true;
}
// Compress a file or directory
@ -216,7 +218,7 @@ class Filesystem {
$number = 0;
$tmpName = $filename.'_'.$number.'.'.$fileExtension;
while (Sanitize::pathFile($path.$tmpName)) {
$number++;
$number = $number + 1;
$tmpName = $filename.'_'.$number.'.'.$fileExtension;
}
}

View File

@ -146,7 +146,7 @@ class Paginator {
*/
public static function bootstrap_html($textPrevPage=false, $textNextPage=false, $showPageNumber=false){
global $Language;
global $language;
$total_pages = self::numberOfPages();
$howMany = 2;
@ -160,12 +160,12 @@ class Paginator {
$html .= '<ul class="pagination">';
if ($currentPage > 3 || $currentPage === $total_pages){
$html .= '<li class="page-item">';
$html .= '<a class="page-link" href="'.self::firstPageUrl().'" aria-label="First"><span aria-hidden="true">&laquo;</span> '.$Language->get('First').'</a>';
$html .= '<a class="page-link" href="'.self::firstPageUrl().'" aria-label="First"><span aria-hidden="true">&laquo;</span> '.$language->get('First').'</a>';
$html .= '</li>';
}
if ($currentPage > 1){
$html .= '<li class="page-item'.$show_previois.'">';
$html .= '<a class="page-link" href="'.self::prevPageUrl().'" aria-label="Previous"><span aria-hidden="true">&laquo;</span> '.$Language->get('Previous').'</a>';
$html .= '<a class="page-link" href="'.self::prevPageUrl().'" aria-label="Previous"><span aria-hidden="true">&laquo;</span> '.$language->get('Previous').'</a>';
$html .= '</li>';
}
if ($currentPage > $howMany + 1){
@ -184,9 +184,9 @@ class Paginator {
}
if ($currentPage < $total_pages){
$html .= '<li class="page-item'.$show_next.'">';
$html .= '<a class="page-link" href="'.self::nextPageUrl().'" aria-label="Next">'.$Language->get('Next').' <span aria-hidden="true">&raquo;</span></a>';
$html .= '<a class="page-link" href="'.self::nextPageUrl().'" aria-label="Next">'.$language->get('Next').' <span aria-hidden="true">&raquo;</span></a>';
$html .= '</li>';
$html .= '<li><a href="'.$last_page.'">'.$Language->get('Last').'</a></li>';
$html .= '<li><a href="'.$last_page.'">'.$language->get('Last').'</a></li>';
}
$html .= '</ul>';
$html .= '</nav>';

View File

@ -22,4 +22,8 @@ class Redirect {
self::url(HTML_PATH_ROOT);
}
public static function admin()
{
self::url(HTML_PATH_ADMIN_ROOT);
}
}

View File

@ -190,14 +190,18 @@ class Text {
}
// Find position of first occurrence of substring in a string otherwise returns FALSE.
public static function stringPosition($string, $substring)
public static function stringPosition($string, $substring, $caseSensitive=true)
{
return mb_strpos($string, $substring, 0, CHARSET);
if ($caseSensitive) {
return mb_strpos($string, $substring, 0, CHARSET);
}
return mb_stripos($string, $substring, 0, CHARSET);
}
public static function stringContains($string, $substring)
public static function stringContains($string, $substring, $caseSensitive=true)
{
return (self::stringPosition($string, $substring) !== false);
return (self::stringPosition($string, $substring, $caseSensitive) !== false);
}
// Returns the portion of string specified by the start and length parameters.

View File

@ -26,6 +26,12 @@ class Theme {
return $site->footer();
}
public static function lang()
{
global $language;
return $language->currentLanguageShortVersion();
}
public static function rssUrl()
{
if (pluginActivated('pluginRSS')) {
@ -42,12 +48,17 @@ class Theme {
return false;
}
// Returns the absolute URL of the site
// Ex. https://example.com the method returns https://example.com/
// Ex. https://example.com/bludit/ the method returns https://example.com/bludit/
public static function siteUrl()
{
global $site;
return $site->url();
return DOMAIN_BASE;
}
// Returns the absolute URL of admin panel
// Ex. https://example.com/admin/ the method returns https://example.com/admin/
// Ex. https://example.com/bludit/admin/ the method returns https://example.com/bludit/admin/
public static function adminUrl()
{
return DOMAIN_ADMIN;
@ -180,7 +191,7 @@ class Theme {
$scripts = '';
foreach($files as $file) {
$scripts .= '<script charset="utf-8" src="'.$base.$file.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
$scripts .= '<script src="'.$base.$file.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
return $scripts;
@ -214,12 +225,12 @@ class Theme {
public static function jquery()
{
return '<script charset="utf-8" src="'.DOMAIN_CORE_JS.'jquery.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
return '<script src="'.DOMAIN_CORE_JS.'jquery.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
public static function jsBootstrap()
{
return '<script charset="utf-8" src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
return '<script src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
public static function cssBootstrap()
@ -230,7 +241,7 @@ class Theme {
public static function jsSortable()
{
// https://github.com/psfpro/bootstrap-html5sortable
return '<script charset="utf-8" src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
return '<script src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
}

View File

@ -95,4 +95,5 @@ class bluditAjax {
console.log("Bludit AJAX: generateSlug(): always handler");
});
}
}

View File

@ -1,7 +1,13 @@
<script>
// DEPRECATED
// ALL THIS FUNCTIONS ARE DEPREACTED
function copyToClipboard(elementId) {
var aux = document.createElement("input");
aux.setAttribute("value", document.getElementById(elementId).innerHTML);
document.body.appendChild(aux);
aux.select();
document.execCommand("copy");
document.body.removeChild(aux);
}
function sanitizeHTML(text) {
var map = {

View File

@ -3,9 +3,9 @@
echo 'var HTML_PATH_ROOT = "'.HTML_PATH_ROOT.'";'.PHP_EOL;
echo 'var HTML_PATH_ADMIN_ROOT = "'.HTML_PATH_ADMIN_ROOT.'";'.PHP_EOL;
echo 'var HTML_PATH_ADMIN_THEME = "'.HTML_PATH_ADMIN_THEME.'";'.PHP_EOL;
echo 'var HTML_PATH_ADMIN_THEME_IMG = "'.HTML_PATH_ADMIN_THEME_IMG.'";'.PHP_EOL;
echo 'var HTML_PATH_UPLOADS = "'.HTML_PATH_UPLOADS.'";'.PHP_EOL;
echo 'var HTML_PATH_UPLOADS_THUMBNAILS = "'.HTML_PATH_UPLOADS_THUMBNAILS.'";'.PHP_EOL;
echo 'var PARENT = "'.PARENT.'";'.PHP_EOL;
echo 'var BLUDIT_VERSION = "'.BLUDIT_VERSION.'";'.PHP_EOL;
echo 'var BLUDIT_BUILD = "'.BLUDIT_BUILD.'";'.PHP_EOL;
echo 'var DOMAIN_UPLOADS = "'.DOMAIN_UPLOADS.'";'.PHP_EOL;

View File

@ -20,7 +20,8 @@ class Pages extends dbJSON {
'template'=>'',
'noindex'=>false,
'nofollow'=>false,
'noarchive'=>false
'noarchive'=>false,
'custom'=>array()
);
function __construct()
@ -55,7 +56,7 @@ class Pages extends dbJSON {
{
$row = array();
// Check values on args and set default values if not exists
// Predefined values
foreach ($this->dbFields as $field=>$value) {
if ($field=='tags') {
$tags = '';

View File

@ -73,17 +73,17 @@ class Page {
return $content;
}
$contentRaw = $this->contentRaw();
// Parse pre code with htmlentities
$content = Text::pre2htmlentities($contentRaw);
$content = $this->contentRaw();
// Parse Markdown
$parsedown = new Parsedown();
$content = $parsedown->text($content);
// Parse img src relative to absolute (with domain)
$content = Text::imgRel2Abs($content, DOMAIN_UPLOADS);
if (IMAGE_RELATIVE_TO_ABSOLUTE) {
$domain = IMAGE_RESTRICT?DOMAIN_UPLOADS_PAGES.$this->uuid().'/':DOMAIN_UPLOADS;
$content = Text::imgRel2Abs($content, $domain);
}
if ($sanitize) {
return Sanitize::html($content);
@ -276,35 +276,47 @@ class Page {
return json_encode($tmp);
}
// Returns the file name, FALSE there isn't a cover image setted
// If the user defined an External Cover Image the complete URL is going to be returned
// (boolean) $absolute, TRUE returns the absolute path and file name, FALSE just the file name
// Returns the endpoint of the coverimage, FALSE if the page doesn't have a cover image
// (boolean) $absolute, TRUE returns the complete URL, FALSE returns the filename
// If the user defined an external cover image the function returns it
public function coverImage($absolute=true)
{
$fileName = $this->getValue('coverImage');
if (empty($fileName)) {
$filename = $this->getValue('coverImage');
if (empty($filename)) {
return false;
}
// Check if external cover image, is a valid URL
if (filter_var($fileName, FILTER_VALIDATE_URL)) {
return $fileName;
// Check is external cover image
if (filter_var($filename, FILTER_VALIDATE_URL)) {
return $filename;
}
if ($absolute) {
return DOMAIN_UPLOADS.$fileName;
if (IMAGE_RESTRICT) {
return DOMAIN_UPLOADS_PAGES.$this->uuid().'/'.$filename;
}
return DOMAIN_UPLOADS.$filename;
}
return $fileName;
return $filename;
}
// Returns the absolute URL of the thumbnail of the cover image, FALSE if the page doen't have cover image
// Returns the endpoint of the thumbnail cover image, FALSE if the page doesn't have a cover image
public function thumbCoverImage()
{
$coverImageFilename = $this->coverImage(false);
if ($coverImageFilename==false) {
return false;
}
// Check is external cover image
if (filter_var($coverImageFilename, FILTER_VALIDATE_URL)) {
return $coverImageFilename;
}
if (IMAGE_RESTRICT) {
return DOMAIN_UPLOADS_PAGES.$this->uuid().'/thumbnails/'.$filename;
}
return DOMAIN_UPLOADS_THUMBNAILS.$coverImageFilename;
}

View File

@ -38,7 +38,9 @@ class Site extends dbJSON {
'titleFormatHomepage'=> '{{site-slogan}} | {{site-title}}',
'titleFormatPages'=> '{{page-title}} | {{site-title}}',
'titleFormatCategory'=> '{{category-name}} | {{site-title}}',
'titleFormatTag'=> '{{tag-name}} | {{site-title}}'
'titleFormatTag'=> '{{tag-name}} | {{site-title}}',
'imageRestrict'=> true,
'imageRelativeToAbsolute'=> false
);
function __construct()
@ -96,15 +98,13 @@ class Site extends dbJSON {
return false;
}
// Returns the URL of the rss.xml file
// You need to have enabled the plugin RSS
// DEPRECATED in v3.0, use Theme::rssUrl()
public function rss()
{
return DOMAIN_BASE.'rss.xml';
}
// Returns the URL of the sitemap.xml file
// You need to have enabled the plugin Sitemap
// DEPRECATED in v3.0, use Theme::sitemapUrl()
public function sitemap()
{
return DOMAIN_BASE.'sitemap.xml';
@ -170,6 +170,16 @@ class Site extends dbJSON {
return $this->getField('orderBy');
}
public function imageRestrict()
{
return $this->getField('imageRestrict');
}
public function imageRelativeToAbsolute()
{
return $this->getField('imageRelativeToAbsolute');
}
// Returns the site title
public function title()
{
@ -248,8 +258,6 @@ class Site extends dbJSON {
return $this->getField('url');
}
// Returns the protocol and the domain, without the base url
// For example, http://www.domain.com
public function domain()
@ -300,6 +308,14 @@ class Site extends dbJSON {
return $this->getField('language');
}
// Returns the sort version of the site's language
public function languageShortVersion()
{
$current = $this->language();
$explode = explode('_', $current);
return $explode[0];
}
// Returns the current locale.
public function locale()
{

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -356,5 +356,14 @@
"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."
"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"
}

View File

@ -3,7 +3,7 @@
"native": "Deutsch (Schweiz)",
"english-name": "German",
"locale": "de, de_CH",
"last-update": "2018-09-20",
"last-update": "2018-10-08",
"authors": [
"Clickwork https:\/\/clickwork.ch",
"blog2read https:\/\/github.com\/blog2read",
@ -301,7 +301,7 @@
"disable-user": "Benutzer deaktivieren",
"delete-user-and-keep-content": "Benutzer löschen und Inhalte behalten",
"delete-user-and-delete-content": "Benutzer und Inhalte löschen (Vorsicht!)",
"social-networks": "Sozial Netzwerke",
"social-networks": "Soziale Netzwerke",
"interval": "Abstände",
"number-in-minutes-for-every-execution-of-autosave": "Anzahl Minuten zwischen automatischen Speicherungen.",
"extreme-friendly-url": "Besonders benutzerfreundlicher URL",
@ -356,5 +356,14 @@
"last": "Ende",
"there-are-no-pages-at-this-moment": "Es gibt keine Seiten.",
"there-are-no-static-pages-at-this-moment": "Es gibt keine statischen Inhalte.",
"there-are-no-draft-pages-at-this-moment": "Es gibt keine Entwürfe."
}
"there-are-no-draft-pages-at-this-moment": "Es gibt keine Entwürfe.",
"good-morning": "Guten Morgen",
"good-afternoon": "Guten Nachmittag",
"good-evening": "Guten Abend",
"good-night": "Good night",
"hello": "Hallo",
"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"
}

View File

@ -3,7 +3,7 @@
"native": "Deutsch (Deutschland)",
"english-name": "German",
"locale": "de, de_DE",
"last-update": "2018-09-20",
"last-update": "2018-10-08",
"authors": [
"Clickwork https:\/\/clickwork.ch",
"blog2read https:\/\/github.com\/blog2read",
@ -301,7 +301,7 @@
"disable-user": "Benutzer deaktivieren",
"delete-user-and-keep-content": "Benutzer löschen und Inhalte behalten",
"delete-user-and-delete-content": "Benutzer und Inhalte löschen (Vorsicht!)",
"social-networks": "Sozial Netzwerke",
"social-networks": "Soziale Netzwerke",
"interval": "Abstände",
"number-in-minutes-for-every-execution-of-autosave": "Anzahl Minuten zwischen automatischen Speicherungen.",
"extreme-friendly-url": "Besonders benutzerfreundlicher URL",
@ -356,5 +356,14 @@
"last": "Ende",
"there-are-no-pages-at-this-moment": "Es gibt keine Seiten.",
"there-are-no-static-pages-at-this-moment": "Es gibt keine statischen Inhalte.",
"there-are-no-draft-pages-at-this-moment": "Es gibt keine Entwürfe."
}
"there-are-no-draft-pages-at-this-moment": "Es gibt keine Entwürfe.",
"good-morning": "Guten Morgen",
"good-afternoon": "Guten Nachmittag",
"good-evening": "Guten Abend",
"good-night": "Gute Nacht",
"hello": "Hallo",
"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"
}

View File

@ -356,5 +356,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"last": "Último",
"there-are-no-pages-at-this-moment": "No hay páginas en este momento.",
"there-are-no-static-pages-at-this-moment": "No hay páginas estáticas en este momento.",
"there-are-no-draft-pages-at-this-moment": "No hay páginas borrador en este momento."
"there-are-no-draft-pages-at-this-moment": "No hay páginas borrador en este momento.",
"good-morning": "Buenos días",
"good-afternoon": "Buenas tardes",
"good-evening": "Buenas noches",
"good-night": "Buenas noches",
"hello": "Hola",
"there-are-no-images-for-the-page": "No hay imágenes para la página.",
"select-cover-image": "Seleccionar imagen de portada",
"this-plugin-depends-on-the-following-plugins": "Este plugin depende de los siguientes plugins.",
"no-pages-found": "No pages found"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -3,7 +3,7 @@
"native": "Français (France)",
"english-name": "French",
"locale": "fr, fr_FR",
"last-update": "2018-03-10",
"last-update": "2018-10-24",
"authors": [
"Frédéric K. http:\/\/flatboard.free.fr",
"Clickwork https:\/\/clickwork.ch",
@ -74,7 +74,7 @@
"categories": "Catégories",
"users": "Utilisateurs",
"settings": "Paramètres",
"general": "Général",
"general": "Généraux",
"advanced": "Avancé",
"new-content": "Nouveau contenu",
"manage-content": "Gestionnaire de contenu",
@ -292,69 +292,78 @@
"example-page-4-slug": "a-propos",
"example-page-4-title": "À propos",
"example-page-4-content": "Votre page « À propos » est généralement lune des pages les plus visitées sur votre site, elle doit être simple avec quelques éléments clés, tels que votre nom, qui vous êtes, comment vous contacter, une petite histoire, etc.",
"the-extension-zip-is-not-installed": "The extension zip is not installed, to use this plugin you need to install the extension.",
"there-are-no-sticky-pages-at-this-moment": "There are no sticky pages at this moment.",
"there-are-no-scheduled-pages-at-this-moment": "There are no scheduled pages at this moment.",
"update": "Update",
"template": "Template",
"nickname": "Nickname",
"disable-user": "Disable user",
"delete-user-and-keep-content": "Delete user and keep content",
"delete-user-and-delete-content": "Delete user and delete content (Warning)",
"social-networks": "Social Networks",
"interval": "Interval",
"number-in-minutes-for-every-execution-of-autosave": "Number in minutes for every execution of autosave.",
"extreme-friendly-url": "Extreme friendly URL",
"title-formats": "Title formats",
"delete-content": "Delete content",
"are-you-sure-you-want-to-delete-this-page": "Are you sure you want to delete this page?",
"sticky": "Sticky",
"the-extension-zip-is-not-installed": "Lextension zip nest pas installée sur votre serveur, pour utiliser ce plugin, vous devez installer cette extension.",
"there-are-no-sticky-pages-at-this-moment": "Il ny a pas de pages épinglée pour le moment.",
"there-are-no-scheduled-pages-at-this-moment": "Il ny a pas de publication programmée pour le moment",
"update": "Mise à jour",
"template": "Modèle",
"nickname": "Pseudo",
"disable-user": "Désactiver lutilisateur",
"delete-user-and-keep-content": "Supprimer lutilisateur et conserver le contenu",
"delete-user-and-delete-content": "Supprimer lutilisateur ainsi que le contenu associé (Avertissement).",
"social-networks": "Réseaux sociaux",
"interval": "Intervalle",
"number-in-minutes-for-every-execution-of-autosave": "Temps en minutes pour exécuter la sauvegarde automatique.",
"extreme-friendly-url": "URL amicale (référencement naturel)",
"title-formats": "Format du titre",
"delete-content": "Supprimer le contenu",
"are-you-sure-you-want-to-delete-this-page": "Êtes-vous sûr de vouloir supprimer cette page?",
"sticky": "Épingler",
"actions": "Actions",
"edit": "Edit",
"edit": "Éditer",
"options": "Options",
"enter-title": "Enter title",
"media-manager": "Media Manager",
"set-a-cover-image-from-external-url,-such-as-a-cdn-or-some-server-dedicated-for-images": "Set a cover image from an external URL, such as a CDN or some server dedicated for images.",
"user": "User",
"date-format-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.",
"field-used-when-ordering-content-by-position": "Field used when ordering content by position",
"write-a-template-name-to-filter-the-page-in-the-theme-and-change-the-style-of-the-page": "Write a template name to filter the page in the theme and change the style of the page.",
"write-the-tags-separated-by-comma": "Write the tags separated by comma.",
"apply-code-noindex-code-to-this-page": "Apply <code>noindex<\/code> to this page.",
"this-tells-search-engines-not-to-show-this-page-in-their-search-results": "This tells search engines not to show this page in their search results.",
"apply-code-nofollow-code-to-this-page": "Apply <code>nofollow<\/code> to this page.",
"this-tells-search-engines-not-to-follow-links-on-this-page": "This tells search engines not to follow links on this page.",
"apply-code-noarchive-code-to-this-page": "Apply <code>noarchive<\/code> to this page.",
"this-tells-search-engines-not-to-save-a-cached-copy-of-this-page": "This tells search engines not to save a cached copy of this page.",
"uncategorized": "Uncategorized",
"done": "Done",
"delete-category": "Delete category",
"are-you-sure-you-want-to-delete-this-category?": "Are you sure you want to delete this category?",
"confirm-new-password": "Confirm new password",
"the-nickname-is-almost-used-in-the-themes-to-display-the-author-of-the-content": "The nickname is almost used in the themes to display the author of the content",
"allow-unicode": "Allow Unicode",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Allow Unicode characters in the URL and some part of the system.",
"variables-allowed": "Variables allowed",
"tag": "Tag",
"drag-and-drop-to-sort-the-plugins": "Drag and Drop to sort the plugins.",
"enter-title": "Insérer un titre",
"media-manager": "Gestionnaire de médias",
"set-a-cover-image-from-external-url,-such-as-a-cdn-or-some-server-dedicated-for-images": "Définissez une image daccroche à partir dune URL externe, telle quun CDN ou un serveur dédié aux images.",
"user": "Utilisateur",
"date-format-format": "Format de la date : <code>YYYY-MM-DD Heures:Minutes:Secondes<\/code>",
"start-typing-a-page-title-to-see-a-list-of-suggestions": "Commencez à taper le titre dune page, pour voir safficher une liste de suggestions.",
"field-used-when-ordering-content-by-position": "Champ utilisé lorsque le paramètre «contenu par position» est sélectionné.",
"write-a-template-name-to-filter-the-page-in-the-theme-and-change-the-style-of-the-page": "Écrivez un nom de modèle pour filtrer la page dans le thème et changer le style de la page.",
"write-the-tags-separated-by-comma": "Écrivez les balises séparées par des virgules.",
"apply-code-noindex-code-to-this-page": "Bloquer lindexation à cette page <code>noindex<\/code>.",
"this-tells-search-engines-not-to-show-this-page-in-their-search-results": "Cela indique aux moteurs de recherche de ne pas afficher cette page dans leurs résultats de recherche.",
"apply-code-nofollow-code-to-this-page": "Bloquer le suivi des liens à cette page <code>nofollow<\/code>.",
"this-tells-search-engines-not-to-follow-links-on-this-page": "Cela indique aux moteurs de recherche de ne pas suivre les liens sur cette page.",
"apply-code-noarchive-code-to-this-page": "Bloquer la mise en cache à cette page <code>noarchive<\/code>.",
"this-tells-search-engines-not-to-save-a-cached-copy-of-this-page": "Cela indique aux moteurs de recherche de ne pas enregistrer une copie en cache de cette page.",
"uncategorized": "Non classé",
"done": "Terminé",
"delete-category": "Supprimer la catégorie",
"are-you-sure-you-want-to-delete-this-category?": "Êtes-vous sûr de vouloir supprimer cette catégorie ?",
"confirm-new-password": "Confirmer le nouveau mot de passe.",
"the-nickname-is-almost-used-in-the-themes-to-display-the-author-of-the-content": "Le pseudo est souvent utilisé dans les thèmes pour afficher lauteur du contenu.",
"allow-unicode": "Autoriser les caractères Unicode",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Autoriser les caractères Unicode dans les URLS et une partie du système.",
"variables-allowed": "Variables autorisées",
"tag": "Balise",
"drag-and-drop-to-sort-the-plugins": "Glisser-déposer pour trier les plugins.",
"seo": "SEO",
"documentation": "Documentation",
"forum-support": "Forum support",
"chat-support": "Chat support",
"quick-links": "Quick links",
"leave-empty-for-autocomplete-by-bludit": "Leave empty for autocomplete by Bludit.",
"choose-a-password-for-the-user-admin": "Choose a password for the user <code>admin<\/code>",
"access-denied": "Access denied",
"choose-images-to-upload": "Choose images to upload",
"insert": "Insert",
"upload": "Upload",
"autosave": "Autosave",
"the-content-is-saved-as-a-draft-to-publish-it": "The content is saved as a draft. To publish it click on the button <b>Publish<\/b> or if you still working on it click on <b>Save as draft<\/b>.",
"forum-support": "Forum de support",
"chat-support": "Le support par chat.",
"quick-links": "Liens rapides",
"leave-empty-for-autocomplete-by-bludit": "Laisser vide pour un remplissage automatique par Bludit.",
"choose-a-password-for-the-user-admin": "Choisissez un mot de passe pour lutilisateur <code>admin<\/code>",
"access-denied": "Accès refusé",
"choose-images-to-upload": "Sélectionnez vos images à téléverser.",
"insert": "Insérer",
"upload": "Téléverser",
"autosave": "Enregistrement automatique",
"the-content-is-saved-as-a-draft-to-publish-it": "Le contenu est enregistré en tant que brouillon. Pour le publier, cliquez sur le bouton <b>Publier<\/b> ou, si vous travaillez encore, cliquez sur <b>Enregistrer en tant que brouillon<\/b>.",
"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."
"first": "Premier",
"last": "Dernier",
"there-are-no-pages-at-this-moment": "Il ny a pas de pages à afficher pour le moment.",
"there-are-no-static-pages-at-this-moment": "Il ny a pas de pages statiques à afficher pour le moment.",
"there-are-no-draft-pages-at-this-moment": "Il ny a pas de brouillon à afficher pour le moment.",
"good-morning": "Bonjour",
"good-afternoon": "Bonne après-midi",
"good-evening": "Bonsoir",
"good-night": "Bonne nuit",
"hello": "Salut",
"there-are-no-images-for-the-page": "Il ny a aucune images pour cette page.",
"select-cover-image": "Sélectionnez une image daccroche.",
"this-plugin-depends-on-the-following-plugins": "Ce plugin dépend des plugins suivants.",
"no-pages-found": "Aucune page trouvée"
}

View File

@ -356,5 +356,14 @@
"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."
"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"
}

View File

@ -356,5 +356,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -356,5 +356,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -7,7 +7,7 @@
"authors": [
"Dawid Stawicki",
"kontakt: dawid.stawicki@windowslive.com",
"strona: http://stawicki.at",
"strona: http:\/\/stawicki.at",
""
]
},
@ -356,5 +356,14 @@
"last": "Ostatnia",
"there-are-no-pages-at-this-moment": "Na tę chwilę nie posiadasz żadnych stron.",
"there-are-no-static-pages-at-this-moment": "Na tę chwilę nie posiadasz żadnych stron statycznych.",
"there-are-no-draft-pages-at-this-moment": "Na tę chwilę nie posiadasz żadnych szkiców."
"there-are-no-draft-pages-at-this-moment": "Na tę chwilę nie posiadasz żadnych szkiców.",
"good-morning": "Dzień dobry",
"good-afternoon": "Dzień dobry",
"good-evening": "Dobry wieczór",
"good-night": "Good night",
"hello": "Cześć",
"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"
}

View File

@ -356,5 +356,14 @@
"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."
"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"
}

View File

@ -356,5 +356,14 @@
"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."
"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"
}

View File

@ -352,5 +352,14 @@
"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."
"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"
}

View File

@ -168,7 +168,7 @@
"confirm-password": "Подтвердите пароль",
"editor": "Редактор",
"administrator": "Администратор",
"edit-user": "Редактировать пользователя",
"edit-user": "Редактирование пользователя",
"edit-content": "Редактировать контент",
"profile": "Профиль",
"change-password": "Изменить пароль",
@ -231,7 +231,7 @@
"content-published-from-scheduler": "Запланированный контент опубликован",
"blog": "Блог",
"complete-all-fields": "Заполните все поля",
"static": "Статическая",
"static": "Статические",
"about-your-site-or-yourself": "О Вас или Вашем сайте",
"homepage": "Домашняя страница",
"disabled": "Отключен",
@ -299,8 +299,8 @@
"template": "Шаблон",
"nickname": "Псевдоним",
"disable-user": "Отключить пользователя",
"delete-user-and-keep-content": "Удалить пользователя и сохранить содержимое",
"delete-user-and-delete-content": "Удалить пользователя и удалить содержимое (!)",
"delete-user-and-keep-content": "Удалить пользователя",
"delete-user-and-delete-content": "Удалить пользователя и содержимое (!)",
"social-networks": "Социальные сети",
"interval": "Интервал",
"number-in-minutes-for-every-execution-of-autosave": "Интервал в минутах для автосохранения.",
@ -335,7 +335,7 @@
"the-nickname-is-almost-used-in-the-themes-to-display-the-author-of-the-content": "Псевдоним, в основном, используется в темах для отображения авторства содержимого",
"allow-unicode": "Разрешить Unicode",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Разрешить символы Unicode в URL и других частях системы.",
"variables-allowed": "Переменные разрешены",
"variables-allowed": "Разрешённые переменные",
"tag": "Тег",
"drag-and-drop-to-sort-the-plugins": "Отсортируйте плагин перетаскиванием.",
"seo": "SEO",
@ -354,7 +354,16 @@
"site": "Сайт",
"first": "Первый",
"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."
}
"there-are-no-pages-at-this-moment": "В настоящее время страниц нет.",
"there-are-no-static-pages-at-this-moment": "В настоящее время статических страниц нет.",
"there-are-no-draft-pages-at-this-moment": "В настоящее время черновиков нет.",
"good-morning": "Доброе утро",
"good-afternoon": "Добрый день",
"good-evening": "Добрый вечер",
"good-night": "Доброй ночи",
"hello": "Привет",
"there-are-no-images-for-the-page": "На вашей странице нет изображений.",
"select-cover-image": "Выбрать изображение обложки",
"this-plugin-depends-on-the-following-plugins": "Этот плагин зависит от следующих плагинов.",
"no-pages-found": "Страниц не найдено"
}

View File

@ -3,8 +3,9 @@
"native": "Türkçe",
"english-name": "Turkish",
"locale": "tr, tr_TR",
"last-update": "2017-12-25",
"last-update": "2018-09-18",
"authors": [
"Ali Demirtas",
"guleyc",
"",
"",
@ -66,7 +67,7 @@
"url": "URL",
"welcome": "Merhaba",
"logout": ıkış",
"website": "Website",
"website": "Web site",
"publish": "Yayınla",
"manage": "Yönet",
"content": "İçerikler",
@ -76,7 +77,7 @@
"settings": "Ayarlar",
"general": "Genel",
"advanced": "Gelişmiş",
"new-content": "İçerik Ekle",
"new-content": "İçerik ekle",
"manage-content": "İçerikler",
"add-new-content": "Yeni içerik ekle",
"new-category": "Yeni kategori",
@ -98,8 +99,8 @@
"save": "Kaydet",
"save-as-draft": "Taslak olarak kaydet",
"cancel": "İptal",
"description": "Tanım",
"this-field-can-help-describe-the-content": "Bu alan içerisine 150 karakteri geçmeyecek şekilde içeriğe tanım ekleyebilirsiniz.",
"description": "ıklama",
"this-field-can-help-describe-the-content": "Bu alan içerisine 150 karakteri geçmeyecek şekilde içeriğe uygun açıklama ekleyebilirsiniz.",
"images": "Resimler",
"error": "Hata",
"supported-image-file-types": "Desteklenen resim formatları",
@ -115,7 +116,7 @@
"tags": "Etiketler",
"add": "Ekle",
"status": "Durum",
"published": "Dinamik",
"published": "Yayınlanmış",
"draft": "Taslak",
"empty-title": "Başlıksız",
"empty": "boş",
@ -129,13 +130,13 @@
"image-description": "Resim açıklaması",
"add-a-new-category": "Yeni kategori ekle",
"name": "Ad",
"username": "Kullanıcı Adı",
"username": "Kullanıcı adı",
"first-name": "Ad",
"last-name": "Soyad",
"to-schedule-the-content-select-the-date-and-time": "İçeriği zamanlamak için tarih ve saati seçin",
"email": "Email",
"email": "E-posta",
"role": "Grup",
"registered": "Kayıt Tarihi",
"registered": "Kayıt tarihi",
"site-information": "Site bilgisi",
"site-title": "Site başlığı",
"use-this-field-to-name-your-site": "Bu alanı sitenize ad vermek için kullanın.",
@ -143,13 +144,13 @@
"use-this-field-to-add-a-catchy-phrase": "Bu alanı sitenize akılda kalıcı bir cümle seçmek için kullanın.",
"site-description": "Site tanımı",
"you-can-add-a-site-description-to-provide": "Bir site tanımı ekleyebilirsiniz.",
"footer-text": "Footer metni",
"footer-text": "Alt bilgi metni",
"you-can-add-a-small-text-on-the-bottom": "Sitenizdeki her sayfanın sonuna kısa bir yazı ekleyebilirsiniz. Örn: Copyright, sahibi, tarih, vs.",
"social-networks-links": "Sosyal ağ linkleri",
"site-url": "Site URL",
"email-account-settings": "Email hesabı ayarları",
"sender-email": "Gönderen email",
"emails-will-be-sent-from-this-address": "Emailler bu adresten gönderilecektir.",
"social-networks-links": "Sosyal ağ bağlantıları",
"site-url": "Site URL'si",
"email-account-settings": "E-posta hesabı ayarları",
"sender-email": "Gönderen e-postası",
"emails-will-be-sent-from-this-address": "E-postalar bu adresten gönderilecektir.",
"url-filters": "URL filtreleri",
"select-your-sites-language": "Sitenizin dilini seçin.",
"timezone": "Saat dilimi",
@ -157,16 +158,16 @@
"locale": "Yerel",
"date-and-time-formats": "Tarih ve saat formatları",
"date-format": "Tarih formatı",
"current-format": "Şimdiki format",
"current-format": "Mevcut format",
"version": "Sürüm",
"author": "Yazar",
"activate": "Aktifleştir",
"deactivate": "Pasifleştir",
"activate": "Etkinleştir",
"deactivate": "Devre dışı bırak",
"edit-category": "Kategoriyi düzenle",
"delete": "Sil",
"password": "Şifre",
"confirm-password": "Şifre Doğrulama",
"editor": "Editör",
"editor": "Düzenleyici",
"administrator": "Yönetici",
"edit-user": "Kullanıcıyı düzenle",
"edit-content": "İçeriği düzenle",
@ -175,15 +176,15 @@
"enabled": "Etkinleştirildi",
"disable-the-user": "Kullanıcıyı etkisizleştir",
"profile-picture": "Profil resmi",
"edit-or-delete-your-categories": "Kategorilerinizi düzenle veya sil",
"edit-or-delete-your-categories": "Kategorileri düzenle veya sil",
"create-a-new-category-to-organize-your-content": "İçeriğinizi düzenlemek için yeni bir kategori oluşturun",
"confirm-delete-this-action-cannot-be-undone": "Silmeyi onaylayın,bu işlem geri alınamaz!",
"do-you-want-to-disable-the-user": "Kullanıcıyı etkisizleştirmek istiyor musunuz ?",
"confirm-delete-this-action-cannot-be-undone": "Silmeyi onaylayın, bu işlem geri alınamaz!",
"do-you-want-to-disable-the-user": "Kullanıcıyı etkisizleştirmek istiyor musunuz?",
"new-password": "Yeni şifre",
"you-can-change-this-field-when-save-the-current-changes": "Geçerli değişiklikleri kaydettiğinizde bu alanı değiştirebilirsiniz.",
"items-per-page": "Sayfa başına öğe",
"items-per-page": "Sayfa başına öge",
"invite-a-friend-to-collaborate-on-your-site": "Bir arkadaşınızı sitenize davet edin",
"number-of-items-to-show-per-page": "Sayfa başına gösterilecek öğe sayısı.",
"number-of-items-to-show-per-page": "Sayfa başına gösterilecek öge sayısı.",
"website-or-blog": "Web sitesi veya blog",
"order-content-by": "İçerik sıralaması",
"edit-or-delete-content-from-your-site": "Sitenizden içerik düzenleme veya silme",
@ -201,48 +202,48 @@
"complete-the-form-choose-a-password-for-the-username-admin": "Bu formu doldurarak, « admin » kullanıcısı için bir şifre belirleyin",
"show-password": "Şifreyi göster",
"install": "Yükle",
"login": "Giriş",
"login": "Giriş yap",
"back-to-login-form": "Giriş formuna geri dön",
"get-login-access-code": "Giriş kodu al",
"email-access-code": "Email erişim kodu",
"whats-next": "Sırada Ne Var",
"email-access-code": "E-posta erişim kodu",
"whats-next": "Sırada ne var?",
"username-or-password-incorrect": "Kullanıcı adı veya şifre yanlış",
"follow-bludit-on": "Takip edin",
"this-is-a-brief-description-of-yourself-our-your-site": "Bu kısım siten hakkında bilgi verir.Burayı değiştirmek ve düzenlemek için admin->eklentiler->tanımı düzenle",
"this-is-a-brief-description-of-yourself-our-your-site": "Bu kısım siten hakkında bilgi verir. Burayı değiştirmek ve düzenlemek için admin->eklentiler->tanımı düzenle",
"new-version-available": "Yeni sürüm mevcut",
"new-category-created": "Yeni kategori oluşturuldu",
"category-deleted": "Kategori silindi",
"category-edited": "Kategori düzenlenmiş",
"new-user-created": "Yeni kullanıcı yaratıldı",
"category-edited": "Kategori düzenlendi",
"new-user-created": "Yeni kullanıcı oluşturuldu",
"user-edited": "Kullanıcı düzenlendi",
"user-deleted": "Kullanıcı silindi",
"recommended-for-recovery-password-and-notifications": "Kurtarma şifresi ve bildirimleri için önerilir.",
"authentication-token": "Authentication Token",
"token": "Token",
"current-status": "Şu anki durum",
"authentication-token": "Kimlik doğrulama jetonu",
"token": "Jeton",
"current-status": "Mevcut durum",
"upload-image": "Resim yükle",
"the-changes-have-been-saved": "Değişiklikler kaydedildi",
"label": "Etiket",
"links": "Bağlantılar",
"this-title-is-almost-always-used-in-the-sidebar-of-the-site": "Bu başlık hemen hemen her zaman sitenin kenar çubuğunda kullanılır..",
"this-title-is-almost-always-used-in-the-sidebar-of-the-site": "Bu başlık her zaman sitenin kenar çubuğunda kullanılır.",
"password-must-be-at-least-6-characters-long": "Şifre en az 6 karakter uzunluğunda olmalıdır",
"ip-address-has-been-blocked": "IP adresi bloklandı.",
"ip-address-has-been-blocked": "IP adresi engellendi.",
"try-again-in-a-few-minutes": "Birkaç dakika içinde tekrar deneyin.",
"content-published-from-scheduler": "Zamanlayıcı'dan yayınlanan içerik",
"content-published-from-scheduler": "Zamanlayıcı tarafından yayınlanan içerik",
"blog": "Blog",
"complete-all-fields": "Tüm alanları doldurun",
"static": "Statik",
"static": "Sabit",
"about-your-site-or-yourself": "Siteniz veya kendiniz hakkında",
"homepage": "Anasayfa",
"homepage": "Ana sayfa",
"disabled": "Devre dışı",
"to-enable-the-user-you-must-set-a-new-password": "Kullanıcıyı etkinleştirmek için yeni bir şifre oluşturmalısınız.",
"delete-the-user-and-associate-his-content-to-admin-user": "Kullanıcıyı silin ve içeriğini yönetici kullanıcısı ile ilişkilendirin",
"delete-the-user-and-associate-his-content-to-admin-user": "Kullanıcıyı silin ve içeriğini yönetici ile ilişkilendirin",
"delete-the-user-and-all-his-content": "Kullanıcıyı ve içeriğini tümüyle sil",
"user-disabled": "Kullanıcı devre dışı",
"user-password-changed": "Kullanıcı şifresi değişti",
"the-password-and-confirmation-password-do-not-match": "Parola ve doğrulama parolası uyuşmuyor",
"scheduled-content": "Zamanlanmış içerik",
"there-are-no-scheduled-content": "Programlanmış bir içerik yok.",
"there-are-no-scheduled-content": "Zamanlanmış bir içerik yok.",
"new-content-created": "Yeni içerik oluşturuldu",
"content-edited": "İçerik düzenlendi",
"content-deleted": "İçerik silindi",
@ -252,9 +253,9 @@
"order-items-by": "Öğe sıralaması:",
"all-content": "Tüm içerik",
"dynamic": "Dinamik",
"type": "Tip",
"type": "Tür",
"draft-content": "Taslak içeriği",
"post": "Post",
"post": "Gönderi",
"default": "Varsayılan",
"latest-content": "Son içerik",
"default-message": "Varsayılan mesaj",
@ -267,94 +268,103 @@
"previous-page": "Önceki sayfa",
"next-page": "Sonraki sayfa",
"scheduled": "Zamanlanmış",
"this-token-is-similar-to-a-password-it-should-not-be-shared": "Bu belirteç bir parolaya benzer, paylaşılmamalıdır..",
"congratulations-you-have-successfully-installed-your-bludit": "Tebrikler ** Bludit ** 'ı başarıyla yüklediniz.",
"this-token-is-similar-to-a-password-it-should-not-be-shared": "Bu belirteç bir parolaya benzer, paylaşılmamalıdır.",
"congratulations-you-have-successfully-installed-your-bludit": "Tebrikler, **Bludit** başarıyla yüklendi.",
"this-theme-may-not-be-supported-by-this-version-of-bludit": "Bu tema Bludit'in bu sürümü tarafından desteklenmeyebilir",
"read-more": "Devamını oku",
"remember-me": "Remember me",
"plugins-position": "Plugin position",
"plugins-sorted": "Plugins sorted",
"plugins-position-changed": "Plugin position changed",
"drag-and-drop-to-set-the-position-of-the-plugin": "Drag and Drop to set the position of the plugins",
"change-the-position-of-the-plugins": "Change the position of the plugins",
"reading-time": "Reading time",
"minutes": "minutes",
"minute": "minute",
"example-page-1-slug": "create-your-own-content",
"example-page-1-title": "Create your own content",
"example-page-1-content": "Start writing your own content or edit the current to fit your needs. To create, edit or remove content you need to login to the <a href=\".\/admin\/\">admin panel<\/a> with the username `admin` and the password you set on the installation process.",
"example-page-2-slug": "set-up-your-new-site",
"example-page-2-title": "Set up your new site",
"example-page-2-content": "Update the settings of your site from the <a href=\".\/admin\/\">admin panel<\/a>, you can change the title, description and the social networks from <a href=\".\/admin\/settings\" target=\"_blank\">Settings > General<\/a>.",
"example-page-3-slug": "follow-bludit",
"example-page-3-title": "Follow Bludit",
"example-page-3-content": "Get information about news, new releases, new themes or new plugins on our social networks <a href=\"https:\/\/www.facebook.com\/bluditcms\/\" target=\"_blank\">Facebook<\/a>, <a href=\"https:\/\/www.twitter.com\/bludit\/\" target=\"_blank\">Twitter<\/a> and <a href=\"https:\/\/plus.google.com\/+Bluditcms\" target=\"_blank\">Google Plus<\/a> or visit our <a href=\"https:\/\/blog.bludit.com\" target=\"_blank\">Blog<\/a>.",
"example-page-4-slug": "about",
"example-page-4-title": "About",
"example-page-4-content": "Your About page is typically one of the most visited pages on your site, need to be simple with a few key things, such as your name, who are you, how can contact you, a small story, etc.",
"the-extension-zip-is-not-installed": "The extension zip is not installed, to use this plugin you need to install the extension.",
"there-are-no-sticky-pages-at-this-moment": "There are no sticky pages at this moment.",
"there-are-no-scheduled-pages-at-this-moment": "There are no scheduled pages at this moment.",
"update": "Update",
"template": "Template",
"nickname": "Nickname",
"disable-user": "Disable user",
"delete-user-and-keep-content": "Delete user and keep content",
"delete-user-and-delete-content": "Delete user and delete content (Warning)",
"social-networks": "Social Networks",
"interval": "Interval",
"number-in-minutes-for-every-execution-of-autosave": "Number in minutes for every execution of autosave.",
"extreme-friendly-url": "Extreme friendly URL",
"title-formats": "Title formats",
"delete-content": "Delete content",
"are-you-sure-you-want-to-delete-this-page": "Are you sure you want to delete this page?",
"sticky": "Sticky",
"actions": "Actions",
"edit": "Edit",
"options": "Options",
"enter-title": "Enter title",
"media-manager": "Media Manager",
"set-a-cover-image-from-external-url,-such-as-a-cdn-or-some-server-dedicated-for-images": "Set a cover image from an external URL, such as a CDN or some server dedicated for images.",
"user": "User",
"date-format-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.",
"field-used-when-ordering-content-by-position": "Field used when ordering content by position",
"write-a-template-name-to-filter-the-page-in-the-theme-and-change-the-style-of-the-page": "Write a template name to filter the page in the theme and change the style of the page.",
"write-the-tags-separated-by-comma": "Write the tags separated by comma.",
"apply-code-noindex-code-to-this-page": "Apply <code>noindex<\/code> to this page.",
"this-tells-search-engines-not-to-show-this-page-in-their-search-results": "This tells search engines not to show this page in their search results.",
"apply-code-nofollow-code-to-this-page": "Apply <code>nofollow<\/code> to this page.",
"this-tells-search-engines-not-to-follow-links-on-this-page": "This tells search engines not to follow links on this page.",
"apply-code-noarchive-code-to-this-page": "Apply <code>noarchive<\/code> to this page.",
"this-tells-search-engines-not-to-save-a-cached-copy-of-this-page": "This tells search engines not to save a cached copy of this page.",
"uncategorized": "Uncategorized",
"done": "Done",
"delete-category": "Delete category",
"are-you-sure-you-want-to-delete-this-category?": "Are you sure you want to delete this category?",
"confirm-new-password": "Confirm new password",
"the-nickname-is-almost-used-in-the-themes-to-display-the-author-of-the-content": "The nickname is almost used in the themes to display the author of the content",
"allow-unicode": "Allow Unicode",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Allow Unicode characters in the URL and some part of the system.",
"variables-allowed": "Variables allowed",
"tag": "Tag",
"drag-and-drop-to-sort-the-plugins": "Drag and Drop to sort the plugins.",
"remember-me": "Beni hatırla",
"plugins-position": "Eklenti konumu",
"plugins-sorted": "Eklentiler sıralandı",
"plugins-position-changed": "Eklenti konumu değişti",
"drag-and-drop-to-set-the-position-of-the-plugin": "Eklentilerin konumunu ayarlamak için sürükle ve bırak",
"change-the-position-of-the-plugins": "Eklentilerin konumunu değiştirin",
"reading-time": "Okuma süresi",
"minutes": "dakika",
"minute": "dakika",
"example-page-1-slug": "iceriginizi-olusturun",
"example-page-1-title": "İçeriğinizi oluşturun",
"example-page-1-content": "Kendi içeriğinizi yazmaya başlayın veya gereksinimlerinize uyacak şekilde bunu düzenleyin. İçeriği oluşturmak, düzenlemek veya kaldırmak için <a href=\".\/admin\/\">yönetim paneline<\/a> kullanıcı adı 'admin' ve yükleme işleminde belirlediğiniz şifre ile giriş yapmanız gerekir.",
"example-page-2-slug": "yeni-sitenizi-kurun",
"example-page-2-title": "Yeni sitenizi kurun",
"example-page-2-content": "Sitenizin ayarlarını <a href=\".\/admin\/\">yönetim panelinden<\/a> güncelleyin. Başlığı, açıklamayı ve sosyal ağları <a href=\".\/admin\/settings\" target=\"_blank\">Ayarlar > Genel<\/a> adresinden değiştirebilirsiniz.",
"example-page-3-slug": "bludit-takip-et",
"example-page-3-title": "Bludit'i takip edin",
"example-page-3-content": "Haberler, yeni sürümler, yeni temalar veya yeni eklentiler hakkında sosyal ağlarımızı <a href=\"https:\/\/www.facebook.com\/bluditcms\/\" target=\"_blank\">Facebook<\/a>, <a href=\"https:\/\/www.twitter.com\/bludit\/\" target=\"_blank\">Twitter<\/a>, <a href=\"https:\/\/plus.google.com\/+Bluditcms\" target=\"_blank\">Google Plus<\/a> takip edin ya da <a href=\"https:\/\/blog.bludit.com\" target=\"_blank\">Blog'muzu<\/a> ziyaret edin.",
"example-page-4-slug": "hakkinda",
"example-page-4-title": "Hakkında",
"example-page-4-content": "Hakkında sayfanız genellikle sitenizdeki en çok ziyaret edilen sayfalardan biridir. Adınız gibi birkaç önemli şeyle basit olmanız gerekir, kimsiniz, sizinle nasıl iletişim kurabilir, küçük bir hikaye, vb.",
"the-extension-zip-is-not-installed": "zip uzantısı yüklü değil, bu eklentiyi kullanmak için uzantıyı yüklemeniz gerekir.",
"there-are-no-sticky-pages-at-this-moment": "Şu anda yapışkan sayfa yok.",
"there-are-no-scheduled-pages-at-this-moment": "Şu anda zamanlanmış sayfa yok.",
"update": "Güncelle",
"template": "Şablon",
"nickname": "Takma isim",
"disable-user": "Kullanıcıyı devre dışı bırak",
"delete-user-and-keep-content": "Kullanıcıyı sil ve içeriği sakla",
"delete-user-and-delete-content": "Kullanıcıyı sil ve içeriği sil (Uyarı)",
"social-networks": "Sosyal ağlar",
"interval": "Aralık",
"number-in-minutes-for-every-execution-of-autosave": "Otomatik kaydetmenin her çalıştırılması için dakika cinsinden sayı.",
"extreme-friendly-url": "ırı uyumlu URL",
"title-formats": "Başlık formatları",
"delete-content": "İçeriği sil",
"are-you-sure-you-want-to-delete-this-page": "Bu sayfayı silmek istediğinizden emin misiniz?",
"sticky": "Yapışkan",
"actions": "Eylemler",
"edit": "Düzenle",
"options": "Seçenekler",
"enter-title": "Başlığı gir",
"media-manager": "Medya yöneticisi",
"set-a-cover-image-from-external-url,-such-as-a-cdn-or-some-server-dedicated-for-images": "CDN veya görüntüler için ayrılmış bir sunucu gibi harici bir URL'den kapak resmi ayarlayın.",
"user": "Kullanıcı",
"date-format-format": "Tarih formatı: <code>YIL-AY-GÜN Saat:Dakika:Saniye<\/code>",
"start-typing-a-page-title-to-see-a-list-of-suggestions": "Önerilerin listesini görmek için bir sayfa başlığı yazmaya başlayın.",
"field-used-when-ordering-content-by-position": "İçeriği konuma göre sıralarken kullanılan alan",
"write-a-template-name-to-filter-the-page-in-the-theme-and-change-the-style-of-the-page": "Sayfayı temaya göre filtrelemek ve sayfanın stilini değiştirmek için bir şablon adı yazın.",
"write-the-tags-separated-by-comma": "Etiketleri virgülle ayırın.",
"apply-code-noindex-code-to-this-page": "Bu sayfaya <code>noindex<\/code> uygula.",
"this-tells-search-engines-not-to-show-this-page-in-their-search-results": "Bu, arama motorlarına bu sayfayı arama sonuçlarında göstermemesini söyler.",
"apply-code-nofollow-code-to-this-page": "Bu sayfaya <code>nofollow<\/code> uygula.",
"this-tells-search-engines-not-to-follow-links-on-this-page": "Bu, arama motorlarına bu sayfadaki bağlantıları izlememesini söyler.",
"apply-code-noarchive-code-to-this-page": "Bu sayfaya <code>noarchive<\/code> uygula.",
"this-tells-search-engines-not-to-save-a-cached-copy-of-this-page": "Bu, arama motorlarına bu sayfanın önbelleğe alınmış bir kopyasını kaydetmemesini söyler.",
"uncategorized": "Kategorisiz",
"done": "Tamam",
"delete-category": "Kategoriyi sil",
"are-you-sure-you-want-to-delete-this-category?": "Bu kategoriyi silmek istediğinizden emin misiniz?",
"confirm-new-password": "Yeni parolayı onayla",
"the-nickname-is-almost-used-in-the-themes-to-display-the-author-of-the-content": "İçeriğin yazarını görüntülemek için takma adlar neredeyse temalarda kullanılır.",
"allow-unicode": "Unicode'a izin ver",
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "URL'de Unicode karakterlerine ve bazı sistem parçalarına izin verin.",
"variables-allowed": "Değişkenlere izin verilir",
"tag": "Etiket",
"drag-and-drop-to-sort-the-plugins": "Eklentileri sıralamak için sürükle ve bırak.",
"seo": "SEO",
"documentation": "Documentation",
"forum-support": "Forum support",
"chat-support": "Chat support",
"quick-links": "Quick links",
"leave-empty-for-autocomplete-by-bludit": "Leave empty for autocomplete by Bludit.",
"choose-a-password-for-the-user-admin": "Choose a password for the user <code>admin<\/code>",
"access-denied": "Access denied",
"choose-images-to-upload": "Choose images to upload",
"insert": "Insert",
"upload": "Upload",
"autosave": "Autosave",
"the-content-is-saved-as-a-draft-to-publish-it": "The content is saved as a draft. To publish it click on the button <b>Publish<\/b> or if you still working on it click on <b>Save as draft<\/b>.",
"documentation": "Belgeler",
"forum-support": "Forum desteği",
"chat-support": "Sohbet desteği",
"quick-links": "Hızlı bağlantılar",
"leave-empty-for-autocomplete-by-bludit": "Bludit tarafından otomatik tamamlama için boş bırakın.",
"choose-a-password-for-the-user-admin": "Kullanıcı için bir şifre seçin <code>admin<\/code>",
"access-denied": "Erişim engellendi",
"choose-images-to-upload": "Yüklenecek görselleri seçin",
"insert": "Ekle",
"upload": "Yükle",
"autosave": "Otomatik kaydetme",
"the-content-is-saved-as-a-draft-to-publish-it": "İçerik taslak olarak kaydedilir. Yayınlamak için <b>Yayınla<\/b> seçeneğine tıklayın ya da hala üzerinde çalışıyorsanız <b>Taslak olarak kaydet<\/b> seçeneğini seçin.",
"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."
"first": "İlk",
"last": "Son",
"there-are-no-pages-at-this-moment": "Şu anda hiç sayfa yok.",
"there-are-no-static-pages-at-this-moment": "Şu anda hiç sabit sayfa yok.",
"there-are-no-draft-pages-at-this-moment": "Şu anda taslak sayfa yok.",
"good-morning": "Günaydın",
"good-afternoon": "İyi günler",
"good-evening": "İyi akşamlar",
"good-night": "İyi geceler",
"hello": "Merhaba",
"there-are-no-images-for-the-page": "Sayfa için resim yok.",
"select-cover-image": "Kapak resmini seç",
"this-plugin-depends-on-the-following-plugins": "Bu eklenti aşağıdaki eklentilere bağlıdır.",
"no-pages-found": "No pages found"
}

View File

@ -356,5 +356,14 @@
"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."
"there-are-no-draft-pages-at-this-moment": "There are no draft pages at this moment.",
"good-morning": "Доброго ранку",
"good-afternoon": "Доброго дня",
"good-evening": "Доброго вечора",
"good-night": "Good night",
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

@ -355,5 +355,14 @@
"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."
"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"
}

View File

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

View File

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

View File

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

View File

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

View File

@ -2,10 +2,10 @@
"plugin-data":
{
"name": "Disqus Yorum Sistemi",
"description": "Diqus siteler için yorum hostingi yapan bir hostingdir.Eklentiyi kullanmadan önce Disqus.com adresine kayıt olmanız gerekmektedir."
"description": "Disqus siteler için yorum barındırması yapan bir firmadır. Eklentiyi kullanmadan önce Disqus.com adresine kayıt olmanız gerekmektedir."
},
"disqus-shortname": "Disqus",
"enable-disqus-on-pages": "Sayfalar için Disqus'ı etkinleştir.",
"enable-disqus-on-posts": "Yazılar için Disqus'ı etkinleştir.",
"enable-disqus-on-default-home-page": "Geçerli anasayfa için Disqus'ı etkinleştir."
"enable-disqus-on-pages": "Sayfalar için Disqus'ı etkinleştir",
"enable-disqus-on-posts": "Yazılar için Disqus'ı etkinleştir",
"enable-disqus-on-default-home-page": "Geçerli ana sayfa için Disqus'ı etkinleştir"
}

View File

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

View File

@ -55,7 +55,7 @@ class pluginDisqus extends Plugin {
if ( !$url->notFound() &&
( $url->whereAmI()=='page' &&
(($this->getValue('enablePosts') && $page->published()) ||
($this->getValue('enablePages') && $page->static()))
($this->getValue('enablePages') && $page->isStatic()))
) &&
$page->allowComments() ) {
$html = '<div id="disqus_thread"></div>';

View File

@ -0,0 +1,7 @@
{
"plugin-data":
{
"name": "Hit Counter",
"description": "Show the number of visits or unique visitors in the sidebar of your site."
}
}

View File

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

View File

@ -0,0 +1,10 @@
{
"author": "Bludit",
"email": "",
"website": "https://plugins.bludit.com",
"version": "3.2",
"releaseDate": "2018-10-20",
"license": "MIT",
"compatible": "3.2",
"notes": ""
}

View File

@ -0,0 +1,85 @@
<?php
class pluginHitCounter extends Plugin {
public function init()
{
$this->dbFields = array(
'label'=>'Hit Counter',
'showUniqueVisitors'=>false
);
}
public function form()
{
global $L;
// Check if the plugin Simple Stats is activated
if (!pluginActivated('pluginSimpleStats')) {
// Show an alert about the dependency of the plugin
$html = '<div class="alert alert-warning" role="alert">';
$html .= $L->get('This plugin depends on the following plugins.');
$html .= '<ul class="m-0"><li>Simple Stats</li></ul>';
$html .= '</div>';
// Hidden form buttons. Save and Cancel buttons.
$this->formButtons = false;
return $html;
}
// Show the description of the plugin in the settings
$html = '<div class="alert alert-primary" role="alert">';
$html .= $this->description();
$html .= '</div>';
// Label of the plugin to show in the sidebar
$html .= '<div>';
$html .= '<label>'.$L->get('Label').'</label>';
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';
// Form "select" element for enable or disable Unique visitors properties
$html .= '<div>';
$html .= '<label>'.$L->get('Show unique visitors').'</label>';
$html .= '<select name="showUniqueVisitors">';
$html .= '<option value="true" '.($this->getValue('showUniqueVisitors')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
$html .= '<option value="false" '.($this->getValue('showUniqueVisitors')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
$html .= '</select>';
$html .= '</div>';
return $html;
}
public function siteSidebar()
{
// Init counter to 0
$counter = 0;
// Check if the plugin Simple Stats is activated
if (pluginActivated('pluginSimpleStats')) {
// Get the object of the plugin Simple Stats
global $plugins;
$simpleStats = $plugins['all']['pluginSimpleStats'];
$currentDate = Date::current('Y-m-d');
if ($this->getValue('showUniqueVisitors')) {
// Get the unique visitors from today
$counter = $simpleStats->uniqueVisitors($currentDate);
} else {
// Get the visits from today
$counter = $simpleStats->visits($currentDate);
}
}
// Show in the sidebar the number of visitors
$html = '<div class="plugin plugin-hit-counter">';
$html .= '<h2 class="plugin-label">'.$this->getValue('label').'</h2>';
$html .= '<div class="plugin-content">';
$html .= '<div class="counter">'.$counter.'</div>';
$html .= '</div>';
$html .= '</div>';
return $html;
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,10 @@
{
"plugin-data":
{
"name": "Gezinti menüsü",
"description": "Kenar çubuğu için üst ve alt sayfaları içeren gezinme menüsü."
},
"home-link": "Ana sayfa bağlantısı",
"show-the-home-link-on-the-sidebar": "Kenar çubuğundaki ev bağlantısını göster.",
"amount-of-items": "Öge sayısı"
}

View File

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

View File

@ -0,0 +1,8 @@
{
"plugin-data":
{
"name": "Open Graph",
"description": "Open Graph protokolü sosyal bir grafikte zengin bir nesne halinde herhangi bir web sayfasını sağlar."
},
"default-image": "Varsayılan resim"
}

View File

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

View File

@ -2,7 +2,7 @@
"plugin-data":
{
"name": "Remote Content",
"description": ""
"description": "This plugin provides an easy way to have the content of your site on Github or similar and in turn is synchronized with your Bludit."
},
"webhook": "Webhook",
"source": "Source",

View File

@ -2,7 +2,7 @@
"plugin-data":
{
"name": "Contenido remoto",
"description": ""
"description": "Este plugin provee una forma facil de tener el contenido de tu sitio en Github o similar y a su vez esta sincronizado con tu Bludit."
},
"webhook": "Webhook",
"source": "Source",

View File

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

View File

@ -16,11 +16,11 @@ class pluginRemoteContent extends Plugin {
public function form()
{
global $Language;
global $language;
if (extension_loaded('zip')===false) {
$this->formButtons = false;
return '<div class="alert alert-success">'.$Language->get('the-extension-zip-is-not-installed').'</div>';
return '<div class="alert alert-success">'.$language->get('the-extension-zip-is-not-installed').'</div>';
}
$html = '<div class="alert alert-primary" role="alert">';
@ -28,15 +28,15 @@ class pluginRemoteContent extends Plugin {
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$Language->get('Webhook').'</label>';
$html .= '<label>'.$language->get('Webhook').'</label>';
$html .= '<input id="jswebhook" name="webhook" type="text" value="'.$this->getValue('webhook').'">';
$html .= '<span class="tip">'.DOMAIN_BASE.$this->getValue('webhook').'</span>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$Language->get('Source').'</label>';
$html .= '<label>'.$language->get('Source').'</label>';
$html .= '<input id="jssource" name="source" type="text" value="'.$this->getValue('source').'" placeholder="https://">';
$html .= '<span class="tip">'.$Language->get('Complete URL of the zip file').'</span>';
$html .= '<span class="tip">'.$language->get('Complete URL of the zip file').'</span>';
$html .= '</div>';
return $html;
@ -94,8 +94,10 @@ class pluginRemoteContent extends Plugin {
Filesystem::deleteRecursive(PATH_PAGES);
Filesystem::deleteRecursive(PATH_UPLOADS);
mkdir(PATH_PAGES, 0755, true);
mkdir(PATH_UPLOADS, 0755, true);
mkdir(PATH_PAGES, DIR_PERMISSIONS, true);
mkdir(PATH_UPLOADS, DIR_PERMISSIONS, true);
mkdir(PATH_UPLOADS_PROFILES, DIR_PERMISSIONS, true);
mkdir(PATH_UPLOADS_THUMBNAILS, DIR_PERMISSIONS, true);
return true;
}
@ -104,7 +106,7 @@ class pluginRemoteContent extends Plugin {
{
$workspace = $this->workspace();
Filesystem::deleteRecursive($workspace.DS);
mkdir($workspace, 0755, true);
mkdir($workspace, DIR_PERMISSIONS, true);
return true;
}

View File

@ -2,6 +2,6 @@
"plugin-data":
{
"name": "Robots",
"description": "Plugin für die Verwendung von Robots-Meta-Tags zur Suchmaschinenoptimierung (SEO) unter "Einstellungen" bei der Erstellung oder Bearbeitung von Seiten.
"description": "Plugin für die Verwendung von Robots-Meta-Tags zur Suchmaschinenoptimierung (SEO) unter \"Einstellungen\" bei der Erstellung oder Bearbeitung von Seiten."
}
}

View File

@ -2,6 +2,6 @@
"plugin-data":
{
"name": "Robots",
"description": "Plugin für die Verwendung von Robots-Meta-Tags zur Suchmaschinenoptimierung (SEO) unter "Einstellungen" bei der Erstellung oder Bearbeitung von Seiten.
"description": "Plugin für die Verwendung von Robots-Meta-Tags zur Suchmaschinenoptimierung (SEO) unter \"Einstellungen\" bei der Erstellung oder Bearbeitung von Seiten."
}
}

View File

@ -0,0 +1,7 @@
{
"plugin-data":
{
"name": "Robotlar",
"description": "Robotların bir sayfanın içeriğini dizine eklememelerini veya takip edilecek bağlantılar için taramamasını sağlamak için özel bir HTML meta etiketi kullanabilirsiniz."
}
}

View File

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

View File

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

View File

@ -0,0 +1,8 @@
{
"plugin-data":
{
"name": "Suche",
"description": "Fügt ein Suchfeld ein, mit dem die Inhalte der Website durchsucht werden können."
},
"search": "Suchen"
}

View File

@ -0,0 +1,8 @@
{
"plugin-data":
{
"name": "Suche",
"description": "Fügt ein Suchfeld ein, mit dem die Inhalte der Website durchsucht werden können."
},
"search": "Suchen"
}

View File

@ -0,0 +1,8 @@
{
"plugin-data":
{
"name": "Search",
"description": "Provide a search box to your users to search through the content of your site."
},
"search": "Search"
}

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