Merge remote-tracking branch 'upstream/master' into dignajar/master

Conflicts:
	languages/bg_BG.json
This commit is contained in:
Dipchikov 2015-11-13 08:59:29 +02:00
commit 522a3c9e52
50 changed files with 433 additions and 183 deletions

View File

@ -18,30 +18,44 @@ function addUser($args)
global $dbUsers;
global $Language;
// Check if the username already exist in db.
if( Text::isEmpty($args['username']) )
// Check empty username
if( Text::isEmpty($args['new_username']) )
{
Alert::set($Language->g('username-field-is-empty'));
Alert::set($Language->g('username-field-is-empty'), ALERT_STATUS_FAIL);
return false;
}
if( $dbUsers->userExists($args['username']) )
// Check already exist username
if( $dbUsers->userExists($args['new_username']) )
{
Alert::set($Language->g('username-already-exists'));
Alert::set($Language->g('username-already-exists'), ALERT_STATUS_FAIL);
return false;
}
// Validate password.
if( ($args['password'] != $args['confirm-password'] ) || Text::isEmpty($args['password']) )
// Password length
if( strlen($args['new_password']) < 6 )
{
Alert::set($Language->g('The password and confirmation password do not match'));
Alert::set($Language->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL);
return false;
}
// Add the user.
if( $dbUsers->add($args) )
// Check new password and confirm password are equal
if( $args['new_password'] != $args['confirm_password'] )
{
Alert::set($Language->g('user-has-been-added-successfully'));
Alert::set($Language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL);
return false;
}
// Filter form fields
$tmp = array();
$tmp['username'] = $args['new_username'];
$tmp['password'] = $args['new_password'];
$tmp['role'] = $args['role'];
// Add the user to the database
if( $dbUsers->add($tmp) )
{
Alert::set($Language->g('user-has-been-added-successfully'), ALERT_STATUS_OK);
return true;
}
else

View File

@ -17,26 +17,6 @@ function editUser($args)
}
}
function setPassword($username, $new_password, $confirm_password)
{
global $dbUsers;
global $Language;
if( ($new_password===$confirm_password) && !Text::isEmpty($new_password) )
{
if( $dbUsers->setPassword($username, $new_password) ) {
Alert::set($Language->g('The changes have been saved'));
}
else {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to change the user password.');
}
}
else {
Alert::set($Language->g('The password and confirmation password do not match'));
return false;
}
}
function deleteUser($args, $deleteContent=false)
{
global $dbUsers;
@ -92,10 +72,6 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
elseif(isset($_POST['delete-user-associate'])) {
deleteUser($_POST, false);
}
elseif( !empty($_POST['new-password']) && !empty($_POST['confirm-password']) ) {
setPassword($_POST['username'], $_POST['new-password'], $_POST['confirm-password']);
editUser($_POST);
}
else {
editUser($_POST);
}

View File

@ -0,0 +1,73 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Functions
// ============================================================================
function setPassword($username, $new_password, $confirm_password)
{
global $dbUsers;
global $Language;
// Password length
if( strlen($new_password) < 6 )
{
Alert::set($Language->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL);
return false;
}
if($new_password===$confirm_password)
{
if( $dbUsers->setPassword($username, $new_password) ) {
Alert::set($Language->g('The changes have been saved'), ALERT_STATUS_OK);
return true;
}
else {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to change the user password.');
return false;
}
}
else {
Alert::set($Language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL);
return false;
}
}
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
// Prevent editors to administrate other users.
if($Login->role()!=='admin')
{
$_POST['username'] = $Login->username();
unset($_POST['role']);
}
if( setPassword($_POST['username'], $_POST['new_password'], $_POST['confirm_password']) ) {
Redirect::page('admin', 'users');
}
}
// ============================================================================
// Main after POST
// ============================================================================
if($Login->role()!=='admin') {
$layout['parameters'] = $Login->username();
}
$_user = $dbUsers->getDb($layout['parameters']);
// If the user doesn't exist, redirect to the users list.
if($_user===false) {
Redirect::page('admin', 'users');
}
$_user['username'] = $layout['parameters'];

View File

@ -99,9 +99,15 @@ button.delete-button:hover {
text-decoration: underline;
}
#jscontent {
height: 400px;
}
/* ----------- ALERT ----------- */
#alert {
display: none;
background: rgba(48, 102, 187, 0.91);
color: #ffffff;
padding: 24px;
position: fixed;
@ -110,8 +116,12 @@ button.delete-button:hover {
z-index: 100;
}
#jscontent {
height: 400px;
.alert-ok {
background: rgba(48, 102, 187, 0.91);
}
.alert-fail {
background: rgba(187, 48, 48, 0.91);
}
/* ----------- LOGIN FORM ----------- */
@ -226,9 +236,16 @@ div.plugin-links > span.separator {
color: #AAAAAA;
}
#jsformplugin textarea {
min-width: 400px;
width: 60%;
min-height: 100px;
}
#jsformplugin input[type=text] {
min-width: 400px;
width: 60%;
height: 37px;
}
#jsformplugin input[type="checkbox"] {
@ -239,6 +256,6 @@ div.plugin-links > span.separator {
#jsformplugin label.forCheckbox {
margin-left: 3px;
margin-bottom: 10px;
margin-bottom: 0px !important;
display: inline-block;
}

View File

@ -48,7 +48,7 @@ $(document).ready(function() {
});
</script>
<div id="alert">
<div id="alert" class="<?php echo (Alert::status()==ALERT_STATUS_OK)?'alert-ok':'alert-fail'; ?>">
<?php Alert::p() ?>
</div>

View File

@ -30,6 +30,7 @@ class HTML {
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"';
$disabled = empty($args['disabled']) ? '' : 'disabled';
$html = '<div class="uk-form-row">';
@ -39,7 +40,7 @@ class HTML {
$html .= '<div class="uk-form-controls">';
$html .= '<input id="'.$id.'" name="'.$args['name'].'" type="'.$type.'" '.$class.' '.$placeholder.' value="'.$args['value'].'">';
$html .= '<input id="'.$id.'" name="'.$args['name'].'" type="'.$type.'" '.$class.' '.$placeholder.' autocomplete="off" '.$disabled.' value="'.$args['value'].'">';
if(!empty($args['tip'])) {
$html .= '<p class="uk-form-help-block">'.$args['tip'].'</p>';
@ -158,6 +159,9 @@ class HTML {
$("#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");
});
@ -186,6 +190,10 @@ class HTML {
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);
}
};

View File

