Merge remote-tracking branch 'dignajar/master'
This commit is contained in:
commit
f5a07eb732
|
@ -40,12 +40,12 @@ class Content {
|
|||
// Parse the content from the file index.txt
|
||||
private function build($path)
|
||||
{
|
||||
if( !Sanitize::pathFile($path.'index.txt') ) {
|
||||
if( !Sanitize::pathFile($path.FILENAME) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$tmp = 0;
|
||||
$lines = file($path.'index.txt');
|
||||
$lines = file($path.FILENAME);
|
||||
foreach($lines as $lineNumber=>$line)
|
||||
{
|
||||
$parts = array_map('trim', explode(':', $line, 2));
|
||||
|
@ -304,4 +304,4 @@ class Content {
|
|||
|
||||
return json_encode($tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,13 @@ class dbJSON
|
|||
$this->dbBackup = $this->db;
|
||||
|
||||
// LOCK_EX flag to prevent anyone else writing to the file at the same time.
|
||||
return file_put_contents($this->file, $data, LOCK_EX);
|
||||
if( file_put_contents($this->file, $data, LOCK_EX) ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns a JSON encoded string on success or FALSE on failure.
|
||||
|
|
|
@ -12,28 +12,53 @@ function updateBludit()
|
|||
// Check if Bludit need to be update.
|
||||
if( ($Site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) )
|
||||
{
|
||||
// --- Update dates on posts ---
|
||||
foreach($dbPosts->db as $key=>$post)
|
||||
{
|
||||
// LOG
|
||||
Log::set('UPDATE SYSTEM - Starting...');
|
||||
|
||||
// LOG
|
||||
Log::set('UPDATE SYSTEM - Checking posts.');
|
||||
|
||||
// Update posts
|
||||
foreach($dbPosts->db as $key=>$post) {
|
||||
|
||||
// Dates
|
||||
$date = Date::format($post['date'], 'Y-m-d H:i', DB_DATE_FORMAT);
|
||||
if($date !== false) {
|
||||
$dbPosts->setPostDb($key,'date',$date);
|
||||
$dbPosts->setPostDb($key, 'date', $date);
|
||||
}
|
||||
|
||||
// Checksum
|
||||
if( empty($post['md5file']) ) {
|
||||
$checksum = md5_file(PATH_POSTS.$key.DS.FILENAME);
|
||||
$dbPosts->setPostDb($key, 'md5file', $checksum);
|
||||
}
|
||||
}
|
||||
|
||||
$dbPosts->save();
|
||||
|
||||
// --- Update dates on pages ---
|
||||
foreach($dbPages->db as $key=>$page)
|
||||
{
|
||||
// LOG
|
||||
Log::set('UPDATE SYSTEM - Checking pages.');
|
||||
|
||||
// Update pages
|
||||
foreach($dbPages->db as $key=>$page) {
|
||||
|
||||
$date = Date::format($page['date'], 'Y-m-d H:i', DB_DATE_FORMAT);
|
||||
if($date !== false) {
|
||||
$dbPages->setPageDb($key,'date',$date);
|
||||
$dbPages->setPageDb($key, 'date', $date);
|
||||
}
|
||||
|
||||
// Checksum
|
||||
if( empty($post['md5file']) ) {
|
||||
$checksum = md5_file(PATH_PAGES.$key.DS.FILENAME);
|
||||
$dbPages->setPageDb($key, 'md5file', $checksum);
|
||||
}
|
||||
}
|
||||
|
||||
$dbPages->save();
|
||||
|
||||
// LOG
|
||||
Log::set('UPDATE SYSTEM - Checking directories.');
|
||||
|
||||
// --- Update directories ---
|
||||
$directories = array(
|
||||
PATH_POSTS,
|
||||
|
@ -44,8 +69,8 @@ function updateBludit()
|
|||
PATH_TMP
|
||||
);
|
||||
|
||||
foreach($directories as $dir)
|
||||
{
|
||||
foreach($directories as $dir) {
|
||||
|
||||
// Check if the directory is already created.
|
||||
if(!file_exists($dir)) {
|
||||
// Create the directory recursive.
|
||||
|
@ -56,7 +81,8 @@ function updateBludit()
|
|||
// Set and save the database.
|
||||
$Site->set(array('currentBuild'=>BLUDIT_BUILD));
|
||||
|
||||
Log::set('updateBludit'.LOG_SEP.'System updated');
|
||||
// LOG
|
||||
Log::set('UPDATE SYSTEM - Updated...');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -205,11 +205,11 @@ class HTML {
|
|||
|
||||
public static function bluditCoverImage($coverImage="")
|
||||
{
|
||||
global $L;
|
||||
|
||||
// Javascript code
|
||||
include(PATH_JS.'bludit-cover-image.js');
|
||||
|
||||
global $L;
|
||||
|
||||
$style = '';
|
||||
if(!empty($coverImage)) {
|
||||
$style = 'background-image: url('.HTML_PATH_UPLOADS_THUMBNAILS.$coverImage.')';
|
||||
|
@ -263,11 +263,11 @@ class HTML {
|
|||
|
||||
public static function bluditImagesV8()
|
||||
{
|
||||
global $L;
|
||||
|
||||
// Javascript code
|
||||
include(PATH_JS.'bludit-images-v8.js');
|
||||
|
||||
global $L;
|
||||
|
||||
$html = '<!-- BLUDIT IMAGES V8 -->';
|
||||
$html .= '
|
||||
<div id="bludit-images-v8" class="uk-modal">
|
||||
|
|
|
@ -14,8 +14,18 @@ echo '
|
|||
';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit</td>';
|
||||
echo '<td>'.BLUDIT_VERSION.' ('.BLUDIT_CODENAME.')</td>';
|
||||
echo '<td>Bludit version</td>';
|
||||
echo '<td>'.BLUDIT_VERSION.'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit codename</td>';
|
||||
echo '<td>'.BLUDIT_CODENAME.'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit build</td>';
|
||||
echo '<td>'.BLUDIT_BUILD.'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
|
|
|
@ -34,7 +34,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
|||
'label'=>$L->g('Locale'),
|
||||
'value'=>$Site->locale(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'tip'=>$L->g('you-can-use-this-field-to-define-a-set-off')
|
||||
'tip'=>$L->g('you-can-use-this-field-to-define-a-set-of')
|
||||
));
|
||||
|
||||
HTML::legend(array('value'=>$L->g('Date and time formats')));
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// Bludit version
|
||||
define('BLUDIT_VERSION', '1.4');
|
||||
define('BLUDIT_CODENAME', 'Spot');
|
||||
define('BLUDIT_RELEASE_DATE', '2016-06-20');
|
||||
define('BLUDIT_BUILD', '20160620');
|
||||
define('BLUDIT_VERSION', '1.5beta');
|
||||
define('BLUDIT_CODENAME', '');
|
||||
define('BLUDIT_RELEASE_DATE', '2016-07-16');
|
||||
define('BLUDIT_BUILD', '20160716');
|
||||
|
||||
// Debug mode
|
||||
define('DEBUG_MODE', TRUE);
|
||||
|
@ -91,7 +91,7 @@ define('NO_PARENT_CHAR', '3849abb4cb7abd24c2d8dac17b216f17');
|
|||
define('POSTS_PER_PAGE_ADMIN', 10);
|
||||
|
||||
// Cli mode status for new posts/pages
|
||||
define('CLI_MODE', false);
|
||||
define('CLI_MODE', FALSE);
|
||||
|
||||
// Cli mode status for new posts/pages
|
||||
define('CLI_STATUS', 'published');
|
||||
|
@ -99,6 +99,9 @@ define('CLI_STATUS', 'published');
|
|||
// Cli mode username for new posts/pages
|
||||
define('CLI_USERNAME', 'admin');
|
||||
|
||||
// Filename for posts and pages
|
||||
define('FILENAME', 'index.md');
|
||||
|
||||
// Database date format
|
||||
define('DB_DATE_FORMAT', 'Y-m-d H:i:s');
|
||||
|
||||
|
@ -120,17 +123,11 @@ define('EXTREME_FRIENDLY_URL', false);
|
|||
// Directory permissions
|
||||
define('DIR_PERMISSIONS', 0755);
|
||||
|
||||
// Multibyte string extension loaded.
|
||||
define('MB_STRING', extension_loaded('mbstring'));
|
||||
// Set internal character encoding.
|
||||
mb_internal_encoding(CHARSET);
|
||||
|
||||
if(MB_STRING)
|
||||
{
|
||||
// Set internal character encoding.
|
||||
mb_internal_encoding(CHARSET);
|
||||
|
||||
// Set HTTP output character encoding.
|
||||
mb_http_output(CHARSET);
|
||||
}
|
||||
// Set HTTP output character encoding.
|
||||
mb_http_output(CHARSET);
|
||||
|
||||
// Inclde Abstract Classes
|
||||
include(PATH_ABSTRACT.'dbjson.class.php');
|
||||
|
|
|
@ -13,8 +13,8 @@ $posts = array();
|
|||
// ============================================================================
|
||||
|
||||
// Search for changes on posts by the user.
|
||||
if( CLI_MODE ) {
|
||||
if($dbPosts->regenerateCli()) {
|
||||
if( CLI_MODE && false) {
|
||||
if($dbPosts->cliMode()) {
|
||||
reIndexTagsPosts();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ $pagesParentsPublished = array();
|
|||
|
||||
// Search for changes on pages by the user.
|
||||
if( CLI_MODE ) {
|
||||
$dbPages->regenerateCli();
|
||||
$dbPages->cliMode();
|
||||
}
|
||||
|
||||
// Build specific page.
|
||||
|
|
|
@ -84,7 +84,7 @@ class dbPages extends dbJSON
|
|||
|
||||
// Make the index.txt and save the file.
|
||||
$data = implode("\n", $dataForFile);
|
||||
if( file_put_contents(PATH_PAGES.$key.'/index.txt', $data) === false ) {
|
||||
if( file_put_contents(PATH_PAGES.$key.DS.FILENAME, $data) === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to put the content in the file index.txt');
|
||||
return false;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ class dbPages extends dbJSON
|
|||
|
||||
// Make the index.txt and save the file.
|
||||
$data = implode("\n", $dataForFile);
|
||||
if( file_put_contents(PATH_PAGES.$newKey.DS.'index.txt', $data) === false ) {
|
||||
if( file_put_contents(PATH_PAGES.$newKey.DS.FILENAME, $data) === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to put the content in the file index.txt');
|
||||
return false;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ class dbPages extends dbJSON
|
|||
}
|
||||
|
||||
// Delete the index.txt file.
|
||||
if( Filesystem::rmfile(PATH_PAGES.$key.DS.'index.txt') === false ) {
|
||||
if( Filesystem::rmfile(PATH_PAGES.$key.DS.FILENAME) === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to delete the file index.txt');
|
||||
}
|
||||
|
||||
|
@ -340,6 +340,167 @@ class dbPages extends dbJSON
|
|||
return $count - 1;
|
||||
}
|
||||
|
||||
public function cliMode()
|
||||
{
|
||||
// LOG
|
||||
Log::set('CLI MODE - PAGES - Starting...');
|
||||
|
||||
$pageList = array();
|
||||
|
||||
$pagesDirectories = Filesystem::listDirectories(PATH_PAGES);
|
||||
foreach( $pagesDirectories as $directory ) {
|
||||
|
||||
if( Sanitize::pathFile($directory.DS.FILENAME) ) {
|
||||
|
||||
// The key is the directory name
|
||||
$key = basename($directory);
|
||||
|
||||
// Add the page key to the list
|
||||
$pageList[$key] = true;
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - Page found, key: '.$key);
|
||||
|
||||
// Search sub-pages
|
||||
$subPaths = Filesystem::listDirectories($directory.DS);
|
||||
foreach( $subPaths as $subDirectory )
|
||||
{
|
||||
// The key of the sub-page
|
||||
$subKey = basename($subDirectory);
|
||||
|
||||
if( Sanitize::pathFile($subDirectory.DS.FILENAME) ) {
|
||||
|
||||
// Add the key of the sub-page, the key is composed by the directory/subdirectory
|
||||
$pageList[$key.'/'.$subKey] = true;
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - Page found, key: '.$key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach( $pageList as $key=>$value ) {
|
||||
|
||||
if( !isset($this->db[$key]) ) {
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - The page is not in the database, key: '.$key);
|
||||
|
||||
// Insert new post
|
||||
$this->cliModeInsert($key);
|
||||
}
|
||||
else {
|
||||
$checksum = md5_file(PATH_PAGES.$key.DS.FILENAME);
|
||||
|
||||
// If checksum is different, update the post
|
||||
if( !isset($this->db[$key]['md5file']) ||
|
||||
$this->db[$key]['md5file']!==$checksum ) {
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - Different md5 checksum, key: '.$key);
|
||||
|
||||
// Update the post
|
||||
$this->cliModeInsert($key, $update=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - Cleaning database...');
|
||||
|
||||
foreach( array_diff_key($this->db, $pageList) as $key=>$data ) {
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - Removing page from database, key: '.$key);
|
||||
|
||||
// Remove the page from database
|
||||
unset( $this->db[$key] );
|
||||
}
|
||||
|
||||
// Save the database
|
||||
$this->save();
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - PAGES - Finishing...');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private function cliModeInsert($key, $update=false)
|
||||
{
|
||||
if($update) {
|
||||
// LOG
|
||||
Log::set('CLI MODE - cliModeInsert() - Updating the page, key: '.$key);
|
||||
|
||||
// Database from the current database
|
||||
$dataForDb = $this->db[$key];
|
||||
$dataForDb['dateModified'] = Date::current(DB_DATE_FORMAT);
|
||||
}
|
||||
else {
|
||||
// LOG
|
||||
Log::set('CLI MODE - cliModeInsert() - Inserting the new post, key: '.$key);
|
||||
|
||||
// Database for the new page, fields with the default values
|
||||
$dataForDb = array();
|
||||
foreach( $this->dbFields as $field=>$options ) {
|
||||
|
||||
if( !$options['inFile'] ) {
|
||||
$dataForDb[$field] = $options['value'];
|
||||
}
|
||||
}
|
||||
|
||||
// Fields and value predefined in init.php
|
||||
$dataForDb['username'] = CLI_USERNAME;
|
||||
$dataForDb['status'] = CLI_STATUS;
|
||||
$dataForDb['date'] = Date::current(DB_DATE_FORMAT);
|
||||
}
|
||||
|
||||
// MD5 checksum
|
||||
$dataForDb['md5file'] = md5_file(PATH_PAGES.$key.DS.FILENAME);
|
||||
|
||||
// Generate the Object from the file
|
||||
$Page = new Page($key);
|
||||
|
||||
foreach( $this->dbFields as $field=>$options ) {
|
||||
|
||||
if( !$options['inFile'] ) {
|
||||
|
||||
// Get the field from the file
|
||||
// If the field doesn't exist, the function returns FALSE
|
||||
$data = $Page->getField($field);
|
||||
|
||||
if( $data!==false ) {
|
||||
|
||||
$tmpValue = '';
|
||||
|
||||
if( $field=='tags' ) {
|
||||
$tmpValue = $this->generateTags($data);
|
||||
}
|
||||
elseif( $field=='date' ) {
|
||||
|
||||
// Validate format date from file
|
||||
if( Valid::date($data, DB_DATE_FORMAT) ) {
|
||||
|
||||
$tmpValue = $data;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$tmpValue = Sanitize::html($data);
|
||||
}
|
||||
|
||||
settype($tmpValue, gettype($options['value']));
|
||||
$dataForDb[$field] = $tmpValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Insert row in the database
|
||||
$this->db[$key] = $dataForDb;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function regenerateCli()
|
||||
{
|
||||
$db = $this->db;
|
||||
|
@ -359,7 +520,7 @@ class dbPages extends dbJSON
|
|||
{
|
||||
$key = basename($directory);
|
||||
|
||||
if(file_exists($directory.DS.'index.txt')) {
|
||||
if(file_exists($directory.DS.FILENAME)) {
|
||||
// The key is the directory name
|
||||
$newPaths[$key] = true;
|
||||
}
|
||||
|
@ -371,7 +532,7 @@ class dbPages extends dbJSON
|
|||
{
|
||||
$subKey = basename($subDirectory);
|
||||
|
||||
if(file_exists($subDirectory.DS.'index.txt')) {
|
||||
if(file_exists($subDirectory.DS.FILENAME)) {
|
||||
// The key is composed by the directory/subdirectory
|
||||
$newPaths[$key.'/'.$subKey] = true;
|
||||
}
|
||||
|
@ -432,4 +593,4 @@ class dbPages extends dbJSON
|
|||
|
||||
return $this->db!=$db;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ class dbPosts extends dbJSON
|
|||
'allowComments'=> array('inFile'=>false, 'value'=>0),
|
||||
'date'=> array('inFile'=>false, 'value'=>''),
|
||||
'dateModified'=> array('inFile'=>false, 'value'=>''),
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>'')
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>''),
|
||||
'md5file'=> array('inFile'=>false, 'value'=>'')
|
||||
);
|
||||
|
||||
function __construct()
|
||||
|
@ -25,7 +26,7 @@ class dbPosts extends dbJSON
|
|||
// $total = FALSE, return the amount of published posts
|
||||
public function numberPost($total=false)
|
||||
{
|
||||
// Amount of posts, published, scheduled and draft
|
||||
// Amount of total posts, published, scheduled and draft
|
||||
if($total) {
|
||||
return count($this->db);
|
||||
}
|
||||
|
@ -69,7 +70,7 @@ class dbPosts extends dbJSON
|
|||
// Return TRUE if the post exists, FALSE otherwise.
|
||||
public function postExists($key)
|
||||
{
|
||||
return isset($this->db[$key]);
|
||||
return isset( $this->db[$key] );
|
||||
}
|
||||
|
||||
// Generate a valid Key/Slug.
|
||||
|
@ -104,15 +105,17 @@ class dbPosts extends dbJSON
|
|||
{
|
||||
$dataForDb = array(); // This data will be saved in the database
|
||||
$dataForFile = array(); // This data will be saved in the file
|
||||
|
||||
// Current date, format of DB_DATE_FORMAT
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Generate the database key.
|
||||
// Generate the database key / index
|
||||
$key = $this->generateKey($args['slug']);
|
||||
|
||||
// The user is always who is loggued.
|
||||
// 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.');
|
||||
Log::set(__METHOD__.LOG_SEP.'Session username doesnt exists.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -129,7 +132,7 @@ class dbPosts extends dbJSON
|
|||
// Verify arguments with the database fields.
|
||||
foreach($this->dbFields as $field=>$options)
|
||||
{
|
||||
// If the field is in the arguments.
|
||||
// If the field is in the arguments
|
||||
if( isset($args[$field]) )
|
||||
{
|
||||
if($field=='tags') {
|
||||
|
@ -145,13 +148,13 @@ class dbPosts extends dbJSON
|
|||
}
|
||||
}
|
||||
}
|
||||
// Default value if not in the arguments.
|
||||
// Set a default value if not in the arguments
|
||||
else
|
||||
{
|
||||
$tmpValue = $options['value'];
|
||||
}
|
||||
|
||||
// Check where the field will be written, if in the file or in the database.
|
||||
// Check where the field will be written, in the file or in the database
|
||||
if($options['inFile']) {
|
||||
$dataForFile[$field] = Text::firstCharUp($field).': '.$tmpValue;
|
||||
}
|
||||
|
@ -173,18 +176,27 @@ class dbPosts extends dbJSON
|
|||
|
||||
// Make the index.txt and save the file.
|
||||
$data = implode("\n", $dataForFile);
|
||||
if( file_put_contents(PATH_POSTS.$key.DS.'index.txt', $data) === false ) {
|
||||
if( file_put_contents(PATH_POSTS.$key.DS.FILENAME, $data) === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to put the content in the file index.txt');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Calculate the checksum of the file
|
||||
$dataForDb['md5file'] = md5_file(PATH_POSTS.$key.DS.FILENAME);
|
||||
|
||||
// Save the database
|
||||
$this->db[$key] = $dataForDb;
|
||||
|
||||
// Sort posts before save.
|
||||
// Sort posts before save
|
||||
$this->sortByDate();
|
||||
|
||||
if( $this->save() === false ) {
|
||||
|
||||
// Trying to rollback
|
||||
Log::set(__METHOD__.LOG_SEP.'Rollback...');
|
||||
Filesystem::rmfile(PATH_POSTS.$key.DS.FILENAME);
|
||||
Filesystem::rmdir(PATH_POSTS.$key);
|
||||
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
}
|
||||
|
@ -214,7 +226,7 @@ class dbPosts extends dbJSON
|
|||
}
|
||||
|
||||
// Delete the index.txt file.
|
||||
if( Filesystem::rmfile(PATH_POSTS.$key.DS.'index.txt') === false ) {
|
||||
if( Filesystem::rmfile(PATH_POSTS.$key.DS.FILENAME) === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to delete the file index.txt');
|
||||
}
|
||||
|
||||
|
@ -261,20 +273,15 @@ class dbPosts extends dbJSON
|
|||
return array();
|
||||
}
|
||||
|
||||
// Delete all posts from an user.
|
||||
// Delete all posts from an user
|
||||
public function deletePostsByUser($username)
|
||||
{
|
||||
foreach($this->db as $key=>$value)
|
||||
{
|
||||
if($value['username']==$username) {
|
||||
unset($this->db[$key]);
|
||||
}
|
||||
}
|
||||
foreach($this->db as $key=>$value) {
|
||||
|
||||
// Save the database.
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
if($value['username']==$username) {
|
||||
$this->delete($key);
|
||||
Log::set(__METHOD__.LOG_SEP.'Post deleted: '.$key);
|
||||
}
|
||||
}
|
||||
|
||||
Log::set(__METHOD__.LOG_SEP.'Posts from the user '.$username.' were delete.');
|
||||
|
@ -284,8 +291,8 @@ class dbPosts extends dbJSON
|
|||
// Link-up all posts from an user to another user.
|
||||
public function linkPostsToUser($oldUsername, $newUsername)
|
||||
{
|
||||
foreach($this->db as $key=>$value)
|
||||
{
|
||||
foreach($this->db as $key=>$value) {
|
||||
|
||||
if($value['username']==$oldUsername) {
|
||||
$this->db[$key]['username'] = $newUsername;
|
||||
}
|
||||
|
@ -308,6 +315,7 @@ class dbPosts extends dbJSON
|
|||
public function removeUnpublished()
|
||||
{
|
||||
foreach($this->db as $key=>$values) {
|
||||
|
||||
if($values['status']!='published') {
|
||||
unset($this->db[$key]);
|
||||
}
|
||||
|
@ -319,7 +327,7 @@ class dbPosts extends dbJSON
|
|||
// Return TRUE if there are new posts published, FALSE otherwise.
|
||||
public function scheduler()
|
||||
{
|
||||
// Get current date.
|
||||
// Get current date
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
$saveDatabase = false;
|
||||
|
@ -327,10 +335,11 @@ class dbPosts extends dbJSON
|
|||
// Check scheduled posts
|
||||
foreach($this->db as $postKey=>$values)
|
||||
{
|
||||
if($values['status']=='scheduled')
|
||||
{
|
||||
// Publish post.
|
||||
if($values['status']=='scheduled') {
|
||||
|
||||
// Publish post
|
||||
if($values['date']<=$currentDate) {
|
||||
|
||||
$this->db[$postKey]['status'] = 'published';
|
||||
$saveDatabase = true;
|
||||
}
|
||||
|
@ -348,7 +357,7 @@ class dbPosts extends dbJSON
|
|||
return false;
|
||||
}
|
||||
|
||||
Log::set(__METHOD__.LOG_SEP.'New post published from scheduler.');
|
||||
Log::set(__METHOD__.LOG_SEP.'New posts published from the scheduler.');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -401,110 +410,152 @@ class dbPosts extends dbJSON
|
|||
return $a['date']<$b['date'];
|
||||
}
|
||||
|
||||
// Return TRUE if there are new posts or orphan post deleted, FALSE otherwise.
|
||||
public function regenerateCli()
|
||||
public function cliMode()
|
||||
{
|
||||
$db = $this->db;
|
||||
$allPosts = array();
|
||||
$fields = array();
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
// LOG
|
||||
Log::set('CLI MODE - POSTS - Starting...');
|
||||
|
||||
// Generate default fields and values.
|
||||
// --------------------------------------------------------------------------
|
||||
foreach($this->dbFields as $field=>$options) {
|
||||
if(!$options['inFile']) {
|
||||
$fields[$field] = $options['value'];
|
||||
}
|
||||
}
|
||||
$postList = array();
|
||||
|
||||
$fields['status'] = CLI_STATUS;
|
||||
$fields['username'] = CLI_USERNAME;
|
||||
$fields['date'] = $currentDate;
|
||||
|
||||
// Get all posts from the first level of directories.
|
||||
$postsDirectories = Filesystem::listDirectories(PATH_POSTS);
|
||||
foreach($postsDirectories as $directory)
|
||||
{
|
||||
|
||||
// Check if the post has the index.txt file.
|
||||
if(Sanitize::pathFile($directory.DS.'index.txt'))
|
||||
{
|
||||
// The key is the directory name.
|
||||
foreach( $postsDirectories as $directory ) {
|
||||
|
||||
if( Sanitize::pathFile($directory.DS.FILENAME) ) {
|
||||
|
||||
// The key is the directory name
|
||||
$key = basename($directory);
|
||||
|
||||
Log::set('----------------');
|
||||
Log::set('CliMode - Post KEY: '.$key);
|
||||
// Add the key to the list
|
||||
$postList[$key] = true;
|
||||
|
||||
// This post exists
|
||||
$allPosts[$key] = true;
|
||||
// Checksum
|
||||
$checksum = md5_file($directory.DS.FILENAME);
|
||||
|
||||
// LOG
|
||||
Log::set('CLI MODE - Post found, key: '.$key);
|
||||
|
||||
// Create the new entry if not exist inside the DATABASE.
|
||||
if( !isset($this->db[$key]) ) {
|
||||
// New entry on database with the default fields and values.
|
||||
$this->db[$key] = $fields;
|
||||
|
||||
Log::set('CliMode - New post: '.$key);
|
||||
// LOG
|
||||
Log::set('CLI MODE - The post is not in the database, key: '.$key);
|
||||
|
||||
// Insert new post
|
||||
$this->cliModeInsert($key);
|
||||
}
|
||||
else {
|
||||
// If checksum is different, update the post
|
||||
if( $this->db[$key]['md5file']!==$checksum ) {
|
||||
|
||||
// Create the post from FILE.
|
||||
$Post = new Post($key);
|
||||
// LOG
|
||||
Log::set('CLI MODE - Different md5 checksum, key: '.$key);
|
||||
|
||||
// Update all fields from FILE to DATABASE.
|
||||
foreach($fields as $f=>$v)
|
||||
{
|
||||
// Get the value from FILE.
|
||||
$valueFromFile = $Post->getField($f);
|
||||
|
||||
// If the field exists on the FILE, update it.
|
||||
if( !empty($valueFromFile) )
|
||||
{
|
||||
Log::set('CliMode - Field to replace: '.$f);
|
||||
Log::set('CliMode - value from file: '.$valueFromFile);
|
||||
|
||||
if($f=='tags') {
|
||||
// Generate tags array.
|
||||
$this->db[$key]['tags'] = $this->generateTags($valueFromFile);
|
||||
}
|
||||
elseif($f=='date') {
|
||||
// Validate Date from file
|
||||
if(Valid::date($valueFromFile, DB_DATE_FORMAT)) {
|
||||
$this->db[$key]['date'] = $valueFromFile;
|
||||
|
||||
if( $valueFromFile > $currentDate ) {
|
||||
$this->db[$key]['status'] = 'scheduled';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Sanitize the values from file.
|
||||
$this->db[$key][$f] = Sanitize::html($valueFromFile);
|
||||
}
|
||||
// Update the post
|
||||
$this->cliModeInsert($key, $update=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove orphan posts from db, the orphan posts are posts deleted by hand (directory deleted).
|
||||
foreach( array_diff_key($db, $allPosts) as $key=>$data ) {
|
||||
unset($this->db[$key]);
|
||||
Log::set('CliMode - Deleted post: '.$key);
|
||||
// LOG
|
||||
Log::set('CLI MODE - Cleaning database...');
|
||||
|
||||
foreach( array_diff_key($this->db, $postList) as $key=>$data ) {
|
||||
// LOG
|
||||
Log::set('CLI MODE - Removing post from database, key: '.$key);
|
||||
|
||||
// Removing the post from database
|
||||
unset( $this->db[$key] );
|
||||
}
|
||||
|
||||
// Sort posts before save.
|
||||
// Sort posts before save
|
||||
$this->sortByDate();
|
||||
|
||||
// Save the database.
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
}
|
||||
// Save the database
|
||||
$this->save();
|
||||
|
||||
if($this->db!=$db) {
|
||||
Log::set(__METHOD__.LOG_SEP.'There are new or deleted posts.');
|
||||
return true;
|
||||
}
|
||||
// LOG
|
||||
Log::set('CLI MODE - POSTS - Finishing...');
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
private function cliModeInsert($key, $update=false)
|
||||
{
|
||||
if($update) {
|
||||
// LOG
|
||||
Log::set('CLI MODE - cliModeInsert() - Updating the post, key: '.$key);
|
||||
|
||||
// Database from the current database
|
||||
$dataForDb = $this->db[$key];
|
||||
$dataForDb['dateModified'] = Date::current(DB_DATE_FORMAT);
|
||||
}
|
||||
else {
|
||||
// LOG
|
||||
Log::set('CLI MODE - cliModeInsert() - Inserting the new post, key: '.$key);
|
||||
|
||||
// Database for the new post, fields with the default values
|
||||
$dataForDb = array();
|
||||
foreach( $this->dbFields as $field=>$options ) {
|
||||
|
||||
if( !$options['inFile'] ) {
|
||||
$dataForDb[$field] = $options['value'];
|
||||
}
|
||||
}
|
||||
|
||||
// Fields and value predefined in init.php
|
||||
$dataForDb['username'] = CLI_USERNAME;
|
||||
$dataForDb['status'] = CLI_STATUS;
|
||||
$dataForDb['date'] = Date::current(DB_DATE_FORMAT);
|
||||
}
|
||||
|
||||
// MD5 checksum
|
||||
$dataForDb['md5file'] = md5_file(PATH_POSTS.$key.DS.FILENAME);
|
||||
|
||||
// Generate the Object from the file
|
||||
$Post = new Post($key);
|
||||
|
||||
foreach( $this->dbFields as $field=>$options ) {
|
||||
|
||||
if( !$options['inFile'] ) {
|
||||
|
||||
// Get the field from the file
|
||||
// If the field doesn't exist, the function returns FALSE
|
||||
$data = $Post->getField($field);
|
||||
|
||||
if( $data!==false ) {
|
||||
|
||||
$tmpValue = '';
|
||||
|
||||
if( $field=='tags' ) {
|
||||
$tmpValue = $this->generateTags($data);
|
||||
}
|
||||
elseif( $field=='date' ) {
|
||||
|
||||
// Validate format date from file
|
||||
if( Valid::date($data, DB_DATE_FORMAT) ) {
|
||||
|
||||
$tmpValue = $data;
|
||||
|
||||
if( $data > $currentDate ) {
|
||||
$dataForDb['status'] = 'scheduled';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$tmpValue = Sanitize::html($data);
|
||||
}
|
||||
|
||||
settype($tmpValue, gettype($options['value']));
|
||||
$dataForDb[$field] = $tmpValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Insert row in the database
|
||||
$this->db[$key] = $dataForDb;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ $(document).ready(function() {
|
|||
},
|
||||
|
||||
notallowed: function(file, settings) {
|
||||
alert("'.$L->g('Supported image file types').' "+settings.allow);
|
||||
alert("<?php echo $L->g('error').'. '.$L->g('Supported image file types')?>: "+settings.allow);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ $(document).ready(function() {
|
|||
},
|
||||
|
||||
notallowed: function(file, settings) {
|
||||
alert("'.$L->g('Supported image file types').' "+settings.allow);
|
||||
alert("<?php echo $L->g('error').'. '.$L->g('Supported image file types')?>: "+settings.allow);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
"add-or-edit-description-tags-or": "Lisää ja muokkaa kuvausta, tageja tai sivun osoitetta.",
|
||||
"select-your-sites-language": "Valitse sivuston kieli.",
|
||||
"select-a-timezone-for-a-correct": "Valitse aikavyöhyke, jotta kellonajat ja päivämäärät näkyvät oikein.",
|
||||
"you-can-use-this-field-to-define-a-set-off": "Tällä kentällä voit määritellä joukon asetuksia liittyen kieleen, maahan ja erityisiin asetuksiin.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Tällä kentällä voit määritellä joukon asetuksia liittyen kieleen, maahan ja erityisiin asetuksiin.",
|
||||
"you-can-modify-the-url-which-identifies":"Voit muokata sivun osoitetta. Enintään 150 merkkiä",
|
||||
"this-field-can-help-describe-the-content": "Kirjoita tähän kuvaus sivun sisällöstä. Kuvaus näkyy hakutuloksessa esim. Googlessa. Enintään 150 merkkiä.",
|
||||
|
||||
|
|
|
@ -0,0 +1,244 @@
|
|||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Magyar",
|
||||
"english-name": "Hungarian",
|
||||
"last-update": "2016-06-25",
|
||||
"author": "Korfa",
|
||||
"email": "",
|
||||
"website": ""
|
||||
},
|
||||
|
||||
"username": "Felhasználónév",
|
||||
"password": "Jelszó",
|
||||
"confirm-password": "Jelszó újra",
|
||||
"editor": "WYSIWYG szerkesztő engedélyezése",
|
||||
"dashboard": "Vezérlőpult",
|
||||
"role": "Jogosultság",
|
||||
"post": "Új bejegyzés",
|
||||
"posts": "Új bejegyzés",
|
||||
"users": "Felhasználók hozzászólásainak engedélyezése",
|
||||
"administrator": "Adminisztrátor felhasználóneve",
|
||||
"add": "Kategória hozzáadása",
|
||||
"cancel": "Mégse",
|
||||
"content": "Haladó beállítások. Például: Hozzászólások engedélyezése vagy tiltása, kategóriák kiválasztása, stb.",
|
||||
"title": "Írja be a címet",
|
||||
"no-parent": "Nics szülő",
|
||||
"edit-page": "Oldal szerkesztése",
|
||||
"edit-post": "Bejegyzés szerkesztése",
|
||||
"add-a-new-user": "Új felhasználó:",
|
||||
"parent": "Szűlő",
|
||||
"friendly-url": "Keresőbarát URL",
|
||||
"description": "Rövid leírás. Maximum 150 karakter lehet.",
|
||||
"posted-by": "Szerző",
|
||||
"tags": "Címke",
|
||||
"position": "Pozíció",
|
||||
"save": "Változások mentése",
|
||||
"draft": "Piszkozat",
|
||||
"delete": "Törlés",
|
||||
"registered": "Regisztrált",
|
||||
"notifications": "Értesítések",
|
||||
"profile": "Profil",
|
||||
"email": "E-mail",
|
||||
"settings": "Beállítások",
|
||||
"general": "Általános beállítások",
|
||||
"advanced": "Bejegyzés haladó beállításai",
|
||||
"regional": "Területi beállítások",
|
||||
"about": "A blogodról",
|
||||
"login": "Belépés",
|
||||
"logout": "Kilépés",
|
||||
"manage": "Bejegyzések szerkesztése",
|
||||
"themes": "Témák",
|
||||
"prev-page": "Előző oldal",
|
||||
"next-page": "Következő oldal",
|
||||
"configure-plugin": "Bővítmény beállítása",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Biztosan törli?",
|
||||
"site-title": "Oldal cím",
|
||||
"site-slogan": "Oldal szlogen",
|
||||
"site-description": "Oldal leírás",
|
||||
"footer-text": "Lábléc text",
|
||||
"posts-per-page": "Bejegyzések oldalanként",
|
||||
"site-url": "Weboldal URL",
|
||||
"writting-settings": "Írási beállítások",
|
||||
"url-filters": "URL-szűrők",
|
||||
"page": "Bejegyzések száma egy oldalon",
|
||||
"pages": "Oldal",
|
||||
"home": "Kezdőlap",
|
||||
"welcome-back": "Isten hozta újra!",
|
||||
"language": "Nyelv",
|
||||
"website": "Weboldal",
|
||||
"timezone": "Időzóna",
|
||||
"locale": "Helyi",
|
||||
"new-post": "Új bejegyzés",
|
||||
"new-page": "Új oldal",
|
||||
"html-and-markdown-code-supported": "HTML és Markdown kód használható",
|
||||
"manage-posts": "Posztok kezelése",
|
||||
"published-date": "Publikálás dátuma",
|
||||
"modified-date": "Modosítás dátuma",
|
||||
"empty-title": "Üres cím",
|
||||
"plugins": "Bővitmények kezelése",
|
||||
"install-plugin": "Bővitmény telepítése",
|
||||
"uninstall-plugin": "Bővitmény eltávolítása",
|
||||
"new-password": "Új jelszó",
|
||||
"edit-user": "Felhasználó szerkesztése",
|
||||
"publish-now": "Publikálás azonnal",
|
||||
"first-name": "Keresztnév",
|
||||
"last-name": "Vezetéknév",
|
||||
"bludit-version": "Verzió",
|
||||
"powered-by": "Mozgásban tartja",
|
||||
"recent-posts": "Friss posztok",
|
||||
"manage-pages": "Oldalak kezelése",
|
||||
"advanced-options": "További lehetőségek",
|
||||
"user-deleted": "Felhasználó törlése",
|
||||
"page-added-successfully": "Oldal hozzáadása sikerült",
|
||||
"post-added-successfully": "Bejegyzés hozzáadása sikerült",
|
||||
"the-post-has-been-deleted-successfully": "Bejegyzés törlése sikerült",
|
||||
"the-page-has-been-deleted-successfully": "Oldal törlése sikerült",
|
||||
"username-or-password-incorrect": "A felhasználónév és a jelszó nem egyezik",
|
||||
"database-regenerated": "Adatbáis újragenerálva",
|
||||
"the-changes-have-been-saved": "A változtatások elmentve",
|
||||
"enable-more-features-at": "További funkciókat itt kapcsolhat be",
|
||||
"username-already-exists": "Felhasználónév már létezik",
|
||||
"username-field-is-empty": "Felhasználónév mező üres",
|
||||
"the-password-and-confirmation-password-do-not-match":"A jelszó és megerősítése nem egyezik",
|
||||
"user-has-been-added-successfully": "Felhasználó sikeresen hozzáadva",
|
||||
"you-do-not-have-sufficient-permissions": "Nem rendelkezik megfelelő engedélyekkel az oldal eléréséhez, lépjen kapcsolatba a rendszergazdával!",
|
||||
"settings-advanced-writting-settings": "Beállítások->Haladó->Írási beállítások",
|
||||
"new-posts-and-pages-synchronized": "Új hozzászólások és oldalak szinkronizálva.",
|
||||
"you-can-choose-the-users-privilege": "Kiválaszthatja a felhasználói jogosultságokat. A szerkesztői szerepkörrel csak oldalakat és bejegyzéseket tud írni.",
|
||||
"email-will-not-be-publicly-displayed": "E-mail nem jelenik meg nyilvánosan. A jelszó helyreállításához és az értesítésekhez javasoljuk.",
|
||||
"use-this-field-to-name-your-site": "Ebben a mezőben adja meg a weboldal nevét, ez minden oldal tetején meg fog jelenni a weboldalon.",
|
||||
"use-this-field-to-add-a-catchy-phrase": "Ebben a mezőben megadhat egy szlogent a weboldalhoz.",
|
||||
"you-can-add-a-site-description-to-provide": "Itt megadhatja a weboldal leírását, egy rövid összefoglalót az oldalról.",
|
||||
"you-can-add-a-small-text-on-the-bottom": "Megadhat egy apróbetűs szöveget az oldalak aljára. Pl. jogi információk, tulajdonos, dátumok, stb.",
|
||||
"number-of-posts-to-show-per-page": "Hány bejegyzés jelenjen meg oldalanként.",
|
||||
"the-url-of-your-site": "Az oldal címe (URL)",
|
||||
"add-or-edit-description-tags-or": "Felveheti és szerkesztheti a leírást, a címkéket, vagy módosíthatja a keresőbarát URL-t.",
|
||||
"select-your-sites-language": "Válassza ki weboldala nyelvét!",
|
||||
"select-a-timezone-for-a-correct": "Válasszon időzónát a dátumok megfelelő megjelenítéséhez!",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Ebben a mezőben a nyelvvel, országgal és más különleges beállításokkal kapcsolatos paramétereket veheti fel.",
|
||||
"you-can-modify-the-url-which-identifies": "Itt könnyen megjegyezhető kulcsszavak segítségével módosíthatja az oldalhoz vagy bejegyzéshez tartozó URL-t. Legfeljebb 150 karakter.",
|
||||
"this-field-can-help-describe-the-content": "Ebben a mezőben néhány szóban összefoglalhatja a tartalmat. Legfeljebb 150 karakter.",
|
||||
|
||||
"delete-the-user-and-all-its-posts": "A felhasználó törlése összes bejegyzésével együtt",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "A felhasználó törlése, bejegyzéseinek gazdája az adminisztrátor lesz",
|
||||
"read-more": "Tovább",
|
||||
"show-blog": "Blog megmutatása",
|
||||
"default-home-page": "Alapértelmezett kezdőoldal",
|
||||
"version": "Verziószám",
|
||||
"there-are-no-drafts": "Nincsenek vázlatok.",
|
||||
"create-a-new-article-for-your-blog": "Új cikk írása a blogba.",
|
||||
"create-a-new-page-for-your-website": "Új oldal létrehozása a weboldalra.",
|
||||
"invite-a-friend-to-collaborate-on-your-website": "Ismerős meghívása az oldalon végzendő közös munkára.",
|
||||
"change-your-language-and-region-settings": "Nyelvi és területi beállítások megváltoztatása.",
|
||||
"language-and-timezone": "Nyelv és időzóna",
|
||||
"author": "Szerző",
|
||||
"start-here": "Kezdje itt!",
|
||||
"install-theme": "Téma telepítése",
|
||||
"first-post": "Első bejegyzés",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "Gratulálunk a **Bludit** sikeres telepítéséhez!",
|
||||
"whats-next": "Mi következik?",
|
||||
|
||||
"follow-bludit-on": "Kövesse a Bluditot!",
|
||||
"visit-the-support-forum": "Látogassa meg a [fórumot](https://forum.bludit.com) ha segítségre van szüksége!",
|
||||
"read-the-documentation-for-more-information": "Olvassa el a [dokumentációt](https://docs.bludit.com) további információkért!",
|
||||
"share-with-your-friends-and-enjoy": "Ossza meg barátaival és élvezze!",
|
||||
"the-page-has-not-been-found": "Ez az oldal nem található.",
|
||||
"error": "Hiba",
|
||||
"bludit-installer": "Bludit telepítő",
|
||||
"welcome-to-the-bludit-installer": "Üdvözli a Bludit telepítő!",
|
||||
"complete-the-form-choose-a-password-for-the-username-admin": "Töltse ki az űrlapot, válasszon jelszót az « admin » felhasználónak!",
|
||||
"password-visible-field": "Jelszó, a mező tartalma látható!",
|
||||
"install": "Telepítés",
|
||||
"choose-your-language": "Válasszon nyelvet!",
|
||||
"next": "Tovább",
|
||||
"the-password-field-is-empty": "A Jelszó mező üres",
|
||||
"your-email-address-is-invalid": "Az email mező tartalma nem megfelelő.",
|
||||
"proceed-anyway": "Akkor is folytatom!",
|
||||
"drafts": "Vázlatok",
|
||||
"ip-address-has-been-blocked": "Az IP-cím le lett tiltva.",
|
||||
"try-again-in-a-few-minutes": "Próbálja újra néhány perc múlva!",
|
||||
"date": "Válasszon egy időzónát, a helyes idő megjelenítéséért!",
|
||||
|
||||
"scheduled": "Időzített",
|
||||
"publish": "Közzététel",
|
||||
"please-check-your-theme-configuration": "Kérjük, ellenőrizze a témája beállításait!",
|
||||
"plugin-label": "Bővítménycímke",
|
||||
"enabled": "Bekapcsolva",
|
||||
"disabled": "Kikapcsolva",
|
||||
"cli-mode": "Cli mód",
|
||||
"command-line-mode": "Parancssori üzemmód",
|
||||
"enable-the-command-line-mode-if-you-add-edit": "Kapcsolja be a parancssori üzemmódot, ha a fájlrendszerből akar bejegyzéseket és oldalakat létrehozni, szerkeszteni vagy törölni!",
|
||||
|
||||
"configure": "Beállitás",
|
||||
"uninstall": "Eltávolítás",
|
||||
"change-password": "Jelszó megváltoztatása",
|
||||
"to-schedule-the-post-just-select-the-date-and-time": "A bejegyzés időzítéséhez csak válassza ki a dátumot és az időpontot!",
|
||||
"write-the-tags-separated-by-commas": "Írja be a címkéket vesszővel elválasztva!",
|
||||
"status": "Állapot",
|
||||
"published": "A bejegyzés sikeresen közzétéve",
|
||||
"scheduled-posts": "Időzített bejegyzések",
|
||||
"statistics": "Statisztika",
|
||||
"name": "Felhasználónév",
|
||||
"email-account-settings": "Levelezési beállítások",
|
||||
"sender-email": "Küldő email címe",
|
||||
"emails-will-be-sent-from-this-address": "Az emailek erről a címről kerülnek majd kiküldésre.",
|
||||
"bludit-login-access-code": "BLUDIT - Hozzáférési kód",
|
||||
"check-your-inbox-for-your-login-access-code": "Ellenőrizze postafiókjában a hozzáférési kódot tartalmazó emailt!",
|
||||
"there-was-a-problem-sending-the-email": "Nem sikerült elküldeni az emailt.",
|
||||
"back-to-login-form": "Vissza a bejelentkezési oldalra",
|
||||
"send-me-a-login-access-code": "Hozzáférési kódot kérek",
|
||||
"get-login-access-code": "Hozzáférési kód megszerzése",
|
||||
"email-notification-login-access-code": "<p>Ezt az értesítőt {{WEBSITE_NAME}} küldte Önnek.</p><p>Hozzáférési kódot kérvényezett, ehhez kattintson az alábbi linkre::</p><p>{{LINK}}</p>",
|
||||
"there-are-no-scheduled-posts": "Nincsenek időzített bejegyzések.",
|
||||
"show-password": "Mutassa a jelszót",
|
||||
"edit-or-remove-your=pages": "Oldalak szerkesztése vagy törlése.",
|
||||
"edit-or-remove-your-blogs-posts": "A blog bejegyzéseinek szerkesztése vagy törlése.",
|
||||
"general-settings": "Általános beállítások",
|
||||
"advanced-settings": "Haladó beállítások",
|
||||
"manage-users": "Felhasználók kezelése",
|
||||
"view-and-edit-your-profile": "Profiloldalának megtekintése és szerkesztése.",
|
||||
|
||||
"password-must-be-at-least-6-characters-long": "A jelszónak legalább 6 karakter hosszúnak kell lennie.",
|
||||
"images": "Képek",
|
||||
"upload-image": "Kép feltöltése",
|
||||
"drag-and-drop-or-click-here": "Húzza ide vagy kattintson ide!",
|
||||
"insert-image": "Kép beszúrása",
|
||||
"supported-image-file-types": "Támogatott képfájl-formátumok",
|
||||
"date-format": "Dátumformátum",
|
||||
"time-format": "Időformátum",
|
||||
"chat-with-developers-and-users-on-gitter": "Beszélgessen a fejlesztőkkel és a felhasználókkal a [Gitter-en](https://gitter.im/dignajar/bludit)",
|
||||
"this-is-a-brief-description-of-yourself-our-your-site": "Itt röviden bemutathatja önmagát vagy a weboldalát, a szöveg megváltoztatásához menjen az Adminlapra, Beállítások, Bővítmények, majd a Névjegy bővítmény beállításai.",
|
||||
"profile-picture": "Profilkép",
|
||||
"the-about-page-is-very-important": "A Névjegy oldal fontos és hasznos eszköz a potenciális ügyfelek és partnerek számára. Azoknak, akiket érdekel, ki áll a weboldal mögött, a Névjegy oldal jelenti az elsődleges információforrást.",
|
||||
"change-this-pages-content-on-the-admin-panel": "Ennek az oldalnak a tartalmát így változtathatja meg: Adminlap, Vezérlés, Oldalak, majd kattintás a Névjegy oldalra.",
|
||||
"about-your-site-or-yourself": "Névjegy - önmaga és a weboldal bemutatása",
|
||||
"welcome-to-bludit": "Üdvözöljük a Bluditban!",
|
||||
|
||||
"site-information": "Weboldal-információ",
|
||||
"date-and-time-formats": "Dátum- és időformátum",
|
||||
"activate": "Aktiválás",
|
||||
"deactivate": "Deaktiválás",
|
||||
|
||||
"cover-image": "Borítóképek",
|
||||
"blog": "Blog",
|
||||
"more-images": "További képek",
|
||||
|
||||
"click-here-to-cancel": "Kattintson ide a kilépéshez!",
|
||||
"type-the-tag-and-press-enter": "Írja be a címkét és nyomjon Entert!",
|
||||
"add": "Hozzáadás",
|
||||
"manage-your-bludit-from-the-admin-panel": "Vezérelje a Bluditot az [admin felületről]({{ADMIN_AREA_LINK}})",
|
||||
"there-are-no-images": "Nincs kép",
|
||||
|
||||
"click-on-the-image-for-options": "Kattintson a képre a beállításokhoz!",
|
||||
"set-as-cover-image": "Beállítás borítóképnek",
|
||||
"delete-image": "Kép törlése",
|
||||
"image-description": "Kép leírása",
|
||||
|
||||
"social-networks-links": "Közösségimédia-linkek",
|
||||
|
||||
"email-access-code": "Email hozzáférési kód",
|
||||
"current-format": "Jelenlegi",
|
||||
|
||||
"welcome": "Üdvözöljük a blogon!"
|
||||
}
|
|
@ -116,7 +116,6 @@
|
|||
"add-or-edit-description-tags-or": "Tambah atau sunting perihal dan tag atau ubah URL mesra.",
|
||||
"select-your-sites-language": "Pilih bahasa laman web anda.",
|
||||
"select-a-timezone-for-a-correct": "Pilih zon masa yang betul untuk paparan tarikh dan masa yang tepat.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the language, country and special preferences.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Tetapkan set parameter berkaitan dengan bahasa, negara dan keutamaan istimewa.",
|
||||
"you-can-modify-the-url-which-identifies":"Anda boleh mengubah URL yang mengenalpasti sesuatu artikel atau halaman menggunakan kata kunci yang boleh dibaca oleh manusia. Tidak lebih daripada 150 aksara.",
|
||||
"this-field-can-help-describe-the-content": "Huraikan secara ringkas kandungan ini. Tidak lebih daripada 150 aksara.",
|
||||
|
|
|
@ -231,8 +231,14 @@
|
|||
|
||||
"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",
|
||||
"delete-image": "Resmi sil",
|
||||
"image-description": "Resim açıklaması",
|
||||
|
||||
"social-networks-links": "Sosyal ağ linkleri"
|
||||
"social-networks-links": "Sosyal ağ linkleri",
|
||||
|
||||
"email-access-code": "Email erişim kodu",
|
||||
"current-format": "Geçerli format",
|
||||
|
||||
"welcome": "Hoşgeldiniz"
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Simplified Chinese (PRC)",
|
||||
"english-name": "Simplified Chinese",
|
||||
"last-update": "2017-07-20",
|
||||
"author": "Zhou Hao",
|
||||
"email": "zhou.hao.27@gmail.com",
|
||||
"website": "http://thezeusoft.com"
|
||||
},
|
||||
|
||||
"username": "用户名称",
|
||||
"password": "用户密码",
|
||||
"confirm-password": "确认密码",
|
||||
"editor": "作者",
|
||||
"dashboard": "主页面",
|
||||
"role": "角色",
|
||||
"post": "文章",
|
||||
"posts": "文章",
|
||||
"users": "用户",
|
||||
"administrator": "管理员",
|
||||
"add": "新增",
|
||||
"cancel": "取消",
|
||||
"content": "內容",
|
||||
"title": "标题",
|
||||
"no-parent": "沒有继承页面",
|
||||
"edit-page": "编辑页面",
|
||||
"edit-post": "编辑文章",
|
||||
"add-a-new-user": "新增用户",
|
||||
"parent": "继承页面",
|
||||
"friendly-url": "友好链接",
|
||||
"description": "简介",
|
||||
"posted-by": "发表由",
|
||||
"tags": "标签",
|
||||
"position": "位置",
|
||||
"save": "存储",
|
||||
"draft": "草稿",
|
||||
"delete": "刪除",
|
||||
"registered": "已注册",
|
||||
"Notifications": "通知",
|
||||
"profile": "个人档案",
|
||||
"email": "电子邮件",
|
||||
"settings": "设定",
|
||||
"general": "一般设定",
|
||||
"advanced": "高级设定",
|
||||
"regional": "区域",
|
||||
"about": "关于",
|
||||
"login": "登入",
|
||||
"logout": "登出",
|
||||
"manage": "管理",
|
||||
"themes": "主题",
|
||||
"prev-page": "上一页",
|
||||
"next-page": "下一页",
|
||||
"configure-plugin": "插件设置",
|
||||
"confirm-delete-this-action-cannot-be-undone": "确认删除? 此动作不可复原",
|
||||
"site-title": "网站标题",
|
||||
"site-slogan": "网站标语",
|
||||
"site-description": "网站简介",
|
||||
"footer-text": "页脚文字",
|
||||
"posts-per-page": "每页文章数",
|
||||
"site-url": "网站网址",
|
||||
"writting-settings": "写作设定",
|
||||
"url-filters": "网址过滤器",
|
||||
"page": "页面",
|
||||
"pages": "页面",
|
||||
"home": "首页",
|
||||
"welcome-back": "欢迎回來",
|
||||
"language": "语言",
|
||||
"website": "网站",
|
||||
"timezone": "时区",
|
||||
"locale": "区域",
|
||||
"new-post": "新文章",
|
||||
"html-and-markdown-code-supported": "支持HTML与Markdown代码",
|
||||
"new-page": "新页面",
|
||||
"manage-posts": "管理文章",
|
||||
"published-date": "发表日期",
|
||||
"modified-date": "修改日期",
|
||||
"empty-title": "空白标题",
|
||||
"plugins": "插件",
|
||||
"install-plugin": "安装插件",
|
||||
"uninstall-plugin": "移除插件",
|
||||
"new-password": "新密码",
|
||||
"edit-user": "编辑用户",
|
||||
"publish-now": "立即发表",
|
||||
"first-name": "名",
|
||||
"last-name": "姓",
|
||||
"bludit-version": "Bludit版本",
|
||||
"powered-by": "Powered by",
|
||||
"recent-posts": "最新文章",
|
||||
"manage-pages": "管理页面",
|
||||
"advanced-options": "高级设定",
|
||||
"user-deleted": "用户已刪除",
|
||||
"page-added-successfully": "页面已成功新增",
|
||||
"post-added-successfully": "文章已成功新增",
|
||||
"the-post-has-been-deleted-successfully": "页面已成功被刪除",
|
||||
"the-page-has-been-deleted-successfully": "页面已成功被刪除",
|
||||
"username-or-password-incorrect": "用户账号或者密码不正确",
|
||||
"database-regenerated": "数据库已经重建",
|
||||
"the-changes-have-been-saved": "变更已经储存",
|
||||
"enable-more-features-at": "启用更多功能在",
|
||||
"username-already-exists": "用户名称已经存在",
|
||||
"username-field-is-empty": "用户名称字段为空白",
|
||||
"the-password-and-confirmation-password-do-not-match":"用户密码与确认密码不符",
|
||||
"user-has-been-added-successfully": "用户已新增成功",
|
||||
"you-do-not-have-sufficient-permissions": "您沒有权限存取此页面,请联络管理员",
|
||||
"settings-advanced-writting-settings": "设定->高级设定->写作设定",
|
||||
"new-posts-and-pages-synchronized": "新文章与页面已经同步完成",
|
||||
"you-can-choose-the-users-privilege": "您可以选择用户的权限,作者角色只能撰写页面与文章",
|
||||
"email-will-not-be-publicly-displayed": "Email將不会被公开显示,建议用于复原密码或是通知",
|
||||
"use-this-field-to-name-your-site": "使用此字段来填写您网站名称,它將会被显示在每一个页面的最上方",
|
||||
"use-this-field-to-add-a-catchy-phrase": "使用此字段来帮您的网站添加一个可以朗朗上口的标语吧",
|
||||
"you-can-add-a-site-description-to-provide": "您可以新增一段简短的简介來介绍您的网站",
|
||||
"you-can-add-a-small-text-on-the-bottom": "您可以在每一页的页尾放置一些短短的文字,例如: 版权、所有人、日期...",
|
||||
"number-of-posts-to-show-per-page": "每一页会显示几篇文章的数量",
|
||||
"the-url-of-your-site": "网站的网址",
|
||||
"add-or-edit-description-tags-or": "新增或编辑简介、标签或是修改友好网址",
|
||||
"select-your-sites-language": "选择您所使用的语言",
|
||||
"select-a-timezone-for-a-correct": "选择正确的时区来显示时间",
|
||||
"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个字",
|
||||
"write-the-tags-separated-by-comma": "撰写使用逗号分隔的标签,例如: 标签1, 标签2, 标签3",
|
||||
"delete-the-user-and-all-its-posts":"刪除用户与他所发表的文章",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "刪除用户,並將他所发表的文章关联至管理員权限的用户",
|
||||
"read-more": "继续阅读",
|
||||
"show-blog": "显示博客",
|
||||
"default-home-page": "默认首页",
|
||||
"version": "版本",
|
||||
"there-are-no-drafts": "沒有草稿",
|
||||
"create-a-new-article-for-your-blog":"为您的网站建立一篇新文章",
|
||||
"create-a-new-page-for-your-website":"为您的网站建立一个新页面",
|
||||
"invite-a-friend-to-collaborate-on-your-website":"邀请朋友合作开发网站",
|
||||
"change-your-language-and-region-settings":"更改您所使用的语言与地区设定",
|
||||
"language-and-timezone":"语言与时区",
|
||||
"author": "作者",
|
||||
"start-here": "从这里开始",
|
||||
"install-theme": "安装主题",
|
||||
"first-post": "第一篇文章",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "恭喜您已经成功安裝您的**Bludit**",
|
||||
"whats-next": "接下來",
|
||||
"manage-your-bludit-from-the-admin-panel": "通过[admin area](./admin/)管理您的Bludit",
|
||||
"follow-bludit-on": "Follow Bludit on",
|
||||
"visit-the-support-forum": "访问[forum](https://forum.bludit.com)來取得支持",
|
||||
"read-the-documentation-for-more-information": "阅读[documentation](https://docs.bludit.com)來获得更多资讯",
|
||||
"share-with-your-friends-and-enjoy": "分享给您的朋友们",
|
||||
"the-page-has-not-been-found": "此页面不存在",
|
||||
"error": "错误",
|
||||
"bludit-installer": "Bludit 安裝程式",
|
||||
"welcome-to-the-bludit-installer": "欢迎使用Bludit安裝程序",
|
||||
"complete-the-form-choose-a-password-for-the-username-admin": "请完成表单,为此用户名称 « admin » 设置一下密码吧",
|
||||
"password-visible-field": "密码可见字段",
|
||||
"install": "安装",
|
||||
"choose-your-language": "选择您所使用的语言",
|
||||
"next": "下一步",
|
||||
"the-password-field-is-empty": "密码字段是空白的",
|
||||
"your-email-address-is-invalid":"您所输入的email是无效的",
|
||||
"proceed-anyway": "继续!",
|
||||
"drafts":"草稿",
|
||||
"ip-address-has-been-blocked": "IP 地址已被封锁",
|
||||
"try-again-in-a-few-minutes": "请过几分钟后再试",
|
||||
"date": "日期",
|
||||
"you-can-schedule-the-post-just-select-the-date-and-time": "您只需要选择一个日期与时间就可以预定什么時候再发表此文章",
|
||||
"scheduled": "已安排",
|
||||
"publish": "发表",
|
||||
"please-check-your-theme-configuration": "请检查您的主題设定",
|
||||
"plugin-label": "插件标签",
|
||||
"enabled": "启用",
|
||||
"disabled": "禁止",
|
||||
"cli-mode": "Cli模式",
|
||||
"command-line-mode": "命令行模式",
|
||||
"enable-the-command-line-mode-if-you-add-edit": "启用命令行模式,如果您需要完成新增或者编辑工作。",
|
||||
"configure": "设定",
|
||||
"uninstall": "移除",
|
||||
"change-password": "更改密码",
|
||||
"to-schedule-the-post-just-select-the-date-and-time": "选择日期与时间预定发布此文章",
|
||||
"write-the-tags-separated-by-commas": "使用逗号分隔标签",
|
||||
"status": "状态",
|
||||
"published": "已发表",
|
||||
"scheduled-posts": "预定文章",
|
||||
"statistics": "统计",
|
||||
"name": "名称",
|
||||
"email-account-settings":"Email账户设定",
|
||||
"sender-email": "发送者email",
|
||||
"emails-will-be-sent-from-this-address":"Emails將会被从此地址发送",
|
||||
"bludit-login-access-code": "BLUDIT - 登入存取码",
|
||||
"check-your-inbox-for-your-login-access-code":"检查您的收件夹是否有收到登入存取码",
|
||||
"there-was-a-problem-sending-the-email":"发送email时发生问题",
|
||||
"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": "编辑或移除您的博客文章",
|
||||
"general-settings": "一般设定",
|
||||
"advanced-settings": "高级设定",
|
||||
"manage-users": "管理者",
|
||||
"view-and-edit-your-profile": "查看与编辑您的个人资料",
|
||||
"password-must-be-at-least-6-characters-long": "密吗长度必须在6个字节以上",
|
||||
"images": "图片",
|
||||
"upload-image": "上传图片",
|
||||
"drag-and-drop-or-click-here": "拖曳您的图片到这里或是点选这里选择图片",
|
||||
"insert-image": "插入图片",
|
||||
"supported-image-file-types": "可以上传的文件格式",
|
||||
"date-format": "日期格式",
|
||||
"time-format": "时间格式",
|
||||
"chat-with-developers-and-users-on-gitter":"与开发者或者用户聊聊~ [Gitter](https://gitter.im/dignajar/bludit)",
|
||||
"this-is-a-brief-description-of-yourself-our-your-site":"這这是关于您自己或是网站的简短介绍,如果想要修改,请至管理界面/设置/插件,设置一个名为“关于”的插件",
|
||||
"profile-picture": "大头帖",
|
||||
"the-about-page-is-very-important": "此关于页面对于用户与合作伙伴非常重要和有用的工具。对于那些不了解您网站內容的人,您的关于页面将会是他们第一个阅读的页面。",
|
||||
"change-this-pages-content-on-the-admin-panel": "在管理界面中更改此页面的內容,管理/页面,接着点选关于页面。",
|
||||
"about-your-site-or-yourself": "关于您的网站或是您自己",
|
||||
"welcome-to-bludit": "欢迎使用Bludit",
|
||||
"you-can-use-this-field-to-define-a-set-off": "使用此字段定义默认语言代码",
|
||||
"More images": "更多的图片",
|
||||
"Cover image": "封面图片",
|
||||
"site-information": "网站资讯",
|
||||
"date-and-time-formats": "日期与时间格式",
|
||||
"activate": "启用",
|
||||
"deactivate": "关闭"
|
||||
}
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Интерфейс для взаимодействия с Bludit через HTTP протокол."
|
||||
}
|
||||
}
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class pluginAPI extends Plugin {
|
|||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<p><b>Show post:</b> <a href="'.DOMAIN_BASE.'api/show/page/{PAGE-NAME}">'.DOMAIN_BASE.'api/show/page/{PAGE-NAME}</a></p>';
|
||||
$html .= '<p><b>Show page:</b> <a href="'.DOMAIN_BASE.'api/show/page/{PAGE-NAME}">'.DOMAIN_BASE.'api/show/page/{PAGE-NAME}</a></p>';
|
||||
$html .= '<div class="tip">Get a particular page, change the {PAGE-NAME} with the page friendly url.</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -157,7 +157,7 @@ class pluginAPI extends Plugin {
|
|||
// Get parameters
|
||||
$parameters = explode('/', $URI);
|
||||
|
||||
for($i=0; $i<4; $i++) {
|
||||
for($i=0; $i<3; $i++) {
|
||||
if(empty($parameters[$i])) {
|
||||
return false;
|
||||
} else {
|
||||
|
@ -173,6 +173,8 @@ class pluginAPI extends Plugin {
|
|||
'message'=>'Check the parameters'
|
||||
));
|
||||
|
||||
|
||||
|
||||
if($parameters[0]==='show') {
|
||||
|
||||
if($parameters[1]==='all') {
|
||||
|
@ -208,4 +210,4 @@ class pluginAPI extends Plugin {
|
|||
header('Content-Type: application/json');
|
||||
exit($json);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class pluginPages extends Plugin {
|
|||
}
|
||||
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<ul>';
|
||||
$html .= '<ul class="parents">';
|
||||
|
||||
// Show home link ?
|
||||
if($this->getDbField('homeLink')) {
|
||||
|
@ -59,8 +59,8 @@ class pluginPages extends Plugin {
|
|||
if( $parent->published() )
|
||||
{
|
||||
// Print the parent
|
||||
$html .= '<li>';
|
||||
$html .= '<a class="parent '.( ($parent->key()==$Url->slug())?' active':'').'" href="'.$parent->permalink().'">'.$parent->title().'</a>';
|
||||
$html .= '<li class="parent">';
|
||||
$html .= '<a class="parent'.( ($parent->key()==$Url->slug())?' active':'').'" href="'.$parent->permalink().'">'.$parent->title().'</a>';
|
||||
|
||||
// Check if the parent has children
|
||||
if(isset($pagesParents[$parent->key()]))
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
},
|
||||
"toolbar": "Панель инструментов",
|
||||
"tab-size": "Размер панели",
|
||||
"autosave": "Autosave"
|
||||
"autosave": "Автосохранение"
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.11.2",
|
||||
"releaseDate": "2016-06-14",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Карта сайта",
|
||||
"description": "Этот плагин генерирует sitemap.xml где вы можете перечислить все страницы сайта для удобства индексирования содержимого поисковыми системами."
|
||||
}
|
||||
}
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"version": "1.4",
|
||||
"releaseDate": "2016-05-20",
|
||||
"license": "CCA 3.0",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"compatible": "1.5beta",
|
||||
"notes": ""
|
||||
}
|
||||
|
|
41
install.php
41
install.php
|
@ -40,6 +40,9 @@ define('PATH_ABSTRACT', PATH_KERNEL.'abstract'.DS);
|
|||
// Protecting against Symlink attacks.
|
||||
define('CHECK_SYMBOLIC_LINKS', TRUE);
|
||||
|
||||
// Filename for posts and pages
|
||||
define('FILENAME', 'index.md');
|
||||
|
||||
// Domain and protocol
|
||||
define('DOMAIN', $_SERVER['HTTP_HOST']);
|
||||
|
||||
|
@ -89,17 +92,11 @@ define('DB_DATE_FORMAT', 'Y-m-d H:i:s');
|
|||
// Charset, default UTF-8.
|
||||
define('CHARSET', 'UTF-8');
|
||||
|
||||
// Multibyte string extension loaded.
|
||||
define('MB_STRING', extension_loaded('mbstring'));
|
||||
// Set internal character encoding.
|
||||
mb_internal_encoding(CHARSET);
|
||||
|
||||
if(MB_STRING)
|
||||
{
|
||||
// Set internal character encoding.
|
||||
mb_internal_encoding(CHARSET);
|
||||
|
||||
// Set HTTP output character encoding.
|
||||
mb_http_output(CHARSET);
|
||||
}
|
||||
// Set HTTP output character encoding.
|
||||
mb_http_output(CHARSET);
|
||||
|
||||
// --- PHP Classes ---
|
||||
|
||||
|
@ -223,6 +220,16 @@ function checkSystem()
|
|||
array_push($stdOut, $tmp);
|
||||
}
|
||||
|
||||
if(!in_array('mbstring', $phpModules))
|
||||
{
|
||||
$errorText = 'PHP module Multibyte String (mbstring) is not installed. (ERR_206)';
|
||||
error_log($errorText, 0);
|
||||
|
||||
$tmp['title'] = 'PHP module';
|
||||
$tmp['errorText'] = $errorText;
|
||||
array_push($stdOut, $tmp);
|
||||
}
|
||||
|
||||
// Try to create the directory content
|
||||
@mkdir(PATH_CONTENT, $dirpermissions, true);
|
||||
|
||||
|
@ -486,22 +493,22 @@ function install($adminPassword, $email, $timezone)
|
|||
LOCK_EX
|
||||
);
|
||||
|
||||
// File index.txt for error page
|
||||
// File FILENAME for error page
|
||||
$data = 'Title: '.$Language->get('Error').'
|
||||
Content: '.$Language->get('The page has not been found');
|
||||
|
||||
file_put_contents(PATH_PAGES.'error'.DS.'index.txt', $data, LOCK_EX);
|
||||
file_put_contents(PATH_PAGES.'error'.DS.FILENAME, $data, LOCK_EX);
|
||||
|
||||
// File index.txt for about page
|
||||
// File FILENAME for about page
|
||||
$data = 'Title: '.$Language->get('About').'
|
||||
Content:
|
||||
'.$Language->get('the-about-page-is-very-important').'
|
||||
|
||||
'.$Language->get('change-this-pages-content-on-the-admin-panel');
|
||||
|
||||
file_put_contents(PATH_PAGES.'about'.DS.'index.txt', $data, LOCK_EX);
|
||||
file_put_contents(PATH_PAGES.'about'.DS.FILENAME, $data, LOCK_EX);
|
||||
|
||||
// File index.txt for welcome post
|
||||
// File FILENAME for welcome post
|
||||
$text1 = Text::replaceAssoc(
|
||||
array(
|
||||
'{{ADMIN_AREA_LINK}}'=>PROTOCOL.DOMAIN.HTML_PATH_ROOT.'admin'
|
||||
|
@ -520,7 +527,7 @@ Content:
|
|||
- '.$Language->get('Read the documentation for more information').'
|
||||
- '.$Language->get('Share with your friends and enjoy');
|
||||
|
||||
file_put_contents(PATH_POSTS.$firstPostSlug.DS.'index.txt', $data, LOCK_EX);
|
||||
file_put_contents(PATH_POSTS.$firstPostSlug.DS.FILENAME, $data, LOCK_EX);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -720,4 +727,4 @@ $(document).ready(function()
|
|||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue