commit
d064875a76
|
@ -8,9 +8,16 @@ function updateBludit()
|
||||||
global $Site;
|
global $Site;
|
||||||
|
|
||||||
// Check if Bludit need to be update.
|
// Check if Bludit need to be update.
|
||||||
if($Site->currentBuild() < BLUDIT_BUILD)
|
if( ($Site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) )
|
||||||
{
|
{
|
||||||
$directories = array(PATH_POSTS, PATH_PAGES, PATH_PLUGINS_DATABASES, PATH_UPLOADS_PROFILES);
|
$directories = array(
|
||||||
|
PATH_POSTS,
|
||||||
|
PATH_PAGES,
|
||||||
|
PATH_PLUGINS_DATABASES,
|
||||||
|
PATH_UPLOADS_PROFILES,
|
||||||
|
PATH_UPLOADS_THUMBNAILS,
|
||||||
|
PATH_TMP
|
||||||
|
);
|
||||||
|
|
||||||
foreach($directories as $dir)
|
foreach($directories as $dir)
|
||||||
{
|
{
|
||||||
|
@ -23,6 +30,8 @@ function updateBludit()
|
||||||
|
|
||||||
// Set and save the database.
|
// Set and save the database.
|
||||||
$Site->set(array('currentBuild'=>BLUDIT_BUILD));
|
$Site->set(array('currentBuild'=>BLUDIT_BUILD));
|
||||||
|
|
||||||
|
Log::set('updateBludit'.LOG_SEP.'System updated');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,11 +85,9 @@ if($Login->role()!=='admin') {
|
||||||
$layout['parameters'] = $Login->username();
|
$layout['parameters'] = $Login->username();
|
||||||
}
|
}
|
||||||
|
|
||||||
$_user = $dbUsers->getDb($layout['parameters']);
|
$_User = $dbUsers->getUser($layout['parameters']);
|
||||||
|
|
||||||
// If the user doesn't exist, redirect to the users list.
|
// If the user doesn't exist, redirect to the users list.
|
||||||
if($_user===false) {
|
if($_User===false) {
|
||||||
Redirect::page('admin', 'users');
|
Redirect::page('admin', 'users');
|
||||||
}
|
}
|
||||||
|
|
||||||
$_user['username'] = $layout['parameters'];
|
|
||||||
|
|
|
@ -41,7 +41,8 @@ legend.first-child {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uk-nav-navbar > li > a:hover {
|
.uk-nav-navbar > li > a:hover,
|
||||||
|
.uk-nav-navbar > li > a:focus {
|
||||||
background: #2672ec;
|
background: #2672ec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +88,34 @@ li.bludit-logo {
|
||||||
background: #F9F9F9 !important;
|
background: #F9F9F9 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uk-container {
|
||||||
|
max-width: 1280px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uk-width-large-4-5,
|
||||||
|
.uk-width-large-8-10 {
|
||||||
|
width: 75% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uk-width-large-1-5,
|
||||||
|
.uk-width-large-2-10 {
|
||||||
|
width: 25% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uk-thumbnail {
|
||||||
|
margin: 2px 3px !important;
|
||||||
|
max-width: 30% !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uk-progress-bar {
|
||||||
|
background: #2672ec !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uk-placeholder {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------- BLUDIT ----------- */
|
/* ----------- BLUDIT ----------- */
|
||||||
|
|
||||||
#logo {
|
#logo {
|
||||||
|
@ -143,6 +172,119 @@ button.delete-button:hover {
|
||||||
background: rgba(187, 48, 48, 0.91);
|
background: rgba(187, 48, 48, 0.91);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------- FORM ----------- */
|
||||||
|
|
||||||
|
.sidebar .uk-form-label {
|
||||||
|
font-size: 0.9em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------- BLUDIT IMAGES V8 ----------- */
|
||||||
|
#bludit-images-v8 {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-images-v8 img.uk-thumbnail {
|
||||||
|
width: 15% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-images-v8-upload {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-images-v8-drag-drop {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-images-v8-progressbar {
|
||||||
|
display: none;
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-images-v8-thumbnails {
|
||||||
|
height: 350px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------- BLUDIT QUICK IMAGES ----------- */
|
||||||
|
#bludit-quick-images {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-quick-images a.moreImages {
|
||||||
|
margin: 15px 0 0;
|
||||||
|
width: 100%;
|
||||||
|
background: #F5F5F5 !important;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-quick-images h4.label {
|
||||||
|
background: #f8f8f8;
|
||||||
|
color: #aaa;
|
||||||
|
padding: 2px 5px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-quick-images-thumbnails {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------- BLUDIT COVER IMAGE ----------- */
|
||||||
|
#bludit-cover-image {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#cover-image-thumbnail {
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
color: #666;
|
||||||
|
height: 130px;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cover-image-upload {
|
||||||
|
color: #999;
|
||||||
|
position: relative;
|
||||||
|
top: 35%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cover-image-delete {
|
||||||
|
background: rgba(255, 255, 255, 0.7);
|
||||||
|
bottom: 0;
|
||||||
|
color: #000;
|
||||||
|
display: none;
|
||||||
|
font-size: 2.2em;
|
||||||
|
padding: 4px 10px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cover-image-progressbar {
|
||||||
|
display: none;
|
||||||
|
left: 5%;
|
||||||
|
position: relative;
|
||||||
|
top: 33%;
|
||||||
|
width: 90%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------- BLUDIT PROFILE PICTURE ----------- */
|
||||||
|
|
||||||
|
#bludit-profile-picture-drag-drop {
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bludit-profile-picture-progressbar {
|
||||||
|
display: none;
|
||||||
|
margin: 15px 0 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------- LOGIN FORM ----------- */
|
/* ----------- LOGIN FORM ----------- */
|
||||||
|
|
||||||
div.login-box > h1 {
|
div.login-box > h1 {
|
||||||
|
@ -171,6 +313,11 @@ div.dashboard-links a {
|
||||||
color: #555;
|
color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* NEW POST */
|
||||||
|
h3.titleOptions {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------- PLUGIN LIST / THEME LIST ----------- */
|
/* ----------- PLUGIN LIST / THEME LIST ----------- */
|
||||||
|
|
||||||
div.plugin-links > a {
|
div.plugin-links > a {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
kernel/admin/themes/default/css/uikit/form-file.almost-flat.min.css
vendored
Normal file → Executable file
2
kernel/admin/themes/default/css/uikit/form-file.almost-flat.min.css
vendored
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
||||||
/*! UIkit 2.24.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||||
.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}
|
.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}
|
2
kernel/admin/themes/default/css/uikit/placeholder.almost-flat.min.css
vendored
Normal file → Executable file
2
kernel/admin/themes/default/css/uikit/placeholder.almost-flat.min.css
vendored
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
||||||
/*! UIkit 2.24.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||||
.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}
|
.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}
|
2
kernel/admin/themes/default/css/uikit/progress.almost-flat.min.css
vendored
Normal file → Executable file
2
kernel/admin/themes/default/css/uikit/progress.almost-flat.min.css
vendored
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
||||||
/*! UIkit 2.24.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||||
.uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}
|
.uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}
|
4
kernel/admin/themes/default/css/uikit/uikit.almost-flat.min.css
vendored
Normal file → Executable file
4
kernel/admin/themes/default/css/uikit/uikit.almost-flat.min.css
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
2
kernel/admin/themes/default/css/uikit/upload.almost-flat.min.css
vendored
Normal file → Executable file
2
kernel/admin/themes/default/css/uikit/upload.almost-flat.min.css
vendored
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
||||||
/*! UIkit 2.24.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||||
.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}
|
.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}
|
|
@ -102,9 +102,9 @@ $(document).ready(function() {
|
||||||
<ul class="uk-navbar-nav">
|
<ul class="uk-navbar-nav">
|
||||||
<li class="uk-parent" data-uk-dropdown>
|
<li class="uk-parent" data-uk-dropdown>
|
||||||
<?php
|
<?php
|
||||||
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.jpg';
|
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.png';
|
||||||
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.jpg')) {
|
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.png')) {
|
||||||
$profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.jpg';
|
$profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.png';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>">
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>">
|
||||||
|
|
|
@ -128,70 +128,108 @@ class HTML {
|
||||||
$html = '';
|
$html = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function uploader()
|
public static function bluditQuickImages()
|
||||||
|
{
|
||||||
|
|
||||||
|
$html = '<!-- BLUDIT QUICK IMAGES -->';
|
||||||
|
$html .= '
|
||||||
|
<div id="bludit-quick-images">
|
||||||
|
<div id="bludit-quick-images-thumbnails">
|
||||||
|
';
|
||||||
|
|
||||||
|
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true);
|
||||||
|
array_splice($thumbnailList, THUMBNAILS_AMOUNT);
|
||||||
|
foreach($thumbnailList as $file) {
|
||||||
|
$filename = basename($file);
|
||||||
|
$html .= '<img class="bludit-thumbnail uk-thumbnail" data-filename="'.$filename.'" src="'.HTML_PATH_UPLOADS_THUMBNAILS.$filename.'" alt="Thumbnail">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a data-uk-modal href="#bludit-images-v8" class="moreImages uk-button">More images</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
';
|
||||||
|
|
||||||
|
echo $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function bluditCoverImage($coverImage="")
|
||||||
{
|
{
|
||||||
global $L;
|
global $L;
|
||||||
|
|
||||||
$html = '
|
$style = '';
|
||||||
<div id="upload-drop" class="uk-placeholder uk-text-center">
|
if(!empty($coverImage)) {
|
||||||
<i class="uk-icon-cloud-upload uk-icon-medium uk-text-muted uk-margin-small-right"></i>'.$L->g('Upload Image').'<br><a class="uk-form-file">'.$L->g('Drag and drop or click here').'<input id="upload-select" type="file"></a>
|
$style = 'background-image: url('.HTML_PATH_UPLOADS_THUMBNAILS.$coverImage.')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html = '<!-- BLUDIT COVER IMAGE -->';
|
||||||
|
$html .= '
|
||||||
|
<div id="bludit-cover-image">
|
||||||
|
<div id="cover-image-thumbnail" class="uk-form-file uk-placeholder uk-text-center" style="'.$style.'">
|
||||||
|
|
||||||
|
<input type="hidden" name="coverImage" id="cover-image-upload-filename" value="'.$coverImage.'">
|
||||||
|
|
||||||
|
<div id="cover-image-upload" '.( empty($coverImage)?'':'style="display: none;"' ).'>
|
||||||
|
<div><i class="uk-icon-picture-o"></i> '.$L->g('Cover image').'</div>
|
||||||
|
<div style="font-size:0.8em;">'.$L->g('Drag and drop or click here').'<input id="cover-image-file-select" type="file"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progressbar" class="uk-progress uk-hidden">
|
<div id="cover-image-delete" '.( empty($coverImage)?'':'style="display: block;"' ).'>
|
||||||
|
<div><i class="uk-icon-trash-o"></i></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="cover-image-progressbar" class="uk-progress">
|
||||||
<div class="uk-progress-bar" style="width: 0%;">0%</div>
|
<div class="uk-progress-bar" style="width: 0%;">0%</div>
|
||||||
</div>
|
</div>
|
||||||
';
|
|
||||||
|
|
||||||
$html .= '<select id="jsimageList" class="uk-width-1-1" size="10">';
|
</div>
|
||||||
$imagesList = Filesystem::listFiles(PATH_UPLOADS,'*','*',true);
|
|
||||||
foreach($imagesList as $file) {
|
|
||||||
$html .= '<option value="">'.basename($file).'</option>';
|
|
||||||
}
|
|
||||||
$html .= '</select>';
|
|
||||||
|
|
||||||
$html .= '
|
|
||||||
<div class="uk-form-row uk-margin-top">
|
|
||||||
<button id="jsaddImage" class="uk-button uk-button-primary" type="button"><i class="uk-icon-angle-double-left"></i> '.$L->g('Insert Image').'</button>
|
|
||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
|
|
||||||
$html .= '
|
$script = '
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$("#jsaddImage").on("click", function() {
|
$("#cover-image-delete").on("click", function() {
|
||||||
var filename = $("#jsimageList option:selected").text();
|
$("#cover-image-thumbnail").attr("style","");
|
||||||
if(!filename.trim()) {
|
$("#cover-image-upload-filename").attr("value","");
|
||||||
return false;
|
$("#cover-image-delete").hide();
|
||||||
}
|
$("#cover-image-upload").show();
|
||||||
var textareaValue = $("#jscontent").val();
|
|
||||||
$("#jscontent").val(textareaValue + "<img src=\""+filename+"\" alt=\"\">" + "\n");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function()
|
|
||||||
{
|
|
||||||
var progressbar = $("#progressbar");
|
|
||||||
var bar = progressbar.find(".uk-progress-bar");
|
|
||||||
var settings =
|
var settings =
|
||||||
{
|
{
|
||||||
type: "json",
|
type: "json",
|
||||||
action: "'.HTML_PATH_ADMIN_ROOT.'ajax/uploader",
|
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
|
||||||
allow : "*.(jpg|jpeg|gif|png)",
|
allow : "*.(jpg|jpeg|gif|png)",
|
||||||
|
params: {"type":"cover-image"},
|
||||||
|
|
||||||
loadstart: function() {
|
loadstart: function() {
|
||||||
bar.css("width", "0%").text("0%");
|
$("#cover-image-progressbar").find(".uk-progress-bar").css("width", "0%").text("0%");
|
||||||
progressbar.removeClass("uk-hidden");
|
$("#cover-image-progressbar").show();
|
||||||
|
$("#cover-image-delete").hide();
|
||||||
|
$("#cover-image-upload").hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
progress: function(percent) {
|
progress: function(percent) {
|
||||||
percent = Math.ceil(percent);
|
percent = Math.ceil(percent);
|
||||||
bar.css("width", percent+"%").text(percent+"%");
|
$("#cover-image-progressbar").find(".uk-progress-bar").css("width", percent+"%").text(percent+"%");
|
||||||
},
|
},
|
||||||
|
|
||||||
allcomplete: function(response) {
|
allcomplete: function(response) {
|
||||||
bar.css("width", "100%").text("100%");
|
$("#cover-image-progressbar").find(".uk-progress-bar").css("width", "100%").text("100%");
|
||||||
setTimeout(function() { progressbar.addClass("uk-hidden"); }, 250);
|
$("#cover-image-progressbar").hide();
|
||||||
$("#jsimageList").prepend("<option value=\'"+response.filename+"\' selected=\'selected\'>"+response.filename+"</option>");
|
|
||||||
|
var imageSrc = HTML_PATH_UPLOADS_THUMBNAILS+response.filename;
|
||||||
|
$("#cover-image-thumbnail").attr("style","background-image: url("+imageSrc+")");
|
||||||
|
$("#cover-image-delete").show();
|
||||||
|
|
||||||
|
$("img:last-child", "#bludit-quick-images-thumbnails").remove();
|
||||||
|
$("#bludit-quick-images-thumbnails").prepend("<img class=\"bludit-thumbnail uk-thumbnail\" data-filename=\""+response.filename+"\" src=\""+imageSrc+"\" alt=\"Thumbnail\">");
|
||||||
|
|
||||||
|
$("#cover-image-upload-filename").attr("value",response.filename);
|
||||||
},
|
},
|
||||||
|
|
||||||
notallowed: function(file, settings) {
|
notallowed: function(file, settings) {
|
||||||
|
@ -199,59 +237,182 @@ class HTML {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var select = UIkit.uploadSelect($("#upload-select"), settings);
|
UIkit.uploadSelect($("#cover-image-file-select"), settings);
|
||||||
var drop = UIkit.uploadDrop($("#upload-drop"), settings);
|
UIkit.uploadDrop($("#cover-image-thumbnail"), settings);
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>';
|
</script>
|
||||||
|
';
|
||||||
|
echo $html.$script;
|
||||||
|
}
|
||||||
|
|
||||||
echo $html;
|
public static function bluditImagesV8()
|
||||||
|
{
|
||||||
|
global $L;
|
||||||
|
|
||||||
|
$html = '<!-- BLUDIT IMAGES V8 -->';
|
||||||
|
$html .= '
|
||||||
|
<div id="bludit-images-v8" class="uk-modal">
|
||||||
|
<div class="uk-modal-dialog">
|
||||||
|
|
||||||
|
<div id="bludit-images-v8-upload" class="uk-form-file uk-placeholder uk-text-center">
|
||||||
|
|
||||||
|
<div id="bludit-images-v8-drag-drop">
|
||||||
|
<div><i class="uk-icon-picture-o"></i> '.$L->g('Upload image').'</div>
|
||||||
|
<div style="font-size:0.8em;">'.$L->g('Drag and drop or click here').'<input id="bludit-images-v8-file-select" type="file"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="bludit-images-v8-progressbar" class="uk-progress">
|
||||||
|
<div class="uk-progress-bar" style="width: 0%;">0%</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="bludit-images-v8-thumbnails">
|
||||||
|
';
|
||||||
|
|
||||||
|
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true);
|
||||||
|
foreach($thumbnailList as $file) {
|
||||||
|
$filename = basename($file);
|
||||||
|
$html .= '<img class="bludit-thumbnail uk-thumbnail" src="'.HTML_PATH_UPLOADS_THUMBNAILS.$filename.'" data-filename="'.$filename.'" alt="Thumbnail">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-modal-footer">
|
||||||
|
Double click on the image to add it or <a href="" class="uk-modal-close">click here to cancel</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
';
|
||||||
|
|
||||||
|
$script = '
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
// Add border when select an thumbnail
|
||||||
|
$("body").on("click", "img.bludit-thumbnail", function() {
|
||||||
|
$(".bludit-thumbnail").css("border", "1px solid #ddd");
|
||||||
|
$(this).css("border", "solid 3px orange");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Hide the modal when double click on thumbnail.
|
||||||
|
$("body").on("dblclick", "img.bludit-thumbnail", function() {
|
||||||
|
var modal = UIkit.modal("#bludit-images-v8");
|
||||||
|
if ( modal.isActive() ) {
|
||||||
|
modal.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Event for double click for insert the image is in each editor plugin
|
||||||
|
// ..
|
||||||
|
|
||||||
|
var settings =
|
||||||
|
{
|
||||||
|
type: "json",
|
||||||
|
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
|
||||||
|
allow : "*.(jpg|jpeg|gif|png)",
|
||||||
|
params: {"type":"bludit-images-v8"},
|
||||||
|
|
||||||
|
loadstart: function() {
|
||||||
|
$("#bludit-images-v8-progressbar").find(".uk-progress-bar").css("width", "0%").text("0%");
|
||||||
|
$("#bludit-images-v8-drag-drop").hide();
|
||||||
|
$("#bludit-images-v8-progressbar").show();
|
||||||
|
},
|
||||||
|
|
||||||
|
progress: function(percent) {
|
||||||
|
percent = Math.ceil(percent);
|
||||||
|
$("#bludit-images-v8-progressbar").find(".uk-progress-bar").css("width", percent+"%").text(percent+"%");
|
||||||
|
},
|
||||||
|
|
||||||
|
allcomplete: function(response) {
|
||||||
|
$("#bludit-images-v8-progressbar").find(".uk-progress-bar").css("width", "100%").text("100%");
|
||||||
|
$("#bludit-images-v8-progressbar").hide();
|
||||||
|
$("#bludit-images-v8-drag-drop").show();
|
||||||
|
|
||||||
|
// Images V8 Thumbnails
|
||||||
|
var imageSrc = HTML_PATH_UPLOADS_THUMBNAILS+response.filename;
|
||||||
|
$("#bludit-images-v8-thumbnails").prepend("<img class=\"bludit-thumbnail uk-thumbnail\" data-filename=\""+response.filename+"\" src=\""+imageSrc+"\" alt=\"Thumbnail\">");
|
||||||
|
|
||||||
|
// Quick images Thumbnails
|
||||||
|
$("img:last-child", "#bludit-quick-images-thumbnails").remove();
|
||||||
|
$("#bludit-quick-images-thumbnails").prepend("<img class=\"bludit-thumbnail uk-thumbnail\" data-filename=\""+response.filename+"\" src=\""+imageSrc+"\" alt=\"Thumbnail\">");
|
||||||
|
},
|
||||||
|
|
||||||
|
notallowed: function(file, settings) {
|
||||||
|
alert("'.$L->g('Supported image file types').' "+settings.allow);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
UIkit.uploadSelect($("#bludit-images-v8-file-select"), settings);
|
||||||
|
UIkit.uploadDrop($("#bludit-images-v8-upload"), settings);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
';
|
||||||
|
echo $html.$script;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function profileUploader($username)
|
public static function profileUploader($username)
|
||||||
{
|
{
|
||||||
global $L;
|
global $L;
|
||||||
|
|
||||||
$html = '
|
$html = '<!-- BLUDIT PROFILE UPLOADER -->';
|
||||||
<div id="jsprogressBar" class="uk-progress uk-hidden">
|
|
||||||
|
$html .= '
|
||||||
|
<div id="bludit-profile-picture">
|
||||||
|
|
||||||
|
<div id="bludit-profile-picture-image">';
|
||||||
|
|
||||||
|
if(file_exists(PATH_UPLOADS_PROFILES.$username.'.png')) {
|
||||||
|
$html .= '<img class="uk-border-rounded" src="'.HTML_PATH_UPLOADS_PROFILES.$username.'.png" alt="Profile picture">';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$html .= '<div class="uk-block uk-border-rounded uk-block-muted uk-block-large">'.$L->g('Profile picture').'</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="bludit-profile-picture-progressbar" class="uk-progress">
|
||||||
<div class="uk-progress-bar" style="width: 0%;">0%</div>
|
<div class="uk-progress-bar" style="width: 0%;">0%</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="upload-drop" class="uk-placeholder uk-text-center">
|
<div id="bludit-profile-picture-drag-drop" class="uk-form-file uk-placeholder uk-text-center">
|
||||||
<i class="uk-icon-cloud-upload uk-margin-small-right"></i>'.$L->g('Upload Image').'<br><a class="uk-form-file">'.$L->g('Drag and drop or click here').'<input id="upload-select" type="file"></a>
|
<div>'.$L->g('Upload image').'</div>
|
||||||
|
<div style="font-size:0.8em;">'.$L->g('Drag and drop or click here').'<input id="bludit-profile-picture-file-select" type="file"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
|
|
||||||
$html .= '
|
$script = '
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$(function()
|
|
||||||
{
|
|
||||||
var progressbar = $("#jsprogressBar");
|
|
||||||
var bar = progressbar.find(".uk-progress-bar");
|
|
||||||
var settings =
|
var settings =
|
||||||
{
|
{
|
||||||
type: "json",
|
type: "json",
|
||||||
action: "'.HTML_PATH_ADMIN_ROOT.'ajax/uploader",
|
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
|
||||||
allow : "*.(jpg|jpeg|gif|png)",
|
allow : "*.(jpg|jpeg|gif|png)",
|
||||||
params: {"type":"profilePicture", "username":"'.$username.'"},
|
params: {"type":"profilePicture", "username":"'.$username.'"},
|
||||||
|
|
||||||
loadstart: function() {
|
loadstart: function() {
|
||||||
bar.css("width", "0%").text("0%");
|
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", "0%").text("0%");
|
||||||
progressbar.removeClass("uk-hidden");
|
$("#bludit-profile-picture-progressbar").show();
|
||||||
},
|
},
|
||||||
|
|
||||||
progress: function(percent) {
|
progress: function(percent) {
|
||||||
percent = Math.ceil(percent);
|
percent = Math.ceil(percent);
|
||||||
bar.css("width", percent+"%").text(percent+"%");
|
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", percent+"%").text(percent+"%");
|
||||||
},
|
},
|
||||||
|
|
||||||
allcomplete: function(response) {
|
allcomplete: function(response) {
|
||||||
bar.css("width", "100%").text("100%");
|
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", "100%").text("100%");
|
||||||
progressbar.addClass("uk-hidden");
|
$("#bludit-profile-picture-progressbar").hide();
|
||||||
$("#jsprofilePicture").html("<img class=\"uk-border-rounded\" src=\"'.HTML_PATH_UPLOADS_PROFILES.$username.'.jpg\">");
|
|
||||||
|
$("#bludit-profile-picture-image").html("<img class=\"uk-border-rounded\" src=\"'.HTML_PATH_UPLOADS_PROFILES.$username.'.png?time='.time().'\">");
|
||||||
},
|
},
|
||||||
|
|
||||||
notallowed: function(file, settings) {
|
notallowed: function(file, settings) {
|
||||||
|
@ -259,14 +420,14 @@ class HTML {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var select = UIkit.uploadSelect($("#upload-select"), settings);
|
UIkit.uploadSelect($("#bludit-profile-picture-file-select"), settings);
|
||||||
var drop = UIkit.uploadDrop($("#upload-drop"), settings);
|
UIkit.uploadDrop($("#bludit-profile-picture-drag-drop"), settings);
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>';
|
</script>
|
||||||
|
';
|
||||||
|
|
||||||
echo $html;
|
echo $html.$script;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,2 @@
|
||||||
/*! UIkit 2.24.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||||
!function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json"),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var s=a.complete;if(a.single){var d=o.length,f=0,p=!0;a.beforeAll(o),a.complete=function(e,t){f+=1,s(e,t),a.filelimit&&f>=a.filelimit&&(p=!1),p&&d>f?r([o[f]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){s(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.dataTransfer&&n.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.dataTransfer.files]),t(n.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),e.support.ajaxupload&&e.$.event.props.push("dataTransfer"),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});
|
!function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json"),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var s=a.complete;if(a.single){var d=o.length,f=0,p=!0;a.beforeAll(o),a.complete=function(e,t){f+=1,s(e,t),a.filelimit&&f>=a.filelimit&&(p=!1),p&&d>f?r([o[f]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){s(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.dataTransfer&&n.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.dataTransfer.files]),t(n.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),e.support.ajaxupload&&e.$.event.props.push("dataTransfer"),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});
|
|
@ -18,7 +18,7 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||||
|
|
||||||
// ---- LEFT SIDE ----
|
// ---- LEFT SIDE ----
|
||||||
echo '<div class="uk-grid">';
|
echo '<div class="uk-grid">';
|
||||||
echo '<div class="uk-width-large-7-10">';
|
echo '<div class="uk-width-large-8-10">';
|
||||||
|
|
||||||
// Title input
|
// Title input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
|
@ -52,7 +52,7 @@ if(count($_Page->children())===0)
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
// ---- RIGHT SIDE ----
|
// ---- RIGHT SIDE ----
|
||||||
echo '<div class="uk-width-large-3-10">';
|
echo '<div class="sidebar uk-width-large-2-10">';
|
||||||
|
|
||||||
// Tabs, general and advanced mode
|
// Tabs, general and advanced mode
|
||||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||||
|
@ -71,7 +71,7 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
'name'=>'description',
|
'name'=>'description',
|
||||||
'label'=>$L->g('description'),
|
'label'=>$L->g('description'),
|
||||||
'value'=>$_Page->description(),
|
'value'=>$_Page->description(),
|
||||||
'rows'=>'7',
|
'rows'=>'4',
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
@ -90,13 +90,32 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
// ---- IMAGES TAB ----
|
// ---- IMAGES TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
HTML::uploader();
|
// --- BLUDIT COVER IMAGE ---
|
||||||
|
echo '<hr>';
|
||||||
|
HTML::bluditCoverImage($_Page->coverImage(false));
|
||||||
|
echo '<hr>';
|
||||||
|
|
||||||
|
// --- BLUDIT QUICK IMAGES ---
|
||||||
|
HTML::bluditQuickImages();
|
||||||
|
|
||||||
|
// --- BLUDIT IMAGES V8 ---
|
||||||
|
HTML::bluditImagesV8();
|
||||||
|
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
|
||||||
// ---- ADVANCED TAB ----
|
// ---- ADVANCED TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
|
// Status input
|
||||||
|
HTML::formSelect(array(
|
||||||
|
'name'=>'status',
|
||||||
|
'label'=>$L->g('Status'),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'options'=>array('published'=>$L->g('Published'), 'draft'=>$L->g('Draft')),
|
||||||
|
'selected'=>($_Page->draft()?'draft':'published'),
|
||||||
|
'tip'=>''
|
||||||
|
));
|
||||||
|
|
||||||
// If the page is parent then doesn't can have a parent.
|
// If the page is parent then doesn't can have a parent.
|
||||||
if(count($_Page->children())===0)
|
if(count($_Page->children())===0)
|
||||||
{
|
{
|
||||||
|
@ -116,16 +135,6 @@ if(count($_Page->children())===0)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status input
|
|
||||||
HTML::formSelect(array(
|
|
||||||
'name'=>'status',
|
|
||||||
'label'=>$L->g('Status'),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'options'=>array('published'=>$L->g('Published'), 'draft'=>$L->g('Draft')),
|
|
||||||
'selected'=>($_Page->draft()?'draft':'published'),
|
|
||||||
'tip'=>''
|
|
||||||
));
|
|
||||||
|
|
||||||
// Position input
|
// Position input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'position',
|
'name'=>'position',
|
||||||
|
|
|
@ -18,7 +18,7 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||||
|
|
||||||
// ---- LEFT SIDE ----
|
// ---- LEFT SIDE ----
|
||||||
echo '<div class="uk-grid">';
|
echo '<div class="uk-grid">';
|
||||||
echo '<div class="uk-width-large-7-10">';
|
echo '<div class="uk-width-large-8-10">';
|
||||||
|
|
||||||
// Title input
|
// Title input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
|
@ -46,7 +46,7 @@ echo '<div class="uk-width-large-7-10">';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
// ---- RIGHT SIDE ----
|
// ---- RIGHT SIDE ----
|
||||||
echo '<div class="uk-width-large-3-10">';
|
echo '<div class="sidebar uk-width-large-2-10">';
|
||||||
|
|
||||||
// Tabs, general and advanced mode
|
// Tabs, general and advanced mode
|
||||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||||
|
@ -65,7 +65,7 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
'name'=>'description',
|
'name'=>'description',
|
||||||
'label'=>$L->g('description'),
|
'label'=>$L->g('description'),
|
||||||
'value'=>$_Post->description(),
|
'value'=>$_Post->description(),
|
||||||
'rows'=>'7',
|
'rows'=>'4',
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
@ -84,22 +84,22 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
// ---- IMAGES TAB ----
|
// ---- IMAGES TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
HTML::uploader();
|
// --- BLUDIT COVER IMAGE ---
|
||||||
|
echo '<hr>';
|
||||||
|
HTML::bluditCoverImage($_Post->coverImage(false));
|
||||||
|
echo '<hr>';
|
||||||
|
|
||||||
|
// --- BLUDIT QUICK IMAGES ---
|
||||||
|
HTML::bluditQuickImages();
|
||||||
|
|
||||||
|
// --- BLUDIT IMAGES V8 ---
|
||||||
|
HTML::bluditImagesV8();
|
||||||
|
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
|
||||||
// ---- ADVANCED TAB ----
|
// ---- ADVANCED TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
// Date input
|
|
||||||
HTML::formInputText(array(
|
|
||||||
'name'=>'date',
|
|
||||||
'value'=>$_Post->dateRaw(),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
|
||||||
'tip'=>$L->g('To schedule the post just select the date and time'),
|
|
||||||
'label'=>$L->g('Date')
|
|
||||||
));
|
|
||||||
|
|
||||||
// Status input
|
// Status input
|
||||||
HTML::formSelect(array(
|
HTML::formSelect(array(
|
||||||
'name'=>'status',
|
'name'=>'status',
|
||||||
|
@ -110,6 +110,15 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Date input
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'date',
|
||||||
|
'value'=>$_Post->dateRaw(),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-large',
|
||||||
|
'tip'=>$L->g('To schedule the post just select the date and time'),
|
||||||
|
'label'=>$L->g('Date')
|
||||||
|
));
|
||||||
|
|
||||||
// Slug input
|
// Slug input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'slug',
|
'name'=>'slug',
|
||||||
|
|
|
@ -16,7 +16,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||||
// Security token
|
// Security token
|
||||||
HTML::formInputHidden(array(
|
HTML::formInputHidden(array(
|
||||||
'name'=>'username',
|
'name'=>'username',
|
||||||
'value'=>$_user['username']
|
'value'=>$_User->username()
|
||||||
));
|
));
|
||||||
|
|
||||||
HTML::legend(array('value'=>$L->g('Profile'), 'class'=>'first-child'));
|
HTML::legend(array('value'=>$L->g('Profile'), 'class'=>'first-child'));
|
||||||
|
@ -24,7 +24,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'usernameDisable',
|
'name'=>'usernameDisable',
|
||||||
'label'=>$L->g('Username'),
|
'label'=>$L->g('Username'),
|
||||||
'value'=>$_user['username'],
|
'value'=>$_User->username(),
|
||||||
'class'=>'uk-width-1-2 uk-form-medium',
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
'disabled'=>true,
|
'disabled'=>true,
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
|
@ -33,7 +33,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'firstName',
|
'name'=>'firstName',
|
||||||
'label'=>$L->g('First name'),
|
'label'=>$L->g('First name'),
|
||||||
'value'=>$_user['firstName'],
|
'value'=>$_User->firstName(),
|
||||||
'class'=>'uk-width-1-2 uk-form-medium',
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
));
|
));
|
||||||
|
@ -41,7 +41,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'lastName',
|
'name'=>'lastName',
|
||||||
'label'=>$L->g('Last name'),
|
'label'=>$L->g('Last name'),
|
||||||
'value'=>$_user['lastName'],
|
'value'=>$_User->lastName(),
|
||||||
'class'=>'uk-width-1-2 uk-form-medium',
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
));
|
));
|
||||||
|
@ -49,7 +49,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||||
echo '<div class="uk-form-row">
|
echo '<div class="uk-form-row">
|
||||||
<label class="uk-form-label">Password</label>
|
<label class="uk-form-label">Password</label>
|
||||||
<div class="uk-form-controls">
|
<div class="uk-form-controls">
|
||||||
<a href="'.HTML_PATH_ADMIN_ROOT.'user-password/'.$_user['username'].'">'.$L->g('Change password').'</a>
|
<a href="'.HTML_PATH_ADMIN_ROOT.'user-password/'.$_User->username().'">'.$L->g('Change password').'</a>
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
@ -59,20 +59,53 @@ if($Login->role()==='admin') {
|
||||||
'name'=>'role',
|
'name'=>'role',
|
||||||
'label'=>$L->g('Role'),
|
'label'=>$L->g('Role'),
|
||||||
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||||
'selected'=>$_user['role'],
|
'selected'=>$_User->role(),
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'email',
|
'name'=>'email',
|
||||||
'label'=>$L->g('Email'),
|
'label'=>$L->g('Email'),
|
||||||
'value'=>$_user['email'],
|
'value'=>$_User->email(),
|
||||||
'class'=>'uk-width-1-2 uk-form-medium',
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
'tip'=>$L->g('email-will-not-be-publicly-displayed')
|
'tip'=>$L->g('email-will-not-be-publicly-displayed')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
HTML::legend(array('value'=>'Social networks'));
|
||||||
|
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'twitterUsername',
|
||||||
|
'label'=>'Twitter username',
|
||||||
|
'value'=>$_User->twitterUsername(),
|
||||||
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
|
'tip'=>''
|
||||||
|
));
|
||||||
|
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'facebookUsername',
|
||||||
|
'label'=>'Facebook username',
|
||||||
|
'value'=>$_User->facebookUsername(),
|
||||||
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
|
'tip'=>''
|
||||||
|
));
|
||||||
|
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'googleUsername',
|
||||||
|
'label'=>'Google username',
|
||||||
|
'value'=>$_User->googleUsername(),
|
||||||
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
|
'tip'=>''
|
||||||
|
));
|
||||||
|
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'instagramUsername',
|
||||||
|
'label'=>'Instagram username',
|
||||||
|
'value'=>$_User->instagramUsername(),
|
||||||
|
'class'=>'uk-width-1-2 uk-form-medium',
|
||||||
|
'tip'=>''
|
||||||
|
));
|
||||||
|
|
||||||
echo '<div class="uk-form-row">
|
echo '<div class="uk-form-row">
|
||||||
<div class="uk-form-controls">
|
<div class="uk-form-controls">
|
||||||
<button type="submit" class="uk-button uk-button-primary">'.$L->g('Save').'</button>
|
<button type="submit" class="uk-button uk-button-primary">'.$L->g('Save').'</button>
|
||||||
|
@ -80,7 +113,7 @@ if($Login->role()==='admin') {
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
if( ($Login->role()==='admin') && ($_user['username']!='admin') ) {
|
if( ($Login->role()==='admin') && ($_User->username()!='admin') ) {
|
||||||
|
|
||||||
HTML::legend(array('value'=>$L->g('Delete')));
|
HTML::legend(array('value'=>$L->g('Delete')));
|
||||||
|
|
||||||
|
@ -96,18 +129,10 @@ if( ($Login->role()==='admin') && ($_user['username']!='admin') ) {
|
||||||
HTML::formClose();
|
HTML::formClose();
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div class="uk-width-3-10" style="margin-top: 50px; text-align: center;">';
|
echo '<div class="uk-width-3-10" style="margin-top: 50px; text-align: center;">';
|
||||||
|
|
||||||
echo '<div id="jsprofilePicture">';
|
HTML::profileUploader($_User->username());
|
||||||
if(file_exists(PATH_UPLOADS_PROFILES.$_user['username'].'.jpg')) {
|
|
||||||
echo '<img class="uk-border-rounded" src="'.HTML_PATH_UPLOADS_PROFILES.$_user['username'].'.jpg" alt="">';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo '<div class="uk-block uk-border-rounded uk-block-muted uk-block-large">'.$L->g('Profile picture').'</div>';
|
|
||||||
}
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
HTML::profileUploader($_user['username']);
|
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
|
@ -12,7 +12,7 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||||
|
|
||||||
// ---- LEFT SIDE ----
|
// ---- LEFT SIDE ----
|
||||||
echo '<div class="uk-grid">';
|
echo '<div class="uk-grid">';
|
||||||
echo '<div class="uk-width-large-7-10">';
|
echo '<div class="uk-width-large-8-10">';
|
||||||
|
|
||||||
// Title input
|
// Title input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
|
@ -39,7 +39,7 @@ echo '<div class="uk-width-large-7-10">';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
// ---- RIGHT SIDE ----
|
// ---- RIGHT SIDE ----
|
||||||
echo '<div class="uk-width-large-3-10">';
|
echo '<div class="sidebar uk-width-large-2-10">';
|
||||||
|
|
||||||
// Tabs, general and advanced mode
|
// Tabs, general and advanced mode
|
||||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||||
|
@ -58,7 +58,7 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
'name'=>'description',
|
'name'=>'description',
|
||||||
'label'=>$L->g('description'),
|
'label'=>$L->g('description'),
|
||||||
'value'=>'',
|
'value'=>'',
|
||||||
'rows'=>'7',
|
'rows'=>'4',
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
@ -77,13 +77,32 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
// ---- IMAGES TAB ----
|
// ---- IMAGES TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
HTML::uploader();
|
// --- BLUDIT COVER IMAGE ---
|
||||||
|
echo '<hr>';
|
||||||
|
HTML::bluditCoverImage();
|
||||||
|
echo '<hr>';
|
||||||
|
|
||||||
|
// --- BLUDIT QUICK IMAGES ---
|
||||||
|
HTML::bluditQuickImages();
|
||||||
|
|
||||||
|
// --- BLUDIT IMAGES V8 ---
|
||||||
|
HTML::bluditImagesV8();
|
||||||
|
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
|
||||||
// ---- ADVANCED TAB ----
|
// ---- ADVANCED TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
|
// Status input
|
||||||
|
HTML::formSelect(array(
|
||||||
|
'name'=>'status',
|
||||||
|
'label'=>$L->g('Status'),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'options'=>array('published'=>$L->g('Published'), 'draft'=>$L->g('Draft')),
|
||||||
|
'selected'=>'published',
|
||||||
|
'tip'=>''
|
||||||
|
));
|
||||||
|
|
||||||
// Parent input
|
// Parent input
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[NO_PARENT_CHAR] = '('.$Language->g('No parent').')';
|
$options[NO_PARENT_CHAR] = '('.$Language->g('No parent').')';
|
||||||
|
@ -98,16 +117,6 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
));
|
));
|
||||||
|
|
||||||
// Status input
|
|
||||||
HTML::formSelect(array(
|
|
||||||
'name'=>'status',
|
|
||||||
'label'=>$L->g('Status'),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'options'=>array('published'=>$L->g('Published'), 'draft'=>$L->g('Draft')),
|
|
||||||
'selected'=>'published',
|
|
||||||
'tip'=>''
|
|
||||||
));
|
|
||||||
|
|
||||||
// Position input
|
// Position input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'position',
|
'name'=>'position',
|
||||||
|
|
|
@ -12,7 +12,7 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||||
|
|
||||||
// ---- LEFT SIDE ----
|
// ---- LEFT SIDE ----
|
||||||
echo '<div class="uk-grid">';
|
echo '<div class="uk-grid">';
|
||||||
echo '<div class="uk-width-large-7-10">';
|
echo '<div class="uk-width-large-8-10">';
|
||||||
|
|
||||||
// Title input
|
// Title input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
|
@ -39,7 +39,7 @@ echo '<div class="uk-width-large-7-10">';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
// ---- RIGHT SIDE ----
|
// ---- RIGHT SIDE ----
|
||||||
echo '<div class="uk-width-large-3-10">';
|
echo '<div class="sidebar uk-width-large-2-10">';
|
||||||
|
|
||||||
// Tabs, general and advanced mode
|
// Tabs, general and advanced mode
|
||||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||||
|
@ -58,7 +58,7 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
'name'=>'description',
|
'name'=>'description',
|
||||||
'label'=>$L->g('description'),
|
'label'=>$L->g('description'),
|
||||||
'value'=>'',
|
'value'=>'',
|
||||||
'rows'=>'7',
|
'rows'=>'4',
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
@ -77,22 +77,22 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
// ---- IMAGES TAB ----
|
// ---- IMAGES TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
HTML::uploader();
|
// --- BLUDIT COVER IMAGE ---
|
||||||
|
echo '<hr>';
|
||||||
|
HTML::bluditCoverImage();
|
||||||
|
echo '<hr>';
|
||||||
|
|
||||||
|
// --- BLUDIT QUICK IMAGES ---
|
||||||
|
HTML::bluditQuickImages();
|
||||||
|
|
||||||
|
// --- BLUDIT IMAGES V8 ---
|
||||||
|
HTML::bluditImagesV8();
|
||||||
|
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
|
||||||
// ---- ADVANCED TAB ----
|
// ---- ADVANCED TAB ----
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
|
|
||||||
// Date input
|
|
||||||
HTML::formInputText(array(
|
|
||||||
'name'=>'date',
|
|
||||||
'value'=>Date::current(DB_DATE_FORMAT),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
|
||||||
'tip'=>$L->g('To schedule the post just select the date and time'),
|
|
||||||
'label'=>$L->g('Date')
|
|
||||||
));
|
|
||||||
|
|
||||||
// Status input
|
// Status input
|
||||||
HTML::formSelect(array(
|
HTML::formSelect(array(
|
||||||
'name'=>'status',
|
'name'=>'status',
|
||||||
|
@ -103,6 +103,15 @@ echo '<div class="uk-width-large-3-10">';
|
||||||
'tip'=>''
|
'tip'=>''
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Date input
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'date',
|
||||||
|
'value'=>Date::current(DB_DATE_FORMAT),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-large',
|
||||||
|
'tip'=>$L->g('To schedule the post just select the date and time'),
|
||||||
|
'label'=>$L->g('Date')
|
||||||
|
));
|
||||||
|
|
||||||
// Slug input
|
// Slug input
|
||||||
HTML::formInputText(array(
|
HTML::formInputText(array(
|
||||||
'name'=>'slug',
|
'name'=>'slug',
|
||||||
|
|
|
@ -8,17 +8,19 @@ if(!empty($_POST['type'])) {
|
||||||
$type = Sanitize::html($_POST['type']);
|
$type = Sanitize::html($_POST['type']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Source
|
// Source.
|
||||||
$source = $_FILES['files']['tmp_name'][0];
|
$source = $_FILES['files']['tmp_name'][0];
|
||||||
|
|
||||||
// Filename
|
// Filename and extension.
|
||||||
$filename = Text::lowercase($_FILES['files']['name'][0]);
|
$filename = Text::lowercase($_FILES['files']['name'][0]);
|
||||||
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
|
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||||
$filename = pathinfo($filename, PATHINFO_FILENAME);
|
$filename = pathinfo($filename, PATHINFO_FILENAME);
|
||||||
$filename = Text::replace(' ', '', $filename);
|
$filename = Text::replace(' ', '', $filename);
|
||||||
$filename = Text::replace('_', '', $filename);
|
$filename = Text::replace('_', '', $filename);
|
||||||
|
|
||||||
if( file_exists(PATH_UPLOADS.$filename.'.'.$fileExtension) )
|
// Generate the next filename if the filename already exist.
|
||||||
|
$tmpName = $filename.'.'.$fileExtension;
|
||||||
|
if( file_exists(PATH_UPLOADS.$tmpName) )
|
||||||
{
|
{
|
||||||
$number = 0;
|
$number = 0;
|
||||||
$tmpName = $filename.'_'.$number.'.'.$fileExtension;
|
$tmpName = $filename.'_'.$number.'.'.$fileExtension;
|
||||||
|
@ -28,29 +30,33 @@ if( file_exists(PATH_UPLOADS.$filename.'.'.$fileExtension) )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($tmpName)) {
|
// Move from temporary PHP folder to temporary Bludit folder.
|
||||||
$tmpName = $filename.'.'.$fileExtension;
|
move_uploaded_file($source, PATH_TMP.'original'.'.'.$fileExtension);
|
||||||
}
|
|
||||||
|
|
||||||
// --- PROFILE PICTURE ---
|
// --- PROFILE PICTURE ---
|
||||||
if($type=='profilePicture')
|
if($type=='profilePicture')
|
||||||
{
|
{
|
||||||
// Move to tmp file
|
|
||||||
move_uploaded_file($source, PATH_UPLOADS_PROFILES.'tmp'.'.'.$fileExtension);
|
|
||||||
|
|
||||||
// Resize and crop profile image.
|
// Resize and crop profile image.
|
||||||
$username = Sanitize::html($_POST['username']);
|
$username = Sanitize::html($_POST['username']);
|
||||||
$tmpName = $username.'.jpg';
|
$tmpName = $username.'.png';
|
||||||
$Image = new Image();
|
$Image = new Image();
|
||||||
$Image->setImage(PATH_UPLOADS_PROFILES.'tmp'.'.'.$fileExtension, '200', '200', 'crop');
|
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, '400', '400', 'crop');
|
||||||
$Image->saveImage(PATH_UPLOADS_PROFILES.$tmpName, 100, true);
|
$Image->saveImage(PATH_UPLOADS_PROFILES.$tmpName, 100, false, true);
|
||||||
|
|
||||||
// Remove tmp file
|
|
||||||
unlink(PATH_UPLOADS_PROFILES.'tmp'.'.'.$fileExtension);
|
|
||||||
}
|
}
|
||||||
// --- OTHERS ---
|
// --- OTHERS ---
|
||||||
else {
|
else {
|
||||||
move_uploaded_file($source, PATH_UPLOADS.$tmpName);
|
// Generate the thumbnail
|
||||||
|
$Image = new Image();
|
||||||
|
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, THUMBNAILS_WIDTH, THUMBNAILS_HEIGHT, 'crop');
|
||||||
|
$Image->saveImage(PATH_UPLOADS_THUMBNAILS.$tmpName, 100, true);
|
||||||
|
|
||||||
|
// Move the original to the upload folder.
|
||||||
|
rename(PATH_TMP.'original'.'.'.$fileExtension, PATH_UPLOADS.$tmpName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the Bludit temporary file.
|
||||||
|
if(file_exists(PATH_TMP.'original'.'.'.$fileExtension)) {
|
||||||
|
unlink(PATH_TMP.'original'.'.'.$fileExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(json_encode(array(
|
exit(json_encode(array(
|
||||||
|
|
|
@ -35,8 +35,10 @@ define('PATH_POSTS', PATH_CONTENT.'posts'.DS);
|
||||||
define('PATH_PAGES', PATH_CONTENT.'pages'.DS);
|
define('PATH_PAGES', PATH_CONTENT.'pages'.DS);
|
||||||
define('PATH_DATABASES', PATH_CONTENT.'databases'.DS);
|
define('PATH_DATABASES', PATH_CONTENT.'databases'.DS);
|
||||||
define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases'.DS.'plugins'.DS);
|
define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases'.DS.'plugins'.DS);
|
||||||
|
define('PATH_TMP', PATH_CONTENT.'tmp'.DS);
|
||||||
define('PATH_UPLOADS', PATH_CONTENT.'uploads'.DS);
|
define('PATH_UPLOADS', PATH_CONTENT.'uploads'.DS);
|
||||||
define('PATH_UPLOADS_PROFILES', PATH_UPLOADS.'profiles'.DS);
|
define('PATH_UPLOADS_PROFILES', PATH_UPLOADS.'profiles'.DS);
|
||||||
|
define('PATH_UPLOADS_THUMBNAILS', PATH_UPLOADS.'thumbnails'.DS);
|
||||||
define('PATH_ADMIN', PATH_KERNEL.'admin'.DS);
|
define('PATH_ADMIN', PATH_KERNEL.'admin'.DS);
|
||||||
define('PATH_ADMIN_THEMES', PATH_ADMIN.'themes'.DS);
|
define('PATH_ADMIN_THEMES', PATH_ADMIN.'themes'.DS);
|
||||||
define('PATH_ADMIN_CONTROLLERS', PATH_ADMIN.'controllers'.DS);
|
define('PATH_ADMIN_CONTROLLERS', PATH_ADMIN.'controllers'.DS);
|
||||||
|
@ -56,6 +58,12 @@ define('ALERT_STATUS_OK', 0);
|
||||||
// Alert status fail
|
// Alert status fail
|
||||||
define('ALERT_STATUS_FAIL', 1);
|
define('ALERT_STATUS_FAIL', 1);
|
||||||
|
|
||||||
|
// Salt length
|
||||||
|
define('THUMBNAILS_WIDTH', 400);
|
||||||
|
define('THUMBNAILS_HEIGHT', 400);
|
||||||
|
|
||||||
|
define('THUMBNAILS_AMOUNT', 6);
|
||||||
|
|
||||||
// Salt length
|
// Salt length
|
||||||
define('SALT_LENGTH', 8);
|
define('SALT_LENGTH', 8);
|
||||||
|
|
||||||
|
@ -87,7 +95,7 @@ define('TOKEN_EMAIL_TTL', '+15 minutes');
|
||||||
define('CHARSET', 'UTF-8');
|
define('CHARSET', 'UTF-8');
|
||||||
|
|
||||||
// Directory permissions
|
// Directory permissions
|
||||||
define('DIR_PERMISSIONS', '0755');
|
define('DIR_PERMISSIONS', 0755);
|
||||||
|
|
||||||
// Multibyte string extension loaded.
|
// Multibyte string extension loaded.
|
||||||
define('MB_STRING', extension_loaded('mbstring'));
|
define('MB_STRING', extension_loaded('mbstring'));
|
||||||
|
@ -115,12 +123,14 @@ include(PATH_KERNEL.'dblanguage.class.php');
|
||||||
include(PATH_KERNEL.'dbsite.class.php');
|
include(PATH_KERNEL.'dbsite.class.php');
|
||||||
include(PATH_KERNEL.'post.class.php');
|
include(PATH_KERNEL.'post.class.php');
|
||||||
include(PATH_KERNEL.'page.class.php');
|
include(PATH_KERNEL.'page.class.php');
|
||||||
|
include(PATH_KERNEL.'user.class.php');
|
||||||
include(PATH_KERNEL.'url.class.php');
|
include(PATH_KERNEL.'url.class.php');
|
||||||
include(PATH_KERNEL.'login.class.php');
|
include(PATH_KERNEL.'login.class.php');
|
||||||
include(PATH_KERNEL.'parsedown.class.php');
|
include(PATH_KERNEL.'parsedown.class.php');
|
||||||
include(PATH_KERNEL.'parsedownextra.class.php');
|
include(PATH_KERNEL.'parsedownextra.class.php');
|
||||||
include(PATH_KERNEL.'security.class.php');
|
include(PATH_KERNEL.'security.class.php');
|
||||||
|
|
||||||
|
|
||||||
// Include Helpers Classes
|
// Include Helpers Classes
|
||||||
include(PATH_HELPERS.'text.class.php');
|
include(PATH_HELPERS.'text.class.php');
|
||||||
include(PATH_HELPERS.'log.class.php');
|
include(PATH_HELPERS.'log.class.php');
|
||||||
|
@ -193,6 +203,7 @@ define('HTML_PATH_ADMIN_THEME_IMG', HTML_PATH_ADMIN_THEME.'img/');
|
||||||
|
|
||||||
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/');
|
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/');
|
||||||
define('HTML_PATH_UPLOADS_PROFILES', HTML_PATH_UPLOADS.'profiles/');
|
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.'plugins/');
|
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/');
|
||||||
|
|
||||||
define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js');
|
define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js');
|
||||||
|
|
|
@ -66,14 +66,9 @@ function build_page($key)
|
||||||
$pageDateFormated = $Page->dateRaw( $Site->dateFormat() );
|
$pageDateFormated = $Page->dateRaw( $Site->dateFormat() );
|
||||||
$Page->setField('date', $pageDateFormated, true);
|
$Page->setField('date', $pageDateFormated, true);
|
||||||
|
|
||||||
// Parse username for the page.
|
// User object
|
||||||
if( $dbUsers->userExists( $Page->username() ) )
|
$username = $Page->username();
|
||||||
{
|
$Page->setField('user', $dbUsers->getUser($username));
|
||||||
$user = $dbUsers->getDb( $Page->username() );
|
|
||||||
|
|
||||||
$Page->setField('authorFirstName', $user['firstName'], false);
|
|
||||||
$Page->setField('authorLastName', $user['lastName'], false);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $Page;
|
return $Page;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,14 +75,9 @@ function buildPost($key)
|
||||||
$postDateFormated = $Post->dateRaw( $Site->dateFormat() );
|
$postDateFormated = $Post->dateRaw( $Site->dateFormat() );
|
||||||
$Post->setField('date', $postDateFormated, true);
|
$Post->setField('date', $postDateFormated, true);
|
||||||
|
|
||||||
// Parse username for the post.
|
// User object
|
||||||
if( $dbUsers->userExists( $Post->username() ) )
|
$username = $Post->username();
|
||||||
{
|
$Post->setField('user', $dbUsers->getUser($username));
|
||||||
$user = $dbUsers->getDb( $Post->username() );
|
|
||||||
|
|
||||||
$Post->setField('authorFirstName', $user['firstName'], false);
|
|
||||||
$Post->setField('authorLastName', $user['lastName'], false);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $Post;
|
return $Post;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ class dbPages extends dbJSON
|
||||||
'tags'=> array('inFile'=>false, 'value'=>array()),
|
'tags'=> array('inFile'=>false, 'value'=>array()),
|
||||||
'status'=> array('inFile'=>false, 'value'=>'draft'),
|
'status'=> array('inFile'=>false, 'value'=>'draft'),
|
||||||
'date'=> array('inFile'=>false, 'value'=>''),
|
'date'=> array('inFile'=>false, 'value'=>''),
|
||||||
'position'=> array('inFile'=>false, 'value'=>0)
|
'position'=> array('inFile'=>false, 'value'=>0),
|
||||||
|
'coverImage'=> array('inFile'=>false, 'value'=>''),
|
||||||
);
|
);
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
|
|
|
@ -10,7 +10,8 @@ class dbPosts extends dbJSON
|
||||||
'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled
|
'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled
|
||||||
'tags'=> array('inFile'=>false, 'value'=>array()),
|
'tags'=> array('inFile'=>false, 'value'=>array()),
|
||||||
'allowComments'=> array('inFile'=>false, 'value'=>false),
|
'allowComments'=> array('inFile'=>false, 'value'=>false),
|
||||||
'date'=> array('inFile'=>false, 'value'=>'')
|
'date'=> array('inFile'=>false, 'value'=>''),
|
||||||
|
'coverImage'=> array('inFile'=>false, 'value'=>''),
|
||||||
);
|
);
|
||||||
|
|
||||||
private $numberPosts = array(
|
private $numberPosts = array(
|
||||||
|
|
|
@ -18,6 +18,16 @@ class dbTags extends dbJSON
|
||||||
parent::__construct(PATH_DATABASES.'tags.php');
|
parent::__construct(PATH_DATABASES.'tags.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns an array with all tags names
|
||||||
|
public function getAll()
|
||||||
|
{
|
||||||
|
$tmp = array();
|
||||||
|
foreach($this->db['postsIndex'] as $tagSlug=>$tagInfo) {
|
||||||
|
$tmp[$tagSlug] = $tagInfo['name'];
|
||||||
|
}
|
||||||
|
return $tmp;
|
||||||
|
}
|
||||||
|
|
||||||
// Returns an array with a list of posts keys, filtered by a page number and a tag key.
|
// Returns an array with a list of posts keys, filtered by a page number and a tag key.
|
||||||
public function getList($pageNumber, $postPerPage, $tagKey)
|
public function getList($pageNumber, $postPerPage, $tagKey)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,24 @@ class dbUsers extends dbJSON
|
||||||
parent::__construct(PATH_DATABASES.'users.php');
|
parent::__construct(PATH_DATABASES.'users.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUser($username)
|
||||||
|
{
|
||||||
|
$User = new User();
|
||||||
|
|
||||||
|
if($this->userExists($username))
|
||||||
|
{
|
||||||
|
$User->setField('username', $username);
|
||||||
|
|
||||||
|
foreach($this->db[$username] as $key=>$value) {
|
||||||
|
$User->setField($key, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $User;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getAll()
|
public function getAll()
|
||||||
{
|
{
|
||||||
return $this->db;
|
return $this->db;
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Image {
|
||||||
$this->resizeImage($newWidth, $newHeight, $option);
|
$this->resizeImage($newWidth, $newHeight, $option);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function saveImage($savePath, $imageQuality="100", $forceJPG=false)
|
public function saveImage($savePath, $imageQuality="100", $forceJPG=false, $forcePNG=false)
|
||||||
{
|
{
|
||||||
$extension = strtolower(pathinfo($savePath, PATHINFO_EXTENSION));
|
$extension = strtolower(pathinfo($savePath, PATHINFO_EXTENSION));
|
||||||
|
|
||||||
|
@ -28,21 +28,25 @@ class Image {
|
||||||
|
|
||||||
$path_complete = $filename.'.'.$extension;
|
$path_complete = $filename.'.'.$extension;
|
||||||
|
|
||||||
if($forceJPG) {
|
if($forcePNG) {
|
||||||
imagejpeg($this->imageResized, $filename.'.jpg', $imageQuality);
|
$extension = 'png';
|
||||||
}
|
}
|
||||||
else
|
elseif($forceJPG) {
|
||||||
{
|
$extension = 'jpg';
|
||||||
|
}
|
||||||
|
|
||||||
switch($extension)
|
switch($extension)
|
||||||
{
|
{
|
||||||
case 'jpg':
|
case 'jpg':
|
||||||
case 'jpeg':
|
case 'jpeg':
|
||||||
|
// Checking for JPG support
|
||||||
if (imagetypes() & IMG_JPG) {
|
if (imagetypes() & IMG_JPG) {
|
||||||
imagejpeg($this->imageResized, $path_complete, $imageQuality);
|
imagejpeg($this->imageResized, $path_complete, $imageQuality);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'gif':
|
case 'gif':
|
||||||
|
// Checking for GIF support
|
||||||
if (imagetypes() & IMG_GIF) {
|
if (imagetypes() & IMG_GIF) {
|
||||||
imagegif($this->imageResized, $path_complete);
|
imagegif($this->imageResized, $path_complete);
|
||||||
}
|
}
|
||||||
|
@ -55,16 +59,16 @@ class Image {
|
||||||
// *** Invert quality setting as 0 is best, not 9
|
// *** Invert quality setting as 0 is best, not 9
|
||||||
$invertScaleQuality = 9 - $scaleQuality;
|
$invertScaleQuality = 9 - $scaleQuality;
|
||||||
|
|
||||||
|
// Checking for PNG support
|
||||||
if (imagetypes() & IMG_PNG) {
|
if (imagetypes() & IMG_PNG) {
|
||||||
imagepng($this->imageResized, $path_complete, $invertScaleQuality);
|
imagepng($this->imageResized, $path_complete, $invertScaleQuality);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// *** No extension - No save.
|
// Fail extension detection
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
imagedestroy($this->imageResized);
|
imagedestroy($this->imageResized);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ 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_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 = "'.HTML_PATH_ADMIN_THEME.'";'.PHP_EOL;
|
||||||
echo 'var HTML_PATH_UPLOADS = "'.HTML_PATH_UPLOADS.'";'.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 NO_PARENT_CHAR = "'.NO_PARENT_CHAR.'";'.PHP_EOL;
|
echo 'var NO_PARENT_CHAR = "'.NO_PARENT_CHAR.'";'.PHP_EOL;
|
||||||
|
|
||||||
echo '</script>';
|
echo '</script>';
|
||||||
|
|
|
@ -111,6 +111,17 @@ class Page extends fileContent
|
||||||
return $this->getField('key');
|
return $this->getField('key');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function coverImage($absolute=true)
|
||||||
|
{
|
||||||
|
$fileName = $this->getField('coverImage');
|
||||||
|
|
||||||
|
if($absolute) {
|
||||||
|
return HTML_PATH_UPLOADS.$fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fileName;
|
||||||
|
}
|
||||||
|
|
||||||
// Returns TRUE if the page is published, FALSE otherwise.
|
// Returns TRUE if the page is published, FALSE otherwise.
|
||||||
public function published()
|
public function published()
|
||||||
{
|
{
|
||||||
|
@ -187,16 +198,32 @@ class Page extends fileContent
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns the user object if $field is false, otherwise returns the field's value.
|
||||||
|
public function user($field=false)
|
||||||
|
{
|
||||||
|
// Get the user object.
|
||||||
|
$User = $this->getField('user');
|
||||||
|
|
||||||
|
if($field) {
|
||||||
|
return $User->getField($field);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $User;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
public function username()
|
public function username()
|
||||||
{
|
{
|
||||||
return $this->getField('username');
|
return $this->getField('username');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
public function authorFirstName()
|
public function authorFirstName()
|
||||||
{
|
{
|
||||||
return $this->getField('authorFirstName');
|
return $this->getField('authorFirstName');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
public function authorLastName()
|
public function authorLastName()
|
||||||
{
|
{
|
||||||
return $this->getField('authorLastName');
|
return $this->getField('authorLastName');
|
||||||
|
|
|
@ -78,9 +78,15 @@ class Post extends fileContent
|
||||||
return ($this->getField('status')=='draft');
|
return ($this->getField('status')=='draft');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function username()
|
public function coverImage($absolute=true)
|
||||||
{
|
{
|
||||||
return $this->getField('username');
|
$fileName = $this->getField('coverImage');
|
||||||
|
|
||||||
|
if($absolute) {
|
||||||
|
return HTML_PATH_UPLOADS.$fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function profilePicture()
|
public function profilePicture()
|
||||||
|
@ -88,11 +94,32 @@ class Post extends fileContent
|
||||||
return HTML_PATH_UPLOADS_PROFILES.$this->username().'.jpg';
|
return HTML_PATH_UPLOADS_PROFILES.$this->username().'.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns the user object if $field is false, otherwise returns the field's value.
|
||||||
|
public function user($field=false)
|
||||||
|
{
|
||||||
|
// Get the user object.
|
||||||
|
$User = $this->getField('user');
|
||||||
|
|
||||||
|
if($field) {
|
||||||
|
return $User->getField($field);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $User;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
|
public function username()
|
||||||
|
{
|
||||||
|
return $this->getField('username');
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
public function authorFirstName()
|
public function authorFirstName()
|
||||||
{
|
{
|
||||||
return $this->getField('authorFirstName');
|
return $this->getField('authorFirstName');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
public function authorLastName()
|
public function authorLastName()
|
||||||
{
|
{
|
||||||
return $this->getField('authorLastName');
|
return $this->getField('authorLastName');
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
|
class User
|
||||||
|
{
|
||||||
|
public $db;
|
||||||
|
|
||||||
|
public function setField($field, $value)
|
||||||
|
{
|
||||||
|
$this->db[$field] = $value;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getField($field)
|
||||||
|
{
|
||||||
|
if(isset($this->db[$field])) {
|
||||||
|
return $this->db[$field];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns username
|
||||||
|
public function username()
|
||||||
|
{
|
||||||
|
return $this->getField('username');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function firstName()
|
||||||
|
{
|
||||||
|
return $this->getField('firstName');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function lastName()
|
||||||
|
{
|
||||||
|
return $this->getField('lastName');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function role()
|
||||||
|
{
|
||||||
|
return $this->getField('role');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function password()
|
||||||
|
{
|
||||||
|
return $this->getField('password');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function salt()
|
||||||
|
{
|
||||||
|
return $this->getField('salt');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function email()
|
||||||
|
{
|
||||||
|
return $this->getField('email');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registered()
|
||||||
|
{
|
||||||
|
return $this->getField('registered');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function twitterUsername()
|
||||||
|
{
|
||||||
|
return $this->getField('twitterUsername');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function facebookUsername()
|
||||||
|
{
|
||||||
|
return $this->getField('facebookUsername');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function googleUsername()
|
||||||
|
{
|
||||||
|
return $this->getField('googleUsername');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function instagramUsername()
|
||||||
|
{
|
||||||
|
return $this->getField('instagramUsername');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function profilePicture($absolute=true)
|
||||||
|
{
|
||||||
|
$filename = $this->getField('username').'.png';
|
||||||
|
|
||||||
|
if($absolute) {
|
||||||
|
return HTML_PATH_UPLOADS_PROFILES.$filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -77,7 +77,7 @@
|
||||||
"published-date": "Дата на побликуване",
|
"published-date": "Дата на побликуване",
|
||||||
"modified-date": "Промяна на дата",
|
"modified-date": "Промяна на дата",
|
||||||
"empty-title": "Без заглавие",
|
"empty-title": "Без заглавие",
|
||||||
"plugins": "Плъгини",
|
"plugins": "Компоненти",
|
||||||
"install-plugin": "Добави",
|
"install-plugin": "Добави",
|
||||||
"uninstall-plugin": "Премахни",
|
"uninstall-plugin": "Премахни",
|
||||||
"new-password": "Нова парола",
|
"new-password": "Нова парола",
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
"scheduled": "Планирано",
|
"scheduled": "Планирано",
|
||||||
"publish": "Публикувай",
|
"publish": "Публикувай",
|
||||||
"please-check-your-theme-configuration": "Моля, проверете конфигурацията на вашата тема.",
|
"please-check-your-theme-configuration": "Моля, проверете конфигурацията на вашата тема.",
|
||||||
"plugin-label": "Заглавие плъгин",
|
"plugin-label": "Заглавие на компонент",
|
||||||
"enabled": "Разреши",
|
"enabled": "Разреши",
|
||||||
"disabled": "Забрани",
|
"disabled": "Забрани",
|
||||||
"cli-mode": "Режим CLI",
|
"cli-mode": "Режим CLI",
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
"to-schedule-the-post-just-select-the-date-and-time": "За да планирате поста, просто изберете дата и час.",
|
"to-schedule-the-post-just-select-the-date-and-time": "За да планирате поста, просто изберете дата и час.",
|
||||||
"write-the-tags-separated-by-commas": "Напишете етикети, разделени със запетая.",
|
"write-the-tags-separated-by-commas": "Напишете етикети, разделени със запетая.",
|
||||||
"status": "Статус",
|
"status": "Статус",
|
||||||
"published": "Пубиликуван",
|
"published": "Публикувай",
|
||||||
"scheduled-posts": "Планирани постове:",
|
"scheduled-posts": "Планирани постове:",
|
||||||
"statistics": "Статистика:",
|
"statistics": "Статистика:",
|
||||||
"name": "Име",
|
"name": "Име",
|
||||||
|
|
|
@ -218,5 +218,7 @@
|
||||||
"site-information": "Site information",
|
"site-information": "Site information",
|
||||||
"date-and-time-formats": "Date and time formats",
|
"date-and-time-formats": "Date and time formats",
|
||||||
"activate": "Activate",
|
"activate": "Activate",
|
||||||
"deactivate": "Deactivate"
|
"deactivate": "Deactivate",
|
||||||
|
|
||||||
|
"cover-image": "Cover image"
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"language-data":
|
"language-data":
|
||||||
{
|
{
|
||||||
"native": "Italiano (Italy)",
|
"native": "Italiano (Italia)",
|
||||||
"english-name": "Italian",
|
"english-name": "Italian",
|
||||||
"last-update": "2015-11-27",
|
"last-update": "2015-12-30",
|
||||||
"author": "Daniele La Pira",
|
"author": "Daniele La Pira",
|
||||||
"email": "daniele.lapira@gmail.com",
|
"email": "daniele.lapira@gmail.com",
|
||||||
"website": "https://github.com/danielelapira"
|
"website": "https://github.com/danielelapira"
|
||||||
|
@ -41,8 +41,8 @@
|
||||||
"profile": "Profilo",
|
"profile": "Profilo",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"settings": "Impostazioni",
|
"settings": "Impostazioni",
|
||||||
"general": "Generale",
|
"general": "Generali",
|
||||||
"advanced": "Avanzato",
|
"advanced": "Avanzate",
|
||||||
"regional": "Regionale",
|
"regional": "Regionale",
|
||||||
"about": "About",
|
"about": "About",
|
||||||
"login": "Inizia sessione",
|
"login": "Inizia sessione",
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
"new-post": "Nuovo articolo",
|
"new-post": "Nuovo articolo",
|
||||||
"new-page": "Nuova pagina",
|
"new-page": "Nuova pagina",
|
||||||
"html-and-markdown-code-supported": "Codici HTML e Markdown supportati",
|
"html-and-markdown-code-supported": "Codici HTML e Markdown supportati",
|
||||||
"manage-posts": "Gestisci articoli",
|
"manage-posts": "Gestione articoli",
|
||||||
"published-date": "Data di pubblicazione",
|
"published-date": "Data di pubblicazione",
|
||||||
"modified-date": "Data di modifica",
|
"modified-date": "Data di modifica",
|
||||||
"empty-title": "Titolo assente",
|
"empty-title": "Titolo assente",
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
"bludit-version": "Versione di Bludit",
|
"bludit-version": "Versione di Bludit",
|
||||||
"powered-by": "Powered by",
|
"powered-by": "Powered by",
|
||||||
"recent-posts": "Articoli recenti",
|
"recent-posts": "Articoli recenti",
|
||||||
"manage-pages": "Gestisci pagine",
|
"manage-pages": "Gestione pagine",
|
||||||
"advanced-options": "Opzioni avanzate",
|
"advanced-options": "Opzioni avanzate",
|
||||||
"user-deleted": "Utente eliminato",
|
"user-deleted": "Utente eliminato",
|
||||||
"page-added-successfully": "Pagina aggiunta con successo",
|
"page-added-successfully": "Pagina aggiunta con successo",
|
||||||
|
@ -98,25 +98,25 @@
|
||||||
"database-regenerated": "Database rigenerato",
|
"database-regenerated": "Database rigenerato",
|
||||||
"the-changes-have-been-saved": "Le modifiche sono state salvate",
|
"the-changes-have-been-saved": "Le modifiche sono state salvate",
|
||||||
"enable-more-features-at": "Abilita altre funzioni a",
|
"enable-more-features-at": "Abilita altre funzioni a",
|
||||||
"username-already-exists": "Il nome utente esiste già",
|
"username-already-exists": "Nome utente già esistente",
|
||||||
"username-field-is-empty": "Campo nome utente vuoto",
|
"username-field-is-empty": "Campo nome utente vuoto",
|
||||||
"the-password-and-confirmation-password-do-not-match":"Le password non corrispondono",
|
"the-password-and-confirmation-password-do-not-match":"Le password non corrispondono",
|
||||||
"user-has-been-added-successfully": "Utente aggiunto con successo",
|
"user-has-been-added-successfully": "Utente aggiunto con successo",
|
||||||
"you-do-not-have-sufficient-permissions": "Non hai i permessi sufficienti per accedere a questa pagina, contatta l'amministratore.",
|
"you-do-not-have-sufficient-permissions": "Non hai sufficienti permessi per accedere a questa pagina. Contatta l'amministratore.",
|
||||||
"settings-advanced-writting-settings": "Impostazioni->Avanzate->Impostazioni di scrittura",
|
"settings-advanced-writting-settings": "Impostazioni->Avanzate->Impostazioni di scrittura",
|
||||||
"new-posts-and-pages-synchronized": "Nuovi articoli e pagine sincronizzate.",
|
"new-posts-and-pages-synchronized": "Nuovi articoli e pagine sincronizzate.",
|
||||||
"you-can-choose-the-users-privilege": "Puoi selezionare i privilegi dell'utente. Il ruolo di editore può solo scrivere e modificare pagine e articoli.",
|
"you-can-choose-the-users-privilege": "Puoi selezionare i privilegi dell'utente. Il ruolo di editore può solo scrivere e modificare pagine e articoli.",
|
||||||
"email-will-not-be-publicly-displayed": "L'indirizzo Email non sarà visibile. Raccomandato per il recupero della password e per ricevere notifiche.",
|
"email-will-not-be-publicly-displayed": "L'indirizzo Email non sarà visibile. Raccomandato per il recupero della password e per ricevere notifiche.",
|
||||||
"use-this-field-to-name-your-site": "Usa questo campo per dare un nome al tuo sito, apparirà nella parte superiore in ogni pagina del tuo sito.",
|
"use-this-field-to-name-your-site": "Usa questo campo per dare un nome al tuo sito. Apparirà nella parte superiore in ogni pagina del tuo sito.",
|
||||||
"use-this-field-to-add-a-catchy-phrase": "Usa questo campo per aggiungere uno slogan al tuo sito.",
|
"use-this-field-to-add-a-catchy-phrase": "Usa questo campo per aggiungere uno slogan al tuo sito.",
|
||||||
"you-can-add-a-site-description-to-provide": "Puoi aggiungere una descrizione del sito per fornire una breve biografia o descrizione del sito.",
|
"you-can-add-a-site-description-to-provide": "Puoi aggiungere una descrizione del tuo sito e una tua breve biografia.",
|
||||||
"you-can-add-a-small-text-on-the-bottom": "Puoi aggiungere un breve testo in fondo ad ogni pagina. Ad es. copyright, autore, date, ecc.",
|
"you-can-add-a-small-text-on-the-bottom": "Puoi aggiungere un breve testo in fondo ad ogni pagina. Ad es. copyright, autore, date, ecc.",
|
||||||
"number-of-posts-to-show-per-page": "Numero di articoli da mostrare per pagina.",
|
"number-of-posts-to-show-per-page": "Numero di articoli da mostrare per pagina.",
|
||||||
"the-url-of-your-site": "Indirizzo URL del tuo sito.",
|
"the-url-of-your-site": "Indirizzo URL del tuo sito.",
|
||||||
"add-or-edit-description-tags-or": "Aggiungi o modifica descrizione, tags oppure modifica l'URL amichevole.",
|
"add-or-edit-description-tags-or": "Aggiungi o modifica la descrizione, i tags oppure modifica l'URL amichevole.",
|
||||||
"select-your-sites-language": "Seleziona la lingua del tuo sito.",
|
"select-your-sites-language": "Seleziona la lingua del tuo sito.",
|
||||||
"select-a-timezone-for-a-correct": "Seleziona un fuso orario per la corretta visualizzazione di data e ora sul sito.",
|
"select-a-timezone-for-a-correct": "Seleziona un fuso orario per la corretta visualizzazione di data e ora sul sito.",
|
||||||
"you-can-use-this-field-to-define-a-set-of": "Puoi utilizzare questo campo per definire set di parametri riferiti alla lingua, alla nazione e preferenze speciali.",
|
"you-can-use-this-field-to-define-a-set-of": "Puoi utilizzare questo campo per definire un set di parametri riferiti alla lingua, alla nazione e preferenze speciali.",
|
||||||
"you-can-modify-the-url-which-identifies":"Puoi modificare l'indirizzo URL che identifica una pagina o un articolo utilizzando delle parole chiavi leggibili. Non più di 150 caratteri.",
|
"you-can-modify-the-url-which-identifies":"Puoi modificare l'indirizzo URL che identifica una pagina o un articolo utilizzando delle parole chiavi leggibili. Non più di 150 caratteri.",
|
||||||
"this-field-can-help-describe-the-content": "Quì puoi descrivere il contenuto in poche parole. Non più di 150 caratteri.",
|
"this-field-can-help-describe-the-content": "Quì puoi descrivere il contenuto in poche parole. Non più di 150 caratteri.",
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
"there-are-no-drafts": "Non ci sono bozze.",
|
"there-are-no-drafts": "Non ci sono bozze.",
|
||||||
"create-a-new-article-for-your-blog":"Crea un nuovo articolo per il tuo blog.",
|
"create-a-new-article-for-your-blog":"Crea un nuovo articolo per il tuo blog.",
|
||||||
"create-a-new-page-for-your-website":"Crea una nuova pagina per il tuo sito.",
|
"create-a-new-page-for-your-website":"Crea una nuova pagina per il tuo sito.",
|
||||||
"invite-a-friend-to-collaborate-on-your-website":"Invita un amico per collaborare sul tuo sito.",
|
"invite-a-friend-to-collaborate-on-your-website":"Invita un amico a collaborare sul tuo sito.",
|
||||||
"change-your-language-and-region-settings":"Modifica le impostazioni di lingua e regione.",
|
"change-your-language-and-region-settings":"Modifica le impostazioni di lingua e regione.",
|
||||||
"language-and-timezone":"Lingua e fuso orario",
|
"language-and-timezone":"Lingua e fuso orario",
|
||||||
"author": "Autore",
|
"author": "Autore",
|
||||||
|
@ -137,10 +137,10 @@
|
||||||
"install-theme": "Installa tema",
|
"install-theme": "Installa tema",
|
||||||
"first-post": "Primo articolo",
|
"first-post": "Primo articolo",
|
||||||
"congratulations-you-have-successfully-installed-your-bludit": "Congratulazioni, hai installato con successo **Bludit**",
|
"congratulations-you-have-successfully-installed-your-bludit": "Congratulazioni, hai installato con successo **Bludit**",
|
||||||
"whats-next": "Passi seguenti",
|
"whats-next": "Passi successivi",
|
||||||
"manage-your-bludit-from-the-admin-panel": "Gestisci Bludit dal [pannello di amministrazione](./admin/)",
|
"manage-your-bludit-from-the-admin-panel": "Gestisci Bludit dal [pannello di amministrazione](./admin/)",
|
||||||
"follow-bludit-on": "Segui Bludit su",
|
"follow-bludit-on": "Segui Bludit su",
|
||||||
"visit-the-support-forum": "Visita il [forum](http://forum.bludit.com) for support",
|
"visit-the-support-forum": "Visita il [forum](http://forum.bludit.com) per supporto",
|
||||||
"read-the-documentation-for-more-information": "Leggi la [documentazione](http://docs.bludit.com) per ulteriori informazioni",
|
"read-the-documentation-for-more-information": "Leggi la [documentazione](http://docs.bludit.com) per ulteriori informazioni",
|
||||||
"share-with-your-friends-and-enjoy": "Condividi con i tuoi amici",
|
"share-with-your-friends-and-enjoy": "Condividi con i tuoi amici",
|
||||||
"the-page-has-not-been-found": "La pagina non è stata trovata.",
|
"the-page-has-not-been-found": "La pagina non è stata trovata.",
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
"enabled": "Abilitato",
|
"enabled": "Abilitato",
|
||||||
"disabled": "Disabilitato",
|
"disabled": "Disabilitato",
|
||||||
"cli-mode": "Modo Cli",
|
"cli-mode": "Modo Cli",
|
||||||
"command-line-mode": "Modo linia di comando",
|
"command-line-mode": "Modo linea di comando",
|
||||||
"enable-the-command-line-mode-if-you-add-edit": "Abilita il modo della linea di comando se vuoi aggiungere, modificare o eliminare articoli e pagine dal filesystem",
|
"enable-the-command-line-mode-if-you-add-edit": "Abilita il modo della linea di comando se vuoi aggiungere, modificare o eliminare articoli e pagine dal filesystem",
|
||||||
|
|
||||||
"configure": "Configura",
|
"configure": "Configura",
|
||||||
|
@ -183,17 +183,17 @@
|
||||||
"email-account-settings":"Impostazioni dell'account email",
|
"email-account-settings":"Impostazioni dell'account email",
|
||||||
"sender-email": "Mittente email",
|
"sender-email": "Mittente email",
|
||||||
"emails-will-be-sent-from-this-address":"Le emails saranno inviate da questo indirizzo.",
|
"emails-will-be-sent-from-this-address":"Le emails saranno inviate da questo indirizzo.",
|
||||||
"bludit-login-access-code": "BLUDIT - Login access code",
|
"bludit-login-access-code": "BLUDIT - Codice di accesso",
|
||||||
"check-your-inbox-for-your-login-access-code":"Controlla la tua posta in ingresso per il codice di accesso",
|
"check-your-inbox-for-your-login-access-code":"Controlla la tua posta in ingresso per il codice di accesso",
|
||||||
"there-was-a-problem-sending-the-email":"C'è stato un problema nell'invio dell' email",
|
"there-was-a-problem-sending-the-email":"C'è stato un problema nell'invio dell' email",
|
||||||
"back-to-login-form": "Torna indietro alla pagina di accesso",
|
"back-to-login-form": "Torna indietro alla pagina di accesso",
|
||||||
"send-me-a-login-access-code": "Inviami un codice accesso",
|
"send-me-a-login-access-code": "Inviami un codice accesso",
|
||||||
"get-login-access-code": "Richiedi un codice accesso",
|
"get-login-access-code": "Richiedi un codice accesso",
|
||||||
"email-notification-login-access-code": "<p>Questa è una notifica dal tuo sito {{WEBSITE_NAME}}</p><p>Hai richiesto un codice per accedere, segui il link seguente:</p><p>{{LINK}}</p>",
|
"email-notification-login-access-code": "<p>Questa è una notifica dal tuo sito {{WEBSITE_NAME}}</p><p>Hai richiesto un codice per accedere. Segui il link:</p><p>{{LINK}}</p>",
|
||||||
"there-are-no-scheduled-posts": "Non ci sono articoli programmati.",
|
"there-are-no-scheduled-posts": "Non ci sono articoli programmati.",
|
||||||
"show-password": "Mostra password",
|
"show-password": "Mostra password",
|
||||||
"edit-or-remove-your=pages": "Modifica o elimina pagine.",
|
"edit-or-remove-your=pages": "Modifica o elimina pagine.",
|
||||||
"edit-or-remove-your-blogs-posts": "Modifica o elimina gli articoli del tuo blog.",
|
"edit-or-remove-your-blogs-posts": "Modifica o elimina articoli del blog.",
|
||||||
"general-settings": "Impostazioni generali",
|
"general-settings": "Impostazioni generali",
|
||||||
"advanced-settings": "Impostazioni avanzate",
|
"advanced-settings": "Impostazioni avanzate",
|
||||||
"manage-users": "Gestisci utenti",
|
"manage-users": "Gestisci utenti",
|
||||||
|
@ -208,10 +208,17 @@
|
||||||
"date-format": "Formato data",
|
"date-format": "Formato data",
|
||||||
"time-format": "Formato ora",
|
"time-format": "Formato ora",
|
||||||
"chat-with-developers-and-users-on-gitter":"Chatta con gli sviluppatori e gli utenti su [Gitter](https://gitter.im/dignajar/bludit)",
|
"chat-with-developers-and-users-on-gitter":"Chatta con gli sviluppatori e gli utenti su [Gitter](https://gitter.im/dignajar/bludit)",
|
||||||
"this-is-a-brief-description-of-yourself-our-your-site":"Questa è una breve descrizione tua o del tuo sito, Per cambiare il testo vai nel pannello di amministrazione, impostazioni, plugins, e configura il plugin about.",
|
"this-is-a-brief-description-of-yourself-our-your-site":"Questa è una breve descrizione del tuo sito. Per cambiare il testo vai nel pannello di amministrazione, impostazioni, plugins e configura il plugin about.",
|
||||||
"profile-picture": "Foto del profilo",
|
"profile-picture": "Foto del profilo",
|
||||||
"the-about-page-is-very-important": "La pagina << about >> è molto utile. Fornisce ai tuoi visitatori importanti informazioni sul sito. Uno strumento efficace per potenziali clienti e partners.",
|
"the-about-page-is-very-important": "La pagina << about >> è molto utile. Fornisce ai visitatori importanti informazioni sul sito ed il suo autore. Uno strumento efficace per acquisire potenziali clienti e partners.",
|
||||||
"change-this-pages-content-on-the-admin-panel": "Cambia il contenuto di questa pagina sul pannello di amministrazione, Amministra -> Pagine e Clicca sulla pagina << about >> per modificare.",
|
"change-this-pages-content-on-the-admin-panel": "Cambia il contenuto di questa pagina sul pannello di amministrazione, Amministra -> Pagine e Clicca sulla pagina << about >> per modificare.",
|
||||||
"about-your-site-or-yourself": "A proposito del tuo sito o di te stesso",
|
"about-your-site-or-yourself": "A proposito di te e del tuo sito.",
|
||||||
"welcome-to-bludit": "Benvenuti a Bludit"
|
"welcome-to-bludit": "Benvenuti su Bludit",
|
||||||
|
|
||||||
|
"site-information": "Informazioni sul sito",
|
||||||
|
"date-and-time-formats": "Formati data e ora",
|
||||||
|
"activate": "Attiva",
|
||||||
|
"deactivate": "Disattiva",
|
||||||
|
|
||||||
|
"cover-image": "Immagine di copertina"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,166 @@
|
||||||
|
{
|
||||||
|
"language-data":
|
||||||
|
{
|
||||||
|
"native": "Nederlands",
|
||||||
|
"english-name": "Dutch",
|
||||||
|
"last-update": "2015-12-11",
|
||||||
|
"author": "",
|
||||||
|
"email": "",
|
||||||
|
"website": ""
|
||||||
|
},
|
||||||
|
|
||||||
|
"username": "Gebruikersnaam",
|
||||||
|
"password": "Wachtwoord",
|
||||||
|
"confirm-password": "Bevestig wachtwoord",
|
||||||
|
"editor": "Editor",
|
||||||
|
"dashboard": "Dashboard",
|
||||||
|
"role": "Rol",
|
||||||
|
"post": "Artikel",
|
||||||
|
"posts": "Artikelen",
|
||||||
|
"users": "Gebruikers",
|
||||||
|
"administrator": "Administrator",
|
||||||
|
"add": "Voeg toe",
|
||||||
|
"cancel": "Annuleer",
|
||||||
|
"content": "Inhoud",
|
||||||
|
"title": "Titel",
|
||||||
|
"no-parent": "Geen bovenliggend item",
|
||||||
|
"edit-page": "Pagina aanpassen",
|
||||||
|
"edit-post": "Artikel aanpassen",
|
||||||
|
"add-a-new-user": "Voeg een nieuwe gebruiker toe",
|
||||||
|
"parent": "Parent",
|
||||||
|
"friendly-url": "Gebruiksvriendelijke URL",
|
||||||
|
"description": "Omschrijving",
|
||||||
|
"posted-by": "Geplaatst door",
|
||||||
|
"tags": "Tags",
|
||||||
|
"position": "Positie",
|
||||||
|
"save": "Opslaan",
|
||||||
|
"draft": "Concept",
|
||||||
|
"delete": "Verwijder",
|
||||||
|
"registered": "Geregistreerd",
|
||||||
|
"Notifications": "Berichtgevingen",
|
||||||
|
"profile": "Profiel",
|
||||||
|
"email": "Email",
|
||||||
|
"settings": "Instellingen",
|
||||||
|
"general": "Algemeen",
|
||||||
|
"Advanced": "Geadvanceerd",
|
||||||
|
"regional": "Taal/Tijd/Locatie",
|
||||||
|
"about": "Over",
|
||||||
|
"login": "Aanmelden",
|
||||||
|
"logout": "Afmelden",
|
||||||
|
"manage": "Aanpassen",
|
||||||
|
"themes": "Thema",
|
||||||
|
"prev-page": "Vorige pagina",
|
||||||
|
"next-page": "Volgende pagina",
|
||||||
|
"configure-plugin": "Configureer de plugin",
|
||||||
|
"confirm-delete-this-action-cannot-be-undone": "Bevestig het verwijderen,dit kan niet ongedaan worden gemaakt.",
|
||||||
|
"site-title": "Titel van de site",
|
||||||
|
"site-slogan": "Slogan voor de site",
|
||||||
|
"site-description": "Omschrijving van de site",
|
||||||
|
"footer-text": "Footer tekst",
|
||||||
|
"posts-per-page": "Artikelen per pagina",
|
||||||
|
"site-url": "De url van de site",
|
||||||
|
"writting-settings": "Schrijf instellingen",
|
||||||
|
"url-filters": "URL filters",
|
||||||
|
"page": "Pagina",
|
||||||
|
"pages": "Pagina's",
|
||||||
|
"home": "Home",
|
||||||
|
"welcome-back": "Welkom terug",
|
||||||
|
"language": "Taal",
|
||||||
|
"website": "Website",
|
||||||
|
"timezone": "Tijdzone",
|
||||||
|
"locale": "Lokaal",
|
||||||
|
"new-post": "Nieuw artikel",
|
||||||
|
"html-and-markdown-code-supported": "HTML en Markdown code worden ondersteund",
|
||||||
|
"new-page": "Nieuwe pagina",
|
||||||
|
"manage-posts": "Beheer artikelen",
|
||||||
|
"published-date": "Publicatie datum",
|
||||||
|
"modified-date": "Aanpassingsdatum",
|
||||||
|
"empty-title": "Lege titel",
|
||||||
|
"plugins": "Plugins",
|
||||||
|
"install-plugin": "Installeer plugin",
|
||||||
|
"uninstall-plugin": "Verwijder plugin",
|
||||||
|
"new-password": "Nieuw wachtwoord",
|
||||||
|
"edit-user": "Gebruiker aanpassen",
|
||||||
|
"publish-now": "Publiceer nu",
|
||||||
|
"first-name": "Voornaam",
|
||||||
|
"last-name": "Achternaam",
|
||||||
|
"bludit-version": "Bludit Versie",
|
||||||
|
"powered-by": "Aangestuurd door",
|
||||||
|
"recent-posts": "Recente artikelen",
|
||||||
|
"manage-pages": "Beheer pagina's",
|
||||||
|
"advanced-options": "Geadvanceerde opties",
|
||||||
|
"user-deleted": "Gebruiker verwijderd",
|
||||||
|
"page-added-successfully": "Pagina succesvol toegevoegd",
|
||||||
|
"post-added-successfully": "Artikel succesvol toegevoegd",
|
||||||
|
"the-post-has-been-deleted-successfully": "Artikel succesvol verwijderd",
|
||||||
|
"the-page-has-been-deleted-successfully": "Pagina succesvol verwijderd",
|
||||||
|
"username-or-password-incorrect": "Gebruikersnaam of wachtwoord is onjuist",
|
||||||
|
"database-regenerated": "Database opnieuw aangemaakt",
|
||||||
|
"the-changes-have-been-saved": "De veranderingen zijn opgeslagen",
|
||||||
|
"enable-more-features-at": "Voeg meer opties toe",
|
||||||
|
"username-already-exists": "Gebruikersnaam bestaat al",
|
||||||
|
"username-field-is-empty": "Gebruikersnaam is leeg",
|
||||||
|
"the-password-and-confirmation-password-do-not-match":"Ingevoerde wachtwoorden zijn niet gelijk aan elkaar",
|
||||||
|
"user-has-been-added-successfully": "Gebruiker toegevoegd",
|
||||||
|
"you-do-not-have-sufficient-permissions": "Onvoldoende rechten voor deze uitvoering",
|
||||||
|
"settings-advanced-writting-settings": "Instellingen-> Geadvanceerd-> Schrijf instellingen",
|
||||||
|
"new-posts-and-pages-synchronized": "Pagina's en artikelen zijn gesynchroniseerd.",
|
||||||
|
"you-can-choose-the-users-privilege": "Stel hier privileges in. De editor rol kan alleen pagina's en artikelen plaatsen.",
|
||||||
|
"email-will-not-be-publicly-displayed": "Email(afgeschermd). Aanbevolen voor vergeten wachtwoord en notificaties ",
|
||||||
|
"use-this-field-to-name-your-site": "Titel van de site,wordt op iedere pagina weergegeven.",
|
||||||
|
"use-this-field-to-add-a-catchy-phrase": "Slogan voor je site.",
|
||||||
|
"you-can-add-a-site-description-to-provide": "Korte Omschrijving van je site.",
|
||||||
|
"you-can-add-a-small-text-on-the-bottom": "Plaats hier een korte tekst( bijv.copyright / datum / merknaam )",
|
||||||
|
"number-of-posts-to-show-per-page": "Aantal artikelen per pagina.",
|
||||||
|
"the-url-of-your-site": "De url van je site.",
|
||||||
|
"add-or-edit-description-tags-or": "Plaats of bewerk omschrijving / tags / gebruiksvriendelijke URL.",
|
||||||
|
"select-your-sites-language": "Selecteer taal.",
|
||||||
|
"select-a-timezone-for-a-correct": "Selecteer de tijdzone.",
|
||||||
|
"you-can-use-this-field-to-define-a-set-of": "Speciale instellingen voor tijd / datum.",
|
||||||
|
"you-can-modify-the-url-which-identifies":"Plaats hier de tekst voor gebruiksvriendelijke URL / niet meer dan 150 leestekens.",
|
||||||
|
"this-field-can-help-describe-the-content": "Omschrijving voor gebruiksvriendelijke URL / niet meer dan 150 leestekens.",
|
||||||
|
"write-the-tags-separeted-by-comma": "Tags verdeeld door komma's bijv: tag1, tag2, tag3",
|
||||||
|
"delete-the-user-and-all-its-posts":"Verwijder gebruiker en door gebruiker geplaatste artikelen",
|
||||||
|
"delete-the-user-and-associate-its-posts-to-admin-user": "Verwijder gebruiker en plaats alle artikelen onder administrator ",
|
||||||
|
"read-more": "Meer ...",
|
||||||
|
"show-blog": "Bekijk blog",
|
||||||
|
"default-home-page": "Home pagina",
|
||||||
|
"version": "Versie",
|
||||||
|
"there-are-no-drafts": "Er zijn geen concepten.",
|
||||||
|
"create-a-new-article-for-your-blog":"Nieuw artikel.",
|
||||||
|
"create-a-new-page-for-your-website":"Nieuwe pagina.",
|
||||||
|
"invite-a-friend-to-collaborate-on-your-website":"Nodig iemand uit om samen de site te bewerken.",
|
||||||
|
"change-your-language-and-region-settings":"Instellingen voor taal en locatie.",
|
||||||
|
"language-and-timezone":"Taal en tijdzone",
|
||||||
|
"author": "Auteur",
|
||||||
|
"start-here": "Begin hier",
|
||||||
|
"install-theme": "Installeer thema",
|
||||||
|
"first-post": "Eerste artikel",
|
||||||
|
"congratulations-you-have-successfully-installed-your-bludit": "Gefeliciteerd **Bludit** is succesvol geinstalleerd",
|
||||||
|
"whats-next": "En nu?",
|
||||||
|
"manage-your-bludit-from-the-admin-panel": "Beheer Bludit via het administratie omgeving(./admin/)",
|
||||||
|
"follow-bludit-on": "Volg Bludit via",
|
||||||
|
"visit-the-support-forum": "Bezoek het [forum](http://forum.bludit.com) voor ondersteuning(Engels)",
|
||||||
|
"read-the-documentation-for-more-information": "Lees de [documentatie](http://docs.bludit.com) voor meer informatie(Engels)",
|
||||||
|
"share-with-your-friends-and-enjoy": "Deel met je vrienden en veel plezier",
|
||||||
|
"the-page-has-not-been-found": "De pagina werd niet gevonden.",
|
||||||
|
"error": "Error",
|
||||||
|
"bludit-installer": "Bludit installatie programma",
|
||||||
|
"welcome-to-the-bludit-installer": "Welkom bij het Bludit installatie programma",
|
||||||
|
"complete-the-form-choose-a-password-for-the-username-admin": "Vul het formulier in, kies een gebruikersnaam en wachtwoord « admin »",
|
||||||
|
"password-visible-field": "Wachtwoord, zichtbaar veld!",
|
||||||
|
"install": "Installeer",
|
||||||
|
"choose-your-language":"Kies je taal",
|
||||||
|
"next": "Volgende",
|
||||||
|
"the-password-field-is-empty": "Geen wachtwoord ingevuld",
|
||||||
|
"your-email-address-is-invalid":"Het email adres is ongeldig.",
|
||||||
|
"proceed-anyway": "Toch doorgaan!",
|
||||||
|
"drafts":"Concepten",
|
||||||
|
"ip-address-has-been-blocked": "IP adres is geblokkeerd.",
|
||||||
|
"try-again-in-a-few-minutes": "Probeer het over een paar minuten nog eens.",
|
||||||
|
"date": "Datum",
|
||||||
|
"you-can-schedule-the-post-just-select-the-date-and-time": "Je kunt je artikel later plaatsen,voer datum en tijd in",
|
||||||
|
"scheduled": "Ingepland",
|
||||||
|
"publish": "Publiceer",
|
||||||
|
"please-check-your-theme-configuration": "Denk om de thema instellingen."
|
||||||
|
}
|
|
@ -213,5 +213,10 @@
|
||||||
"the-about-page-is-very-important": "Bu sayfa potansiyel müşteriler ve ortaklar için oldukça önemli ve güçlü bir araçtır. Bu siteyi kimin yaptığını merak edenler ilk olarak hakkında kısmına bakarlar.",
|
"the-about-page-is-very-important": "Bu sayfa potansiyel müşteriler ve ortaklar için oldukça önemli ve güçlü bir araçtır. Bu siteyi kimin yaptığını merak edenler ilk olarak hakkında kısmına bakarlar.",
|
||||||
"change-this-pages-content-on-the-admin-panel": "Bu sayfanın içeriğini düzenlemek için admin paneli -> yönet -> sayfalar -> hakkında sayfası .",
|
"change-this-pages-content-on-the-admin-panel": "Bu sayfanın içeriğini düzenlemek için admin paneli -> yönet -> sayfalar -> hakkında sayfası .",
|
||||||
"about-your-site-or-yourself": "Site veya senin hakkında",
|
"about-your-site-or-yourself": "Site veya senin hakkında",
|
||||||
"welcome-to-bludit": "Bludit'e Hoşgeldiniz"
|
"welcome-to-bludit": "Bludit'e Hoşgeldiniz",
|
||||||
|
|
||||||
|
"site-information": "Site bilgisi",
|
||||||
|
"date-and-time-formats": "Tarih ve saat formatları",
|
||||||
|
"activate": "Aktifleştir",
|
||||||
|
"deactivate": "Deaktive et"
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,8 +80,16 @@ class pluginsimpleMDE extends Plugin {
|
||||||
$pluginPath = $this->htmlPath();
|
$pluginPath = $this->htmlPath();
|
||||||
|
|
||||||
$html = '<script>'.PHP_EOL;
|
$html = '<script>'.PHP_EOL;
|
||||||
|
|
||||||
|
$html .= 'var simplemde = null;'.PHP_EOL;
|
||||||
|
|
||||||
|
$html .= 'function addContentSimpleMDE(content) {
|
||||||
|
var text = simplemde.value();
|
||||||
|
simplemde.value(text + content + "\n");
|
||||||
|
}'.PHP_EOL;
|
||||||
|
|
||||||
$html .= '$(document).ready(function() { '.PHP_EOL;
|
$html .= '$(document).ready(function() { '.PHP_EOL;
|
||||||
$html .= 'var simplemde = new SimpleMDE({
|
$html .= 'simplemde = new SimpleMDE({
|
||||||
element: document.getElementById("jscontent"),
|
element: document.getElementById("jscontent"),
|
||||||
status: false,
|
status: false,
|
||||||
toolbarTips: true,
|
toolbarTips: true,
|
||||||
|
@ -95,13 +103,21 @@ class pluginsimpleMDE extends Plugin {
|
||||||
toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).']
|
toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).']
|
||||||
});';
|
});';
|
||||||
|
|
||||||
|
/*
|
||||||
$html .= '$("#jsaddImage").on("click", function() {
|
$html .= '$("#jsaddImage").on("click", function() {
|
||||||
var filename = $("#jsimageList option:selected" ).text();
|
|
||||||
if(!filename.trim()) {
|
if(!imageFilename.trim()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var text = simplemde.value();
|
var text = simplemde.value();
|
||||||
simplemde.value(text + "![alt text]("+filename+")" + "\n");
|
simplemde.value(text + "![alt text]("+imageFilename+")" + "\n");
|
||||||
|
});';
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This is the event for Bludit images
|
||||||
|
$html .= '$("body").on("dblclick", "img.bludit-thumbnail", function() {
|
||||||
|
var filename = $(this).data("filename");
|
||||||
|
addContentSimpleMDE("![alt text]("+filename+")");
|
||||||
});';
|
});';
|
||||||
|
|
||||||
$html .= '}); </script>';
|
$html .= '}); </script>';
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
<?php
|
<?php
|
||||||
echo $Language->get('Posted By').' ';
|
echo $Language->get('Posted By').' ';
|
||||||
|
|
||||||
if( Text::isNotEmpty($Post->authorFirstName()) || Text::isNotEmpty($Post->authorLastName()) ) {
|
if( Text::isNotEmpty($Post->user('firstName')) || Text::isNotEmpty($Post->user('lastName')) ) {
|
||||||
echo $Post->authorFirstName().' '.$Post->authorLastName();
|
echo $Post->user('firstName').' '.$Post->user('lastName');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo $Post->username();
|
echo $Post->user('username');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue