Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
33f6d622f9
@ -38,3 +38,4 @@ if($Url->whereAmI()==='admin') {
|
||||
else {
|
||||
require(PATH_BOOT.'site.php');
|
||||
}
|
||||
|
||||
|
21
install.php
21
install.php
@ -24,6 +24,7 @@ define('PATH_CONTENT', PATH_ROOT.'content'.DS);
|
||||
define('PATH_POSTS', PATH_CONTENT.'posts'.DS);
|
||||
define('PATH_UPLOADS', PATH_CONTENT.'uploads'.DS);
|
||||
define('PATH_UPLOADS_PROFILES', PATH_UPLOADS.'profiles'.DS);
|
||||
define('PATH_UPLOADS_THUMBNAILS',PATH_UPLOADS.'thumbnails'.DS);
|
||||
define('PATH_PAGES', PATH_CONTENT.'pages'.DS);
|
||||
define('PATH_DATABASES', PATH_CONTENT.'databases'.DS);
|
||||
define('PATH_PLUGINS_DATABASES',PATH_CONTENT.'databases'.DS.'plugins'.DS);
|
||||
@ -60,7 +61,7 @@ if(!defined('JSON_PRETTY_PRINT')) {
|
||||
define('JSON', function_exists('json_encode'));
|
||||
|
||||
// Database format date
|
||||
define('DB_DATE_FORMAT', 'Y-m-d H:i');
|
||||
define('DB_DATE_FORMAT', 'Y-m-d H:i:s');
|
||||
|
||||
// Charset, default UTF-8.
|
||||
define('CHARSET', 'UTF-8');
|
||||
@ -244,9 +245,9 @@ function install($adminPassword, $email, $timezoneOffset)
|
||||
error_log($errorText, 0);
|
||||
}
|
||||
|
||||
if(!mkdir(PATH_PLUGINS_DATABASES.'tinymce', $dirpermissions, true))
|
||||
if(!mkdir(PATH_PLUGINS_DATABASES.'simplemde', $dirpermissions, true))
|
||||
{
|
||||
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'tinymce';
|
||||
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'simplemde';
|
||||
error_log($errorText, 0);
|
||||
}
|
||||
|
||||
@ -268,6 +269,12 @@ function install($adminPassword, $email, $timezoneOffset)
|
||||
error_log($errorText, 0);
|
||||
}
|
||||
|
||||
if(!mkdir(PATH_UPLOADS_THUMBNAILS, $dirpermissions, true))
|
||||
{
|
||||
$errorText = 'Error when trying to created the directory=>'.PATH_UPLOADS_THUMBNAILS;
|
||||
error_log($errorText, 0);
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Create files
|
||||
// ============================================================================
|
||||
@ -409,14 +416,14 @@ function install($adminPassword, $email, $timezoneOffset)
|
||||
LOCK_EX
|
||||
);
|
||||
|
||||
// File plugins/tinymce/db.php
|
||||
// File plugins/simplemde/db.php
|
||||
file_put_contents(
|
||||
PATH_PLUGINS_DATABASES.'tinymce'.DS.'db.php',
|
||||
PATH_PLUGINS_DATABASES.'simplemde'.DS.'db.php',
|
||||
$dataHead.json_encode(
|
||||
array(
|
||||
'position'=>0,
|
||||
'plugins'=>'autoresize, fullscreen, pagebreak, link, textcolor, code',
|
||||
'toolbar'=>'bold italic underline strikethrough | alignleft aligncenter alignright | bullist numlist | styleselect | link forecolor backcolor removeformat | pagebreak code fullscreen'
|
||||
'tabSize'=>4,
|
||||
'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen", "guide"'
|
||||
),
|
||||
JSON_PRETTY_PRINT),
|
||||
LOCK_EX
|
||||
|
@ -1,5 +1,9 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
@ -13,11 +17,17 @@ function editPage($args)
|
||||
$args['parent'] = NO_PARENT_CHAR;
|
||||
}
|
||||
|
||||
// Edit the page.
|
||||
if( $dbPages->edit($args) )
|
||||
// Add the page, if the $key is FALSE the creation of the post failure.
|
||||
$key = $dbPages->edit($args);
|
||||
|
||||
if($key)
|
||||
{
|
||||
$dbPages->regenerateCli();
|
||||
|
||||
// Call the plugins after page created.
|
||||
Theme::plugins('afterPageModify');
|
||||
|
||||
// Alert the user
|
||||
Alert::set($Language->g('The changes have been saved'));
|
||||
Redirect::page('admin', 'edit-page/'.$args['slug']);
|
||||
}
|
||||
@ -34,6 +44,9 @@ function deletePage($key)
|
||||
|
||||
if( $dbPages->delete($key) )
|
||||
{
|
||||
// Call the plugins after post created.
|
||||
Theme::plugins('afterPageDelete');
|
||||
|
||||
Alert::set($Language->g('The page has been deleted successfully'));
|
||||
Redirect::page('admin', 'manage-pages');
|
||||
}
|
||||
|
@ -13,12 +13,18 @@ function editPost($args)
|
||||
global $dbPosts;
|
||||
global $Language;
|
||||
|
||||
// Edit the post.
|
||||
if( $dbPosts->edit($args) )
|
||||
// Add the page, if the $key is FALSE the creation of the post failure.
|
||||
$key = $dbPosts->edit($args);
|
||||
|
||||
if($key)
|
||||
{
|
||||
// Reindex tags, this function is in 70.posts.php
|
||||
reIndexTagsPosts();
|
||||
|
||||
// Call the plugins after post created.
|
||||
Theme::plugins('afterPostModify');
|
||||
|
||||
// Alert the user
|
||||
Alert::set($Language->g('The changes have been saved'));
|
||||
Redirect::page('admin', 'edit-post/'.$args['slug']);
|
||||
}
|
||||
@ -40,6 +46,9 @@ function deletePost($key)
|
||||
// Reindex tags, this function is in 70.posts.php
|
||||
reIndexTagsPosts();
|
||||
|
||||
// Call the plugins after post created.
|
||||
Theme::plugins('afterPostDelete');
|
||||
|
||||
Alert::set($Language->g('The post has been deleted successfully'));
|
||||
Redirect::page('admin', 'manage-posts');
|
||||
}
|
||||
|
@ -85,11 +85,9 @@ if($Login->role()!=='admin') {
|
||||
$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($_user===false) {
|
||||
if($_User===false) {
|
||||
Redirect::page('admin', 'users');
|
||||
}
|
||||
|
||||
$_user['username'] = $layout['parameters'];
|
||||
|
@ -13,9 +13,15 @@ function addPage($args)
|
||||
global $dbPages;
|
||||
global $Language;
|
||||
|
||||
// Add the page.
|
||||
if( $dbPages->add($args) )
|
||||
// Add the page, if the $key is FALSE the creation of the post failure.
|
||||
$key = $dbPages->add($args);
|
||||
|
||||
if($key)
|
||||
{
|
||||
// Call the plugins after page created.
|
||||
Theme::plugins('afterPageCreate');
|
||||
|
||||
// Alert the user
|
||||
Alert::set($Language->g('Page added successfully'));
|
||||
Redirect::page('admin', 'manage-pages');
|
||||
}
|
||||
|
@ -13,12 +13,18 @@ function addPost($args)
|
||||
global $dbPosts;
|
||||
global $Language;
|
||||
|
||||
// Add the page.
|
||||
if( $dbPosts->add($args) )
|
||||
// Add the page, if the $key is FALSE the creation of the post failure.
|
||||
$key = $dbPosts->add($args);
|
||||
|
||||
if($key)
|
||||
{
|
||||
// Reindex tags, this function is in 70.posts.php
|
||||
reIndexTagsPosts();
|
||||
|
||||
// Call the plugins after post created.
|
||||
Theme::plugins('afterPostCreate');
|
||||
|
||||
// Alert for the user
|
||||
Alert::set($Language->g('Post added successfully'));
|
||||
Redirect::page('admin', 'manage-posts');
|
||||
}
|
||||
|
@ -41,7 +41,8 @@ legend.first-child {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.uk-nav-navbar > li > a:hover {
|
||||
.uk-nav-navbar > li > a:hover,
|
||||
.uk-nav-navbar > li > a:focus {
|
||||
background: #2672ec;
|
||||
}
|
||||
|
||||
@ -102,11 +103,19 @@ li.bludit-logo {
|
||||
}
|
||||
|
||||
.uk-thumbnail {
|
||||
margin: 2px 4px !important;
|
||||
margin: 2px 3px !important;
|
||||
max-width: 30% !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.uk-progress-bar {
|
||||
background: #2672ec !important;
|
||||
}
|
||||
|
||||
.uk-placeholder {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/* ----------- BLUDIT ----------- */
|
||||
|
||||
#logo {
|
||||
@ -163,20 +172,33 @@ button.delete-button:hover {
|
||||
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 {
|
||||
#bludit-images-v8 .bludit-thumbnail {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
margin: 2px;
|
||||
padding: 0;
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
#bludit-images-v8-upload {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
|
||||
#bludit-images-v8-drag-drop {
|
||||
@ -185,11 +207,13 @@ button.delete-button:hover {
|
||||
|
||||
#bludit-images-v8-progressbar {
|
||||
display: none;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
#bludit-images-v8-thumbnails {
|
||||
height: 350px;
|
||||
max-height: 350px;
|
||||
overflow: auto;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
/* ----------- BLUDIT QUICK IMAGES ----------- */
|
||||
@ -211,6 +235,21 @@ button.delete-button:hover {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
#bludit-quick-images-thumbnails {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
#bludit-quick-images .bludit-thumbnail {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
margin: 2px;
|
||||
padding: 0;
|
||||
width: 31% !important;
|
||||
}
|
||||
|
||||
/* ----------- BLUDIT COVER IMAGE ----------- */
|
||||
#bludit-cover-image {
|
||||
|
||||
@ -246,6 +285,24 @@ button.delete-button:hover {
|
||||
|
||||
#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 ----------- */
|
||||
|
BIN
kernel/admin/themes/default/css/fonts/FontAwesome.otf
Normal file → Executable file
BIN
kernel/admin/themes/default/css/fonts/FontAwesome.otf
Normal file → Executable file
Binary file not shown.
BIN
kernel/admin/themes/default/css/fonts/fontawesome-webfont.ttf
Normal file → Executable file
BIN
kernel/admin/themes/default/css/fonts/fontawesome-webfont.ttf
Normal file → Executable file
Binary file not shown.
BIN
kernel/admin/themes/default/css/fonts/fontawesome-webfont.woff
Normal file → Executable file
BIN
kernel/admin/themes/default/css/fonts/fontawesome-webfont.woff
Normal file → Executable file
Binary file not shown.
BIN
kernel/admin/themes/default/css/fonts/fontawesome-webfont.woff2
Normal file → Executable file
BIN
kernel/admin/themes/default/css/fonts/fontawesome-webfont.woff2
Normal file → Executable file
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}
|
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}
|
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}
|
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)}
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
BIN
kernel/admin/themes/default/img/default.png
Normal file
BIN
kernel/admin/themes/default/img/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
@ -102,9 +102,9 @@ $(document).ready(function() {
|
||||
<ul class="uk-navbar-nav">
|
||||
<li class="uk-parent" data-uk-dropdown>
|
||||
<?php
|
||||
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.jpg';
|
||||
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.jpg')) {
|
||||
$profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.jpg';
|
||||
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.png';
|
||||
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.png')) {
|
||||
$profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.png';
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>">
|
||||
|
@ -130,12 +130,11 @@ class HTML {
|
||||
|
||||
public static function bluditQuickImages()
|
||||
{
|
||||
global $L;
|
||||
|
||||
$html = '<!-- BLUDIT QUICK IMAGES -->';
|
||||
$html .= '
|
||||
<div id="bludit-quick-images">
|
||||
<h4 class="label">Images</h4>
|
||||
|
||||
<div id="bludit-quick-images-thumbnails">
|
||||
';
|
||||
|
||||
@ -143,35 +142,68 @@ $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 .= '<img class="bludit-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>
|
||||
if(empty($thumbnailList)) {
|
||||
$html .= '<div class="empty-images uk-block uk-text-center uk-block-muted">There are no images, upload someone to make your site more cheerful.</div>';
|
||||
}
|
||||
|
||||
$html .= '
|
||||
<a data-uk-modal href="#bludit-images-v8" class="moreImages uk-button">'.$L->g('More images').'</a>
|
||||
|
||||
</div>
|
||||
';
|
||||
|
||||
echo $html;
|
||||
$script = '
|
||||
<script>
|
||||
|
||||
// Add thumbnail to Quick Images
|
||||
function addQuickImages(filename)
|
||||
{
|
||||
var imageSrc = HTML_PATH_UPLOADS_THUMBNAILS + filename;
|
||||
|
||||
// Remove element if there are more than 6 thumbnails
|
||||
if ($("#bludit-quick-images-thumbnails > img").length > 5) {
|
||||
$("img:last-child", "#bludit-quick-images-thumbnails").remove();
|
||||
}
|
||||
|
||||
public static function bluditCoverImage()
|
||||
// Add the new thumbnail to Quick images
|
||||
$("#bludit-quick-images-thumbnails").prepend("<img class=\"bludit-thumbnail\" data-filename=\""+filename+"\" src=\""+imageSrc+"\" alt=\"Thumbnail\">");
|
||||
}
|
||||
|
||||
</script>
|
||||
';
|
||||
|
||||
echo $html.$script;
|
||||
}
|
||||
|
||||
public static function bluditCoverImage($coverImage="")
|
||||
{
|
||||
global $L;
|
||||
|
||||
$style = '';
|
||||
if(!empty($coverImage)) {
|
||||
$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">
|
||||
<div id="cover-image-thumbnail" class="uk-form-file uk-placeholder uk-text-center" style="'.$style.'">
|
||||
|
||||
<div id="cover-image-upload">
|
||||
<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>'.$L->g('Drag and drop or click here').'<input id="cover-image-file-select" type="file"></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 id="cover-image-delete">
|
||||
<div id="cover-image-delete" '.( empty($coverImage)?'':'style="display: block;"' ).'>
|
||||
<div><i class="uk-icon-trash-o"></i></div>
|
||||
</div>
|
||||
|
||||
@ -185,10 +217,23 @@ $html .= '
|
||||
|
||||
$script = '
|
||||
<script>
|
||||
|
||||
function addCoverImage(filename)
|
||||
{
|
||||
var imageSrc = HTML_PATH_UPLOADS_THUMBNAILS + filename;
|
||||
|
||||
// Cover image background
|
||||
$("#cover-image-thumbnail").attr("style","background-image: url("+imageSrc+")");
|
||||
|
||||
// Form attribute
|
||||
$("#cover-image-upload-filename").attr("value", filename);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#cover-image-delete").on("click", function() {
|
||||
$("#cover-image-thumbnail").attr("style","");
|
||||
$("#cover-image-upload-filename").attr("value","");
|
||||
$("#cover-image-delete").hide();
|
||||
$("#cover-image-upload").show();
|
||||
});
|
||||
@ -202,7 +247,7 @@ $(document).ready(function() {
|
||||
|
||||
loadstart: function() {
|
||||
$("#cover-image-progressbar").find(".uk-progress-bar").css("width", "0%").text("0%");
|
||||
$("#cover-image-progressbar").hide();
|
||||
$("#cover-image-progressbar").show();
|
||||
$("#cover-image-delete").hide();
|
||||
$("#cover-image-upload").hide();
|
||||
},
|
||||
@ -215,13 +260,17 @@ $(document).ready(function() {
|
||||
allcomplete: function(response) {
|
||||
$("#cover-image-progressbar").find(".uk-progress-bar").css("width", "100%").text("100%");
|
||||
$("#cover-image-progressbar").hide();
|
||||
|
||||
var imageSrc = HTML_PATH_UPLOADS_THUMBNAILS+response.filename;
|
||||
$("#cover-image-thumbnail").attr("style","background-image: url("+imageSrc+")");
|
||||
$("#cover-image-delete").show();
|
||||
$(".empty-images").hide();
|
||||
|
||||
$("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\">");
|
||||
// Add Cover Image
|
||||
addCoverImage(response.filename);
|
||||
|
||||
// Add thumbnail to Quick Images
|
||||
addQuickImages(response.filename);
|
||||
|
||||
// Add thumbnail to Bludit Images V8
|
||||
addBluditImagev8(response.filename);
|
||||
},
|
||||
|
||||
notallowed: function(file, settings) {
|
||||
@ -251,7 +300,7 @@ $html .= '
|
||||
|
||||
<div id="bludit-images-v8-drag-drop">
|
||||
<div><i class="uk-icon-picture-o"></i> '.$L->g('Upload image').'</div>
|
||||
<div>'.$L->g('Drag and drop or click here').'<input id="bludit-images-v8-file-select" type="file"></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">
|
||||
@ -263,17 +312,23 @@ $html .= '
|
||||
<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">';
|
||||
}
|
||||
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true);
|
||||
foreach($thumbnailList as $file) {
|
||||
$filename = basename($file);
|
||||
$html .= '<img class="bludit-thumbnail" src="'.HTML_PATH_UPLOADS_THUMBNAILS.$filename.'" data-filename="'.$filename.'" alt="Thumbnail">';
|
||||
}
|
||||
|
||||
$html .= '
|
||||
</div>
|
||||
';
|
||||
|
||||
if(empty($thumbnailList)) {
|
||||
$html .= '<div class="empty-images uk-block uk-text-center uk-block-muted">There are no images, upload someone to make your site more cheerful.</div>';
|
||||
}
|
||||
|
||||
$html .= '
|
||||
<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>
|
||||
'.$L->g('Double click on the image to add it').' <a href="" class="uk-modal-close">'.$L->g('Click here to cancel').'</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -282,6 +337,16 @@ $html .= '
|
||||
|
||||
$script = '
|
||||
<script>
|
||||
|
||||
// Add thumbnail to Bludit Images v8
|
||||
function addBluditImagev8(filename)
|
||||
{
|
||||
var imageSrc = HTML_PATH_UPLOADS_THUMBNAILS + filename;
|
||||
|
||||
// Add the new thumbnail to Bludit Images v8
|
||||
$("#bludit-images-v8-thumbnails").prepend("<img class=\"bludit-thumbnail\" data-filename=\""+filename+"\" src=\""+imageSrc+"\" alt=\"Thumbnail\">");
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Add border when select an thumbnail
|
||||
@ -310,6 +375,8 @@ $(document).ready(function() {
|
||||
|
||||
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) {
|
||||
@ -320,14 +387,14 @@ $(document).ready(function() {
|
||||
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();
|
||||
$(".empty-images").hide();
|
||||
|
||||
// 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\">");
|
||||
// Add thumbnail to Bludit Images V8
|
||||
addBluditImagev8(response.filename);
|
||||
|
||||
// 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\">");
|
||||
// Add thumbnail to Quick Images
|
||||
addQuickImages(response.filename);
|
||||
},
|
||||
|
||||
notallowed: function(file, settings) {
|
||||
@ -343,145 +410,80 @@ $(document).ready(function() {
|
||||
echo $html.$script;
|
||||
}
|
||||
|
||||
public static function uploader()
|
||||
{
|
||||
global $L;
|
||||
|
||||
$html = '
|
||||
<div id="upload-drop" class="uk-placeholder uk-text-center">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div id="progressbar" class="uk-progress uk-hidden">
|
||||
<div class="uk-progress-bar" style="width: 0%;">0%</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
$html .= '<select id="jsimageList" class="uk-width-1-1" size="10">';
|
||||
$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>
|
||||
';
|
||||
|
||||
$html .= '
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#jsaddImage").on("click", function() {
|
||||
var filename = $("#jsimageList option:selected").text();
|
||||
if(!filename.trim()) {
|
||||
return false;
|
||||
}
|
||||
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 =
|
||||
{
|
||||
type: "json",
|
||||
action: "'.HTML_PATH_ADMIN_ROOT.'ajax/uploader",
|
||||
allow : "*.(jpg|jpeg|gif|png)",
|
||||
|
||||
loadstart: function() {
|
||||
bar.css("width", "0%").text("0%");
|
||||
progressbar.removeClass("uk-hidden");
|
||||
},
|
||||
|
||||
progress: function(percent) {
|
||||
percent = Math.ceil(percent);
|
||||
bar.css("width", percent+"%").text(percent+"%");
|
||||
},
|
||||
|
||||
allcomplete: function(response) {
|
||||
bar.css("width", "100%").text("100%");
|
||||
setTimeout(function() { progressbar.addClass("uk-hidden"); }, 250);
|
||||
$("#jsimageList").prepend("<option value=\'"+response.filename+"\' selected=\'selected\'>"+response.filename+"</option>");
|
||||
},
|
||||
|
||||
notallowed: function(file, settings) {
|
||||
alert("'.$L->g('Supported image file types').' "+settings.allow);
|
||||
}
|
||||
};
|
||||
|
||||
var select = UIkit.uploadSelect($("#upload-select"), settings);
|
||||
var drop = UIkit.uploadDrop($("#upload-drop"), settings);
|
||||
});
|
||||
|
||||
});
|
||||
</script>';
|
||||
|
||||
echo $html;
|
||||
}
|
||||
|
||||
public static function profileUploader($username)
|
||||
{
|
||||
global $L;
|
||||
|
||||
$html = '
|
||||
<div id="jsprogressBar" class="uk-progress uk-hidden">
|
||||
$html = '<!-- BLUDIT PROFILE UPLOADER -->';
|
||||
|
||||
$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>
|
||||
</div>
|
||||
|
||||
<div id="upload-drop" class="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>
|
||||
';
|
||||
<div id="bludit-profile-picture-drag-drop" class="uk-form-file uk-placeholder uk-text-center">
|
||||
<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>
|
||||
|
||||
$html .= '
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
</div>
|
||||
';
|
||||
|
||||
$(function()
|
||||
{
|
||||
var progressbar = $("#jsprogressBar");
|
||||
var bar = progressbar.find(".uk-progress-bar");
|
||||
var settings =
|
||||
{
|
||||
type: "json",
|
||||
action: "'.HTML_PATH_ADMIN_ROOT.'ajax/uploader",
|
||||
allow : "*.(jpg|jpeg|gif|png)",
|
||||
params: {"type":"profilePicture", "username":"'.$username.'"},
|
||||
$script = '
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
loadstart: function() {
|
||||
bar.css("width", "0%").text("0%");
|
||||
progressbar.removeClass("uk-hidden");
|
||||
},
|
||||
var settings =
|
||||
{
|
||||
type: "json",
|
||||
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
|
||||
allow : "*.(jpg|jpeg|gif|png)",
|
||||
params: {"type":"profilePicture", "username":"'.$username.'"},
|
||||
|
||||
progress: function(percent) {
|
||||
percent = Math.ceil(percent);
|
||||
bar.css("width", percent+"%").text(percent+"%");
|
||||
},
|
||||
loadstart: function() {
|
||||
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", "0%").text("0%");
|
||||
$("#bludit-profile-picture-progressbar").show();
|
||||
},
|
||||
|
||||
allcomplete: function(response) {
|
||||
bar.css("width", "100%").text("100%");
|
||||
progressbar.addClass("uk-hidden");
|
||||
$("#jsprofilePicture").html("<img class=\"uk-border-rounded\" src=\"'.HTML_PATH_UPLOADS_PROFILES.$username.'.jpg\">");
|
||||
},
|
||||
progress: function(percent) {
|
||||
percent = Math.ceil(percent);
|
||||
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", percent+"%").text(percent+"%");
|
||||
},
|
||||
|
||||
notallowed: function(file, settings) {
|
||||
alert("'.$L->g('Supported image file types').' "+settings.allow);
|
||||
}
|
||||
};
|
||||
allcomplete: function(response) {
|
||||
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", "100%").text("100%");
|
||||
$("#bludit-profile-picture-progressbar").hide();
|
||||
|
||||
var select = UIkit.uploadSelect($("#upload-select"), settings);
|
||||
var drop = UIkit.uploadDrop($("#upload-drop"), settings);
|
||||
});
|
||||
$("#bludit-profile-picture-image").html("<img class=\"uk-border-rounded\" src=\"'.HTML_PATH_UPLOADS_PROFILES.$username.'.png?time='.time().'\">");
|
||||
},
|
||||
|
||||
});
|
||||
</script>';
|
||||
notallowed: function(file, settings) {
|
||||
alert("'.$L->g('Supported image file types').' "+settings.allow);
|
||||
}
|
||||
};
|
||||
|
||||
echo $html;
|
||||
UIkit.uploadSelect($("#bludit-profile-picture-file-select"), settings);
|
||||
UIkit.uploadDrop($("#bludit-profile-picture-drag-drop"), settings);
|
||||
|
||||
});
|
||||
</script>
|
||||
';
|
||||
|
||||
echo $html.$script;
|
||||
}
|
||||
|
||||
}
|
6
kernel/admin/themes/default/js/uikit/uikit.min.js
vendored
Normal file → Executable file
6
kernel/admin/themes/default/js/uikit/uikit.min.js
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
2
kernel/admin/themes/default/js/uikit/upload.min.js
vendored
Normal file → Executable file
2
kernel/admin/themes/default/js/uikit/upload.min.js
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 */
|
||||
!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});
|
@ -91,7 +91,9 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
echo '<li>';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
HTML::bluditCoverImage();
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage($_Page->coverImage(false));
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -104,6 +106,16 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
// ---- ADVANCED TAB ----
|
||||
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(count($_Page->children())===0)
|
||||
{
|
||||
@ -123,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
|
||||
HTML::formInputText(array(
|
||||
'name'=>'position',
|
||||
|
@ -85,7 +85,9 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
echo '<li>';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
HTML::bluditCoverImage();
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage($_Post->coverImage(false));
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -98,15 +100,6 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
// ---- ADVANCED TAB ----
|
||||
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
|
||||
HTML::formSelect(array(
|
||||
'name'=>'status',
|
||||
@ -117,6 +110,15 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
'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
|
||||
HTML::formInputText(array(
|
||||
'name'=>'slug',
|
||||
|
@ -16,7 +16,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||
// Security token
|
||||
HTML::formInputHidden(array(
|
||||
'name'=>'username',
|
||||
'value'=>$_user['username']
|
||||
'value'=>$_User->username()
|
||||
));
|
||||
|
||||
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(
|
||||
'name'=>'usernameDisable',
|
||||
'label'=>$L->g('Username'),
|
||||
'value'=>$_user['username'],
|
||||
'value'=>$_User->username(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'disabled'=>true,
|
||||
'tip'=>''
|
||||
@ -33,7 +33,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||
HTML::formInputText(array(
|
||||
'name'=>'firstName',
|
||||
'label'=>$L->g('First name'),
|
||||
'value'=>$_user['firstName'],
|
||||
'value'=>$_User->firstName(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'tip'=>''
|
||||
));
|
||||
@ -41,7 +41,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||
HTML::formInputText(array(
|
||||
'name'=>'lastName',
|
||||
'label'=>$L->g('Last name'),
|
||||
'value'=>$_user['lastName'],
|
||||
'value'=>$_User->lastName(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'tip'=>''
|
||||
));
|
||||
@ -49,7 +49,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||
echo '<div class="uk-form-row">
|
||||
<label class="uk-form-label">Password</label>
|
||||
<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>';
|
||||
|
||||
@ -59,7 +59,7 @@ if($Login->role()==='admin') {
|
||||
'name'=>'role',
|
||||
'label'=>$L->g('Role'),
|
||||
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'selected'=>$_user['role'],
|
||||
'selected'=>$_User->role(),
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
@ -67,17 +67,41 @@ if($Login->role()==='admin') {
|
||||
HTML::formInputText(array(
|
||||
'name'=>'email',
|
||||
'label'=>$L->g('Email'),
|
||||
'value'=>$_user['email'],
|
||||
'value'=>$_User->email(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'tip'=>$L->g('email-will-not-be-publicly-displayed')
|
||||
));
|
||||
|
||||
HTML::legend(array('value'=>$L->g('Social network')));
|
||||
HTML::legend(array('value'=>'Social networks'));
|
||||
|
||||
HTML::formInputText(array(
|
||||
'name'=>'twitterUsername',
|
||||
'label'=>$L->g('Twitter username'),
|
||||
'value'=>$_user['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'=>''
|
||||
));
|
||||
@ -89,7 +113,7 @@ if($Login->role()==='admin') {
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if( ($Login->role()==='admin') && ($_user['username']!='admin') ) {
|
||||
if( ($Login->role()==='admin') && ($_User->username()!='admin') ) {
|
||||
|
||||
HTML::legend(array('value'=>$L->g('Delete')));
|
||||
|
||||
@ -105,18 +129,10 @@ if( ($Login->role()==='admin') && ($_user['username']!='admin') ) {
|
||||
HTML::formClose();
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="uk-width-3-10" style="margin-top: 50px; text-align: center;">';
|
||||
|
||||
echo '<div id="jsprofilePicture">';
|
||||
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']);
|
||||
HTML::profileUploader($_User->username());
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
@ -78,7 +78,9 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
echo '<li>';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage();
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -91,6 +93,16 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
// ---- ADVANCED TAB ----
|
||||
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
|
||||
$options = array();
|
||||
$options[NO_PARENT_CHAR] = '('.$Language->g('No parent').')';
|
||||
@ -105,16 +117,6 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
'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
|
||||
HTML::formInputText(array(
|
||||
'name'=>'position',
|
||||
|
@ -78,7 +78,9 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
echo '<li>';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage();
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -91,15 +93,6 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
// ---- ADVANCED TAB ----
|
||||
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
|
||||
HTML::formSelect(array(
|
||||
'name'=>'status',
|
||||
@ -110,6 +103,15 @@ echo '<div class="sidebar uk-width-large-2-10">';
|
||||
'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
|
||||
HTML::formInputText(array(
|
||||
'name'=>'slug',
|
||||
|
@ -84,6 +84,14 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
HTML::formInputText(array(
|
||||
'name'=>'uriBlog',
|
||||
'label'=>$L->g('Blog'),
|
||||
'value'=>$Site->uriFilters('blog'),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo '<div class="uk-form-row">
|
||||
<div class="uk-form-controls">
|
||||
<button type="submit" class="uk-button uk-button-primary">'.$L->g('Save').'</button>
|
||||
|
@ -38,10 +38,10 @@ if($type=='profilePicture')
|
||||
{
|
||||
// Resize and crop profile image.
|
||||
$username = Sanitize::html($_POST['username']);
|
||||
$tmpName = $username.'.jpg';
|
||||
$tmpName = $username.'.png';
|
||||
$Image = new Image();
|
||||
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, '200', '200', 'crop');
|
||||
$Image->saveImage(PATH_UPLOADS_PROFILES.$tmpName, 100, true);
|
||||
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, '400', '400', 'crop');
|
||||
$Image->saveImage(PATH_UPLOADS_PROFILES.$tmpName, 100, false, true);
|
||||
}
|
||||
// --- OTHERS ---
|
||||
else {
|
||||
|
@ -40,9 +40,9 @@ if( $layout['slug']==='ajax' )
|
||||
else
|
||||
{
|
||||
// Boot rules
|
||||
include(PATH_RULES.'60.plugins.php');
|
||||
include(PATH_RULES.'70.posts.php');
|
||||
include(PATH_RULES.'70.pages.php');
|
||||
include(PATH_RULES.'80.plugins.php');
|
||||
include(PATH_RULES.'71.pages.php');
|
||||
include(PATH_RULES.'99.header.php');
|
||||
include(PATH_RULES.'99.paginator.php');
|
||||
include(PATH_RULES.'99.themes.php');
|
||||
|
@ -61,7 +61,6 @@ define('ALERT_STATUS_FAIL', 1);
|
||||
// Salt length
|
||||
define('THUMBNAILS_WIDTH', 400);
|
||||
define('THUMBNAILS_HEIGHT', 400);
|
||||
|
||||
define('THUMBNAILS_AMOUNT', 6);
|
||||
|
||||
// Salt length
|
||||
@ -82,9 +81,12 @@ define('JSON', function_exists('json_encode'));
|
||||
// TRUE if new posts hand-made set published, or FALSE for draft.
|
||||
define('CLI_STATUS', 'published');
|
||||
|
||||
// Database format date
|
||||
// Database date format
|
||||
define('DB_DATE_FORMAT', 'Y-m-d H:i:s');
|
||||
|
||||
// Sitemap date format
|
||||
define('SITEMAP_DATE_FORMAT', 'Y-m-d');
|
||||
|
||||
// Date format for Dashboard schedule posts
|
||||
define('SCHEDULED_DATE_FORMAT', 'd M - h:i a');
|
||||
|
||||
@ -123,12 +125,14 @@ include(PATH_KERNEL.'dblanguage.class.php');
|
||||
include(PATH_KERNEL.'dbsite.class.php');
|
||||
include(PATH_KERNEL.'post.class.php');
|
||||
include(PATH_KERNEL.'page.class.php');
|
||||
include(PATH_KERNEL.'user.class.php');
|
||||
include(PATH_KERNEL.'url.class.php');
|
||||
include(PATH_KERNEL.'login.class.php');
|
||||
include(PATH_KERNEL.'parsedown.class.php');
|
||||
include(PATH_KERNEL.'parsedownextra.class.php');
|
||||
include(PATH_KERNEL.'security.class.php');
|
||||
|
||||
|
||||
// Include Helpers Classes
|
||||
include(PATH_HELPERS.'text.class.php');
|
||||
include(PATH_HELPERS.'log.class.php');
|
||||
|
@ -24,6 +24,15 @@ $plugins = array(
|
||||
'beforeAdminLoad'=>array(),
|
||||
'afterAdminLoad'=>array(),
|
||||
|
||||
'beforeRulesLoad'=>array(),
|
||||
|
||||
'afterPostCreate'=>array(),
|
||||
'afterPostModify'=>array(),
|
||||
'afterPostDelete'=>array(),
|
||||
'afterPageCreate'=>array(),
|
||||
'afterPageModify'=>array(),
|
||||
'afterPageDelete'=>array(),
|
||||
|
||||
'loginHead'=>array(),
|
||||
'loginBodyBegin'=>array(),
|
||||
'loginBodyEnd'=>array(),
|
@ -4,6 +4,8 @@
|
||||
// Variables
|
||||
// ============================================================================
|
||||
|
||||
// Array with all posts specified by a filter.
|
||||
// Filter by page number, by tag, etc.
|
||||
$posts = array();
|
||||
|
||||
// ============================================================================
|
||||
@ -42,7 +44,7 @@ function buildPost($key)
|
||||
}
|
||||
|
||||
// Post database, content from DATABASE JSON.
|
||||
$db = $dbPosts->getDb($key);
|
||||
$db = $dbPosts->getPostDB($key);
|
||||
if( !$db ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from database with key: '.$key);
|
||||
return false;
|
||||
@ -75,14 +77,9 @@ function buildPost($key)
|
||||
$postDateFormated = $Post->dateRaw( $Site->dateFormat() );
|
||||
$Post->setField('date', $postDateFormated, true);
|
||||
|
||||
// Parse username for the post.
|
||||
if( $dbUsers->userExists( $Post->username() ) )
|
||||
{
|
||||
$user = $dbUsers->getDb( $Post->username() );
|
||||
|
||||
$Post->setField('authorFirstName', $user['firstName'], false);
|
||||
$Post->setField('authorLastName', $user['lastName'], false);
|
||||
}
|
||||
// User object
|
||||
$username = $Post->username();
|
||||
$Post->setField('user', $dbUsers->getUser($username));
|
||||
|
||||
return $Post;
|
||||
}
|
||||
@ -91,9 +88,10 @@ function buildPostsForPage($pageNumber=0, $amount=POSTS_PER_PAGE_ADMIN, $removeU
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbTags;
|
||||
global $posts;
|
||||
global $Url;
|
||||
|
||||
$posts = array();
|
||||
|
||||
if($tagKey) {
|
||||
// Get the keys list from tags database, this database is optimized for this case.
|
||||
$list = $dbTags->getList($pageNumber, $amount, $tagKey);
|
||||
@ -116,6 +114,8 @@ function buildPostsForPage($pageNumber=0, $amount=POSTS_PER_PAGE_ADMIN, $removeU
|
||||
array_push($posts, $Post);
|
||||
}
|
||||
}
|
||||
|
||||
return $posts;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@ -140,11 +140,13 @@ if( ($Url->whereAmI()==='post') && ($Url->notFound()===false) )
|
||||
{
|
||||
$Post = buildPost( $Url->slug() );
|
||||
|
||||
// The post doesn't exist.
|
||||
if($Post===false)
|
||||
{
|
||||
$Url->setNotFound(true);
|
||||
unset($Post);
|
||||
}
|
||||
// The post is not published yet.
|
||||
elseif( !$Post->published() )
|
||||
{
|
||||
$Url->setNotFound(true);
|
||||
@ -159,17 +161,17 @@ if( ($Url->whereAmI()==='post') && ($Url->notFound()===false) )
|
||||
// Build posts by specific tag.
|
||||
elseif( ($Url->whereAmI()==='tag') && ($Url->notFound()===false) )
|
||||
{
|
||||
buildPostsForPage($Url->pageNumber(), $Site->postsPerPage(), true, $Url->slug());
|
||||
$posts = buildPostsForPage($Url->pageNumber(), $Site->postsPerPage(), true, $Url->slug());
|
||||
}
|
||||
// Build posts for homepage or admin area.
|
||||
else
|
||||
{
|
||||
// Posts for admin area.
|
||||
if($Url->whereAmI()==='admin') {
|
||||
buildPostsForPage($Url->pageNumber(), POSTS_PER_PAGE_ADMIN, false);
|
||||
$posts = buildPostsForPage($Url->pageNumber(), POSTS_PER_PAGE_ADMIN, false);
|
||||
}
|
||||
// Posts for homepage
|
||||
else {
|
||||
buildPostsForPage($Url->pageNumber(), $Site->postsPerPage(), true);
|
||||
// Posts for home and blog filter.
|
||||
elseif( ( ($Url->whereAmI()==='home') || ($Url->whereAmI()==='blog') ) && ($Url->notFound()===false) ) {
|
||||
$posts = buildPostsForPage($Url->pageNumber(), $Site->postsPerPage(), true);
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ function sortPages($a, $b)
|
||||
return ($a->position() < $b->position()) ? -1 : 1;
|
||||
}
|
||||
|
||||
function build_page($key)
|
||||
function buildPage($key)
|
||||
{
|
||||
global $dbPages;
|
||||
global $dbUsers;
|
||||
@ -38,7 +38,7 @@ function build_page($key)
|
||||
}
|
||||
|
||||
// Page database, content from DATABASE JSON.
|
||||
$db = $dbPages->getDb($key);
|
||||
$db = $dbPages->getPageDB($key);
|
||||
if( !$db ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the page from database with key: '.$key);
|
||||
return false;
|
||||
@ -66,31 +66,28 @@ function build_page($key)
|
||||
$pageDateFormated = $Page->dateRaw( $Site->dateFormat() );
|
||||
$Page->setField('date', $pageDateFormated, true);
|
||||
|
||||
// Parse username for the page.
|
||||
if( $dbUsers->userExists( $Page->username() ) )
|
||||
{
|
||||
$user = $dbUsers->getDb( $Page->username() );
|
||||
|
||||
$Page->setField('authorFirstName', $user['firstName'], false);
|
||||
$Page->setField('authorLastName', $user['lastName'], false);
|
||||
}
|
||||
// User object
|
||||
$username = $Page->username();
|
||||
$Page->setField('user', $dbUsers->getUser($username));
|
||||
|
||||
return $Page;
|
||||
}
|
||||
|
||||
function build_all_pages()
|
||||
function buildAllPages()
|
||||
{
|
||||
global $pages;
|
||||
global $pagesParents;
|
||||
global $dbPages;
|
||||
|
||||
$list = $dbPages->getAll();
|
||||
$list = $dbPages->getDB();
|
||||
|
||||
// Clean pages array.
|
||||
$pages = array();
|
||||
|
||||
unset($list['error']);
|
||||
|
||||
foreach($list as $key=>$db)
|
||||
{
|
||||
$Page = build_page($key);
|
||||
$Page = buildPage($key);
|
||||
|
||||
if($Page!==false)
|
||||
{
|
||||
@ -135,6 +132,8 @@ function build_all_pages()
|
||||
}
|
||||
|
||||
$pagesParents = array(NO_PARENT_CHAR=>$parents) + $tmpPageWithParent;
|
||||
|
||||
return $pages;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@ -146,16 +145,18 @@ if( $Site->cliMode() ) {
|
||||
$dbPages->regenerateCli();
|
||||
}
|
||||
|
||||
// Filter by page, then build it
|
||||
// Build specific page.
|
||||
if( ($Url->whereAmI()==='page') && ($Url->notFound()===false) )
|
||||
{
|
||||
$Page = build_page( $Url->slug() );
|
||||
$Page = buildPage( $Url->slug() );
|
||||
|
||||
// The page doesn't exist.
|
||||
if($Page===false)
|
||||
{
|
||||
$Url->setNotFound(true);
|
||||
unset($Page);
|
||||
}
|
||||
// The page is not published yet.
|
||||
elseif( !$Page->published() )
|
||||
{
|
||||
$Url->setNotFound(true);
|
||||
@ -163,14 +164,15 @@ if( ($Url->whereAmI()==='page') && ($Url->notFound()===false) )
|
||||
}
|
||||
}
|
||||
|
||||
// Default homepage
|
||||
if($Url->notFound()===false)
|
||||
// Homepage
|
||||
if( ($Url->whereAmI()==='home') && ($Url->notFound()===false) )
|
||||
{
|
||||
if( Text::isNotEmpty($Site->homepage()) && ($Url->whereAmI()==='home') )
|
||||
// The user defined as homepage a particular page.
|
||||
if( Text::isNotEmpty( $Site->homepage() ) )
|
||||
{
|
||||
$Url->setWhereAmI('page');
|
||||
|
||||
$Page = build_page( $Site->homepage() );
|
||||
$Page = buildPage( $Site->homepage() );
|
||||
|
||||
if($Page===false) {
|
||||
$Url->setWhereAmI('home');
|
||||
@ -185,4 +187,4 @@ if($Url->notFound())
|
||||
}
|
||||
|
||||
// Build all pages
|
||||
build_all_pages();
|
||||
$pages = buildAllPages();
|
@ -1,9 +1,14 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// Boot rules
|
||||
// Load plugins rules
|
||||
include(PATH_RULES.'60.plugins.php');
|
||||
|
||||
// Plugins before rules loaded, except plugins rules
|
||||
Theme::plugins('beforeRulesLoad');
|
||||
|
||||
// Load rules
|
||||
include(PATH_RULES.'70.posts.php');
|
||||
include(PATH_RULES.'70.pages.php');
|
||||
include(PATH_RULES.'80.plugins.php');
|
||||
include(PATH_RULES.'71.pages.php');
|
||||
include(PATH_RULES.'99.header.php');
|
||||
include(PATH_RULES.'99.paginator.php');
|
||||
include(PATH_RULES.'99.themes.php');
|
||||
|
@ -12,7 +12,8 @@ class dbPages extends dbJSON
|
||||
'tags'=> array('inFile'=>false, 'value'=>array()),
|
||||
'status'=> array('inFile'=>false, 'value'=>'draft'),
|
||||
'date'=> array('inFile'=>false, 'value'=>''),
|
||||
'position'=> array('inFile'=>false, 'value'=>0)
|
||||
'position'=> array('inFile'=>false, 'value'=>0),
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>''),
|
||||
);
|
||||
|
||||
function __construct()
|
||||
@ -94,7 +95,7 @@ class dbPages extends dbJSON
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return $key;
|
||||
}
|
||||
|
||||
public function edit($args)
|
||||
@ -182,7 +183,7 @@ class dbPages extends dbJSON
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return $newKey;
|
||||
}
|
||||
|
||||
public function delete($key)
|
||||
@ -214,7 +215,7 @@ class dbPages extends dbJSON
|
||||
}
|
||||
|
||||
// Return an array with the database for a page, FALSE otherwise.
|
||||
public function getDb($key)
|
||||
public function getPageDB($key)
|
||||
{
|
||||
if($this->pageExists($key)) {
|
||||
return $this->db[$key];
|
||||
@ -287,8 +288,8 @@ class dbPages extends dbJSON
|
||||
return $newKey;
|
||||
}
|
||||
|
||||
// Return an array with all databases.
|
||||
public function getAll()
|
||||
// Returns the database
|
||||
public function getDB()
|
||||
{
|
||||
return $this->db;
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ class dbPosts extends dbJSON
|
||||
'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled
|
||||
'tags'=> array('inFile'=>false, 'value'=>array()),
|
||||
'allowComments'=> array('inFile'=>false, 'value'=>false),
|
||||
'date'=> array('inFile'=>false, 'value'=>'')
|
||||
'date'=> array('inFile'=>false, 'value'=>''),
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>''),
|
||||
);
|
||||
|
||||
private $numberPosts = array(
|
||||
@ -34,8 +35,14 @@ class dbPosts extends dbJSON
|
||||
return $this->numberPosts['published'];
|
||||
}
|
||||
|
||||
// Returns the database
|
||||
public function getDB()
|
||||
{
|
||||
return $this->db;
|
||||
}
|
||||
|
||||
// Return an array with the post's database, FALSE otherwise.
|
||||
public function getDb($key)
|
||||
public function getPostDB($key)
|
||||
{
|
||||
if($this->postExists($key)) {
|
||||
return $this->db[$key];
|
||||
@ -44,7 +51,7 @@ class dbPosts extends dbJSON
|
||||
return false;
|
||||
}
|
||||
|
||||
public function setDb($key, $field, $value)
|
||||
public function setPostDb($key, $field, $value)
|
||||
{
|
||||
if($this->postExists($key)) {
|
||||
$this->db[$key][$field] = $value;
|
||||
@ -175,7 +182,7 @@ class dbPosts extends dbJSON
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return $key;
|
||||
}
|
||||
|
||||
public function edit($args)
|
||||
|
@ -17,6 +17,7 @@ class dbSite extends dbJSON
|
||||
'uriPage'=> array('inFile'=>false, 'value'=>'/'),
|
||||
'uriPost'=> array('inFile'=>false, 'value'=>'/post/'),
|
||||
'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'),
|
||||
'uriBlog'=> array('inFile'=>false, 'value'=>'/blog/'),
|
||||
'url'=> array('inFile'=>false, 'value'=>''),
|
||||
'cliMode'=> array('inFile'=>false, 'value'=>true),
|
||||
'emailFrom'=> array('inFile'=>false, 'value'=>''),
|
||||
@ -67,6 +68,7 @@ class dbSite extends dbJSON
|
||||
$filters['post'] = $this->getField('uriPost');
|
||||
$filters['page'] = $this->getField('uriPage');
|
||||
$filters['tag'] = $this->getField('uriTag');
|
||||
$filters['blog'] = $this->getField('uriBlog');
|
||||
|
||||
if(empty($filter)) {
|
||||
return $filters;
|
||||
@ -93,6 +95,12 @@ class dbSite extends dbJSON
|
||||
return $this->url().ltrim($filter, '/');
|
||||
}
|
||||
|
||||
public function urlBlog()
|
||||
{
|
||||
$filter = $this->getField('uriBlog');
|
||||
return $this->url().ltrim($filter, '/');
|
||||
}
|
||||
|
||||
// Returns the site title.
|
||||
public function title()
|
||||
{
|
||||
|
@ -18,6 +18,16 @@ class dbTags extends dbJSON
|
||||
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.
|
||||
public function getList($pageNumber, $postPerPage, $tagKey)
|
||||
{
|
||||
|
@ -24,6 +24,24 @@ class dbUsers extends dbJSON
|
||||
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()
|
||||
{
|
||||
return $this->db;
|
||||
|
@ -19,7 +19,7 @@ class Image {
|
||||
$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));
|
||||
|
||||
@ -28,42 +28,46 @@ class Image {
|
||||
|
||||
$path_complete = $filename.'.'.$extension;
|
||||
|
||||
if($forceJPG) {
|
||||
imagejpeg($this->imageResized, $filename.'.jpg', $imageQuality);
|
||||
if($forcePNG) {
|
||||
$extension = 'png';
|
||||
}
|
||||
else
|
||||
elseif($forceJPG) {
|
||||
$extension = 'jpg';
|
||||
}
|
||||
|
||||
switch($extension)
|
||||
{
|
||||
switch($extension)
|
||||
{
|
||||
case 'jpg':
|
||||
case 'jpeg':
|
||||
if (imagetypes() & IMG_JPG) {
|
||||
imagejpeg($this->imageResized, $path_complete, $imageQuality);
|
||||
}
|
||||
break;
|
||||
case 'jpg':
|
||||
case 'jpeg':
|
||||
// Checking for JPG support
|
||||
if (imagetypes() & IMG_JPG) {
|
||||
imagejpeg($this->imageResized, $path_complete, $imageQuality);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'gif':
|
||||
if (imagetypes() & IMG_GIF) {
|
||||
imagegif($this->imageResized, $path_complete);
|
||||
}
|
||||
break;
|
||||
case 'gif':
|
||||
// Checking for GIF support
|
||||
if (imagetypes() & IMG_GIF) {
|
||||
imagegif($this->imageResized, $path_complete);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'png':
|
||||
// *** Scale quality from 0-100 to 0-9
|
||||
$scaleQuality = round(($imageQuality/100) * 9);
|
||||
case 'png':
|
||||
// *** Scale quality from 0-100 to 0-9
|
||||
$scaleQuality = round(($imageQuality/100) * 9);
|
||||
|
||||
// *** Invert quality setting as 0 is best, not 9
|
||||
$invertScaleQuality = 9 - $scaleQuality;
|
||||
// *** Invert quality setting as 0 is best, not 9
|
||||
$invertScaleQuality = 9 - $scaleQuality;
|
||||
|
||||
if (imagetypes() & IMG_PNG) {
|
||||
imagepng($this->imageResized, $path_complete, $invertScaleQuality);
|
||||
}
|
||||
break;
|
||||
// Checking for PNG support
|
||||
if (imagetypes() & IMG_PNG) {
|
||||
imagepng($this->imageResized, $path_complete, $invertScaleQuality);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// *** No extension - No save.
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Fail extension detection
|
||||
break;
|
||||
}
|
||||
|
||||
imagedestroy($this->imageResized);
|
||||
|
@ -131,103 +131,6 @@ class Theme {
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
// OLD
|
||||
|
||||
public static function url($relative = true)
|
||||
{
|
||||
if($relative)
|
||||
return HTML_PATH_ROOT;
|
||||
else
|
||||
return BLOG_URL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static function name()
|
||||
{
|
||||
global $settings;
|
||||
|
||||
return $settings['name'];
|
||||
}
|
||||
|
||||
public static function slogan()
|
||||
{
|
||||
global $settings;
|
||||
|
||||
return $settings['slogan'];
|
||||
}
|
||||
|
||||
public static function footer()
|
||||
{
|
||||
global $settings;
|
||||
|
||||
return $settings['footer'];
|
||||
}
|
||||
|
||||
public static function language()
|
||||
{
|
||||
global $settings;
|
||||
|
||||
$lang = explode("_",$settings['locale']);
|
||||
|
||||
return $lang[0];
|
||||
}
|
||||
|
||||
public static function locale()
|
||||
{
|
||||
global $settings;
|
||||
|
||||
return $settings['locale'];
|
||||
}
|
||||
|
||||
public static function meta_tags()
|
||||
{
|
||||
global $layout;
|
||||
global $seo;
|
||||
|
||||
// The validator W3C doesn't support???
|
||||
//$meta = '<meta charset="UTF-8">'.PHP_EOL;
|
||||
|
||||
$meta = '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'.PHP_EOL;
|
||||
|
||||
if(!empty($layout['title']))
|
||||
$meta .= '<title>'.$layout['title'].'</title>'.PHP_EOL;
|
||||
|
||||
if(!empty($layout['description']))
|
||||
$meta .= '<meta name="description" content="'.$layout['description'].'">'.PHP_EOL;
|
||||
|
||||
if(!empty($layout['generator']))
|
||||
$meta .= '<meta name="generator" content="'.$layout['generator'].'">'.PHP_EOL;
|
||||
|
||||
if(!empty($layout['keywords']))
|
||||
$meta .= '<meta name="keywords" content="'.$layout['keywords'].'">'.PHP_EOL;
|
||||
|
||||
if(!empty($layout['author']))
|
||||
{
|
||||
if(filter_var($layout['author'], FILTER_VALIDATE_URL))
|
||||
$meta .= '<link rel="author" href="'.$layout['author'].'">'.PHP_EOL;
|
||||
else
|
||||
$meta .= '<meta name="author" content="'.$layout['author'].'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
if(!empty($layout['canonical']))
|
||||
$meta .= '<link rel="canonical" href="'.$layout['canonical'].'">'.PHP_EOL;
|
||||
|
||||
if(!empty($layout['robots']))
|
||||
$meta .= '<meta name="robots" content="'.$layout['robots'].'">'.PHP_EOL;
|
||||
|
||||
if(!empty($seo['google_code']))
|
||||
$meta .= '<meta name="google-site-verification" content="'.$seo['google_code'].'">'.PHP_EOL;
|
||||
|
||||
if(!empty($seo['bing_code']))
|
||||
$meta .= '<meta name="msvalidate.01" content="'.$seo['bing_code'].'">'.PHP_EOL;
|
||||
|
||||
$meta .= '<link rel="alternate" type="application/atom+xml" title="ATOM Feed" href="'.$layout['feed'].'">'.PHP_EOL;
|
||||
|
||||
return $meta;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
@ -111,6 +111,21 @@ class Page extends fileContent
|
||||
return $this->getField('key');
|
||||
}
|
||||
|
||||
public function coverImage($absolute=true)
|
||||
{
|
||||
$fileName = $this->getField('coverImage');
|
||||
|
||||
if(empty($fileName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($absolute) {
|
||||
return HTML_PATH_UPLOADS.$fileName;
|
||||
}
|
||||
|
||||
return $fileName;
|
||||
}
|
||||
|
||||
// Returns TRUE if the page is published, FALSE otherwise.
|
||||
public function published()
|
||||
{
|
||||
@ -187,16 +202,32 @@ class Page extends fileContent
|
||||
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()
|
||||
{
|
||||
return $this->getField('username');
|
||||
}
|
||||
|
||||
// DEPRECATED
|
||||
public function authorFirstName()
|
||||
{
|
||||
return $this->getField('authorFirstName');
|
||||
}
|
||||
|
||||
// DEPRECATED
|
||||
public function authorLastName()
|
||||
{
|
||||
return $this->getField('authorLastName');
|
||||
|
@ -78,9 +78,19 @@ class Post extends fileContent
|
||||
return ($this->getField('status')=='draft');
|
||||
}
|
||||
|
||||
public function username()
|
||||
public function coverImage($absolute=true)
|
||||
{
|
||||
return $this->getField('username');
|
||||
$fileName = $this->getField('coverImage');
|
||||
|
||||
if(empty($fileName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($absolute) {
|
||||
return HTML_PATH_UPLOADS.$fileName;
|
||||
}
|
||||
|
||||
return $fileName;
|
||||
}
|
||||
|
||||
public function profilePicture()
|
||||
@ -88,11 +98,32 @@ class Post extends fileContent
|
||||
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()
|
||||
{
|
||||
return $this->getField('authorFirstName');
|
||||
}
|
||||
|
||||
// DEPRECATED
|
||||
public function authorLastName()
|
||||
{
|
||||
return $this->getField('authorLastName');
|
||||
@ -104,7 +135,7 @@ class Post extends fileContent
|
||||
}
|
||||
|
||||
// Returns the post date according to locale settings and format settings.
|
||||
public function date($format=false)
|
||||
public function date()
|
||||
{
|
||||
return $this->getField('date');
|
||||
}
|
||||
|
@ -67,6 +67,12 @@ class Url
|
||||
break;
|
||||
}
|
||||
|
||||
if($filterURI===$filters['blog'])
|
||||
{
|
||||
$this->whereAmI = 'blog';
|
||||
break;
|
||||
}
|
||||
|
||||
if($filterURI===$adminFilter['admin'])
|
||||
{
|
||||
$this->whereAmI = 'admin';
|
||||
|
95
kernel/user.class.php
Normal file
95
kernel/user.class.php
Normal file
@ -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": "Дата на побликуване",
|
||||
"modified-date": "Промяна на дата",
|
||||
"empty-title": "Без заглавие",
|
||||
"plugins": "Плъгини",
|
||||
"plugins": "Компоненти",
|
||||
"install-plugin": "Добави",
|
||||
"uninstall-plugin": "Премахни",
|
||||
"new-password": "Нова парола",
|
||||
@ -164,7 +164,7 @@
|
||||
"scheduled": "Планирано",
|
||||
"publish": "Публикувай",
|
||||
"please-check-your-theme-configuration": "Моля, проверете конфигурацията на вашата тема.",
|
||||
"plugin-label": "Заглавие плъгин",
|
||||
"plugin-label": "Заглавие на компонент",
|
||||
"enabled": "Разреши",
|
||||
"disabled": "Забрани",
|
||||
"cli-mode": "Режим CLI",
|
||||
@ -218,6 +218,8 @@
|
||||
"site-information": "Информация за сайта",
|
||||
"date-and-time-formats": "Формат дата и час",
|
||||
"activate": "Активиране",
|
||||
"deactivate": "Деактивиране"
|
||||
"deactivate": "Деактивиране",
|
||||
|
||||
"cover-image": "Обложка"
|
||||
}
|
||||
|
||||
|
220
languages/de_CH.json
Normal file
220
languages/de_CH.json
Normal file
@ -0,0 +1,220 @@
|
||||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Deutsch (Schweiz)",
|
||||
"english-name": "German",
|
||||
"last-update": "2016-01-05",
|
||||
"author": "Clickwork",
|
||||
"email": "egoetschel@clickwork.ch",
|
||||
"website": "https://www.clickwork.ch"
|
||||
},
|
||||
|
||||
"username": "Benutzername",
|
||||
"password": "Passwort",
|
||||
"confirm-password": "Passwort wiederholen",
|
||||
"editor": "Editor",
|
||||
"dashboard": "Dashboard",
|
||||
"role": "Rolle",
|
||||
"post": "Beitrag",
|
||||
"posts": "Beiträge",
|
||||
"users": "Benutzer",
|
||||
"administrator": "Administrator",
|
||||
"add": "Hinzufügen",
|
||||
"cancel": "Abbrechen",
|
||||
"content": "Inhalt",
|
||||
"title": "Titel",
|
||||
"no-parent": "Keine übergeordnete Seite",
|
||||
"edit-page": "Seite bearbeiten",
|
||||
"edit-post": "Beitrag bearbeiten",
|
||||
"add-a-new-user": "Neuer Benutzer",
|
||||
"parent": "Übergeordnete Seite",
|
||||
"friendly-url": "Pretty URL",
|
||||
"description": "Beschreibung",
|
||||
"posted-by": "Veröffentlicht von",
|
||||
"tags": "Schlagwörter",
|
||||
"position": "Position",
|
||||
"save": "Speichern",
|
||||
"draft": "Entwurf",
|
||||
"delete": "Löschen",
|
||||
"registered": "Hinzugefügt",
|
||||
"Notifications": "Benachrichtigungen",
|
||||
"profile": "Profil",
|
||||
"email": "E-Mail",
|
||||
"settings": "Einstellungen",
|
||||
"general": "Allgemein",
|
||||
"advanced": "Erweitert",
|
||||
"regional": "Lokalisierung",
|
||||
"about": "Über",
|
||||
"login": "Anmelden",
|
||||
"logout": "Abmelden",
|
||||
"manage": "Verwaltung",
|
||||
"themes": "Themes",
|
||||
"prev-page": "Vorhergehende Seite",
|
||||
"next-page": "Nächste Seite",
|
||||
"configure-plugin": "Plugin konfigurieren",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Bestätige das Löschen, dieser Vorgang kann nicht rückgängig gemacht werden.",
|
||||
"site-title": "Titel der Webseite",
|
||||
"site-slogan": "Untertitel",
|
||||
"site-description": "Informationen zur Website",
|
||||
"footer-text": "Footer-Text",
|
||||
"posts-per-page": "Beiträge pro Seite",
|
||||
"site-url": "URL der Website",
|
||||
"writting-settings": "Beitrags- und Seiteneinstellungen",
|
||||
"url-filters": "URL-Erweiterungen",
|
||||
"page": "Seite",
|
||||
"pages": "Seiten",
|
||||
"home": "Hauptseite",
|
||||
"welcome-back": "Willkommen",
|
||||
"language": "Sprache",
|
||||
"website": "Zur Website",
|
||||
"timezone": "Zeitzone",
|
||||
"locale": "Lokalisierung",
|
||||
"new-post": "Neuer Beitrag",
|
||||
"html-and-markdown-code-supported": "HTML und Markdown werden unterstützt",
|
||||
"new-page": "Neue Seite",
|
||||
"manage-posts": "Beiträge verwalten",
|
||||
"published-date": "Veröffentlicht",
|
||||
"modified-date": "Letzte Änderung",
|
||||
"empty-title": "Kein Titel",
|
||||
"plugins": "Plugins",
|
||||
"install-plugin": "Plugin aktivieren",
|
||||
"uninstall-plugin": "Plugin deaktivieren",
|
||||
"new-password": "Neues Passwort",
|
||||
"edit-user": "Benutzer bearbeiten",
|
||||
"publish-now": "Veröffentlichen",
|
||||
"first-name": "Vorname",
|
||||
"last-name": "Nachname",
|
||||
"bludit-version": "Bludit Version",
|
||||
"powered-by": "Diese Website wurde eingerichtet mit",
|
||||
"recent-posts": "Neueste Beiträge",
|
||||
"manage-pages": "Seiten verwalten",
|
||||
"advanced-options": "Erweiterte Einstellungen",
|
||||
"user-deleted": "Der Benutzer wurde gelöscht.",
|
||||
"page-added-successfully": "Die Seite wurde veröffentlicht.",
|
||||
"post-added-successfully": "Der Beitrag wurde veröffentlicht.",
|
||||
"the-post-has-been-deleted-successfully": "Der Beitrag wurde gelöscht.",
|
||||
"the-page-has-been-deleted-successfully": "Die Seite wurde gelöscht.",
|
||||
"username-or-password-incorrect": "Der Benutzername oder das Passwort stimmt nicht.",
|
||||
"database-regenerated": "Die Datenbank wurde neu aufgebaut.",
|
||||
"the-changes-have-been-saved": "Die Änderungen wurden gespeichert.",
|
||||
"enable-more-features-at": "Zusätzlich Felder können aktiviert werden unter",
|
||||
"username-already-exists": "Diesen Benutzernamen gibt es bereits.",
|
||||
"username-field-is-empty": "Es muss ein Benutzername eingegeben werden.",
|
||||
"the-password-and-confirmation-password-do-not-match":"Die eingegebenen Passwörter stimmen nicht überein.",
|
||||
"user-has-been-added-successfully": "Der Benutzer wurde hinzugefügt.",
|
||||
"you-do-not-have-sufficient-permissions": "Du bist nicht berechtigt, die Seite aufzurufen.",
|
||||
"settings-advanced-writting-settings": "Einstellungen > Erweitert > Beitrags- und Seiteneinstellungen",
|
||||
"new-posts-and-pages-synchronized": "Neue Beiträge und Seiten wurden synchronisiert.",
|
||||
"you-can-choose-the-users-privilege": "Rechte des Benutzers. Ein Editor kann nur Seiten anlegen und Beiträge schreiben.",
|
||||
"email-will-not-be-publicly-displayed": "Die E-Mail wird nicht öffentlich gezeigt. Sie wird für die Wiederherstellung des Passworts und Benachrichtigungen verwendet.",
|
||||
"use-this-field-to-name-your-site": "Name der Website, wie er auf jeder Seite angezeigt wird.",
|
||||
"use-this-field-to-add-a-catchy-phrase": "Untertitel oder Slogan der Website.",
|
||||
"you-can-add-a-site-description-to-provide": "Kurze Beschreibung der Website für Suchmaschinen.",
|
||||
"you-can-add-a-small-text-on-the-bottom": "Text im Fussbereich jeder Seite. Beispielsweise: Copyright-Hinweis, Eigentümer der Website usw.",
|
||||
"number-of-posts-to-show-per-page": "Anzahl der Beiträge, die auf einer Seite gezeigt werden.",
|
||||
"the-url-of-your-site": "URL der Website.",
|
||||
"add-or-edit-description-tags-or": "Beschreibungen, Schlagwörter und Pretty URL hinzufügen oder ändern.",
|
||||
"select-your-sites-language": "Sprache der Website.",
|
||||
"select-a-timezone-for-a-correct": "Zeitzone für die richtige Anzeige des Datums und der Zeit auf der Website.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Parameter mit Bezug auf die verwendete Sprache und das Land. Beispielsweise: de_DE, de_CH usw.",
|
||||
"you-can-modify-the-url-which-identifies":"Der URL kann selbst angepasst werden. Möglich sind bis zu 150 Zeichen.",
|
||||
"this-field-can-help-describe-the-content": "Kurze Inhaltsbeschreibung. Möglich sind bis zu 150 Zeichen.",
|
||||
"write-the-tags-separated-by-comma": "Schlagwörter getrennt durch Kommas. Beispielsweise: Schlagwort1, Schlagwort2, Schlagwort3",
|
||||
"delete-the-user-and-all-its-posts":"Benutzer und alle seine Beiträge löschen",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "Benutzer löschen und seine Beiträge dem Administrator zuordnen",
|
||||
"read-more": "Weiterlesen",
|
||||
"show-blog": "Blog zeigen",
|
||||
"default-home-page": "Hauptseite",
|
||||
"version": "Version",
|
||||
"there-are-no-drafts": "Es sind keine Entwürfe vorhanden.",
|
||||
"create-a-new-article-for-your-blog": "Einen neuen Beitrag schreiben.",
|
||||
"create-a-new-page-for-your-website": "Eine neue Seite anlegen.",
|
||||
"invite-a-friend-to-collaborate-on-your-website": "Einen neuen Benutzer hinzufügen.",
|
||||
"change-your-language-and-region-settings": "Sprache ändern und Lokalisierung einstellen.",
|
||||
"language-and-timezone": "Sprache und Zeitzone",
|
||||
"author": "Autor",
|
||||
"start-here": "Direktzugriff",
|
||||
"install-theme": "Theme aktivieren",
|
||||
"first-post": "Erster Beitrag",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "Gratulation, du hast **Bludit** erfolgreich installiert!",
|
||||
"whats-next": "Und so geht es weiter:",
|
||||
"manage-your-bludit-from-the-admin-panel": "Verwalte Bludit im [Administrationsbereich](./admin/).",
|
||||
"follow-bludit-on": "Folge Bludit bei",
|
||||
"visit-the-support-forum": "Besuche das [Forum](http://forum.bludit.com), um Hilfe zu erhalten.",
|
||||
"read-the-documentation-for-more-information": "Lies die [Dokumentation](http://docs.bludit.com) und das [Bludit-Tutorial](https://bludit-tutorial.ch) für weitere Informationen.",
|
||||
"share-with-your-friends-and-enjoy": "Erzähle deinen Freunden von Bludit und habe Spass daran.",
|
||||
"the-page-has-not-been-found": "Die Seite wurde nicht gefunden.",
|
||||
"error": "Fehler",
|
||||
"bludit-installer": "Bludit-Installer",
|
||||
"welcome-to-the-bludit-installer": "Willkommen beim Bludit-Installer!",
|
||||
"complete-the-form-choose-a-password-for-the-username-admin": "Bitte ein Passwort für den Benutzer \"admin\" wählen<br>und eine E-Mail-Adresse eingeben.",
|
||||
"password-visible-field": "Das Passwort wird in Klartext angezeigt!",
|
||||
"install": "Installieren",
|
||||
"choose-your-language": "Sprache wählen",
|
||||
"next": "Weiter",
|
||||
"the-password-field-is-empty": "Das Passwort-Feld ist leer.",
|
||||
"your-email-address-is-invalid": "Die E-Mail-Adresse scheint ungültig zu sein.",
|
||||
"proceed-anyway": "Trotzdem fortfahren...",
|
||||
"drafts": "Entwürfe",
|
||||
"ip-address-has-been-blocked": "Die IP-Adresse wurde blockiert.",
|
||||
"try-again-in-a-few-minutes": "Bitte versuche es in einigen Minuten noch einmal.",
|
||||
"date": "Datum und Zeit",
|
||||
"you-can-schedule-the-post-just-select-the-date-and-time": "Um den Beitrag zu einem späteren Zeitpunkt zu veröffentlichen, wähle ein Datum und die Zeit aus.",
|
||||
"scheduled": "Veröffentlichung geplant.",
|
||||
"publish": "Veröffentlichen",
|
||||
"please-check-your-theme-configuration": "Bitte die Einstellungen des Themes prüfen.",
|
||||
"plugin-label": "Titel auf der Website",
|
||||
"enabled": "Aktiviert",
|
||||
"disabled": "Deaktiviert",
|
||||
"cli-mode": "CLI-Modus",
|
||||
"command-line-mode": "Kommandozeilen-Modus",
|
||||
"enable-the-command-line-mode-if-you-add-edit": "Verwende den Kommandozeilen-Modus, wenn du Beiträge und Seiten im Dateisystem hinzufügen, ändern oder löschen möchtest.",
|
||||
"configure": "Konfiguration",
|
||||
"uninstall": "Deinstallieren",
|
||||
"change-password": "Neues Passwort",
|
||||
"to-schedule-the-post-just-select-the-date-and-time": "Um einen Beitrag zu einem bestimmten Zeitpunkt zu veröffentlichen, Datum und Zeit wählen.",
|
||||
"write-the-tags-separated-by-commas": "Schlagwörter durch Kommas getrennt.",
|
||||
"status": "Status",
|
||||
"published": "Veröffentlicht",
|
||||
"scheduled-posts": "Veröffentlichung planen",
|
||||
"statistics": "Statistiken",
|
||||
"name": "Name",
|
||||
"email-account-settings":"E-Mail-Adresse",
|
||||
"sender-email": "Absender",
|
||||
"emails-will-be-sent-from-this-address":"E-Mails werden mit dieser E-Mail-Adresse als Absender verschickt.",
|
||||
"bludit-login-access-code": "BLUDIT - Zugangscode",
|
||||
"check-your-inbox-for-your-login-access-code":"Der Zugangscode wurde dir geschickt.",
|
||||
"there-was-a-problem-sending-the-email":"Es besteht ein Pronlem mit dem Verschicken dieser E-Mail.",
|
||||
"back-to-login-form": "Zurück zum Login",
|
||||
"send-me-a-login-access-code": "Zugangscode zuschicken",
|
||||
"get-login-access-code": "Zugangscode schicken",
|
||||
"email-notification-login-access-code": "<p>Du hast einen Zugangscode für die Website {{WEBSITE_NAME}} angefordert.</p><p>Bitte klicke folgenden Link an oder kopiere ihn, um ihn in der Adresszeile des Browsers einzugeben:</p><p>{{LINK}}</p>",
|
||||
"there-are-no-scheduled-posts": "Es sind keine geplanten Beiträge vorhanden.",
|
||||
"show-password": "Passwort zeigen",
|
||||
"edit-or-remove-your=pages": "Seiten bearbeiten oder löschen.",
|
||||
"edit-or-remove-your-blogs-posts": "Beiträge bearbeiten oder löschen.",
|
||||
"general-settings": "Allgemein",
|
||||
"advanced-settings": "Erweitert",
|
||||
"manage-users": "Benutzerverwaltung",
|
||||
"view-and-edit-your-profile": "Profil anschauen und bearbeiten.",
|
||||
"password-must-be-at-least-6-characters-long": "Das Passwort muss mindestens 6 Zeichen lang sein",
|
||||
"images": "Bilder",
|
||||
"upload-image": "Bild hochladen",
|
||||
"drag-and-drop-or-click-here": "Drag and Drop oder klicke hier",
|
||||
"insert-image": "Bild einfügen",
|
||||
"supported-image-file-types": "Unterstützte Datei-Formate",
|
||||
"date-format": "Datumsformat",
|
||||
"time-format": "Zeitformat",
|
||||
"chat-with-developers-and-users-on-gitter":"Chatte mit Entwicklern und Benutzern bei [Gitter](https://gitter.im/dignajar/bludit)",
|
||||
"this-is-a-brief-description-of-yourself-our-your-site":"Dies ist eine kurze Beschreibung, wer du bist, oder deiner Website. Um diesen Text zu ändern, gehe im Admin-Panel zu den Einstellungen und konfiguriere unter \"Plugins\" das Plugin \"Über\".",
|
||||
"profile-picture": "Profil-Bild",
|
||||
"the-about-page-is-very-important": "Die Seite \"Über\" ist wichtig und wirkungsvoll beispielsweise für zukünfige Kunden und Partner. Für alle, die wissen möchten, wer hinter der Website steht, ist die \"Über\"-Seite die erste Informationsquelle.",
|
||||
"change-this-pages-content-on-the-admin-panel": "Der Inhalt dieser Seite kann im Admin-Panel unter \"Verwaltung\" > \"Seiten\" geändert werden.",
|
||||
"about-your-site-or-yourself": "Über dich oder deine Website",
|
||||
"welcome-to-bludit": "Willkommen bei Bludit",
|
||||
"site-information": "Angaben zur Website",
|
||||
"date-and-time-formats": "Datum und Zeit",
|
||||
"activate": "Aktivieren",
|
||||
"deactivate": "Deaktivieren",
|
||||
"cover-image": "Hauptbild"
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
{
|
||||
"native": "Deutsch (Deutschland)",
|
||||
"english-name": "German",
|
||||
"last-update": "2015-12-15",
|
||||
"last-update": "2016-01-05",
|
||||
"author": "Clickwork",
|
||||
"email": "egoetschel@clickwork.ch",
|
||||
"website": "https://www.clickwork.ch"
|
||||
@ -142,7 +142,7 @@
|
||||
"follow-bludit-on": "Folge Bludit bei",
|
||||
"visit-the-support-forum": "Besuche das [Forum](http://forum.bludit.com), um Hilfe zu erhalten.",
|
||||
"read-the-documentation-for-more-information": "Lies die [Dokumentation](http://docs.bludit.com) und das [Bludit-Tutorial](https://bludit-tutorial.ch) für weitere Informationen.",
|
||||
"share-with-your-friends-and-enjoy": "Erzähle deinen Freunden von Bludit und habe Spass daran.",
|
||||
"share-with-your-friends-and-enjoy": "Erzähle deinen Freunden von Bludit und habe Spaß daran.",
|
||||
"the-page-has-not-been-found": "Die Seite wurde nicht gefunden.",
|
||||
"error": "Fehler",
|
||||
"bludit-installer": "Bludit-Installer",
|
||||
@ -184,7 +184,7 @@
|
||||
"emails-will-be-sent-from-this-address":"E-Mails werden mit dieser E-Mail-Adresse als Absender verschickt.",
|
||||
"bludit-login-access-code": "BLUDIT - Zugangscode",
|
||||
"check-your-inbox-for-your-login-access-code":"Der Zugangscode wurde dir geschickt.",
|
||||
"there-was-a-problem-sending-the-email":"Es besteht ein Pronlem mit dem Verschicken dieser E-Mail.",
|
||||
"there-was-a-problem-sending-the-email":"Es besteht ein Problem mit dem Verschicken dieser E-Mail.",
|
||||
"back-to-login-form": "Zurück zum Login",
|
||||
"send-me-a-login-access-code": "Zugangscode zuschicken",
|
||||
"get-login-access-code": "Zugangscode schicken",
|
||||
@ -215,5 +215,6 @@
|
||||
"site-information": "Angaben zur Website",
|
||||
"date-and-time-formats": "Datum und Zeit",
|
||||
"activate": "Aktivieren",
|
||||
"deactivate": "Deaktivieren"
|
||||
"deactivate": "Deaktivieren",
|
||||
"cover-image": "Hauptbild"
|
||||
}
|
||||
|
@ -220,5 +220,9 @@
|
||||
"activate": "Activate",
|
||||
"deactivate": "Deactivate",
|
||||
|
||||
"cover-image": "Cover image"
|
||||
"cover-image": "Cover image",
|
||||
"blog": "Blog",
|
||||
"more-images": "More images",
|
||||
"double-click-on-the-image-to-add-it": "Double click on the image to add it.",
|
||||
"click-here-to-cancel": "Click here to cancel."
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
{
|
||||
"native": "Italiano (Italia)",
|
||||
"english-name": "Italian",
|
||||
"last-update": "2015-12-22",
|
||||
"last-update": "2015-12-30",
|
||||
"author": "Daniele La Pira",
|
||||
"email": "daniele.lapira@gmail.com",
|
||||
"website": "https://github.com/danielelapira"
|
||||
@ -98,7 +98,7 @@
|
||||
"database-regenerated": "Database rigenerato",
|
||||
"the-changes-have-been-saved": "Le modifiche sono state salvate",
|
||||
"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",
|
||||
"the-password-and-confirmation-password-do-not-match":"Le password non corrispondono",
|
||||
"user-has-been-added-successfully": "Utente aggiunto con successo",
|
||||
@ -109,7 +109,7 @@
|
||||
"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-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 tuo sito e una breve biografia.",
|
||||
"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.",
|
||||
"number-of-posts-to-show-per-page": "Numero di articoli da mostrare per pagina.",
|
||||
"the-url-of-your-site": "Indirizzo URL del tuo sito.",
|
||||
@ -183,7 +183,7 @@
|
||||
"email-account-settings":"Impostazioni dell'account email",
|
||||
"sender-email": "Mittente email",
|
||||
"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",
|
||||
"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",
|
||||
@ -193,7 +193,7 @@
|
||||
"there-are-no-scheduled-posts": "Non ci sono articoli programmati.",
|
||||
"show-password": "Mostra password",
|
||||
"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",
|
||||
"advanced-settings": "Impostazioni avanzate",
|
||||
"manage-users": "Gestisci utenti",
|
||||
@ -205,18 +205,20 @@
|
||||
"drag-and-drop-or-click-here": "Trascina e rilascia oppure clicca quì",
|
||||
"insert-image": "Inserisci immagine",
|
||||
"supported-image-file-types": "Formati file immagine supportati",
|
||||
"date-format": "Formato data",
|
||||
"date-format": "Formato data",
|
||||
"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)",
|
||||
"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",
|
||||
"the-about-page-is-very-important": "La pagina << about >> è molto utile. Fornisce ai tuoi visitatori importanti informazioni sul sito. Uno strumento efficace per acquisire 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.",
|
||||
"about-your-site-or-yourself": "A proposito di te e del tuo sito.",
|
||||
"welcome-to-bludit": "Benvenuti su Bludit"
|
||||
"welcome-to-bludit": "Benvenuti su Bludit",
|
||||
|
||||
"site-information": "Informazioni sul sito",
|
||||
"date-and-time-formats": "Formati data e ora",
|
||||
"activate": "Attiva",
|
||||
"deactivate": "Disattiva"
|
||||
"deactivate": "Disattiva",
|
||||
|
||||
"cover-image": "Immagine di copertina"
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
"email": "Email",
|
||||
"settings": "Instellingen",
|
||||
"general": "Algemeen",
|
||||
"Advanced": "Geadvanceerd",
|
||||
"advanced": "Geadvanceerd",
|
||||
"regional": "Taal/Tijd/Locatie",
|
||||
"about": "Over",
|
||||
"login": "Aanmelden",
|
||||
|
@ -218,5 +218,7 @@
|
||||
"site-information": "Информация о сайте",
|
||||
"date-and-time-formats": "Форматы даты и времени",
|
||||
"activate": "Активировать",
|
||||
"deactivate": "Деактивировать"
|
||||
"deactivate": "Деактивировать",
|
||||
|
||||
"cover-image": "Обложка"
|
||||
}
|
||||
|
@ -218,5 +218,7 @@
|
||||
"site-information": "Site bilgisi",
|
||||
"date-and-time-formats": "Tarih ve saat formatları",
|
||||
"activate": "Aktifleştir",
|
||||
"deactivate": "Deaktive et"
|
||||
"deactivate": "Deaktive et",
|
||||
|
||||
"cover-image": "Kapak resmi"
|
||||
}
|
||||
|
7
plugins/about/languages/de_CH.json
Normal file
7
plugins/about/languages/de_CH.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Über",
|
||||
"description": "Kurzer Text über die Website oder zu dir."
|
||||
}
|
||||
}
|
11
plugins/disqus/languages/de_CH.json
Normal file
11
plugins/disqus/languages/de_CH.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Disqus",
|
||||
"description": "Disqus ist eine Kommentar-Plattform für Websites. Um das Plugin verwenden zu können, muss ein Konto bei Disqus.com eingerichtet werden."
|
||||
},
|
||||
"disqus-shortname": "Disqus shortname",
|
||||
"enable-disqus-on-pages": "Disqus auf Seiten verwenden",
|
||||
"enable-disqus-on-posts": "Disqus bei Beiträgen verwenden",
|
||||
"enable-disqus-on-default-home-page": "Disqus auf der Hauptseite verwenden"
|
||||
}
|
11
plugins/googletools/languages/de_CH.json
Normal file
11
plugins/googletools/languages/de_CH.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Google-Tools",
|
||||
"description": "Dieses Plugin erzeugt den Meta-Tag, um deine Website mit den Google Webmasters Tools zu verbinden, und den Code für das JavaScript, der benötigt wird, um Google Analytics verwenden zu können."
|
||||
},
|
||||
"google-webmasters-tools": "Google Webmasters Tools",
|
||||
"google-analytics-tracking-id": "Google Analytics ID",
|
||||
"complete-this-field-with-the-google-site-verification": "Gib hier den Google Analytics-Tracking-Code ein, um zu bestätigen, dass die Website Dir gehört.",
|
||||
"complete-this-field-with-the-tracking-id": "Gib hier die Tracking ID ein."
|
||||
}
|
15
plugins/latest_posts/languages/en_US.json
Normal file
15
plugins/latest_posts/languages/en_US.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Latest posts",
|
||||
"description": "Shows the latest posts published.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.0",
|
||||
"releaseDate": "2016-01-08"
|
||||
},
|
||||
|
||||
"amount-of-posts": "Amount of posts",
|
||||
"show-home-link": "Show home link"
|
||||
}
|
59
plugins/latest_posts/plugin.php
Normal file
59
plugins/latest_posts/plugin.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
class pluginLatestPosts extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'label'=>'Latest posts',
|
||||
'amount'=>5
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Plugin label').'</label>';
|
||||
$html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$Language->get('Amount of posts').'</label>';
|
||||
$html .= '<input name="amount" id="jsamount" type="text" value="'.$this->getDbField('amount').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteSidebar()
|
||||
{
|
||||
// This function is declared in 70.posts.php
|
||||
$posts = buildPostsForPage(0, $this->getDbField('amount'), true, false);
|
||||
|
||||
$html = '<div class="plugin plugin-latest-posts">';
|
||||
|
||||
// Print the label if not empty.
|
||||
$label = $this->getDbField('label');
|
||||
if( !empty($label) ) {
|
||||
$html .= '<h2 class="plugin-title">'.$label.'</h2>';
|
||||
}
|
||||
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<ul>';
|
||||
|
||||
foreach($posts as $Post)
|
||||
{
|
||||
$html .= '<li>';
|
||||
$html .= '<a href="'.$Post->permalink().'">'.$Post->title().'</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
10
plugins/maintancemode/languages/de_CH.json
Normal file
10
plugins/maintancemode/languages/de_CH.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Wartungsmodus",
|
||||
"description": "Wartungsmodus für die Website mit Zugang zum Admin-Bereich."
|
||||
},
|
||||
|
||||
"enable-maintence-mode": "Aktivierung des Wartungsmodus",
|
||||
"message": "Auf der Website angezeigter Hinweis"
|
||||
}
|
7
plugins/opengraph/languages/de_CH.json
Normal file
7
plugins/opengraph/languages/de_CH.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Plugin zur Verwendung des Open Graph Protocols."
|
||||
}
|
||||
}
|
@ -2,17 +2,22 @@
|
||||
|
||||
class pluginOpenGraph extends Plugin {
|
||||
|
||||
// Returns the first image that is in the content
|
||||
private function getImage($content)
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadHTML('<meta http-equiv="content-type" content="text/html; charset=utf-8">'.$content);
|
||||
$finder = new DomXPath($dom);
|
||||
|
||||
/* DEPRECATED
|
||||
$images = $finder->query("//img[contains(@class, 'bludit-img-opengraph')]");
|
||||
|
||||
if($images->length==0) {
|
||||
$images = $finder->query("//img");
|
||||
}
|
||||
*/
|
||||
|
||||
$images = $finder->query("//img");
|
||||
|
||||
if($images->length>0)
|
||||
{
|
||||
@ -49,6 +54,7 @@ class pluginOpenGraph extends Plugin {
|
||||
$og['title'] = $Post->title().' | '.$og['title'];
|
||||
$og['description'] = $Post->description();
|
||||
$og['url'] = $Post->permalink(true);
|
||||
$og['image'] = $Post->coverImage(false);
|
||||
|
||||
$content = $Post->content();
|
||||
break;
|
||||
@ -58,12 +64,16 @@ class pluginOpenGraph extends Plugin {
|
||||
$og['title'] = $Page->title().' | '.$og['title'];
|
||||
$og['description'] = $Page->description();
|
||||
$og['url'] = $Page->permalink(true);
|
||||
$og['image'] = $Page->coverImage(false);
|
||||
|
||||
$content = $Page->content();
|
||||
break;
|
||||
|
||||
default:
|
||||
$content = isset($posts[0])?$posts[0]->content():'';
|
||||
if(isset($posts[0])) {
|
||||
$og['image'] = $posts[0]->coverImage(false);
|
||||
$content = $posts[0]->content();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -75,11 +85,21 @@ class pluginOpenGraph extends Plugin {
|
||||
$html .= '<meta property="og:url" content="'.$og['url'].'">'.PHP_EOL;
|
||||
$html .= '<meta property="og:siteName" content="'.$og['siteName'].'">'.PHP_EOL;
|
||||
|
||||
// Get the image from the content
|
||||
$src = $this->getImage( $content );
|
||||
if($src!==false) {
|
||||
$og['image'] = $Site->domain().$src;
|
||||
$html .= '<meta property="og:image" content="'.$og['image'].'">'.PHP_EOL;
|
||||
$domain = trim($Site->domain(),'/');
|
||||
$urlImage = $domain.HTML_PATH_UPLOADS;
|
||||
|
||||
// If the post o page doesn't have a coverImage try to get it from the content
|
||||
if($og['image']===false)
|
||||
{
|
||||
// Get the image from the content
|
||||
$src = $this->getImage( $content );
|
||||
if($src!==false) {
|
||||
$html .= '<meta property="og:image" content="'.$urlImage.$og['image'].'">'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$html .= '<meta property="og:image" content="'.$urlImage.$og['image'].'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
10
plugins/pages/languages/de_CH.json
Normal file
10
plugins/pages/languages/de_CH.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Menü aller Seiten",
|
||||
"description": "Anzeige eines Menüs aller Seiten in der Seitenleiste (bei Themes mit Seitenleiste)."
|
||||
},
|
||||
|
||||
"home": "Hauptseite",
|
||||
"show-home-link": "Hauptseite zeigen"
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Anzeige aller Seiten",
|
||||
"description": "Anzeige aller Seiten in der Seitenleiste (bei Themes mit Seitenleiste)."
|
||||
"name": "Menü aller Seiten",
|
||||
"description": "Anzeige eines Menüs aller Seiten in der Seitenleiste (bei Themes mit Seitenleiste)."
|
||||
},
|
||||
|
||||
"home": "Hauptseite",
|
||||
"show-home-link": "Hauptseite zeigen"
|
||||
}
|
||||
}
|
||||
|
9
plugins/simplemde/languages/de_CH.json
Normal file
9
plugins/simplemde/languages/de_CH.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "SimpleMDE",
|
||||
"description": "Ein einfacher und schöner JavaScript-Editor für die Verwendung von Markdown von @WesCossick. Von Diego Najar für Bludit angpasst."
|
||||
},
|
||||
"toolbar": "Werkzeugleiste",
|
||||
"tab-size": "Abstände der Tabstopps"
|
||||
}
|
12
plugins/sitemap/languages/en_US.json
Normal file
12
plugins/sitemap/languages/en_US.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Sitemap",
|
||||
"description": "This plugin generate a file sitemap.xml where you can list the web pages of your site to tell to search engines about the organization of your site content.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.0",
|
||||
"releaseDate": "2016-01-07"
|
||||
}
|
||||
}
|
151
plugins/sitemap/plugin.php
Normal file
151
plugins/sitemap/plugin.php
Normal file
@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
class pluginSitemap extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'label'=>'Tags'
|
||||
);
|
||||
}
|
||||
|
||||
private function createXML()
|
||||
{
|
||||
global $Site;
|
||||
global $dbPages;
|
||||
global $dbPosts;
|
||||
global $Url;
|
||||
|
||||
$doc = new DOMDocument('1.0', 'UTF-8');
|
||||
|
||||
// Friendly XML code
|
||||
$doc->formatOutput = true;
|
||||
|
||||
// Create urlset element
|
||||
$urlset = $doc->createElement('urlset');
|
||||
$attribute = $doc->createAttribute('xmlns');
|
||||
$attribute->value = 'http://www.sitemaps.org/schemas/sitemap/0.9';
|
||||
$urlset->appendChild($attribute);
|
||||
|
||||
// --- Base URL ---
|
||||
|
||||
// Create url, loc and lastmod elements
|
||||
$url = $doc->createElement('url');
|
||||
$loc = $doc->createElement('loc', $Site->url());
|
||||
$lastmod = $doc->createElement('lastmod', '');
|
||||
|
||||
// Append loc and lastmod -> url
|
||||
$url->appendChild($loc);
|
||||
$url->appendChild($lastmod);
|
||||
|
||||
// Append url -> urlset
|
||||
$urlset->appendChild($url);
|
||||
|
||||
// --- Pages and Posts ---
|
||||
$all = array();
|
||||
$url = trim($Site->url(),'/');
|
||||
|
||||
// --- Pages ---
|
||||
$filter = trim($Url->filters('page'),'/');
|
||||
$pages = $dbPages->getDB();
|
||||
unset($pages['error']);
|
||||
foreach($pages as $key=>$db)
|
||||
{
|
||||
$permalink = empty($filter) ? $url.'/'.$key : $url.'/'.$filter.'/'.$key;
|
||||
$date = Date::format($db['date'], DB_DATE_FORMAT, SITEMAP_DATE_FORMAT);
|
||||
array_push($all, array('permalink'=>$permalink, 'date'=>$date));
|
||||
}
|
||||
|
||||
// --- Posts ---
|
||||
$filter = rtrim($Url->filters('post'),'/');
|
||||
$posts = $dbPosts->getDB();
|
||||
foreach($posts as $key=>$db)
|
||||
{
|
||||
$permalink = empty($filter) ? $url.'/'.$key : $url.'/'.$filter.'/'.$key;
|
||||
$date = Date::format($db['date'], DB_DATE_FORMAT, SITEMAP_DATE_FORMAT);
|
||||
array_push($all, array('permalink'=>$permalink, 'date'=>$date));
|
||||
}
|
||||
|
||||
// Generate the XML for posts and pages
|
||||
foreach($all as $db)
|
||||
{
|
||||
// Create url, loc and lastmod elements
|
||||
$url = $doc->createElement('url');
|
||||
$loc = $doc->createElement('loc', $db['permalink']);
|
||||
$lastmod = $doc->createElement('lastmod', $db['date']);
|
||||
|
||||
// Append loc and lastmod -> url
|
||||
$url->appendChild($loc);
|
||||
$url->appendChild($lastmod);
|
||||
|
||||
// Append url -> urlset
|
||||
$urlset->appendChild($url);
|
||||
}
|
||||
|
||||
// Append urlset -> XML
|
||||
$doc->appendChild($urlset);
|
||||
|
||||
$doc->save(PATH_PLUGINS_DATABASES.$this->directoryName.DS.'sitemap.xml');
|
||||
}
|
||||
|
||||
public function install($position = 0)
|
||||
{
|
||||
parent::install($position);
|
||||
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPostCreate()
|
||||
{
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPageCreate()
|
||||
{
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPostModify()
|
||||
{
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPageModify()
|
||||
{
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPostDelete()
|
||||
{
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function afterPageDelete()
|
||||
{
|
||||
$this->createXML();
|
||||
}
|
||||
|
||||
public function beforeRulesLoad()
|
||||
{
|
||||
global $Url;
|
||||
|
||||
if( $Url->uri() === HTML_PATH_ROOT.'sitemap.xml' )
|
||||
{
|
||||
// Send XML header
|
||||
header('Content-type: text/xml');
|
||||
|
||||
// New DOM document
|
||||
$doc = new DOMDocument();
|
||||
|
||||
// Load XML
|
||||
$doc->load(PATH_PLUGINS_DATABASES.$this->directoryName.DS.'sitemap.xml');
|
||||
|
||||
// Print the XML
|
||||
echo $doc->saveXML();
|
||||
|
||||
// Stop Bludit running
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
7
plugins/tags/languages/de_CH.json
Normal file
7
plugins/tags/languages/de_CH.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Anzeige aller Schlagwörter",
|
||||
"description": "Anzeige aller Schlagwörter in der Seitenleiste (bei Themes mit Seitenleiste)."
|
||||
}
|
||||
}
|
7
plugins/tinymce/languages/de_CH.json
Normal file
7
plugins/tinymce/languages/de_CH.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "TinyMCE",
|
||||
"description": "TinyMCE ist ein einfacher HTML-Editor mit zahlreichen Plugins und Konfigurationsmöglichkeiten."
|
||||
}
|
||||
}
|
@ -2,6 +2,6 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "TinyMCE",
|
||||
"description": "TinyMCE ist ein einfacher HTML-Editor mit zahlreichen Plugins Und Anpassungsmöglichkeiten."
|
||||
"description": "TinyMCE ist ein einfacher HTML-Editor mit zahlreichen Plugins und Konfigurationsmöglichkeiten."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
<!-- Content -->
|
||||
<?php
|
||||
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') )
|
||||
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') )
|
||||
{
|
||||
include(PATH_THEME_PHP.'home.php');
|
||||
}
|
||||
@ -51,4 +51,4 @@
|
||||
<?php Theme::plugins('siteBodyEnd') ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
@ -1,4 +1,4 @@
|
||||
<h1 class="subhead"><?php echo $Language->get('Recent posts') ?></h1>
|
||||
<div class="subhead"><?php echo $Language->get('Recent posts') ?></div>
|
||||
|
||||
<?php foreach ($posts as $Post): ?>
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
<header class="post-header">
|
||||
|
||||
<!-- Post title -->
|
||||
<h2 class="post-title">
|
||||
<h1 class="post-title">
|
||||
<a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a>
|
||||
</h2>
|
||||
</h1>
|
||||
|
||||
<!-- Post date and author -->
|
||||
<div class="post-meta">
|
||||
@ -22,11 +22,11 @@
|
||||
<?php
|
||||
echo $Language->get('Posted By').' ';
|
||||
|
||||
if( Text::isNotEmpty($Post->authorFirstName()) || Text::isNotEmpty($Post->authorLastName()) ) {
|
||||
echo $Post->authorFirstName().' '.$Post->authorLastName();
|
||||
if( Text::isNotEmpty($Post->user('firstName')) || Text::isNotEmpty($Post->user('lastName')) ) {
|
||||
echo $Post->user('firstName').' '.$Post->user('lastName');
|
||||
}
|
||||
else {
|
||||
echo $Post->username();
|
||||
echo $Post->user('username');
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1 class="subhead"><?php echo $Language->get('Page') ?></h1>
|
||||
<div class="subhead"><?php echo $Language->get('Page') ?></div>
|
||||
|
||||
<section class="page">
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
<header class="page-header">
|
||||
|
||||
<!-- page title -->
|
||||
<h2 class="page-title">
|
||||
<h1 class="page-title">
|
||||
<a href="<?php echo $Page->permalink() ?>"><?php echo $Page->title() ?></a>
|
||||
</h2>
|
||||
</h1>
|
||||
|
||||
</header>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1 class="subhead"><?php echo $Language->get('Post') ?></h1>
|
||||
<div class="subhead"><?php echo $Language->get('Post') ?></div>
|
||||
|
||||
<section class="post">
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
<header class="post-header">
|
||||
|
||||
<!-- Post title -->
|
||||
<h2 class="post-title">
|
||||
<h1 class="post-title">
|
||||
<a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a>
|
||||
</h2>
|
||||
</h1>
|
||||
|
||||
<!-- Post date and author -->
|
||||
<div class="post-meta">
|
||||
|
Loading…
x
Reference in New Issue
Block a user