@ -2,7 +2,7 @@
HTML::title(array('title'=>$L->g('Add a new user'), 'icon'=>'user-plus'));
HTML::formOpen(array('class'=>'uk-form-horizontal'));
HTML::formOpen(array('id'=>'add-user-form', 'class'=>'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array(
@ -11,15 +11,15 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
));
HTML::formInputText(array(
'name'=>'username',
'name'=>'new_username',
'label'=>$L->g('Username'),
'value'=>(isset($_POST['username'])?$_POST['username']:''),
'value'=>(isset($_POST['new_username'])?$_POST['new_username']:''),
'class'=>'uk-width-1-2 uk-form-medium',
'tip'=>''
));
HTML::formInputPassword(array(
'name'=>'password',
'name'=>'new_password',
'label'=>$L->g('Password'),
'value'=>'',
'class'=>'uk-width-1-2 uk-form-medium',
@ -27,7 +27,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
));
HTML::formInputPassword(array(
'name'=>'confirm-password',
'name'=>'confirm_password',
'label'=>$L->g('Confirm Password'),
'value'=>'',
'class'=>'uk-width-1-2 uk-form-medium',

View File

@ -1,8 +1,8 @@
<?php
HTML::title(array('title'=>$L->g('Edit user').' :: '.$_user['username'], 'icon'=>'user'));
HTML::title(array('title'=>$L->g('Edit user'), 'icon'=>'user'));
HTML::formOpen(array('class'=>'uk-form-horizontal'));
HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array(
@ -18,6 +18,15 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
HTML::legend(array('value'=>$L->g('Profile')));
HTML::formInputText(array(
'name'=>'usernameDisable',
'label'=>$L->g('Username'),
'value'=>$_user['username'],
'class'=>'uk-width-1-2 uk-form-medium',
'disabled'=>true,
'tip'=>''
));
HTML::formInputText(array(
'name'=>'firstName',
'label'=>$L->g('First name'),
@ -34,6 +43,13 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
'tip'=>''
));
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>
</div>
</div>';
if($Login->role()==='admin') {
HTML::formSelect(array(
@ -54,24 +70,6 @@ if($Login->role()==='admin') {
'tip'=>$L->g('email-will-not-be-publicly-displayed')
));
HTML::legend(array('value'=>$L->g('Change password')));
HTML::formInputPassword(array(
'name'=>'new-password',
'label'=>$L->g('New password'),
'value'=>'',
'class'=>'uk-width-1-2 uk-form-medium',
'tip'=>''
));
HTML::formInputPassword(array(
'name'=>'confirm-password',
'label'=>$L->g('Confirm Password'),
'value'=>'',
'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>

View File

@ -44,7 +44,7 @@ echo '<div class="uk-width-large-3-10">';
// Tabs, general and advanced mode
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
echo '<li><a href="">'.$L->g('General').'</a></li>';
echo '<li><a href="">Images</a></li>';
echo '<li><a href="">'.$L->g('Images').'</a></li>';
echo '<li><a href="">'.$L->g('Advanced').'</a></li>';
echo '</ul>';

View File

@ -0,0 +1,55 @@
<?php
HTML::title(array('title'=>$L->g('Change password'), 'icon'=>'key'));
HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$Security->getToken()
));
// Hidden field username
HTML::formInputHidden(array(
'name'=>'username',
'value'=>$_user['username']
));
HTML::legend(array('value'=>$L->g('New password')));
HTML::formInputText(array(
'name'=>'usernameDisable',
'label'=>$L->g('Username'),
'value'=>$_user['username'],
'class'=>'uk-width-1-2 uk-form-medium',
'disabled'=>true,
'tip'=>''
));
HTML::formInputPassword(array(
'name'=>'new_password',
'label'=>$L->g('New password'),
'value'=>'',
'class'=>'uk-width-1-2 uk-form-medium',
'tip'=>''
));
HTML::formInputPassword(array(
'name'=>'confirm_password',
'label'=>$L->g('Confirm password'),
'value'=>'',
'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>
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$_user['username'].'" class="uk-button">'.$L->g('Cancel').'</a>
</div>
</div>';
HTML::formClose();
?>

View File

@ -7,6 +7,11 @@
* Bludit is opensource software licensed under the MIT license.
*/
// Check PHP version
if(version_compare(phpversion(), '5.3', '<')) {
exit('Current PHP version '.phpversion().', you need > 5.3. (ERR_202)');
}
// Security constant
define('BLUDIT', true);
@ -139,19 +144,6 @@ function checkSystem()
$phpModules = get_loaded_extensions();
}
// If the php version is less than 5.3, then don't check others requirements.
if(!version_compare(phpversion(), '5.3', '>='))
{
$errorText = 'Current PHP version '.phpversion().', you need > 5.3. (ERR_202)';
error_log($errorText, 0);
$tmp['title'] = 'PHP version';
$tmp['errorText'] = $errorText;
array_push($stdOut, $tmp);
return $stdOut;
}
if(!file_exists(PATH_ROOT.'.htaccess'))
{
$errorText = 'Missing file, upload the file .htaccess (ERR_201)';
@ -202,9 +194,8 @@ function install($adminPassword, $email, $timezoneOffset)
$stdOut = array();
$timezone = timezone_name_from_abbr('', $timezoneOffset, 1);
$timezone = timezone_name_from_abbr('', $timezoneOffset, 0);
if($timezone === false) { $timezone = timezone_name_from_abbr('', $timezoneOffset, 0); } // Workaround bug #44780
date_default_timezone_set($timezone);
$currentDate = Date::current(DB_DATE_FORMAT);

View File

@ -48,6 +48,12 @@ if(!defined('JSON_PRETTY_PRINT')) {
define('JSON_PRETTY_PRINT', 128);
}
// Alert status ok
define('ALERT_STATUS_OK', 0);
// Alert status fail
define('ALERT_STATUS_FAIL', 1);
// Salt length
define('SALT_LENGTH', 8);

View File

@ -93,6 +93,7 @@ class dbLanguage extends dbJSON
foreach($files as $file)
{
$t = new dbJSON($file, false);
$native = $t->db['language-data']['native'];
$locale = basename($file, '.json');

View File

@ -11,7 +11,7 @@ class dbPages extends dbJSON
'username'=> array('inFile'=>false, 'value'=>''),
'tags'=> array('inFile'=>false, 'value'=>array()),
'status'=> array('inFile'=>false, 'value'=>'draft'),
'date'=> array('inFile'=>false, 'value'=>0),
'date'=> array('inFile'=>false, 'value'=>''),
'position'=> array('inFile'=>false, 'value'=>0)
);
@ -34,9 +34,7 @@ class dbPages extends dbJSON
}
// Current date.
if(empty($args['date'])) {
$args['date'] = Date::current(DB_DATE_FORMAT);
}
$args['date'] = Date::current(DB_DATE_FORMAT);
// Verify arguments with the database fields.
foreach($this->dbFields as $field=>$options)

View File

@ -2,21 +2,25 @@
class Alert {
// new
public static function set($value, $key='alert')
// Status, 0 = OK, 1 = Fail
public static function set($value, $status=ALERT_STATUS_OK, $key='alert')
{
Session::set('defined', true);
Session::set('alertStatus', $status);
Session::set($key, $value);
}
public static function get($key='alert')
{
Session::set('defined', false);
return Session::get($key);
}
public static function status()
{
return Session::get('alertStatus');
}
public static function p($key='alert')
{
echo self::get($key);

View File

@ -3,7 +3,11 @@
{
"native": "Български (България)",
"english-name": "Bulgarian",
<<<<<<< HEAD
"last-update": "2015-11-06",
=======
"last-update": "2015-11-09",
>>>>>>> upstream/master
"author": "Христо Дипчиков",
"email": "",
"website": "www.hristodipchikov.tk"
@ -52,7 +56,11 @@
"prev-page": "Предишна страница",
"next-page": "Следваща страница",
"configure-plugin": "Конфигуриране",
<<<<<<< HEAD
"confirm-delete-this-action-cannot-be-undone": "Ако потвърдете изтриванер, действието не може да бъде отменено.",
=======
"confirm-delete-this-action-cannot-be-undone": "Ако потвърдете, действието не може да бъде отменено.",
>>>>>>> upstream/master
"site-title": "Заглавие на сайта",
"site-slogan": "Ключови думи / Етикети",
"site-description": "Описание на сайта",
@ -70,7 +78,11 @@
"timezone": "Часова зона",
"locale": "Местоположение",
"new-post": "Нова публикация",
<<<<<<< HEAD
"html-and-markdown-code-supported": "Поддръжан код HTML и Markdown ",
=======
"html-and-markdown-code-supported": "Поддръжан код HTML и Markdown ",
>>>>>>> upstream/master
"new-page": "Нова страница",
"manage-posts": "Управление на публикациите",
"published-date": "Дата на побликуване",
@ -105,8 +117,13 @@
"you-do-not-have-sufficient-permissions": "Вие нямате права за достъп до тази страница, моля свържете се с администратора.",
"settings-advanced-writting-settings": "Настройки->Разширени настройки->Записване на настройки",
"new-posts-and-pages-synchronized": "Новите публикации и страници са синхронизирани.",
<<<<<<< HEAD
"you-can-choose-the-users-privilege": "Можете да зададете правомощия на потребителя. Редактора може само да напише страници и мнения.",
"email-will-not-be-publicly-displayed": "Имейл адрес няма да бъде показван.Ще се използва за възстановяване парола и уведомления.",
=======
"you-can-choose-the-users-privilege": "Можете да зададете правомощия на потребителя. Редактора, може само да напише страници и мнения.",
"email-will-not-be-publicly-displayed": "Този имейл адрес няма да бъде показван. Ще се използва за възстановяване парола и уведомления.",
>>>>>>> upstream/master
"use-this-field-to-name-your-site": "Използвайте това поле за име на вашия сайт, той ще се появи в горната част на всяка страница на вашия сайт.",
"use-this-field-to-add-a-catchy-phrase": "Използвайте това поле, за да добавите ключови думи и изрази за вашия сайт.",
"you-can-add-a-site-description-to-provide": "Можете да добавите кратко описание или биография на сайта.",
@ -116,9 +133,15 @@
"add-or-edit-description-tags-or": "Добавяне или редактиране на описание, eтикети или модифициране URL.",
"select-your-sites-language": "Изберете системен език.",
"select-a-timezone-for-a-correct": "Изберете часова зона за правилтото показване на дата / час.",
<<<<<<< HEAD
"you-can-use-this-field-to-define-a-set-of": "Можете да използвате това поле, за набор на параметри, свързани с език, страната и специални преференции.",
"you-can-modify-the-url-which-identifies":"Можете да промените адреса, на дадената страница или публикация, ключови думи. Но не повече от 150 символа.",
"this-field-can-help-describe-the-content": " В това поле може да опишете съдържанието с няколко думи. Но не повече от 150 символа.",
=======
"you-can-use-this-field-to-define-a-set-of": "Можете да използвате това поле за избар на параметри свързани с езика, страната и специални преференции.",
"you-can-modify-the-url-which-identifies":"Можете да промените URL адреса , който идентифицира страницата или публикацията използвайки ключови думи, но с обща дължина не повече от 150 символа.",
"this-field-can-help-describe-the-content": " В това поле може да опишете съдържанието с няколко думи, но с обща дължина не повече от 150 символа.",
>>>>>>> upstream/master
"write-the-tags-separeted-by-comma": "Добавянето на етикети става чрез добавянето на запетая. Например: TAG1, tag2, tag3",
"delete-the-user-and-all-its-posts":"Изтриване на потребителя и всички негови публикации.",
"delete-the-user-and-associate-its-posts-to-admin-user": "Изтриване на потребителя, без изтриване на неговите публикации.",
@ -129,8 +152,13 @@
"there-are-no-drafts": "Не са открити чернови.",
"create-a-new-article-for-your-blog":"Създайте на нова публикация във вашия блог.",
"create-a-new-page-for-your-website":"Създайте на нова страница във вашия уеб сайт.",
<<<<<<< HEAD
"invite-a-friend-to-collaborate-on-your-website":"Добави приятел, който да помага за развитието вашият сайт.",
"change-your-language-and-region-settings":"Избор на параметри, свързани с език, страната и местоположение.",
=======
"invite-a-friend-to-collaborate-on-your-website":"Добави потребител, който да ви помага за развитието вашият сайт.",
"change-your-language-and-region-settings":"Избор на параметри свързани с език, страна и местоположение.",
>>>>>>> upstream/master
"language-and-timezone":"Език и часова зона",
"author": "Автор",
"start-here": "Начало",
@ -139,14 +167,24 @@
"congratulations-you-have-successfully-installed-your-bludit": "Поздравления вие успешно инсталирахте вашият **Bludit**",
"whats-next": "Какво следва?",
"manage-your-bludit-from-the-admin-panel": "Управлявайте вашият Bludit от [Администраторският панел](./admin/)",
<<<<<<< HEAD
"follow-bludit-on": "Follow Bludit on",
"visit-the-support-forum": "Visit the [forum](http://forum.bludit.com) for support",
=======
"follow-bludit-on": "Последвайте Bludit в",
"visit-the-support-forum": "Посети [форум](http://forum.bludit.com) за подръжка",
>>>>>>> upstream/master
"read-the-documentation-for-more-information": "Прочети [документацията](http://docs.bludit.com) за повече информация",
"share-with-your-friends-and-enjoy": "Споделете с приятелите си",
"the-page-has-not-been-found": "Страницата не е намерена.",
"error": "Грешна",
<<<<<<< HEAD
"bludit-installer": "Bludit Installer",
"welcome-to-the-bludit-installer": "Welcome to the Bludit installer",
=======
"bludit-installer": "Bludit Инстлатор",
"welcome-to-the-bludit-installer": "Добре дошли в Bludit инсталатор",
>>>>>>> upstream/master
"complete-the-form-choose-a-password-for-the-username-admin": "Попълнете формуляра, или парола за потребителското име « admin »",
"password-visible-field": "Парола във видимото поле!",
"install": "Инсталиране",
@ -155,7 +193,11 @@
"the-password-field-is-empty": "Полето за парола е празно",
"your-email-address-is-invalid":"Вашият имейл адрес е невалиден.",
"proceed-anyway": "Продължете така или иначе!",
<<<<<<< HEAD
"drafts":"Чернови",
=======
"drafts":"Чернови:",
>>>>>>> upstream/master
"ip-address-has-been-blocked": "IP адрес е блокиран.",
"try-again-in-a-few-minutes": "Опитайте отново след няколко минути.",
"date": "Дата",
@ -171,6 +213,7 @@
"enable-the-command-line-mode-if-you-add-edit": "Смени с режим на командния ред, ако добавяте, променяте или изтривате постове и страници от файловата система",
"configure": "Конфигориране",
"uninstall": "Премахване",
<<<<<<< HEAD
"change-password": "Промяна на парола",
"to-schedule-the-post-just-select-the-date-and-time": "За да планирате поста, просто изберете датата и часа.",
"write-the-tags-separated-by-commas": "Напиши етикети, разделени със запетая.",
@ -178,6 +221,15 @@
"published": "Пубиликуван",
"scheduled-posts": "Планирани постове",
"statistics": "Статистика",
=======
"change-password": "Промяна на парола:",
"to-schedule-the-post-just-select-the-date-and-time": "За да планирате поста, просто изберете дата и час.",
"write-the-tags-separated-by-commas": "Напишете етикети, разделени със запетая.",
"status": "Статус",
"published": "Пубиликуван",
"scheduled-posts": "Планирани постове:",
"statistics": "Статистика:",
>>>>>>> upstream/master
"name": "Име",
"email-account-settings":"Настройки на имейл акаунт",
"sender-email": "Имейл на изпращача",
@ -185,6 +237,7 @@
"bludit-login-access-code": "BLUDIT - Код за достъп",
"check-your-inbox-for-your-login-access-code":"Проверете вашата пощенска кутия за вашия код за достъп",
"there-was-a-problem-sending-the-email":"Възникна проблем при изпращането на имейла",
<<<<<<< HEAD
"back-to-login-form": "Връщане вкъм входящата форма",
"send-me-a-login-access-code": "Изпрати ми кода за достъп",
"get-login-access-code": "Вземете кода за достъп",
@ -193,6 +246,16 @@
"show-password": "Покажи паролата",
"edit-or-remove-your=pages": "Промяна или премахване на страници.",
"edit-or-remove-your-blogs-posts": "Промяна или премахване на статии от блога ви.",
=======
"back-to-login-form": "Връщане към входяща форма",
"send-me-a-login-access-code": "Изпрати код за достъп",
"get-login-access-code": "Вземете код за достъп",
"email-notification-login-access-code": "<p>Това е уведомление от вашия сайт {{WEBSITE_NAME}}</p><p>Вашият код за достъп , последвайте следващата връзката:</p><p>{{LINK}}</p>",
"there-are-no-scheduled-posts": "Не са открити планирани публикации.",
"show-password": "Покажи паролата",
"edit-or-remove-your=pages": "Промяна или премахване на страници.",
"edit-or-remove-your-blogs-posts": "Промяна или премахване на публикации.",
>>>>>>> upstream/master
"general-settings": "Основни настройки",
"advanced-settings": "Разширени настройки",
"manage-users": "Управление на потребители",

View File

@ -3,7 +3,7 @@
{
"native": "Deutsch (Deutschland)",
"english-name": "German",
"last-update": "2015-11-05",
"last-update": "2015-11-10",
"author": "Edi Goetschel",
"email": "egoetschel@clickwork.ch",
"website": "http://www.clickwork.ch"
@ -41,8 +41,8 @@
"profile": "Profil",
"email": "E-Mail",
"settings": "Einstellungen",
"general": "Allgemeine Einstellungen",
"advanced": "Erweiterte Einstellungen",
"general": "Allgemein",
"advanced": "Erweitert",
"regional": "Lokalisierung",
"about": "Systeminformation",
"login": "Anmelden",
@ -163,14 +163,14 @@
"scheduled": "Veröffentlichung geplant.",
"publish": "Veröffentlichen",
"please-check-your-theme-configuration": "Bitte die Einstellungen des Themes prüfen.",
"plugin-label": "Plugin-Bezeichnung",
"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": "Deaktivieren,
"uninstall": "Deaktivieren",
"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.",

View File

@ -203,5 +203,6 @@
"images": "Images",
"upload-image": "Upload image",
"drag-and-drop-or-click-here": "Drag and drop or click here",
"insert-image": "Insert image"
"insert-image": "Insert image",
"supported-image-file-types": "Supported image file types"
}

View File

@ -3,7 +3,7 @@
{
"native": "Français (France)",
"english-name": "French",
"last-update": "2015-10-29",
"last-update": "2015-11-08",
"author": "Frédéric K.",
"email": "stradfred@gmail.com",
"website": ""
@ -196,5 +196,12 @@
"general-settings": "Paramètres généraux",
"advanced-settings": "Paramètres avancés",
"manage-users": "Gestion des utilisateurs",
"view-and-edit-your-profile": "Modifier votre profil"
"view-and-edit-your-profile": "Modifier votre profil",
"password-must-be-at-least-6-characters-long": "Le mot de passe doit contenir au moins 6 caractères",
"images": "Images",
"upload-image": "Envoyer une image",
"drag-and-drop-or-click-here": "Glissez et déposez ou cliquez ici",
"insert-image": "Insérer limage sélectionnée"
}

View File

@ -3,7 +3,7 @@
{
"native": "Traditional Chinese (Taiwan)",
"english-name": "Traditional Chinese",
"last-update": "2015-11-05",
"last-update": "2015-11-10",
"author": "Ethan Chen",
"email": "ethan42411@gmail.com",
"website": "http://single4.ml"
@ -202,5 +202,6 @@
"images": "圖片",
"upload-image": "上傳圖片",
"drag-and-drop-or-click-here": "拖曳您的圖片到這裡或是點選這裡選擇圖片",
"insert-image": "插入圖片"
"insert-image": "插入圖片",
"supported-image-file-types": "可以上傳的檔案格式"
}

View File

@ -0,0 +1,12 @@
{
"plugin-data":
{
"name": "About",
"description": "Little description about your site or yourself.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.6",
"releaseDate": "2015-11-13"
}
}

47
plugins/about/plugin.php Normal file
View File

@ -0,0 +1,47 @@
<?php
class pluginAbout extends Plugin {
public function init()
{
$this->dbFields = array(
'label'=>'About',
'text'=>''
);
}
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('About').'</label>';
$html .= '<textarea name="text" id="jstext">'.$this->getDbField('text').'</textarea>';
$html .= '</div>';
return $html;
}
public function siteSidebar()
{
global $Language;
global $dbTags;
global $Url;
$filter = $Url->filters('tag');
$html = '<div class="plugin plugin-about">';
$html .= '<h2>'.$this->getDbField('label').'</h2>';
$html .= '<div class="plugin-content">';
$html .= $this->getDbField('text');
$html .= '</div>';
$html .= '</div>';
return $html;
}
}

View File

@ -8,4 +8,4 @@
"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"
}
}

View File

@ -6,8 +6,8 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"version": "0.6",
"releaseDate": "2015-11-13"
},
"disqus-shortname": "Disqus shortname",
"enable-disqus-on-pages": "Enable Disqus on pages",

View File

@ -2,12 +2,7 @@
"plugin-data":
{
"name": "System komentarzy - Disqus",
"description": "System komentarzy Disqus przechowuje komentarze dla serwisów internetowych. Korzystanie z tej wtyczki wymaga rejestracji w serwisie disqus.com.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"description": "System komentarzy Disqus przechowuje komentarze dla serwisów internetowych. Korzystanie z tej wtyczki wymaga rejestracji w serwisie disqus.com."
},
"disqus-shortname": "Nazwa użytkownika Disqus",
"enable-disqus-on-pages": "Włącz Disqus na wszystkich stronach",

View File

@ -2,15 +2,10 @@
"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.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"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."
}
}

View File

@ -6,8 +6,8 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"version": "0.6",
"releaseDate": "2015-11-13"
},
"google-webmasters-tools": "Google Webmasters tools",
"google-analytics-tracking-id": "Google Analytics Tracking ID",

View File

@ -2,12 +2,7 @@
"plugin-data":
{
"name": "Narzędzia Google",
"description": "Wtyczka ta generuje kod metatagów pozwalający zweryfikować stronę z serwisem Narzędzia Google Dla Webmasterów oraz wygenerować kod JavaScript monitorujący ruch z usługą Google Analytics.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"description": "Wtyczka ta generuje kod metatagów pozwalający zweryfikować stronę z serwisem Narzędzia Google Dla Webmasterów oraz wygenerować kod JavaScript monitorujący ruch z usługą Google Analytics."
},
"google-webmasters-tools": "Google Webmasters tools",
"google-analytics-tracking-id": "Google Analytics Tracking ID",

View File

@ -6,8 +6,8 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"version": "0.6",
"releaseDate": "2015-11-13"
},
"enable-maintence-mode": "Enable maintence mode",

View File

@ -2,12 +2,7 @@
"plugin-data":
{
"name": "Tryb konserwacji",
"description": "Przełącz stronę w tryb konwersacji (wówczas działać będzie tylko kokpit).",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"description": "Przełącz stronę w tryb konwersacji (wówczas działać będzie tylko kokpit)."
},
"enable-maintence-mode": "Włącz tryb konwersacji",

View File

@ -6,7 +6,7 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"version": "0.6",
"releaseDate": "2015-11-13"
}
}

View File

@ -2,11 +2,6 @@
"plugin-data":
{
"name": "Open Graph",
"description": "Protokół Open Graph zezwala stronie na stosowanie meta tagów używanych w serwisach społecznościowych.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"description": "Protokół Open Graph zezwala stronie na stosowanie meta tagów używanych w serwisach społecznościowych."
}
}

View File

@ -4,4 +4,4 @@
"name": "開放社交關係圖",
"description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件"
}
}
}

View File

@ -1,8 +1,8 @@
{
"plugin-data":
{
"name": "Liste aller Seiten",
"description": "Auflistung aller Seiten."
"name": "Anzeige aller Seiten",
"description": "Anzeige aller Seiten in der Seitenleiste (bei Themes mit Seitenleiste)."
},
"home": "Hauptseite",

View File

@ -6,10 +6,10 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"version": "0.6",
"releaseDate": "2015-11-13"
},
"home": "Home",
"show-home-link": "Show home link"
"home": "Home",
"show-home-link": "Show home link"
}

View File

@ -5,6 +5,6 @@
"description": "Constitue un menu avec les liens des pages dans la colonne du thème."
},
"home": "Accueil",
"show-home-link": "Afficher le lien de la page daccueil"
"home": "Accueil",
"show-home-link": "Afficher le lien de la page daccueil"
}

