Merge pull request #2 from dignajar/master

New pull request
This commit is contained in:
Edi 2016-03-07 00:24:49 +01:00
commit e0d03027b6
46 changed files with 220 additions and 79 deletions

View File

@ -1,14 +1,14 @@
[Bludit](http://www.bludit.com/)
[Bludit](https://www.bludit.com/)
================================
**Fast**, **simple**, **extensible** and **flat file** CMS.
Bludit is a simple web application to make your own **blog** or **site** in seconds, it's completly **free and open source**. Bludit uses flat-files (text files in JSON format) to store the posts and pages, you don't need to install or configure a database.
- [Documentation](http://docs.bludit.com)
- [Help and Support](http://forum.bludit.com)
- [Plugins](https://github.com/dignajar/bludit-plugins)
- [Documentation](https://docs.bludit.com)
- [Help and Support](https://forum.bludit.com)
- [Plugins](https://plugins.bludit.com)
- [Themes](https://github.com/dignajar/bludit-themes)
- [More plugins and themes](http://forum.bludit.com/viewforum.php?f=14)
- [More plugins and themes](https://forum.bludit.com/viewforum.php?f=14)
Social networks
---------------
@ -36,7 +36,7 @@ You only need a web server with PHP support.
Installation guide
------------------
1. Download the latest version from http://www.bludit.com/bludit_latest.zip
1. Download the latest version from https://s3.amazonaws.com/bludit-s3/bludit-builds/bludit_latest.zip
2. Extract the zip file into a directory like `bludit`.
3. Upload the directory `bludit` to your hosting server.
4. Done!

View File

@ -123,8 +123,7 @@ body {
}
.bludit-navbar {
border-radius: 0 !important;
box-shadow: 1px 1px 1px rgba(50, 50, 50, 0.37);
}
#logo {
@ -159,6 +158,10 @@ button.delete-button:hover {
margin-bottom: 25px;
}
table.statistics tr:last-child td {
border-bottom: none !important;
}
/* ----------- ALERT ----------- */
#alert {
@ -205,7 +208,7 @@ button.delete-button:hover {
#jstagList span.select {
margin-top: 5px;
margin-right: 5px;
padding: 1px 15px;
padding: 2px 15px;
cursor: pointer;
display: inline-block;
border-radius: 3px;

View File

@ -27,7 +27,7 @@ class HTML {
// Prevent the form submit when press enter key.
$("form").keypress(function(e) {
if (e.which == 13) {
if( (e.which == 13) && (e.target.type !== "textarea") ) {
return false;
}
});

File diff suppressed because one or more lines are too long

View File

@ -65,7 +65,7 @@
<div class="uk-panel uk-panel-box">
<h4><?php $L->p('Statistics') ?></h4>
<table class="uk-table">
<table class="uk-table statistics">
<tbody>
<tr>
<td><?php $Language->p('Posts') ?></td>
@ -128,4 +128,4 @@
</div>
</div>
</div>

View File

@ -1,10 +1,10 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// Bludit version
define('BLUDIT_VERSION', 'githubVersion');
define('BLUDIT_CODENAME', '');
define('BLUDIT_RELEASE_DATE', '');
define('BLUDIT_BUILD', '20160201');
define('BLUDIT_VERSION', '1.1.2');
define('BLUDIT_CODENAME', 'The Dig');
define('BLUDIT_RELEASE_DATE', '2016-02-26');
define('BLUDIT_BUILD', '20160226');
// Debug mode
define('DEBUG_MODE', TRUE);

View File

@ -107,6 +107,7 @@ class dbPosts extends dbJSON
// The user is always who is loggued.
$args['username'] = Session::get('username');
if( Text::isEmpty($args['username']) ) {
Log::set(__METHOD__.LOG_SEP.'The session does not have the username.');
return false;
}
@ -271,6 +272,7 @@ class dbPosts extends dbJSON
return false;
}
Log::set(__METHOD__.LOG_SEP.'Posts from the user '.$username.' were delete.');
return true;
}
@ -293,6 +295,7 @@ class dbPosts extends dbJSON
return false;
}
Log::set(__METHOD__.LOG_SEP.'Posts linked to another user.');
return true;
}
@ -343,6 +346,7 @@ class dbPosts extends dbJSON
return false;
}
Log::set(__METHOD__.LOG_SEP.'New post published from scheduler.');
return true;
}
@ -443,6 +447,8 @@ class dbPosts extends dbJSON
{
$valueFromFile = $Post->getField($f);
Log::set(__METHOD__.LOG_SEP.'Field from file: '.$f);
if($f=='tags') {
// Generate tags array.
$this->db[$key]['tags'] = $this->generateTags($valueFromFile);
@ -480,7 +486,11 @@ class dbPosts extends dbJSON
return false;
}
if($this->db!=$db) {
Log::set(__METHOD__.LOG_SEP.'New posts added from Cli Mode');
}
return $this->db!=$db;
}
}
}

View File

@ -25,6 +25,10 @@ class dbTags extends dbJSON
foreach($this->db['postsIndex'] as $tagSlug=>$tagInfo) {
$tmp[$tagSlug] = $tagInfo['name'];
}
// Sort low to high, by value.
natcasesort($tmp);
return $tmp;
}
@ -93,4 +97,4 @@ class dbTags extends dbJSON
return true;
}
}
}

View File

@ -5,10 +5,16 @@ class Email {
// Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.
public static function send($args)
{
$now = time();
$headers = array();
$headers[] = 'MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=utf-8';
$headers[] = 'From: '.$args['from'];
$headers[] = 'Reply-To: '.$args['from'];
$headers[] = 'Return-Path: '.$args['from'];
$headers[] = 'message-id: <'.$now.'webmaster@'.DOMAIN.'>';
$headers[] = 'X-Mailer: PHP/'.phpversion();
$message = '<html>

View File

@ -4,7 +4,7 @@ class Log {
public static function set($text, $type=0)
{
error_log($text, $type);
error_log('('.BLUDIT_VERSION.')'.$text, $type);
}
}

View File

@ -47,6 +47,17 @@ var menuV8 = new function() {
}
// This function is the default to add the image to the textarea.
// Only call when the textarea doesn't have a HTML Editor enabled.
function editorAddImageDefault(filename) {
var textarea = $("#jscontent");
var imgHTML = '<img src="'+filename+'" alt="">';
textarea.val(textarea.val() + imgHTML);
}
$(document).ready(function() {
// Click on document.
@ -87,8 +98,13 @@ $(document).ready(function() {
// Insert image
$("body").on("click", "#bludit-menuV8-insert", function(e) {
// This function is defined in each editor plugin.
editorAddImage( menuV8.getFilename() );
if(typeof editorAddImage == 'function') {
// This function is defined in each editor plugin.
editorAddImage( menuV8.getFilename() );
}
else {
editorAddImageDefault( menuV8.getFilename() );
}
});

View File

@ -9,7 +9,7 @@ function insertTag() {
}
var findTag = $("span[data-tag]").filter(function() {
return $(this).attr('data-tag').toLowerCase() == newTag;
return $(this).attr('data-tag').toLowerCase() == newTag.toLowerCase();
});
if( findTag.length > 0 ) {

12
bl-languages/fr_FR.json Normal file → Executable file
View File

@ -3,7 +3,7 @@
{
"native": "Français (France)",
"english-name": "French",
"last-update": "2016-02-13",
"last-update": "2016-02-29",
"author": "Frédéric K.",
"email": "stradfred@gmail.com",
"website": "http://flatboard.co.nf"
@ -223,7 +223,7 @@
"cover-image": "Image de couverture",
"blog": "Blog",
"more-images": "Plus dimages",
"double-click-on-the-image-to-add-it": "Double-cliquez sur limage pour lajouter.",
"click-here-to-cancel": "Cliquez ici pour annuler.",
"type-the-tag-and-press-enter": "Saisissez le tag et appuyez sur Entrée.",
"add": "Ajouter",
@ -235,9 +235,5 @@
"delete-image": "Supprimer limage",
"image-description": "Description de limage",
"social-networks": "Réseaux sociaux",
"twitter-username": "Compte utilisateur Twitter",
"facebook-username": "Compte utilisateur Facebook",
"google-username": "Compte utilisateur Google",
"instagram-username": "Compte utilisateur Instagram"
}
"social-networks-links": "Liens vers les réseaux sociaux"
}

View File

@ -3,7 +3,7 @@
{
"native": "Italiano (Italia)",
"english-name": "Italian",
"last-update": "2016-01-22",
"last-update": "2016-02-20",
"author": "Daniele La Pira",
"email": "daniele.lapira@gmail.com",
"website": "https://github.com/danielelapira"
@ -119,6 +119,7 @@
"you-can-use-this-field-to-define-a-set-of": "Puoi utilizzare questo campo per definire un set di parametri riferiti alla lingua, alla nazione e preferenze speciali.",
"you-can-modify-the-url-which-identifies":"Puoi modificare l'indirizzo URL che identifica una pagina o un articolo utilizzando delle parole chiavi leggibili. Non più di 150 caratteri.",
"this-field-can-help-describe-the-content": "Quì puoi descrivere il contenuto in poche parole. Non più di 150 caratteri.",
"delete-the-user-and-all-its-posts":"Elimina l'utente e tutti i suoi articoli",
"delete-the-user-and-associate-its-posts-to-admin-user": "Elimina l'utente e assegna i suoi articoli all'utente admin",
"read-more": "Leggi tutto",
@ -195,7 +196,7 @@
"edit-or-remove-your-blogs-posts": "Modifica o elimina articoli del blog.",
"general-settings": "Impostazioni generali",
"advanced-settings": "Impostazioni avanzate",
"manage-users": "Gestisci utenti",
"manage-users": "Amministra utenti",
"view-and-edit-your-profile": "Visualizza e modifica il tuo profilo.",
"password-must-be-at-least-6-characters-long": "La Password deve contenere almeno 6 caratteri",
@ -222,9 +223,17 @@
"cover-image": "Immagine di copertina",
"blog": "Blog",
"more-images": "Più immagini",
"double-click-on-the-image-to-add-it": "Clicca due volte sull'immagine da inserire.",
"click-here-to-cancel": "Clicca quì per annullare.",
"type-the-tag-and-press-enter": "Scrivi il tag e premi invio.",
"manage-your-bludit-from-the-admin-panel": "Gestisci Bludit dal [pannello di amministrazione]({{ADMIN_AREA_LINK}})",
"there-are-no-images":"Non ci sono immagini"
}
"add": "Aggiungi",
"manage-your-bludit-from-the-admin-panel": "Amministra Bludit dal [pannello di amministrazione]({{ADMIN_AREA_LINK}})",
"there-are-no-images":"Non ci sono immagini",
"click-on-the-image-for-options": "Clicca sull'immagine per le opzioni.",
"set-as-cover-image": "Set as cover image",
"delete-image": "Elimima immagine",
"image-description": "Descrizione dell'immagine",
"social-networks-links": "Social Networks"
}

View File

@ -235,9 +235,5 @@
"delete-image": "Удалить изображение",
"image-description": "Описание изображения",
"social-networks": "Социальные сети",
"twitter-username": "Имя пользователя в Twitter",
"facebook-username": "Имя пользователя в Facebook",
"google-username": "Имя пользователя в Google",
"instagram-username": "Имя пользователя в Instagram"
"social-networks-links": "Социальные сети"
}

View File

@ -227,5 +227,12 @@
"click-here-to-cancel": "İptal etmek için tıklayın.",
"type-the-tag-and-press-enter": "Etiketi girin ve enter tuşuna basın.",
"manage-your-bludit-from-the-admin-panel": "Bludit'i [yönetici panelinden]({{ADMIN_AREA_LINK}}) yönetin.",
"there-are-no-images":"Hiç resim yok."
"there-are-no-images":"Hiç resim yok.",
"click-on-the-image-for-options": "Özellikler için resme tıklayın.",
"set-as-cover-image": "Kapak resmi olarak ayarla",
"delete-image": "Resimi sil",
"image-description": "Resim açıklaması",
"social-networks-links": "Sosyal ağ linkleri"
}

View File

@ -3,7 +3,7 @@
{
"native": "Українська (Україна)",
"english-name": "Ukrainian",
"last-update": "2016-01-23",
"last-update": "2016-02-20",
"author": "Allec Bernz",
"email": "admin@allec.info",
"website": "http://allec.info"
@ -37,7 +37,7 @@
"draft": "Чернетка",
"delete": "Видалити",
"registered": "Зареєстрований",
"Notifications": "Сповіщення",
"notifications": "Повідомлення",
"profile": "Профіль",
"email": "Email",
"settings": "Параметри",
@ -223,9 +223,17 @@
"cover-image": "Зображення обкладинки",
"blog": "Блог",
"more-images": "Більше зображень",
"double-click-on-the-image-to-add-it": "Двічі клацніть на зображення, щоб додати його.",
"click-here-to-cancel": "Натисніть тут, щоб скасувати.",
"type-the-tag-and-press-enter": "Введіть тег і натисніть Enter.",
"add": "Додати",
"manage-your-bludit-from-the-admin-panel": "Керуйте вашим Bludit через [панель управління]({{ADMIN_AREA_LINK}})",
"there-are-no-images":"Немає зображень"
"there-are-no-images":"Немає зображень",
"click-on-the-image-for-options": "Натисніть на зображення, щоб переглянути параметри.",
"set-as-cover-image": "Встановити в якості обкладинки",
"delete-image": "Видалити зображення",
"image-description": "Опис зображення",
"social-networks-links": "Лінки на соціальні мережі"
}

View File

@ -0,0 +1,12 @@
{
"plugin-data":
{
"name": "Система коментарів Disqus",
"description": "Disqus надає послуги хостингу коментарів для веб-сайтів. Необхідно зареєструватися на Disqus.com перед використанням цього плагіна."
},
"disqus-shortname": "Коротке ім'я в Disqus",
"enable-disqus-on-pages": "Включити Disqus на сторінках",
"enable-disqus-on-posts": "Включити Disqus у публікаціях",
"enable-disqus-on-default-home-page": "Включити Disqus на домашній сторінці"
}

View File

@ -0,0 +1,12 @@
{
"plugin-data":
{
"name": "Інструменти Google",
"description": "Цей плагін генерує мета-тег для перевірки вашого сайту у Google Webmasters Tools і JavaScript-код для відстеження вашого сайту з Google Analytics."
},
"google-webmasters-tools": "Google Webmasters tools",
"google-analytics-tracking-id": "КОД відстеження Google Analytics",
"complete-this-field-with-the-google-site-verification": "Заповніть це поле для перевірки власника сайту.",
"complete-this-field-with-the-tracking-id": "Заповніть це поле для генерації Javascript-коду відстеження у Google Analytics."
}

View File

@ -0,0 +1,10 @@
{
"plugin-data":
{
"name": "Последни публикации",
"description": "Показва най-новите публикации."
},
"amount-of-posts": "Брой последни публикации",
"show-home-link": "Покажи връзка за начало"
}

View File

@ -0,0 +1,10 @@
{
"plugin-data":
{
"name": "Останні публікації",
"description": "Показує останні опубліковані публікації."
},
"amount-of-posts": "Кількість публікацій",
"show-home-link": "Показати лінк на домашню сторінку"
}

View File

@ -5,6 +5,6 @@
"description": "Поставете вашия сайт на режим на поддръжка."
},
"enable-maintence-mode": "Активиране режим на поддръжка ",
"enable-maintenance-mode": "Активиране режим на поддръжка ",
"message": "Съобщение"
}
}

View File

@ -5,6 +5,6 @@
"description": "Wartungsmodus für die Website mit Zugang zum Admin-Bereich."
},
"enable-maintence-mode": "Aktivierung des Wartungsmodus",
"enable-maintenance-mode": "Aktivierung des Wartungsmodus",
"message": "Auf der Website angezeigter Hinweis"
}

View File

@ -5,6 +5,6 @@
"description": "Wartungsmodus für die Website mit Zugang zum Admin-Bereich."
},
"enable-maintence-mode": "Aktivierung des Wartungsmodus",
"enable-maintenance-mode": "Aktivierung des Wartungsmodus",
"message": "Auf der Website angezeigter Hinweis"
}
}

View File

@ -5,6 +5,6 @@
"description": "Set your site on maintenance mode, you can access to admin area."
},
"enable-maintence-mode": "Enable maintence mode",
"enable-maintenance-mode": "Enable maintenance mode",
"message": "Message"
}
}

View File

@ -5,6 +5,6 @@
"description": "Configura el sitio en modo mantenimiento, se puede acceder al panel de administración mientras tanto."
},
"enable-maintence-mode": "Habilitar modo mantenimiento",
"enable-maintenance-mode": "Habilitar modo mantenimiento",
"message": "Mensaje"
}
}

View File

@ -5,6 +5,6 @@
"description": "Configurer votre site sur le mode de maintenance, vous pouvez accéder à la zone d'administration."
},
"enable-maintence-mode": "Activer le mode de maintence",
"enable-maintenance-mode": "Activer le mode de maintenance",
"message": "Message"
}
}

View File

@ -5,6 +5,6 @@
"description": "メンテンナンス・モードに設定します。管理エリアにはアクセスできます。"
},
"enable-maintence-mode": "メンテンナンス・モードを有効にする",
"enable-maintenance-mode": "メンテンナンス・モードを有効にする",
"message": "メッセージ"
}
}