View File

@ -2,14 +2,9 @@
"plugin-data":
{
"name": "Lista stron",
"description": "Wyświetla listę stron znajdujących się w witrynie.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"description": "Wyświetla listę stron znajdujących się w witrynie."
},
"home": "Strona główna",
"show-home-link": "Pokaż odnośnik do strony głównek"
"home": "Strona główna",
"show-home-link": "Pokaż odnośnik do strony głównek"
}

View File

@ -5,6 +5,6 @@
"description": "顯示所有頁面的列表"
},
"home": "首頁",
"show-home-link": "顯示首頁連結"
"home": "首頁",
"show-home-link": "顯示首頁連結"
}

View File

@ -6,4 +6,4 @@
},
"toolbar": "Werkzeugleiste",
"tab-size": "Abstände der Tabstopps"
}
}

View File

@ -6,8 +6,8 @@
"author": "NextStepWebs",
"email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "1.8.0",
"releaseDate": "2015-10-29"
"version": "1.8.1",
"releaseDate": "2015-11-13"
},
"toolbar": "Toolbar",
"tab-size": "Tab size"

View File

@ -2,12 +2,7 @@
"plugin-data":
{
"name": "Edytor SimpleMDE",
"description": "Prosty, piękny i osadzony w JavaScript edytor markdown stworzony przez @WesCossick. Na potrzeby Bludit dostosowany przez Diego Najara.",
"author": "NextStepWebs",
"email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "1.7.4",
"releaseDate": "2015-10-02"
"description": "Prosty, piękny i osadzony w JavaScript edytor markdown stworzony przez @WesCossick. Na potrzeby Bludit dostosowany przez Diego Najar."
},
"toolbar": "Pasek narzędzi",
"tab-size": "Rozmiar wcięcia"

View File

@ -97,6 +97,9 @@ class pluginsimpleMDE extends Plugin {
$html .= '$("#jsaddImage").on("click", function() {
var filename = $("#jsimageList option:selected" ).text();
if(!filename.trim()) {
return false;
}
var text = simplemde.value();
simplemde.value(text + "![alt text]("+filename+")" + "\n");
});';

View File

@ -1,7 +1,7 @@
{
"plugin-data":
{
"name": "Liste aller Schlagwörter",
"description": "Anzeige aller Schlagwörter."
"name": "Anzeige aller Schlagwörter",
"description": "Anzeige aller Schlagwörter in der Seitenleiste (bei Themes mit Seitenleiste)."
}
}

View File

@ -6,7 +6,7 @@
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"version": "0.6",
"releaseDate": "2015-11-13"
}
}

View File

@ -2,11 +2,6 @@
"plugin-data":
{
"name": "Lista tagów",
"description": "Wyświetla wszystkie tagi w postaci listy.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"version": "0.3",
"releaseDate": "2015-10-02"
"description": "Wyświetla wszystkie tagi w postaci listy."
}
}

View File

@ -14,7 +14,7 @@ class pluginTags extends Plugin {
global $Language;
$html = '<div>';
$html .= '<label>Plugin label</label>';
$html .= '<label>'.$Language->get('Plugin label').'</label>';
$html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">';
$html .= '</div>';

View File

@ -0,0 +1,12 @@
{
"theme-data":
{
"name": "Pure",
"description": "Einfaches und übersichtliches Theme unter Verwendung des Frameworks Pure.css. Website: http://purecss.io.",
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-themes",
"version": "0.3",
"releaseDate": "2015-10-02"
}
}

View File

@ -1,7 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<?php echo $Site->description() ?>">
<title><?php echo $Site->title() ?></title>
<?php
@ -22,9 +20,14 @@
// <meta name="keywords" content="HTML,CSS,XML,JavaScript">
if( $Url->whereAmI()=='post' ) {
Theme::keywords( $Post->tags() );
Theme::description( $Post->description() );
}
elseif( $Url->whereAmI()=='page' ) {
Theme::keywords( $Page->tags() );
Theme::description( $Page->description() );
}
else {
Theme::description( $Site->description() );
}
?>

View File

@ -23,7 +23,7 @@
echo $Language->get('Posted By').' ';
if( Text::isNotEmpty($Post->authorFirstName()) && Text::isNotEmpty($Post->authorLastName()) ) {
echo $Post->authorFirstName().', '.$Post->authorLastName();
echo $Post->authorFirstName().' '.$Post->authorLastName();
}
else {
echo $Post->username();

View File

@ -21,7 +21,7 @@
echo $Language->get('Posted By').' ';
if( Text::isNotEmpty($Post->authorFirstName()) && Text::isNotEmpty($Post->authorLastName()) ) {
echo $Post->authorFirstName().', '.$Post->authorLastName();
echo $Post->authorFirstName().' '.$Post->authorLastName();
}
else {
echo $Post->username();