View File

@ -5,6 +5,6 @@
"description": "Przełącz stronę w tryb konwersacji (wówczas działać będzie tylko kokpit)."
},
"enable-maintence-mode": "Włącz tryb konwersacji",
"enable-maintenance-mode": "Włącz tryb konwersacji",
"message": "Wiadomość"
}
}

View File

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

View File

@ -5,6 +5,6 @@
"description": "Sitenizi bakım moduna alın, admin paneline erişmeye devam edebilirsiniz."
},
"enable-maintence-mode": "Bakım modunu etkinleştir.",
"enable-maintenance-mode": "Bakım modunu etkinleştir.",
"message": "Mesaj"
}

View File

@ -0,0 +1,10 @@
{
"plugin-data":
{
"name": "Режим обслуговування",
"description": "Перемикає ваш сайт у режим обслуговування, але ви матимете доступ до адмінки."
},
"enable-maintenance-mode": "Включити режим обслуговування",
"message": "Message"
}

View File

@ -5,6 +5,6 @@
"description": "設定您的網站為維護模式,但是您依然可以登入到管理介面"
},
"enable-maintence-mode": "啟用維護模式",
"enable-maintenance-mode": "啟用維護模式",
"message": "訊息"
}
}

View File

@ -1,9 +1,9 @@
{
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-plugins",
"website": "https://plugins.bludit.com",
"version": "1.1",
"releaseDate": "2016-02-13",
"releaseDate": "2016-02-20",
"license": "MIT",
"requires": "Bludit v1.1",
"notes": ""

View File

@ -1,11 +1,11 @@
<?php
class pluginMaintanceMode extends Plugin {
class pluginMaintenanceMode extends Plugin {
public function init()
{
$this->dbFields = array(
'enable'=>true,
'enable'=>false,
'message'=>'Temporarily down for maintenance.'
);
}
@ -16,7 +16,7 @@ class pluginMaintanceMode extends Plugin {
$html = '<div>';
$html .= '<input name="enable" id="jsenable" type="checkbox" value="true" '.($this->getDbField('enable')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jsenable">'.$Language->get('Enable maintence mode').'</label>';
$html .= '<label class="forCheckbox" for="jsenable">'.$Language->get('Enable maintenance mode').'</label>';
$html .= '</div>';
$html .= '<div>';

View File

@ -0,0 +1,7 @@
{
"plugin-data":
{
"name": "RSS-канал",
"description": "Цей плагін генерувати RSS для вашого сайту."
}
}

View File

@ -0,0 +1,7 @@
{
"plugin-data":
{
"name": "Sitemap",
"description": "Цей плагін генерує файл sitemap.xml, де перераховані веб-сторінки вашого сайту, щоб повідомити пошуковим системам про зміст сайту."
}
}

View File

@ -0,0 +1,8 @@
{
"theme-data":
{
"name": "Blogme",
"description": "Мінімалістська та чиста тема, з підтримкою зображення обкладинки, на основі Future Imperfect."
},
"top": "Top"
}

View File

@ -17,5 +17,5 @@
}
img {
max-width: 100%;
width: 100%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,7 @@
{
"theme-data":
{
"name": "Future Imperfect",
"description": "Чиста та дуже адаптивна тема від @n33co адаптована Diego Najar для Bludit."
}
}

View File

@ -1,6 +1,6 @@
<!-- Intro -->
<section id="intro">
<a href="<?php echo $Site->url() ?>" class="logo"><img src="<?php echo HTML_PATH_THEME ?>images/logo.jpg" alt=""></a>
<a href="<?php echo $Site->url() ?>" class="logo"><img src="<?php echo HTML_PATH_THEME ?>img/logo.jpg" alt=""></a>
<header>
<h2><?php echo $Site->title() ?></h2>
<p><?php echo $Site->description() ?></p>

View File

@ -43,7 +43,7 @@
}
// Call the method with FALSE to get the first part of the post
echo $Post->content(false)
echo $Post->content(false);
?>
</div>

View File

@ -41,7 +41,7 @@
}
// Call the method with FALSE to get the first part of the post
echo $Post->content(false)
echo $Post->content();
?>
</div>

View File

@ -36,6 +36,9 @@ define('PATH_UPLOADS_THUMBNAILS',PATH_UPLOADS.'thumbnails'.DS);
define('PATH_HELPERS', PATH_KERNEL.'helpers'.DS);
define('PATH_ABSTRACT', PATH_KERNEL.'abstract'.DS);
// Protecting against Symlink attacks.
define('CHECK_SYMBOLIC_LINKS', TRUE);
// Domain and protocol
define('DOMAIN', $_SERVER['HTTP_HOST']);
@ -243,7 +246,7 @@ function install($adminPassword, $email, $timezone)
$stdOut = array();
if( date_default_timezone_set($timezone) ) {
if( !date_default_timezone_set($timezone) ) {
date_default_timezone_set('UTC');
}