Merge remote-tracking branch 'dignajar/master'
This commit is contained in:
commit
2ddbbec693
@ -7,7 +7,7 @@ Bludit is a simple web application to make your own **blog** or **site** in seco
|
||||
- [Documentation](https://docs.bludit.com)
|
||||
- [Help and Support](https://forum.bludit.com)
|
||||
- [Plugins](https://plugins.bludit.com)
|
||||
- [Themes](https://github.com/dignajar/bludit-themes)
|
||||
- [Themes](https://themes.bludit.com)
|
||||
- [More plugins and themes](https://forum.bludit.com/viewforum.php?f=14)
|
||||
|
||||
Social networks
|
||||
|
@ -1,6 +0,0 @@
|
||||
# Bludit
|
||||
|
||||
Set the correct permissions on this directory.
|
||||
|
||||
Documentation:
|
||||
- http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205
|
@ -11,13 +11,13 @@ class Content {
|
||||
}
|
||||
}
|
||||
|
||||
// Return true if valid
|
||||
// Return TRUE if the content is loaded correctly
|
||||
public function isValid()
|
||||
{
|
||||
return($this->vars!==false);
|
||||
}
|
||||
|
||||
// Returns the value from the $field, FALSE if the field doesn't exist.
|
||||
// Returns the value from the $field, FALSE if the field doesn't exist
|
||||
public function getField($field)
|
||||
{
|
||||
if(isset($this->vars[$field])) {
|
||||
@ -27,7 +27,7 @@ class Content {
|
||||
return false;
|
||||
}
|
||||
|
||||
// $notoverwrite true if you don't want to replace the value if are set previusly
|
||||
// Set a value to a field
|
||||
public function setField($field, $value, $overwrite=true)
|
||||
{
|
||||
if($overwrite || empty($this->vars[$field])) {
|
||||
@ -37,6 +37,7 @@ class Content {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Parse the content from the file index.txt
|
||||
private function build($path)
|
||||
{
|
||||
if( !Sanitize::pathFile($path.'index.txt') ) {
|
||||
@ -88,17 +89,17 @@ class Content {
|
||||
|
||||
}
|
||||
|
||||
// Returns the post title.
|
||||
// Returns the title field
|
||||
public function title()
|
||||
{
|
||||
return $this->getField('title');
|
||||
}
|
||||
|
||||
// Returns the content.
|
||||
// This content is markdown parser.
|
||||
// (boolean) $fullContent, TRUE returns all content, if FALSE returns the first part of the content.
|
||||
// (boolean) $raw, TRUE returns the content without sanitized, FALSE otherwise.
|
||||
public function content($fullContent=true, $raw=true)
|
||||
// Returns the content
|
||||
// This content is markdown parser
|
||||
// (boolean) $fullContent, TRUE returns all content, if FALSE returns the first part of the content
|
||||
// (boolean) $noSanitize, TRUE returns the content without sanitized
|
||||
public function content($fullContent=true, $noSanitize=true)
|
||||
{
|
||||
// This content is not sanitized.
|
||||
$content = $this->getField('content');
|
||||
@ -107,55 +108,60 @@ class Content {
|
||||
$content = $this->getField('breakContent');
|
||||
}
|
||||
|
||||
if($raw) {
|
||||
if($noSanitize) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
return Sanitize::html($content);
|
||||
}
|
||||
|
||||
// Returns the content
|
||||
// This content is not markdown parser
|
||||
// (boolean) $noSanitize, TRUE returns the content without sanitized
|
||||
public function contentRaw($noSanitize=true)
|
||||
{
|
||||
// This content is not sanitized.
|
||||
$content = $this->getField('contentRaw');
|
||||
|
||||
if($noSanitize) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
return Sanitize::html($content);
|
||||
}
|
||||
|
||||
// Returns TRUE if the content has the text splited
|
||||
public function readMore()
|
||||
{
|
||||
return $this->getField('readMore');
|
||||
}
|
||||
|
||||
// Returns the content. This content is not markdown parser.
|
||||
// (boolean) $raw, TRUE returns the content without sanitized, FALSE otherwise.
|
||||
public function contentRaw($raw=true)
|
||||
{
|
||||
// This content is not sanitized.
|
||||
$content = $this->getField('contentRaw');
|
||||
|
||||
if($raw) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
return Sanitize::html($content);
|
||||
}
|
||||
|
||||
// Returns the field key
|
||||
public function key()
|
||||
{
|
||||
return $this->getField('key');
|
||||
}
|
||||
|
||||
// Returns TRUE if the post is published, FALSE otherwise.
|
||||
// Returns TRUE if the post/page is published, FALSE otherwise.
|
||||
public function published()
|
||||
{
|
||||
return ($this->getField('status')==='published');
|
||||
}
|
||||
|
||||
// Returns TRUE if the post is scheduled, FALSE otherwise.
|
||||
// Returns TRUE if the post/page is scheduled, FALSE otherwise.
|
||||
public function scheduled()
|
||||
{
|
||||
return ($this->getField('status')==='scheduled');
|
||||
}
|
||||
|
||||
// Returns TRUE if the post is draft, FALSE otherwise.
|
||||
// Returns TRUE if the post/page is draft, FALSE otherwise.
|
||||
public function draft()
|
||||
{
|
||||
return ($this->getField('status')=='draft');
|
||||
}
|
||||
|
||||
// Returns the file name of the cover image, FALSE there isn't a cover image setted
|
||||
// (boolean) $absolute, TRUE returns the absolute path and file name, FALSE just the file name
|
||||
public function coverImage($absolute=true)
|
||||
{
|
||||
$fileName = $this->getField('coverImage');
|
||||
@ -171,12 +177,16 @@ class Content {
|
||||
return $fileName;
|
||||
}
|
||||
|
||||
/*
|
||||
DEPRECATED ?
|
||||
|
||||
public function profilePicture()
|
||||
{
|
||||
return HTML_PATH_UPLOADS_PROFILES.$this->username().'.jpg';
|
||||
}
|
||||
|
||||
// Returns the user object if $field is false, otherwise returns the field's value.
|
||||
*/
|
||||
// Returns the user object
|
||||
// (boolean) $field, TRUE returns the value of the field, FALSE returns the object
|
||||
public function user($field=false)
|
||||
{
|
||||
// Get the user object.
|
||||
@ -189,23 +199,26 @@ class Content {
|
||||
return $User;
|
||||
}
|
||||
|
||||
// Returns the username who created the post/page
|
||||
public function username()
|
||||
{
|
||||
return $this->getField('username');
|
||||
}
|
||||
|
||||
// Returns the description field
|
||||
public function description()
|
||||
{
|
||||
return $this->getField('description');
|
||||
}
|
||||
|
||||
// Returns the post date according to locale settings and format settings.
|
||||
// Returns the date according to locale settings and format settings
|
||||
public function date()
|
||||
{
|
||||
return $this->getField('date');
|
||||
}
|
||||
|
||||
// Returns the post date according to locale settings and format as database stored.
|
||||
// Returns the date according to locale settings and format as database stored
|
||||
// (string) $format, you can specify the date format
|
||||
public function dateRaw($format=false)
|
||||
{
|
||||
$date = $this->getField('dateRaw');
|
||||
@ -217,6 +230,8 @@ class Content {
|
||||
return $date;
|
||||
}
|
||||
|
||||
// Returns the tags
|
||||
// (boolean) $returnsArray, TRUE to get the tags as an array, FALSE to get the tags separeted by comma
|
||||
public function tags($returnsArray=false)
|
||||
{
|
||||
global $Url;
|
||||
@ -241,6 +256,8 @@ class Content {
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the permalink
|
||||
// (boolean) $absolute, TRUE returns the post/page link with the DOMAIN, FALSE without the DOMAIN
|
||||
public function permalink($absolute=false)
|
||||
{
|
||||
global $Url;
|
||||
@ -271,5 +288,20 @@ class Content {
|
||||
return '/'.$htmlPath.'/'.$tmp;
|
||||
}
|
||||
|
||||
public function json($returnsArray=false)
|
||||
{
|
||||
$tmp['key'] = $this->key();
|
||||
$tmp['title'] = $this->title();
|
||||
$tmp['content'] = $this->content(); // Markdown parsed
|
||||
$tmp['contentRaw'] = $this->contentRaw(); // No Markdown parsed
|
||||
$tmp['description'] = $this->description();
|
||||
$tmp['date'] = $this->dateRaw();
|
||||
$tmp['permalink'] = $this->permalink(true);
|
||||
|
||||
}
|
||||
if($returnsArray) {
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
return json_encode($tmp);
|
||||
}
|
||||
}
|
@ -105,7 +105,7 @@ class Plugin {
|
||||
|
||||
public function setDb($args)
|
||||
{
|
||||
$tmp = array();
|
||||
$tmp = $this->db;
|
||||
|
||||
foreach($this->dbFields as $key=>$value)
|
||||
{
|
||||
@ -120,10 +120,6 @@ class Plugin {
|
||||
// Set value
|
||||
$tmp[$key] = $tmpValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmp[$key] = false;
|
||||
}
|
||||
}
|
||||
|
||||
$this->db = $tmp;
|
||||
@ -174,6 +170,13 @@ class Plugin {
|
||||
return $this->className;
|
||||
}
|
||||
|
||||
public function isCompatible()
|
||||
{
|
||||
$explode = explode(',', $this->getMetadata('compatible'));
|
||||
|
||||
return in_array(BLUDIT_VERSION, $explode);
|
||||
}
|
||||
|
||||
public function directoryName()
|
||||
{
|
||||
return $this->directoryName;
|
||||
@ -186,7 +189,7 @@ class Plugin {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create plugin directory for databases and others files.
|
||||
// Create plugin directory for databases and other files
|
||||
mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, 0755, true);
|
||||
|
||||
// Create database
|
||||
@ -219,4 +222,4 @@ class Plugin {
|
||||
// The user can define your own dbFields.
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -43,6 +43,9 @@ if(!method_exists($_Plugin, 'form')) {
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
$_Plugin->setDb($_POST);
|
||||
|
||||
Theme::plugins('afterFormSave');
|
||||
|
||||
Alert::set($Language->g('the-changes-have-been-saved'));
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ function checkPost($args)
|
||||
|
||||
$sent = Email::send(array(
|
||||
'from'=>$Site->emailFrom(),
|
||||
'fromName'=>$Site->title(),
|
||||
'to'=>$email,
|
||||
'subject'=>$subject,
|
||||
'message'=>$message
|
||||
|
@ -1,31 +1,172 @@
|
||||
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
|
||||
.uk-form * {
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
.uk-tab a {
|
||||
color: #2196f3 !important;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #2196f3 !important;
|
||||
}
|
||||
|
||||
/* UIKIT HACKs navbar
|
||||
---------------------------------------------------------------- */
|
||||
.uk-navbar {
|
||||
background: #EEEEEE !important;
|
||||
background: #323232 !important;
|
||||
border: 0 !important;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
.uk-navbar-nav a {
|
||||
border: none !important;
|
||||
border-radius: none !important;
|
||||
text-shadow: none !important;
|
||||
color: #fff !important;
|
||||
font-weight: 300 !important;
|
||||
padding: 0 25px !important;
|
||||
}
|
||||
|
||||
.uk-navbar-nav > li.uk-open > a,
|
||||
.uk-navbar-nav > li:hover > a,
|
||||
.uk-navbar-nav > li:focus > a,
|
||||
.uk-navbar-nav > li > a:focus,
|
||||
.uk-navbar-nav > li > a:hover {
|
||||
background: none !important;
|
||||
border-radius: 0 !important;
|
||||
color: #BBBBBB !important;
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.uk-nav-navbar > li > a:focus,
|
||||
.uk-nav-navbar > li > a:hover {
|
||||
background: none !important;
|
||||
border-radius: 0 !important;
|
||||
color: #888 !important;
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.uk-navbar-nav > li.uk-active > a {
|
||||
background: none !important;
|
||||
color: #BBBBBB !important;
|
||||
}
|
||||
|
||||
.uk-navbar-nav .uk-border-circle {
|
||||
border-radius: 20px !important;
|
||||
}
|
||||
|
||||
.uk-dropdown-navbar {
|
||||
margin: 0 !important;
|
||||
padding: 10px 0 !important;
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
border-radius: 0 !important;
|
||||
border-left: 0 !important;
|
||||
border-right: 0 !important;
|
||||
border-top: 0 !important;
|
||||
}
|
||||
|
||||
.uk-dropdown-navbar li {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.uk-dropdown-navbar a {
|
||||
color: #323232 !important;
|
||||
}
|
||||
|
||||
li.bludit-logo {
|
||||
color: #fff !important;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
height: 41px;
|
||||
line-height: 40px;
|
||||
margin-left: -1px;
|
||||
margin-top: -1px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.bludit-user-navbar {
|
||||
background: #333 none repeat scroll 0 0;
|
||||
border-color: #ccc;
|
||||
border-radius: 0 0 5px 5px !important;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.bludit-user-navbar a {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
@media (min-width: 333px) and (max-width: 959px) {
|
||||
/* Hidden the Welcome USERNAME */
|
||||
.uk-navbar-flip {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Expand and hidden the sidebar */
|
||||
.uk-width-large-8-10 {
|
||||
width: 100% !important;
|
||||
}
|
||||
/* Hidden the sidebar */
|
||||
.uk-width-large-2-10 {
|
||||
width: 0% !important;
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.uk-width-large-4-5,
|
||||
.uk-width-large-8-10 {
|
||||
width: 75% !important;
|
||||
}
|
||||
|
||||
.uk-width-large-1-5,
|
||||
.uk-width-large-2-10 {
|
||||
width: 25% !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* UIKIT HACKs hidden navbar
|
||||
---------------------------------------------------------------- */
|
||||
|
||||
.uk-navbar-brand {
|
||||
text-shadow: none !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.uk-navbar-toggle {
|
||||
text-shadow: none !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.uk-nav-offcanvas > li > a {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
/* UIKIT HACKs buttons
|
||||
---------------------------------------------------------------- */
|
||||
.uk-button {
|
||||
color: #ffffff;
|
||||
padding: 2px 22px;
|
||||
padding: 2px 26px;
|
||||
text-shadow: none;
|
||||
background: #888888;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.uk-button:hover,
|
||||
.uk-button:focus {
|
||||
background-color: #777777;
|
||||
color: #ffffff;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.uk-button-primary {
|
||||
background: #2672ec;
|
||||
background: #2196f3 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.uk-button-primary:hover {
|
||||
background: #1F5FC4;
|
||||
background: #2EA3FF;
|
||||
color: #fafafa !important;
|
||||
}
|
||||
|
||||
/* UIKIT HACKs forms
|
||||
---------------------------------------------------------------- */
|
||||
legend {
|
||||
width: 70% !important;
|
||||
margin-top: 40px !important;
|
||||
@ -35,16 +176,7 @@ legend.first-child {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.uk-navbar-nav > li > a {
|
||||
border: none;
|
||||
height: 70px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.uk-nav-navbar > li > a:hover,
|
||||
.uk-nav-navbar > li > a:focus {
|
||||
background: #2672ec;
|
||||
}
|
||||
|
||||
.uk-form-label {
|
||||
color: #666666;
|
||||
@ -61,6 +193,11 @@ legend.first-child {
|
||||
padding: 15px 10px;
|
||||
}
|
||||
|
||||
.uk-table td.children {
|
||||
padding: 15px 10px 15px 25px;
|
||||
}
|
||||
|
||||
|
||||
.uk-badge {
|
||||
margin-right: 5px !important;
|
||||
font-size: 0.9em;
|
||||
@ -72,36 +209,15 @@ a {
|
||||
color: #2672ec;
|
||||
}
|
||||
|
||||
li.bludit-logo {
|
||||
color: #848484 !important;
|
||||
height: 70px;
|
||||
padding: 15px;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
height: 35px;
|
||||
line-height: 40px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
.uk-panel-box {
|
||||
background: #F9F9F9 !important;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.uk-container {
|
||||
max-width: 1280px !important;
|
||||
}
|
||||
|
||||
.uk-width-large-4-5,
|
||||
.uk-width-large-8-10 {
|
||||
width: 75% !important;
|
||||
}
|
||||
|
||||
.uk-width-large-1-5,
|
||||
.uk-width-large-2-10 {
|
||||
width: 25% !important;
|
||||
}
|
||||
|
||||
.uk-thumbnail {
|
||||
margin: 2px 3px !important;
|
||||
max-width: 30% !important;
|
||||
@ -116,6 +232,7 @@ li.bludit-logo {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
/* ----------- BLUDIT ----------- */
|
||||
|
||||
body {
|
||||
@ -165,23 +282,22 @@ table.statistics tr:last-child td {
|
||||
/* ----------- ALERT ----------- */
|
||||
|
||||
#alert {
|
||||
bottom: 20px;
|
||||
bottom: 0;
|
||||
color: #ffffff;
|
||||
padding: 10px;
|
||||
display: none;
|
||||
padding: 24px;
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
text-align: center;
|
||||
width: 350px;
|
||||
z-index: 100;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.alert-ok {
|
||||
background: rgba(48, 102, 187, 0.91);
|
||||
background: #4374C1;
|
||||
}
|
||||
|
||||
.alert-fail {
|
||||
background: rgba(187, 48, 48, 0.91);
|
||||
background: #c14343;
|
||||
}
|
||||
|
||||
/* ----------- FORM ----------- */
|
||||
@ -237,7 +353,8 @@ table.statistics tr:last-child td {
|
||||
}
|
||||
|
||||
#jstagList span.select {
|
||||
color: #2672ec;
|
||||
color: #2196f3;
|
||||
padding: 2px 13px;
|
||||
}
|
||||
|
||||
/* ----------- BLUDIT IMAGES V8 ----------- */
|
||||
@ -542,6 +659,7 @@ div.plugin-links > span.separator {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/* ----------- PLUGINS FILTER ----------- */
|
||||
|
||||
tr.plugin-installed.hide, tr.plugin-notInstalled.hide{
|
||||
@ -549,4 +667,8 @@ tr.plugin-installed.hide, tr.plugin-notInstalled.hide{
|
||||
opacity:0;
|
||||
display:none;
|
||||
transition:all 0.1s;
|
||||
=======
|
||||
#jsformplugin p {
|
||||
margin-bottom: 0;
|
||||
>>>>>>> dignajar/master
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
|
||||
html {
|
||||
background: #f1f1f1;
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.uk-form * {
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
.uk-button-primary {
|
||||
@ -13,8 +17,9 @@ html {
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
border-color: #FFF !important;
|
||||
background: #FFF;
|
||||
border-color: #EBEBEB !important;
|
||||
border-radius: 2px !important;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
input:disabled {
|
||||
@ -22,7 +27,7 @@ input:disabled {
|
||||
}
|
||||
|
||||
.uk-vertical-align-middle {
|
||||
margin-top: -100px;
|
||||
margin-top: -150px;
|
||||
}
|
||||
|
||||
.uk-panel {
|
||||
|
@ -1,6 +1,10 @@
|
||||
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
|
||||
html {
|
||||
background: #f1f1f1;
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
* {
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
.uk-button-primary {
|
||||
@ -13,7 +17,13 @@ html {
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
border-color: #FFF !important;
|
||||
border-color: #EBEBEB !important;
|
||||
border-radius: 2px !important;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.uk-alert {
|
||||
padding: 22px 0 !important;
|
||||
}
|
||||
|
||||
/* ----------- BLUDIT ----------- */
|
||||
@ -40,10 +50,10 @@ div.login-form > h2 {
|
||||
}
|
||||
|
||||
a.login-email {
|
||||
background: #f9f9f9 none repeat scroll 0 0;
|
||||
border: 1px solid #eeeeee;
|
||||
border: 0;
|
||||
color: #777;
|
||||
display: block;
|
||||
padding: 20px;
|
||||
margin: 20px 0;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
.uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}
|
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}
|
@ -1,7 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<base href="<?php echo HTML_PATH_ADMIN_THEME ?>">
|
||||
<meta charset="<?php echo CHARSET ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
@ -9,23 +8,22 @@
|
||||
<title><?php echo $layout['title'] ?></title>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="shortcut icon" type="image/x-icon" href="./img/favicon.png">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_ADMIN_THEME.'img/favicon.png' ?>">
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" type="text/css" href="./css/uikit/uikit.almost-flat.min.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="./css/uikit/upload.almost-flat.min.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="./css/uikit/form-file.almost-flat.min.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="./css/uikit/placeholder.almost-flat.min.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="./css/uikit/progress.almost-flat.min.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="./css/default.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="./css/jquery.datetimepicker.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/uikit.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/upload.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/form-file.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/placeholder.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/progress.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/default.css?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/jquery.datetimepicker.css?version='.BLUDIT_VERSION ?>">
|
||||
|
||||
<!-- Javascript -->
|
||||
<script charset="utf-8" src="./js/jquery.min.js?version=<?php echo BLUDIT_VERSION ?>"></script>
|
||||
<script charset="utf-8" src="./js/uikit/uikit.min.js?version=<?php echo BLUDIT_VERSION ?>"></script>
|
||||
<script charset="utf-8" src="./js/uikit/upload.min.js?version=<?php echo BLUDIT_VERSION ?>"></script>
|
||||
<script charset="utf-8" src="./js/jquery.datetimepicker.js?version=<?php echo BLUDIT_VERSION ?>"></script>
|
||||
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/jquery.min.js?version='.BLUDIT_VERSION ?>"></script>
|
||||
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/uikit/uikit.min.js?version='.BLUDIT_VERSION ?>"></script>
|
||||
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/uikit/upload.min.js?version='.BLUDIT_VERSION ?>"></script>
|
||||
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/jquery.datetimepicker.js?version='.BLUDIT_VERSION ?>"></script>
|
||||
|
||||
<!-- Plugins -->
|
||||
<?php Theme::plugins('adminHead') ?>
|
||||
@ -43,8 +41,8 @@ $(document).ready(function() {
|
||||
echo '$("#alert").slideDown().delay(3500).slideUp();';
|
||||
}
|
||||
?>
|
||||
$("#alert").click(function() {
|
||||
$(this).hide();
|
||||
$(window).click(function() {
|
||||
$("#alert").hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -61,12 +59,12 @@ $(document).ready(function() {
|
||||
|
||||
<ul class="uk-navbar-nav">
|
||||
<li class="bludit-logo">BLUDIT</li>
|
||||
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?> ><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><i class="uk-icon-object-ungroup"></i> <?php $L->p('Dashboard') ?></a></li>
|
||||
<li <?php echo ($layout['view']=='new-post')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><i class="uk-icon-pencil"></i> <?php $L->p('New post') ?></a></li>
|
||||
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><i class="uk-icon-file-text-o"></i> <?php $L->p('New page') ?></a></li>
|
||||
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?> ><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a></li>
|
||||
<li <?php echo ($layout['view']=='new-post')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><?php $L->p('New post') ?></a></li>
|
||||
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a></li>
|
||||
|
||||
<li class="uk-parent" data-uk-dropdown>
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><i class="uk-icon-clone"></i> <?php $L->p('Manage') ?> ▾</a>
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><?php $L->p('Manage') ?> ▾</a>
|
||||
<div class="uk-dropdown uk-dropdown-navbar">
|
||||
<ul class="uk-nav uk-nav-navbar">
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Posts') ?></a></li>
|
||||
@ -80,27 +78,30 @@ $(document).ready(function() {
|
||||
|
||||
<?php if($Login->role() == 'admin') { ?>
|
||||
<li class="uk-parent" data-uk-dropdown>
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><i class="uk-icon-cog"></i> <?php $L->p('Settings') ?> ▾</a>
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('Settings') ?> ▾</a>
|
||||
<div class="uk-dropdown uk-dropdown-navbar">
|
||||
<ul class="uk-nav uk-nav-navbar">
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><i class="uk-icon-th-large"></i> <?php $L->p('General') ?></a></li>
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><i class="uk-icon-th"></i> <?php $L->p('Advanced') ?></a></li>
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><i class="uk-icon-cog"></i> <?php $L->p('General') ?></a></li>
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><i class="uk-icon-cogs"></i> <?php $L->p('Advanced') ?></a></li>
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><i class="uk-icon-globe"></i> <?php $L->p('Language and timezone') ?></a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><i class="uk-icon-puzzle-piece"></i> <?php $L->p('Plugins') ?></a></li>
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><i class="uk-icon-paint-brush"></i> <?php $L->p('Themes') ?></a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a></li>
|
||||
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><i class="uk-icon-support"></i> <?php $L->p('About') ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<li><a target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><?php $L->p('Website') ?></a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="uk-navbar-flip">
|
||||
<ul class="uk-navbar-nav">
|
||||
<li class="uk-parent" data-uk-dropdown>
|
||||
|
||||
<?php
|
||||
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.png';
|
||||
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.png')) {
|
||||
@ -108,13 +109,11 @@ $(document).ready(function() {
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>">
|
||||
<img class="uk-border-circle" width="28px" src="<?php echo $profilePictureSrc ?>" alt=""> <?php echo $Login->username() ?> ▾
|
||||
<img class="uk-border-circle" width="28px" src="<?php echo $profilePictureSrc ?>" alt=""> <?php $L->p('Welcome') ?> <?php echo $Login->username() ?>
|
||||
</a>
|
||||
<div class="uk-dropdown uk-dropdown-navbar">
|
||||
|
||||
<div class="uk-dropdown uk-dropdown-navbar bludit-user-navbar">
|
||||
<ul class="uk-nav uk-nav-navbar">
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>"><?php $L->p('Profile') ?></a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><?php $L->p('Website') ?></a></li>
|
||||
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><?php $L->p('Logout') ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,2 +1,256 @@
|
||||
/*! UIkit 2.24.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json"),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var s=a.complete;if(a.single){var d=o.length,f=0,p=!0;a.beforeAll(o),a.complete=function(e,t){f+=1,s(e,t),a.filelimit&&f>=a.filelimit&&(p=!1),p&&d>f?r([o[f]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){s(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.dataTransfer&&n.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.dataTransfer.files]),t(n.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),e.support.ajaxupload&&e.$.event.props.push("dataTransfer"),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
|
||||
if (window.UIkit) {
|
||||
component = addon(UIkit);
|
||||
}
|
||||
|
||||
if (typeof define == "function" && define.amd) {
|
||||
define("uikit-upload", ["uikit"], function(){
|
||||
return component || addon(UIkit);
|
||||
});
|
||||
}
|
||||
|
||||
})(function(UI){
|
||||
|
||||
"use strict";
|
||||
|
||||
UI.component('uploadSelect', {
|
||||
|
||||
init: function() {
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.on("change", function() {
|
||||
xhrupload($this.element[0].files, $this.options);
|
||||
var twin = $this.element.clone(true).data('uploadSelect', $this);
|
||||
$this.element.replaceWith(twin);
|
||||
$this.element = twin;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
UI.component('uploadDrop', {
|
||||
|
||||
defaults: {
|
||||
'dragoverClass': 'uk-dragover'
|
||||
},
|
||||
|
||||
init: function() {
|
||||
|
||||
var $this = this, hasdragCls = false;
|
||||
|
||||
this.on("drop", function(e){
|
||||
|
||||
if (e.originalEvent.dataTransfer && e.originalEvent.dataTransfer.files) {
|
||||
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$this.element.removeClass($this.options.dragoverClass);
|
||||
$this.element.trigger('dropped.uk.upload', [e.originalEvent.dataTransfer.files]);
|
||||
|
||||
xhrupload(e.originalEvent.dataTransfer.files, $this.options);
|
||||
}
|
||||
|
||||
}).on("dragenter", function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}).on("dragover", function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
if (!hasdragCls) {
|
||||
$this.element.addClass($this.options.dragoverClass);
|
||||
hasdragCls = true;
|
||||
}
|
||||
}).on("dragleave", function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
$this.element.removeClass($this.options.dragoverClass);
|
||||
hasdragCls = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
UI.support.ajaxupload = (function() {
|
||||
|
||||
function supportFileAPI() {
|
||||
var fi = document.createElement('INPUT'); fi.type = 'file'; return 'files' in fi;
|
||||
}
|
||||
|
||||
function supportAjaxUploadProgressEvents() {
|
||||
var xhr = new XMLHttpRequest(); return !! (xhr && ('upload' in xhr) && ('onprogress' in xhr.upload));
|
||||
}
|
||||
|
||||
function supportFormData() {
|
||||
return !! window.FormData;
|
||||
}
|
||||
|
||||
return supportFileAPI() && supportAjaxUploadProgressEvents() && supportFormData();
|
||||
})();
|
||||
|
||||
|
||||
function xhrupload(files, settings) {
|
||||
|
||||
if (!UI.support.ajaxupload){
|
||||
return this;
|
||||
}
|
||||
|
||||
settings = UI.$.extend({}, xhrupload.defaults, settings);
|
||||
|
||||
if (!files.length){
|
||||
return;
|
||||
}
|
||||
|
||||
if (settings.allow !== '*.*') {
|
||||
|
||||
for(var i=0,file;file=files[i];i++) {
|
||||
|
||||
if(!matchName(settings.allow, file.name)) {
|
||||
|
||||
if(typeof(settings.notallowed) == 'string') {
|
||||
alert(settings.notallowed);
|
||||
} else {
|
||||
settings.notallowed(file, settings);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var complete = settings.complete;
|
||||
|
||||
if (settings.single){
|
||||
|
||||
var count = files.length,
|
||||
uploaded = 0,
|
||||
allow = true;
|
||||
|
||||
settings.beforeAll(files);
|
||||
|
||||
settings.complete = function(response, xhr){
|
||||
|
||||
uploaded = uploaded + 1;
|
||||
|
||||
complete(response, xhr);
|
||||
|
||||
if (settings.filelimit && uploaded >= settings.filelimit){
|
||||
allow = false;
|
||||
}
|
||||
|
||||
if (allow && uploaded<count){
|
||||
upload([files[uploaded]], settings);
|
||||
} else {
|
||||
settings.allcomplete(response, xhr);
|
||||
}
|
||||
};
|
||||
|
||||
upload([files[0]], settings);
|
||||
|
||||
} else {
|
||||
|
||||
settings.complete = function(response, xhr){
|
||||
complete(response, xhr);
|
||||
settings.allcomplete(response, xhr);
|
||||
};
|
||||
|
||||
upload(files, settings);
|
||||
}
|
||||
|
||||
function upload(files, settings){
|
||||
|
||||
// upload all at once
|
||||
var formData = new FormData(), xhr = new XMLHttpRequest();
|
||||
|
||||
if (settings.before(settings, files)===false) return;
|
||||
|
||||
for (var i = 0, f; f = files[i]; i++) { formData.append(settings.param, f); }
|
||||
for (var p in settings.params) { formData.append(p, settings.params[p]); }
|
||||
|
||||
// Add any event handlers here...
|
||||
xhr.upload.addEventListener("progress", function(e){
|
||||
var percent = (e.loaded / e.total)*100;
|
||||
settings.progress(percent, e);
|
||||
}, false);
|
||||
|
||||
xhr.addEventListener("loadstart", function(e){ settings.loadstart(e); }, false);
|
||||
xhr.addEventListener("load", function(e){ settings.load(e); }, false);
|
||||
xhr.addEventListener("loadend", function(e){ settings.loadend(e); }, false);
|
||||
xhr.addEventListener("error", function(e){ settings.error(e); }, false);
|
||||
xhr.addEventListener("abort", function(e){ settings.abort(e); }, false);
|
||||
|
||||
xhr.open(settings.method, settings.action, true);
|
||||
|
||||
if (settings.type=="json") {
|
||||
xhr.setRequestHeader("Accept", "application/json");
|
||||
}
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
|
||||
settings.readystatechange(xhr);
|
||||
|
||||
if (xhr.readyState==4){
|
||||
|
||||
var response = xhr.responseText;
|
||||
|
||||
if (settings.type=="json") {
|
||||
try {
|
||||
response = UI.$.parseJSON(response);
|
||||
} catch(e) {
|
||||
response = false;
|
||||
}
|
||||
}
|
||||
|
||||
settings.complete(response, xhr);
|
||||
}
|
||||
};
|
||||
settings.beforeSend(xhr);
|
||||
xhr.send(formData);
|
||||
}
|
||||
}
|
||||
|
||||
xhrupload.defaults = {
|
||||
'action': '',
|
||||
'single': true,
|
||||
'method': 'POST',
|
||||
'param' : 'files[]',
|
||||
'params': {},
|
||||
'allow' : '*.*',
|
||||
'type' : 'text',
|
||||
'filelimit': false,
|
||||
|
||||
// events
|
||||
'before' : function(o){},
|
||||
'beforeSend' : function(xhr){},
|
||||
'beforeAll' : function(){},
|
||||
'loadstart' : function(){},
|
||||
'load' : function(){},
|
||||
'loadend' : function(){},
|
||||
'error' : function(){},
|
||||
'abort' : function(){},
|
||||
'progress' : function(){},
|
||||
'complete' : function(){},
|
||||
'allcomplete' : function(){},
|
||||
'readystatechange': function(){},
|
||||
'notallowed' : function(file, settings){ alert('Only the following file types are allowed: '+settings.allow); }
|
||||
};
|
||||
|
||||
function matchName(pattern, path) {
|
||||
|
||||
var parsedPattern = '^' + pattern.replace(/\//g, '\\/').
|
||||
replace(/\*\*/g, '(\\/[^\\/]+)*').
|
||||
replace(/\*/g, '[^\\/]+').
|
||||
replace(/((?!\\))\?/g, '$1.') + '$';
|
||||
|
||||
parsedPattern = '^' + parsedPattern + '$';
|
||||
|
||||
return (path.match(new RegExp(parsedPattern, 'i')) !== null);
|
||||
}
|
||||
|
||||
UI.Utils.xhrupload = xhrupload;
|
||||
|
||||
return xhrupload;
|
||||
});
|
@ -31,7 +31,7 @@
|
||||
<h1>BLUDIT</h1>
|
||||
<?php
|
||||
if(Alert::defined()) {
|
||||
echo '<div class="uk-alert uk-alert-danger">'.Alert::get().'</div>';
|
||||
echo '<div class="uk-alert">'.Alert::get().'</div>';
|
||||
}
|
||||
|
||||
if( Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php') ) {
|
||||
@ -45,4 +45,4 @@
|
||||
<?php Theme::plugins('loginBodyEnd') ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
@ -1,3 +1,5 @@
|
||||
<?php if(empty($_POST)) { ?>
|
||||
|
||||
<div class="login-form">
|
||||
|
||||
<form method="post" action="" class="uk-form" autocomplete="off">
|
||||
@ -16,4 +18,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<a class="login-email" href="<?php echo HTML_PATH_ADMIN_ROOT.'login' ?>"><i class="uk-icon-chevron-left"></i> <?php $L->p('Back to login form') ?></a>
|
||||
|
@ -20,4 +20,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
<a class="login-email" href="<?php echo HTML_PATH_ADMIN_ROOT.'login-email' ?>"><i class="uk-icon-envelope-o"></i> <?php $L->p('Send me a login access code') ?></a>
|
||||
<a class="login-email" href="<?php echo HTML_PATH_ADMIN_ROOT.'login-email' ?>"><i class="uk-icon-envelope-o"></i> <?php $L->p('Email access code') ?></a>
|
||||
|
@ -7,7 +7,6 @@ echo '
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$L->g('Title').'</th>
|
||||
<th>'.$L->g('Parent').'</th>
|
||||
<th class="uk-text-center">'.$L->g('Position').'</th>
|
||||
<th>'.$L->g('Friendly URL').'</th>
|
||||
</tr>
|
||||
@ -15,23 +14,42 @@ echo '
|
||||
<tbody>
|
||||
';
|
||||
|
||||
foreach($pagesParents as $parentKey=>$pageList)
|
||||
foreach($pagesParents[NO_PARENT_CHAR] as $key=>$db)
|
||||
{
|
||||
foreach($pageList as $Page)
|
||||
{
|
||||
if($parentKey!==NO_PARENT_CHAR) {
|
||||
$parentTitle = $pages[$Page->parentKey()]->title();
|
||||
}
|
||||
else {
|
||||
$parentTitle = '';
|
||||
}
|
||||
// Parent page
|
||||
$Page = $pages[$key];
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>'.($Page->parentKey()?'- ':'').'<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'<span class="label-draft">'.$Language->g('Draft').'</span> ').($Page->title()?$Page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ').'</a></td>';
|
||||
echo '<td>'.$parentTitle.'</td>';
|
||||
echo '<td class="uk-text-center">'.$Page->position().'</td>';
|
||||
echo '<td><a target="_blank" href="'.$Page->permalink().'">'.$Url->filters('page').'/'.$Page->key().'</a></td>';
|
||||
echo '</tr>';
|
||||
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$Page->key() : '/'.$Url->filters('page').'/'.$Page->key();
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'<span class="label-draft">'.$Language->g('Draft').'</span> ').($Page->title()?$Page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ').'</a>';
|
||||
echo '</td>';
|
||||
echo '<td class="uk-text-center">'.$Page->position().'</td>';
|
||||
echo '<td><a target="_blank" href="'.$Page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
echo '</tr>';
|
||||
|
||||
// If the page has children
|
||||
if(isset($pagesParents[$Page->key()]))
|
||||
{
|
||||
// Get the children
|
||||
$children = $pagesParents[$Page->key()];
|
||||
|
||||
foreach($children as $keyChildren=>$dbChildren)
|
||||
{
|
||||
// Parent page
|
||||
$Page = $pages[$keyChildren];
|
||||
|
||||
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$Page->key() : '/'.$Url->filters('page').'/'.$Page->key();
|
||||
|
||||
echo '<tr class="children">';
|
||||
echo '<td class="children">';
|
||||
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'<span class="label-draft">'.$Language->g('Draft').'</span> ').($Page->title()?$Page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ').'</a>';
|
||||
echo '</td>';
|
||||
echo '<td class="uk-text-center">'.$Page->position().'</td>';
|
||||
echo '<td><a target="_blank" href="'.$Page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,10 @@ echo '
|
||||
echo '<tr>';
|
||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($status?'<span class="label-draft">'.$status.'</span>':'').($Post->title()?$Post->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ').'</a></td>';
|
||||
echo '<td class="uk-text-center">'.$Post->dateRaw().'</td>';
|
||||
echo '<td><a target="_blank" href="'.$Post->permalink().'">'.$Url->filters('post').'/'.$Post->key().'</a></td>';
|
||||
|
||||
$friendlyURL = Text::isEmpty($Url->filters('post')) ? '/'.$Post->key() : '/'.$Url->filters('post').'/'.$Post->key();
|
||||
|
||||
echo '<td><a target="_blank" href="'.$Post->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
|
@ -37,17 +37,6 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
'tip'=>$L->g('the-url-of-your-site')
|
||||
));
|
||||
|
||||
HTML::legend(array('value'=>$L->g('Command Line Mode')));
|
||||
|
||||
HTML::formSelect(array(
|
||||
'name'=>'cliMode',
|
||||
'label'=>$L->g('Cli Mode'),
|
||||
'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
|
||||
'selected'=>$Site->cliMode(),
|
||||
'class'=>'uk-width-1-3 uk-form-medium',
|
||||
'tip'=>$L->g('enable-the-command-line-mode-if-you-add-edit')
|
||||
));
|
||||
|
||||
HTML::legend(array('value'=>$L->g('Email account settings')));
|
||||
|
||||
HTML::formInputText(array(
|
||||
|
@ -51,7 +51,6 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
'label'=>'Twitter',
|
||||
'value'=>$Site->twitter(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'placeholder'=>'https://twitter.com/USERNAME',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
@ -60,7 +59,6 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
'label'=>'Facebook',
|
||||
'value'=>$Site->facebook(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'placeholder'=>'https://www.facebook.com/USERNAME',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
@ -69,16 +67,14 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
'label'=>'Google+',
|
||||
'value'=>$Site->googlePlus(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'placeholder'=>'https://plus.google.com/+USERNAME',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
HTML::formInputText(array(
|
||||
'name'=>'instagram',
|
||||
'label'=>'Instagram',
|
||||
'value'=>$Site->googlePlus(),
|
||||
'value'=>$Site->instagram(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'placeholder'=>'https://www.instagram.com/USERNAME',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
@ -87,7 +83,6 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
'label'=>'Github',
|
||||
'value'=>$Site->github(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'placeholder'=>'https://github.com/USERNAME',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
@ -97,4 +92,4 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
HTML::formClose();
|
||||
HTML::formClose();
|
||||
|
@ -43,7 +43,8 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
|
||||
'name'=>'dateFormat',
|
||||
'label'=>$L->g('Date format'),
|
||||
'value'=>$Site->dateFormat(),
|
||||
'class'=>'uk-width-1-2 uk-form-medium'
|
||||
'class'=>'uk-width-1-2 uk-form-medium',
|
||||
'tip'=>$L->g('Current format').': '.Date::current($Site->dateFormat())
|
||||
));
|
||||
|
||||
echo '<div class="uk-form-row">
|
||||
|
@ -16,7 +16,7 @@ HTML::formOpen(array('id'=>'edit-user-profile-form','class'=>'uk-form-horizontal
|
||||
'value'=>$_user['username']
|
||||
));
|
||||
|
||||
HTML::legend(array('value'=>$L->g('New password')));
|
||||
HTML::legend(array('value'=>$L->g('New password'), 'class'=>'first-child'));
|
||||
|
||||
HTML::formInputText(array(
|
||||
'name'=>'usernameDisable',
|
||||
|
@ -40,15 +40,15 @@ if($type=='profilePicture')
|
||||
$username = Sanitize::html($_POST['username']);
|
||||
$tmpName = $username.'.png';
|
||||
$Image = new Image();
|
||||
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, '400', '400', 'crop');
|
||||
$Image->saveImage(PATH_UPLOADS_PROFILES.$tmpName, 100, false, true);
|
||||
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, PROFILE_IMG_WIDTH, PROFILE_IMG_HEIGHT, 'crop');
|
||||
$Image->saveImage(PATH_UPLOADS_PROFILES.$tmpName, PROFILE_IMG_QUALITY, false, true);
|
||||
}
|
||||
// --- OTHERS ---
|
||||
else {
|
||||
// Generate the thumbnail
|
||||
$Image = new Image();
|
||||
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, THUMBNAILS_WIDTH, THUMBNAILS_HEIGHT, 'crop');
|
||||
$Image->saveImage(PATH_UPLOADS_THUMBNAILS.$tmpName, 100, true);
|
||||
$Image->saveImage(PATH_UPLOADS_THUMBNAILS.$tmpName, THUMBNAILS_QUALITY, true);
|
||||
|
||||
// Move the original to the upload folder.
|
||||
rename(PATH_TMP.'original'.'.'.$fileExtension, PATH_UPLOADS.$tmpName);
|
||||
@ -64,4 +64,4 @@ exit(json_encode(array(
|
||||
'filename'=>$tmpName
|
||||
)));
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// Bludit version
|
||||
define('BLUDIT_VERSION', '1.1.2');
|
||||
define('BLUDIT_CODENAME', 'The Dig');
|
||||
define('BLUDIT_RELEASE_DATE', '2016-02-26');
|
||||
define('BLUDIT_BUILD', '20160226');
|
||||
define('BLUDIT_VERSION', '1.4');
|
||||
define('BLUDIT_CODENAME', 'Spot');
|
||||
define('BLUDIT_RELEASE_DATE', '2016-06-20');
|
||||
define('BLUDIT_BUILD', '20160620');
|
||||
|
||||
// Debug mode
|
||||
define('DEBUG_MODE', TRUE);
|
||||
@ -65,12 +65,20 @@ define('ALERT_STATUS_OK', 0);
|
||||
// Alert status fail
|
||||
define('ALERT_STATUS_FAIL', 1);
|
||||
|
||||
// Salt length
|
||||
define('THUMBNAILS_WIDTH', 400);
|
||||
define('THUMBNAILS_HEIGHT', 400);
|
||||
// Amount of thumbnails shown on Bludit Quick images
|
||||
define('THUMBNAILS_AMOUNT', 6);
|
||||
|
||||
// Salt length
|
||||
// Thubmnails size
|
||||
define('THUMBNAILS_WIDTH', 400);
|
||||
define('THUMBNAILS_HEIGHT', 400);
|
||||
define('THUMBNAILS_QUALITY', 100); // 100%
|
||||
|
||||
// Profile image size
|
||||
define('PROFILE_IMG_WIDTH', 400);
|
||||
define('PROFILE_IMG_HEIGHT', 400);
|
||||
define('PROFILE_IMG_QUALITY', 100); // 100%
|
||||
|
||||
// Password salt length
|
||||
define('SALT_LENGTH', 8);
|
||||
|
||||
// Page brake string
|
||||
@ -82,8 +90,8 @@ define('NO_PARENT_CHAR', '3849abb4cb7abd24c2d8dac17b216f17');
|
||||
// Post per page on Manage->Posts
|
||||
define('POSTS_PER_PAGE_ADMIN', 10);
|
||||
|
||||
// Check if JSON encode and decode are enabled.
|
||||
// define('JSON', function_exists('json_encode'));
|
||||
// Cli mode status for new posts/pages
|
||||
define('CLI_MODE', false);
|
||||
|
||||
// Cli mode status for new posts/pages
|
||||
define('CLI_STATUS', 'published');
|
||||
@ -106,6 +114,9 @@ define('TOKEN_EMAIL_TTL', '+15 minutes');
|
||||
// Charset, default UTF-8.
|
||||
define('CHARSET', 'UTF-8');
|
||||
|
||||
// EXTREME FRIENDLY URL, TRUE for dissmiss internet standard
|
||||
define('EXTREME_FRIENDLY_URL', false);
|
||||
|
||||
// Directory permissions
|
||||
define('DIR_PERMISSIONS', 0755);
|
||||
|
||||
@ -142,6 +153,9 @@ include(PATH_KERNEL.'parsedown.class.php');
|
||||
include(PATH_KERNEL.'parsedownextra.class.php');
|
||||
include(PATH_KERNEL.'security.class.php');
|
||||
|
||||
// Include functions
|
||||
include(PATH_KERNEL.'functions.php');
|
||||
|
||||
// Include Helpers Classes
|
||||
include(PATH_HELPERS.'text.class.php');
|
||||
include(PATH_HELPERS.'log.class.php');
|
||||
@ -222,6 +236,8 @@ define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js');
|
||||
|
||||
// --- PHP paths with dependency ---
|
||||
// This paths are absolutes for the OS.
|
||||
|
||||
// Depreacted, use THEME_DIR and THEME_DIR_XXX
|
||||
define('PATH_THEME', PATH_ROOT.'bl-themes'.DS.$Site->theme().DS);
|
||||
define('PATH_THEME_PHP', PATH_THEME.'php'.DS);
|
||||
define('PATH_THEME_CSS', PATH_THEME.'css'.DS);
|
||||
@ -229,6 +245,14 @@ define('PATH_THEME_JS', PATH_THEME.'js'.DS);
|
||||
define('PATH_THEME_IMG', PATH_THEME.'img'.DS);
|
||||
define('PATH_THEME_LANG', PATH_THEME.'languages'.DS);
|
||||
|
||||
define('THEME_DIR', PATH_ROOT.'bl-themes'.DS.$Site->theme().DS);
|
||||
define('THEME_DIR_PHP', PATH_THEME.'php'.DS);
|
||||
define('THEME_DIR_CSS', PATH_THEME.'css'.DS);
|
||||
define('THEME_DIR_JS', PATH_THEME.'js'.DS);
|
||||
define('THEME_DIR_IMG', PATH_THEME.'img'.DS);
|
||||
define('THEME_DIR_LANG', PATH_THEME.'languages'.DS);
|
||||
|
||||
|
||||
// --- Absolute paths with domain ---
|
||||
// This paths are absolutes for the user / web browsing.
|
||||
define('DOMAIN', $Site->domain());
|
||||
|
@ -25,6 +25,7 @@ $plugins = array(
|
||||
'afterAdminLoad'=>array(),
|
||||
|
||||
'beforeRulesLoad'=>array(),
|
||||
'afterFormSave'=>array(),
|
||||
|
||||
'afterPostCreate'=>array(),
|
||||
'afterPostModify'=>array(),
|
||||
@ -62,7 +63,11 @@ function buildPlugins()
|
||||
|
||||
// Load each plugin clasess
|
||||
foreach($list as $pluginPath) {
|
||||
include($pluginPath.DS.'plugin.php');
|
||||
|
||||
// Check if the directory has the plugin.php
|
||||
if(file_exists($pluginPath.DS.'plugin.php')) {
|
||||
include($pluginPath.DS.'plugin.php');
|
||||
}
|
||||
}
|
||||
|
||||
// Get plugins clasess loaded
|
||||
@ -91,16 +96,20 @@ function buildPlugins()
|
||||
$Language->add($database);
|
||||
}
|
||||
|
||||
// Push Plugin to array all plugins installed and not installed.
|
||||
$plugins['all'][$pluginClass] = $Plugin;
|
||||
// If the plugin is compatible with the Bludit version, add to arrays
|
||||
if($Plugin->isCompatible()) {
|
||||
|
||||
// If the plugin is installed, order by hooks.
|
||||
if($Plugin->installed())
|
||||
{
|
||||
foreach($pluginsEvents as $event=>$value)
|
||||
{
|
||||
if(method_exists($Plugin, $event)) {
|
||||
array_push($plugins[$event], $Plugin);
|
||||
// Push Plugin to array all plugins installed and not installed.
|
||||
$plugins['all'][$pluginClass] = $Plugin;
|
||||
|
||||
// If the plugin is installed, order by hooks.
|
||||
if($Plugin->installed()) {
|
||||
|
||||
foreach($pluginsEvents as $event=>$value) {
|
||||
|
||||
if(method_exists($Plugin, $event)) {
|
||||
array_push($plugins[$event], $Plugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,122 +8,12 @@
|
||||
// Filter by page number, by tag, etc.
|
||||
$posts = array();
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
function reIndexTagsPosts()
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbTags;
|
||||
|
||||
// Remove unpublished.
|
||||
$dbPosts->removeUnpublished();
|
||||
|
||||
// Regenerate the tags index for posts.
|
||||
$dbTags->reindexPosts( $dbPosts->db );
|
||||
|
||||
// Restore the database, before remove the unpublished.
|
||||
$dbPosts->restoreDB();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function buildPost($key)
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbUsers;
|
||||
global $Parsedown;
|
||||
global $Site;
|
||||
|
||||
// Post object, content from FILE.
|
||||
$Post = new Post($key);
|
||||
if( !$Post->isValid() ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from file with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Post database, content from DATABASE JSON.
|
||||
$db = $dbPosts->getPostDB($key);
|
||||
if( !$db ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from database with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Foreach field from DATABASE.
|
||||
foreach($db as $field=>$value) {
|
||||
$Post->setField($field, $value);
|
||||
}
|
||||
|
||||
// Content in raw format
|
||||
$contentRaw = $Post->content();
|
||||
$Post->setField('contentRaw', $contentRaw, true);
|
||||
|
||||
// Parse the content
|
||||
$content = Text::pre2htmlentities($contentRaw); // Parse pre code with htmlentities
|
||||
$content = $Parsedown->text($content); // Parse Markdown.
|
||||
$content = Text::imgRel2Abs($content, HTML_PATH_UPLOADS); // Parse img src relative to absolute.
|
||||
$Post->setField('content', $content, true);
|
||||
|
||||
// Pagebrake
|
||||
$explode = explode(PAGE_BREAK, $content);
|
||||
$Post->setField('breakContent', $explode[0], true);
|
||||
$Post->setField('readMore', !empty($explode[1]), true);
|
||||
|
||||
// Date format
|
||||
$postDate = $Post->date();
|
||||
$Post->setField('dateRaw', $postDate, true);
|
||||
|
||||
$postDateFormated = $Post->dateRaw( $Site->dateFormat() );
|
||||
$Post->setField('date', $postDateFormated, true);
|
||||
|
||||
// User object
|
||||
$username = $Post->username();
|
||||
$Post->setField('user', $dbUsers->getUser($username));
|
||||
|
||||
return $Post;
|
||||
}
|
||||
|
||||
function buildPostsForPage($pageNumber=0, $amount=POSTS_PER_PAGE_ADMIN, $removeUnpublished=true, $tagKey=false)
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbTags;
|
||||
global $Url;
|
||||
|
||||
$posts = array();
|
||||
|
||||
if($tagKey) {
|
||||
// Get the keys list from tags database, this database is optimized for this case.
|
||||
$list = $dbTags->getList($pageNumber, $amount, $tagKey);
|
||||
}
|
||||
else {
|
||||
// Get the keys list from posts database.
|
||||
$list = $dbPosts->getList($pageNumber, $amount, $removeUnpublished);
|
||||
}
|
||||
|
||||
// There are not posts for the page number then set the page notfound
|
||||
if(empty($list) && $pageNumber>0) {
|
||||
$Url->setNotFound(true);
|
||||
}
|
||||
|
||||
// Foreach post key, build the post.
|
||||
foreach($list as $postKey=>$values)
|
||||
{
|
||||
$Post = buildPost($postKey);
|
||||
if($Post!==false) {
|
||||
array_push($posts, $Post);
|
||||
}
|
||||
}
|
||||
|
||||
return $posts;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main
|
||||
// ============================================================================
|
||||
|
||||
// Search for changes on posts by the user.
|
||||
if( $Site->cliMode() ) {
|
||||
if( CLI_MODE ) {
|
||||
if($dbPosts->regenerateCli()) {
|
||||
reIndexTagsPosts();
|
||||
}
|
||||
|
@ -7,146 +7,19 @@
|
||||
// Array with all pages.
|
||||
$pages = array();
|
||||
|
||||
$pagesPublished = array();
|
||||
|
||||
// Array with all pages, order by parent.
|
||||
$pagesParents = array(NO_PARENT_CHAR=>array());
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
function sortPages($a, $b)
|
||||
{
|
||||
if ($a->position() == $b->position()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ($a->position() < $b->position()) ? -1 : 1;
|
||||
}
|
||||
|
||||
function buildPage($key)
|
||||
{
|
||||
global $dbPages;
|
||||
global $dbUsers;
|
||||
global $Parsedown;
|
||||
global $Site;
|
||||
|
||||
// Page object, content from FILE.
|
||||
$Page = new Page($key);
|
||||
if( !$Page->isValid() ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the page from file with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Page database, content from DATABASE JSON.
|
||||
$db = $dbPages->getPageDB($key);
|
||||
if( !$db ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the page from database with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Foreach field from DATABASE.
|
||||
foreach($db as $field=>$value) {
|
||||
$Page->setField($field, $value);
|
||||
}
|
||||
|
||||
// Content in raw format
|
||||
$contentRaw = $Page->content();
|
||||
$Page->setField('contentRaw', $Page->content(), true);
|
||||
|
||||
// Parse markdown content.
|
||||
$content = Text::pre2htmlentities($contentRaw); // Parse pre code with htmlentities
|
||||
$content = $Parsedown->text($content); // Parse Markdown.
|
||||
$content = Text::imgRel2Abs($content, HTML_PATH_UPLOADS); // Parse img src relative to absolute.
|
||||
$Page->setField('content', $content, true);
|
||||
|
||||
// Pagebrake
|
||||
$explode = explode(PAGE_BREAK, $content);
|
||||
$Page->setField('breakContent', $explode[0], true);
|
||||
$Page->setField('readMore', !empty($explode[1]), true);
|
||||
|
||||
// Date format
|
||||
$pageDate = $Page->date();
|
||||
$Page->setField('dateRaw', $pageDate, true);
|
||||
|
||||
$pageDateFormated = $Page->dateRaw( $Site->dateFormat() );
|
||||
$Page->setField('date', $pageDateFormated, true);
|
||||
|
||||
// User object
|
||||
$username = $Page->username();
|
||||
$Page->setField('user', $dbUsers->getUser($username));
|
||||
|
||||
return $Page;
|
||||
}
|
||||
|
||||
function buildAllPages()
|
||||
{
|
||||
global $pagesParents;
|
||||
global $dbPages;
|
||||
|
||||
$list = $dbPages->getDB();
|
||||
|
||||
// Clean pages array.
|
||||
$pages = array();
|
||||
|
||||
unset($list['error']);
|
||||
|
||||
foreach($list as $key=>$db)
|
||||
{
|
||||
$Page = buildPage($key);
|
||||
|
||||
if($Page!==false)
|
||||
{
|
||||
// --- Order pages by parents ---
|
||||
|
||||
// Generate all posible parents.
|
||||
if( $Page->parentKey()===false )
|
||||
{
|
||||
// Add the parent key in the dbPages
|
||||
$dbPages->addParentKey($Page->key());
|
||||
|
||||
$pagesParents[NO_PARENT_CHAR][$Page->key()] = $Page;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagesParents[$Page->parentKey()][$Page->key()] = $Page;
|
||||
}
|
||||
|
||||
// --- All pages in 1 array ---
|
||||
$pages[$Page->key()] = $Page;
|
||||
}
|
||||
}
|
||||
|
||||
// --- SORT PAGES ---
|
||||
|
||||
// Sort parents.
|
||||
$parents = $pagesParents[NO_PARENT_CHAR];
|
||||
uasort($parents, 'sortPages');
|
||||
|
||||
// Sort children.
|
||||
unset($pagesParents[NO_PARENT_CHAR]);
|
||||
$children = $pagesParents;
|
||||
$tmpPageWithParent = array();
|
||||
foreach($children as $parentKey=>$childrenPages)
|
||||
{
|
||||
// If the child doesn't have a valid parent, then doesn't included them.
|
||||
if(isset($pages[$parentKey]))
|
||||
{
|
||||
$tmpPageWithParent[$parentKey] = $childrenPages;
|
||||
uasort($tmpPageWithParent[$parentKey], 'sortPages');
|
||||
}
|
||||
}
|
||||
|
||||
$pagesParents = array(NO_PARENT_CHAR=>$parents) + $tmpPageWithParent;
|
||||
|
||||
return $pages;
|
||||
}
|
||||
$pagesParentsPublished = array();
|
||||
|
||||
// ============================================================================
|
||||
// Main
|
||||
// ============================================================================
|
||||
|
||||
// Search for changes on pages by the user.
|
||||
if( $Site->cliMode() ) {
|
||||
if( CLI_MODE ) {
|
||||
$dbPages->regenerateCli();
|
||||
}
|
||||
|
||||
@ -193,3 +66,4 @@ if($Url->notFound())
|
||||
|
||||
// Build all pages
|
||||
$pages = buildAllPages();
|
||||
|
||||
|
@ -28,7 +28,7 @@ function buildThemes()
|
||||
$database = file_get_contents($languageFilename);
|
||||
$database = json_decode($database, true);
|
||||
if(empty($database)) {
|
||||
Log::set('99.themes.php'.LOG_SEP.'JSON Error on theme '.$themePath);
|
||||
Log::set('99.themes.php'.LOG_SEP.'Language file error on theme '.$themePath);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -43,15 +43,20 @@ function buildThemes()
|
||||
{
|
||||
$metadataString = file_get_contents($filenameMetadata);
|
||||
$metadata = json_decode($metadataString, true);
|
||||
if(empty($metadata)) {
|
||||
Log::set('99.themes.php'.LOG_SEP.'JSON Error on theme '.$themePath);
|
||||
break;
|
||||
|
||||
if( !empty($metadata['compatible']) ) {
|
||||
|
||||
$explode = explode(',', $metadata['compatible']);
|
||||
|
||||
if(in_array(BLUDIT_VERSION, $explode)) {
|
||||
$database = $database + $metadata;
|
||||
array_push($themes, $database);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log::set('99.themes.php'.LOG_SEP.'Metadata file error on theme '.$themePath);
|
||||
}
|
||||
|
||||
$database = $database + $metadata;
|
||||
|
||||
// Theme data
|
||||
array_push($themes, $database);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -81,4 +86,4 @@ if( Sanitize::pathFile($languageFilename) )
|
||||
if(!empty($database)) {
|
||||
$Language->add($database);
|
||||
}
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@ class dbLanguage extends dbJSON
|
||||
return $this->db[$key];
|
||||
}
|
||||
|
||||
return '';
|
||||
return $string;
|
||||
}
|
||||
|
||||
// Returns translation.
|
||||
@ -71,7 +71,7 @@ class dbLanguage extends dbJSON
|
||||
|
||||
public function add($array)
|
||||
{
|
||||
$this->db = array_merge($this->db, $array);
|
||||
$this->db = array_merge($array, $this->db);
|
||||
}
|
||||
|
||||
// Returns the item from plugin-data.
|
||||
|
@ -12,9 +12,9 @@ class dbPages extends dbJSON
|
||||
'tags'=> array('inFile'=>false, 'value'=>array()),
|
||||
'status'=> array('inFile'=>false, 'value'=>'draft'),
|
||||
'date'=> array('inFile'=>false, 'value'=>''),
|
||||
'dateModified'=> array('inFile'=>false, 'value'=>''),
|
||||
'position'=> array('inFile'=>false, 'value'=>0),
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>''),
|
||||
'checksum'=> array('inFile'=>false, 'value'=>'')
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>'')
|
||||
);
|
||||
|
||||
function __construct()
|
||||
@ -76,10 +76,6 @@ class dbPages extends dbJSON
|
||||
}
|
||||
}
|
||||
|
||||
// Create Hash
|
||||
$serialize = serialize($dataForDb+$dataForFile);
|
||||
$dataForDb['checksum'] = sha1($serialize);
|
||||
|
||||
// Make the directory. Recursive.
|
||||
if( Filesystem::mkdir(PATH_PAGES.$key, true) === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to create the directory '.PATH_PAGES.$key);
|
||||
@ -124,6 +120,9 @@ class dbPages extends dbJSON
|
||||
$args['date'] = $this->db[$args['key']]['date'];
|
||||
}
|
||||
|
||||
// Modified date
|
||||
$args['dateModified'] = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Verify arguments with the database fields.
|
||||
foreach($this->dbFields as $field=>$options)
|
||||
{
|
||||
@ -162,10 +161,6 @@ class dbPages extends dbJSON
|
||||
}
|
||||
}
|
||||
|
||||
// Create Hash
|
||||
$serialize = serialize($dataForDb+$dataForFile);
|
||||
$dataForDb['checksum'] = sha1($serialize);
|
||||
|
||||
// Move the directory from old key to new key.
|
||||
if($newKey!==$args['key'])
|
||||
{
|
||||
@ -437,4 +432,4 @@ class dbPages extends dbJSON
|
||||
|
||||
return $this->db!=$db;
|
||||
}
|
||||
}
|
||||
}
|
@ -9,31 +9,36 @@ class dbPosts extends dbJSON
|
||||
'username'=> array('inFile'=>false, 'value'=>''),
|
||||
'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled
|
||||
'tags'=> array('inFile'=>false, 'value'=>array()),
|
||||
'allowComments'=> array('inFile'=>false, 'value'=>false),
|
||||
'allowComments'=> array('inFile'=>false, 'value'=>0),
|
||||
'date'=> array('inFile'=>false, 'value'=>''),
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>''),
|
||||
'checksum'=> array('inFile'=>false, 'value'=>'')
|
||||
);
|
||||
|
||||
private $numberPosts = array(
|
||||
'total'=>0,
|
||||
'published'=>0
|
||||
'dateModified'=> array('inFile'=>false, 'value'=>''),
|
||||
'coverImage'=> array('inFile'=>false, 'value'=>'')
|
||||
);
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct(PATH_DATABASES.'posts.php');
|
||||
|
||||
$this->numberPosts['total'] = count($this->db);
|
||||
}
|
||||
|
||||
// Return the amount of posts
|
||||
// $total = TRUE, returns the total of posts
|
||||
// $total = FALSE, return the amount of published posts
|
||||
public function numberPost($total=false)
|
||||
{
|
||||
// Amount of posts, published, scheduled and draft
|
||||
if($total) {
|
||||
return $this->numberPosts['total'];
|
||||
return count($this->db);
|
||||
}
|
||||
|
||||
return $this->numberPosts['published'];
|
||||
// Amount of published posts
|
||||
$i = 0;
|
||||
foreach($this->db as $values) {
|
||||
if($values['status']=='published') {
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
// Returns the database
|
||||
@ -111,7 +116,7 @@ class dbPosts extends dbJSON
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the date not valid, then set the current date.
|
||||
// If the date is not valid, then set the current date.
|
||||
if(!Valid::date($args['date'], DB_DATE_FORMAT)) {
|
||||
$args['date'] = $currentDate;
|
||||
}
|
||||
@ -160,10 +165,6 @@ class dbPosts extends dbJSON
|
||||
}
|
||||
}
|
||||
|
||||
// Create Hash
|
||||
$serialize = serialize($dataForDb+$dataForFile);
|
||||
$dataForDb['checksum'] = sha1($serialize);
|
||||
|
||||
// Make the directory.
|
||||
if( Filesystem::mkdir(PATH_POSTS.$key) === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to create the directory '.PATH_POSTS.$key);
|
||||
@ -194,6 +195,10 @@ class dbPosts extends dbJSON
|
||||
public function edit($args)
|
||||
{
|
||||
if( $this->delete($args['key']) ) {
|
||||
|
||||
// Modified date
|
||||
$args['dateModified'] = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
return $this->add($args);
|
||||
}
|
||||
|
||||
@ -232,12 +237,12 @@ class dbPosts extends dbJSON
|
||||
// Returns an array with a list of posts keys, filtered by a page number.
|
||||
public function getList($pageNumber, $postPerPage, $removeUnpublished=true)
|
||||
{
|
||||
$totalPosts = $this->numberPosts['total'];
|
||||
$totalPosts = $this->numberPost(true);
|
||||
|
||||
// Remove the unpublished posts.
|
||||
if($removeUnpublished) {
|
||||
$this->removeUnpublished();
|
||||
$totalPosts = $this->numberPosts['published'];
|
||||
$totalPosts = $this->numberPost(true);
|
||||
}
|
||||
|
||||
$init = (int) $postPerPage * $pageNumber;
|
||||
@ -247,7 +252,7 @@ class dbPosts extends dbJSON
|
||||
if(!$outrange) {
|
||||
$tmp = array_slice($this->db, $init, $postPerPage, true);
|
||||
|
||||
// Restore the database because we delete the unpublished posts.
|
||||
// Restore the database because we deleted the unpublished posts.
|
||||
$this->restoreDB();
|
||||
|
||||
return $tmp;
|
||||
@ -302,15 +307,12 @@ class dbPosts extends dbJSON
|
||||
// Remove unpublished posts, status != published.
|
||||
public function removeUnpublished()
|
||||
{
|
||||
foreach($this->db as $key=>$values)
|
||||
{
|
||||
foreach($this->db as $key=>$values) {
|
||||
if($values['status']!='published') {
|
||||
unset($this->db[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->numberPosts['published'] = count($this->db);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -408,32 +410,40 @@ class dbPosts extends dbJSON
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Generate default fields and values.
|
||||
// --------------------------------------------------------------------------
|
||||
foreach($this->dbFields as $field=>$options) {
|
||||
if(!$options['inFile']) {
|
||||
$fields[$field] = $options['value'];
|
||||
}
|
||||
}
|
||||
|
||||
$fields['status'] = CLI_STATUS;
|
||||
$fields['date'] = $currentDate;
|
||||
$fields['username'] = CLI_USERNAME;
|
||||
$fields['status'] = CLI_STATUS;
|
||||
$fields['username'] = CLI_USERNAME;
|
||||
$fields['date'] = $currentDate;
|
||||
|
||||
// Get all posts from the first level of directories.
|
||||
$tmpPaths = Filesystem::listDirectories(PATH_POSTS);
|
||||
foreach($tmpPaths as $directory)
|
||||
$postsDirectories = Filesystem::listDirectories(PATH_POSTS);
|
||||
foreach($postsDirectories as $directory)
|
||||
{
|
||||
// Check if the post have the index.txt file.
|
||||
|
||||
// Check if the post has the index.txt file.
|
||||
if(Sanitize::pathFile($directory.DS.'index.txt'))
|
||||
{
|
||||
// The key is the directory name.
|
||||
$key = basename($directory);
|
||||
|
||||
Log::set('----------------');
|
||||
Log::set('CliMode - Post KEY: '.$key);
|
||||
|
||||
// This post exists
|
||||
$allPosts[$key] = true;
|
||||
|
||||
// Create the new entry if not exist inside the DATABASE.
|
||||
if(!isset($this->db[$key])) {
|
||||
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);
|
||||
}
|
||||
|
||||
// Create the post from FILE.
|
||||
@ -442,12 +452,14 @@ class dbPosts extends dbJSON
|
||||
// Update all fields from FILE to DATABASE.
|
||||
foreach($fields as $f=>$v)
|
||||
{
|
||||
// If the field exists on the FILE, update it.
|
||||
if($Post->getField($f))
|
||||
{
|
||||
$valueFromFile = $Post->getField($f);
|
||||
// Get the value from FILE.
|
||||
$valueFromFile = $Post->getField($f);
|
||||
|
||||
Log::set(__METHOD__.LOG_SEP.'Field from file: '.$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.
|
||||
@ -475,6 +487,7 @@ class dbPosts extends dbJSON
|
||||
// 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);
|
||||
}
|
||||
|
||||
// Sort posts before save.
|
||||
@ -487,10 +500,11 @@ class dbPosts extends dbJSON
|
||||
}
|
||||
|
||||
if($this->db!=$db) {
|
||||
Log::set(__METHOD__.LOG_SEP.'New posts added from Cli Mode');
|
||||
Log::set(__METHOD__.LOG_SEP.'There are new or deleted posts.');
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->db!=$db;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -19,7 +19,6 @@ class dbSite extends dbJSON
|
||||
'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'),
|
||||
'uriBlog'=> array('inFile'=>false, 'value'=>'/blog/'),
|
||||
'url'=> array('inFile'=>false, 'value'=>''),
|
||||
'cliMode'=> array('inFile'=>false, 'value'=>true),
|
||||
'emailFrom'=> array('inFile'=>false, 'value'=>''),
|
||||
'dateFormat'=> array('inFile'=>false, 'value'=>'F j, Y'),
|
||||
'timeFormat'=> array('inFile'=>false, 'value'=>'g:i a'),
|
||||
@ -216,12 +215,6 @@ class dbSite extends dbJSON
|
||||
return $parse['scheme'].'://'.$domain;
|
||||
}
|
||||
|
||||
// Returns TRUE if the cli mode is enabled, otherwise FALSE.
|
||||
public function cliMode()
|
||||
{
|
||||
return $this->getField('cliMode');
|
||||
}
|
||||
|
||||
// Returns the relative home link
|
||||
public function homeLink()
|
||||
{
|
||||
|
240
bl-kernel/functions.php
Normal file
240
bl-kernel/functions.php
Normal file
@ -0,0 +1,240 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// POST FUNCTIONS
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function reIndexTagsPosts()
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbTags;
|
||||
|
||||
// Remove unpublished.
|
||||
$dbPosts->removeUnpublished();
|
||||
|
||||
// Regenerate the tags index for posts.
|
||||
$dbTags->reindexPosts( $dbPosts->db );
|
||||
|
||||
// Restore the database, before remove the unpublished.
|
||||
$dbPosts->restoreDB();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function buildPost($key)
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbUsers;
|
||||
global $Parsedown;
|
||||
global $Site;
|
||||
|
||||
// Post object, content from FILE.
|
||||
$Post = new Post($key);
|
||||
if( !$Post->isValid() ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from file with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Post database, content from DATABASE JSON.
|
||||
$db = $dbPosts->getPostDB($key);
|
||||
if( !$db ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from database with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Foreach field from DATABASE.
|
||||
foreach($db as $field=>$value) {
|
||||
$Post->setField($field, $value);
|
||||
}
|
||||
|
||||
// Content in raw format
|
||||
$contentRaw = $Post->content();
|
||||
$Post->setField('contentRaw', $contentRaw, true);
|
||||
|
||||
// Parse the content
|
||||
$content = Text::pre2htmlentities($contentRaw); // Parse pre code with htmlentities
|
||||
$content = $Parsedown->text($content); // Parse Markdown.
|
||||
$content = Text::imgRel2Abs($content, HTML_PATH_UPLOADS); // Parse img src relative to absolute.
|
||||
$Post->setField('content', $content, true);
|
||||
|
||||
// Pagebrake
|
||||
$explode = explode(PAGE_BREAK, $content);
|
||||
$Post->setField('breakContent', $explode[0], true);
|
||||
$Post->setField('readMore', !empty($explode[1]), true);
|
||||
|
||||
// Date format
|
||||
$postDate = $Post->date();
|
||||
$Post->setField('dateRaw', $postDate, true);
|
||||
|
||||
$postDateFormated = $Post->dateRaw( $Site->dateFormat() );
|
||||
$Post->setField('date', $postDateFormated, true);
|
||||
|
||||
// User object
|
||||
$username = $Post->username();
|
||||
$Post->setField('user', $dbUsers->getUser($username));
|
||||
|
||||
return $Post;
|
||||
}
|
||||
|
||||
function buildPostsForPage($pageNumber=0, $amount=POSTS_PER_PAGE_ADMIN, $removeUnpublished=true, $tagKey=false)
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbTags;
|
||||
global $Url;
|
||||
|
||||
$posts = array();
|
||||
|
||||
if($tagKey) {
|
||||
// Get the keys list from tags database, this database is optimized for this case.
|
||||
$list = $dbTags->getList($pageNumber, $amount, $tagKey);
|
||||
}
|
||||
else {
|
||||
// Get the keys list from posts database.
|
||||
$list = $dbPosts->getList($pageNumber, $amount, $removeUnpublished);
|
||||
}
|
||||
|
||||
// There are not posts for the page number then set the page notfound
|
||||
if(empty($list) && $pageNumber>0) {
|
||||
$Url->setNotFound(true);
|
||||
}
|
||||
|
||||
// Foreach post key, build the post.
|
||||
foreach($list as $postKey=>$values)
|
||||
{
|
||||
$Post = buildPost($postKey);
|
||||
if($Post!==false) {
|
||||
array_push($posts, $Post);
|
||||
}
|
||||
}
|
||||
|
||||
return $posts;
|
||||
}
|
||||
|
||||
// PAGE FUNCTIONS
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
function sortPages($a, $b)
|
||||
{
|
||||
if ($a['position'] == $b['position']) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ($a['position'] < $b['position']) ? -1 : 1;
|
||||
}
|
||||
|
||||
function buildPage($key)
|
||||
{
|
||||
global $dbPages;
|
||||
global $dbUsers;
|
||||
global $Parsedown;
|
||||
global $Site;
|
||||
|
||||
// Page object, content from FILE.
|
||||
$Page = new Page($key);
|
||||
if( !$Page->isValid() ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the page from file with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Page database, content from DATABASE JSON.
|
||||
$db = $dbPages->getPageDB($key);
|
||||
if( !$db ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the page from database with key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Foreach field from DATABASE.
|
||||
foreach($db as $field=>$value) {
|
||||
$Page->setField($field, $value);
|
||||
}
|
||||
|
||||
// Content in raw format
|
||||
$contentRaw = $Page->content();
|
||||
$Page->setField('contentRaw', $Page->content(), true);
|
||||
|
||||
// Parse markdown content.
|
||||
$content = Text::pre2htmlentities($contentRaw); // Parse pre code with htmlentities
|
||||
$content = $Parsedown->text($content); // Parse Markdown.
|
||||
$content = Text::imgRel2Abs($content, HTML_PATH_UPLOADS); // Parse img src relative to absolute.
|
||||
$Page->setField('content', $content, true);
|
||||
|
||||
// Pagebrake
|
||||
$explode = explode(PAGE_BREAK, $content);
|
||||
$Page->setField('breakContent', $explode[0], true);
|
||||
$Page->setField('readMore', !empty($explode[1]), true);
|
||||
|
||||
// Date format
|
||||
$pageDate = $Page->date();
|
||||
$Page->setField('dateRaw', $pageDate, true);
|
||||
|
||||
$pageDateFormated = $Page->dateRaw( $Site->dateFormat() );
|
||||
$Page->setField('date', $pageDateFormated, true);
|
||||
|
||||
// User object
|
||||
$username = $Page->username();
|
||||
$Page->setField('user', $dbUsers->getUser($username));
|
||||
|
||||
return $Page;
|
||||
}
|
||||
|
||||
function buildAllPages()
|
||||
{
|
||||
global $pagesParents;
|
||||
global $pagesParentsPublished;
|
||||
global $pagesPublished;
|
||||
global $dbPages;
|
||||
|
||||
// Get the page list
|
||||
$list = $dbPages->getDB();
|
||||
|
||||
// Clean pages array.
|
||||
$pages = array();
|
||||
|
||||
// Remove the error page
|
||||
unset($list['error']);
|
||||
|
||||
// Sorte pages
|
||||
uasort($list, 'sortPages');
|
||||
|
||||
foreach($list as $key=>$db)
|
||||
{
|
||||
$Page = buildPage($key);
|
||||
|
||||
if($Page!==false)
|
||||
{
|
||||
// Filter pages, with and without parent
|
||||
|
||||
// If the page doesn't have a father, it's a parent page :P
|
||||
if( $Page->parentKey()===false ) {
|
||||
// Add the parent key in the dbPages
|
||||
$dbPages->addParentKey($Page->key());
|
||||
|
||||
// Add the page as a parent page in the array
|
||||
$pagesParents[NO_PARENT_CHAR][$Page->key()] = $Page;
|
||||
|
||||
// If the page is published
|
||||
if($Page->published()) {
|
||||
$pagesParentsPublished[NO_PARENT_CHAR][$Page->key()] = $Page;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$pagesParents[$Page->parentKey()][$Page->key()] = $Page;
|
||||
|
||||
// If the page is published
|
||||
if($Page->published()) {
|
||||
$pagesParentsPublished[$Page->parentKey()][$Page->key()] = $Page;
|
||||
}
|
||||
}
|
||||
|
||||
// All pages in one array
|
||||
$pages[$Page->key()] = $Page;
|
||||
|
||||
// If the page is published
|
||||
if($Page->published()) {
|
||||
$pagesPublished[$Page->parentKey()][$Page->key()] = $Page;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $pages;
|
||||
}
|
@ -5,31 +5,38 @@ class Email {
|
||||
// Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.
|
||||
public static function send($args)
|
||||
{
|
||||
// Current time in unixtimestamp
|
||||
$now = time();
|
||||
|
||||
// Domain
|
||||
$domainParse = parse_url(DOMAIN);
|
||||
|
||||
$headers = array();
|
||||
$headers[] = 'MIME-Version: 1.0';
|
||||
$headers[] = 'Content-type: text/html; charset=utf-8';
|
||||
$headers[] = 'Content-Transfer-Encoding: 8bit';
|
||||
|
||||
$headers[] = 'From: '.$args['from'];
|
||||
$headers[] = 'From: =?UTF-8?B?'.base64_encode($args['fromName']).'?= <'.$args['from'].'>';
|
||||
$headers[] = 'Reply-To: '.$args['from'];
|
||||
$headers[] = 'Return-Path: '.$args['from'];
|
||||
$headers[] = 'message-id: <'.$now.'webmaster@'.DOMAIN.'>';
|
||||
$headers[] = 'message-id: <'.$now.'webmaster@'.$domainParse['host'].'>';
|
||||
$headers[] = 'X-Mailer: PHP/'.phpversion();
|
||||
|
||||
$subject = '=?UTF-8?B?'.base64_encode($args['subject']).'?=';
|
||||
|
||||
$message = '<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>BLUDIT</title>
|
||||
</head>
|
||||
<body style="background-color: #f1f1f1;">
|
||||
<div style="margin: 0px auto; padding: 10px; font-size: 14px; width: 70%; max-width: 600px;">
|
||||
<div style="font-size: 26px;">BLUDIT</div>
|
||||
<body>
|
||||
<div>
|
||||
'.$args['message'].'
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
return mail($args['to'], $args['subject'], $message, implode(PHP_EOL, $headers));
|
||||
return mail($args['to'], $subject, $message, implode(PHP_EOL, $headers));
|
||||
}
|
||||
|
||||
}
|
@ -78,27 +78,24 @@ class Text {
|
||||
return $string;
|
||||
}
|
||||
|
||||
public static function startsWith($string, $startString)
|
||||
{
|
||||
$length = self::length($startString);
|
||||
|
||||
return( mb_substr($string, 0, $length)===$startString );
|
||||
}
|
||||
|
||||
public static function endsWith($string, $endsString)
|
||||
{
|
||||
$endsPosition = (-1)*self::length($endsString);
|
||||
$length = (-1)*self::length($endsString);
|
||||
|
||||
if(MB_STRING) {
|
||||
return( mb_substr($string, $endsPosition)===$endsString );
|
||||
}
|
||||
|
||||
return( substr($string, $endsPosition)===$endsString );
|
||||
return( mb_substr($string, $length)===$endsString );
|
||||
}
|
||||
|
||||
|
||||
public static function endsWithNumeric($string)
|
||||
{
|
||||
$endsPosition = (-1)*self::length($string);
|
||||
|
||||
if(MB_STRING) {
|
||||
return( is_numeric(mb_substr($string, -1, 1)) );
|
||||
}
|
||||
|
||||
return( is_numeric(substr($string, -1, 1)) );
|
||||
return( is_numeric(mb_substr($string, -1, 1)) );
|
||||
}
|
||||
|
||||
public static function randomText($length)
|
||||
@ -118,6 +115,11 @@ class Text {
|
||||
|
||||
public static function cleanUrl($string, $separator='-')
|
||||
{
|
||||
if(EXTREME_FRIENDLY_URL) {
|
||||
$string = preg_replace("/[\/_|+ -]+/", $separator, $string);
|
||||
return $string;
|
||||
}
|
||||
|
||||
// Transliterate characters to ASCII
|
||||
$string = str_replace(array_keys(self::$specialChars), self::$specialChars, $string);
|
||||
|
||||
@ -142,48 +144,30 @@ class Text {
|
||||
// String to lowercase
|
||||
public static function lowercase($string, $encoding='UTF-8')
|
||||
{
|
||||
if(MB_STRING) {
|
||||
return mb_strtolower($string, $encoding);
|
||||
}
|
||||
|
||||
return strtolower($string);
|
||||
return mb_strtolower($string, $encoding);
|
||||
}
|
||||
|
||||
// Make a string's first character uppercase
|
||||
public static function firstCharUp($string, $encoding='UTF-8')
|
||||
{
|
||||
// Thanks http://stackoverflow.com/questions/2517947/ucfirst-function-for-multibyte-character-encodings
|
||||
if(MB_STRING)
|
||||
{
|
||||
$strlen = mb_strlen($string, $encoding);
|
||||
$firstChar = mb_substr($string, 0, 1, $encoding);
|
||||
$then = mb_substr($string, 1, $strlen - 1, $encoding);
|
||||
$strlen = mb_strlen($string, $encoding);
|
||||
$firstChar = mb_substr($string, 0, 1, $encoding);
|
||||
$then = mb_substr($string, 1, $strlen - 1, $encoding);
|
||||
|
||||
return mb_strtoupper($firstChar, $encoding).$then;
|
||||
}
|
||||
|
||||
return ucfirst($string);
|
||||
return mb_strtoupper($firstChar, $encoding).$then;
|
||||
}
|
||||
|
||||
// Find position of first occurrence of substring in a string otherwise returns FALSE.
|
||||
public static function stringPosition($string, $substring)
|
||||
{
|
||||
if(MB_STRING) {
|
||||
return mb_strpos($string, $substring, 0, 'UTF-8');
|
||||
}
|
||||
|
||||
return strpos($string, $substring);
|
||||
return mb_strpos($string, $substring, 0, 'UTF-8');
|
||||
}
|
||||
|
||||
// Returns the portion of string specified by the start and length parameters.
|
||||
public static function cut($string, $start, $length)
|
||||
{
|
||||
if(MB_STRING) {
|
||||
$cut = mb_substr($string, $start, $length, 'UTF-8');
|
||||
}
|
||||
else {
|
||||
$cut = substr($string, $start, $length);
|
||||
}
|
||||
$cut = mb_substr($string, $start, $length, 'UTF-8');
|
||||
|
||||
if(empty($cut)) {
|
||||
return '';
|
||||
@ -195,17 +179,16 @@ class Text {
|
||||
// Return string length
|
||||
public static function length($string)
|
||||
{
|
||||
if(MB_STRING)
|
||||
return mb_strlen($string, 'UTF-8');
|
||||
return strlen($string);
|
||||
return mb_strlen($string, 'UTF-8');
|
||||
}
|
||||
|
||||
public static function isEmpty($string)
|
||||
{
|
||||
$string = trim($string);
|
||||
|
||||
if(empty($string))
|
||||
if(empty($string)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -227,4 +210,4 @@ class Text {
|
||||
$string);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -183,7 +183,6 @@ class Theme {
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -13,13 +13,13 @@ class Page extends Content {
|
||||
parent::__construct(PATH_PAGES.$key.DS);
|
||||
}
|
||||
|
||||
// Returns the page position.
|
||||
// Returns the page position
|
||||
public function position()
|
||||
{
|
||||
return $this->getField('position');
|
||||
}
|
||||
|
||||
// Returns the page slug.
|
||||
// Returns the page slug
|
||||
public function slug()
|
||||
{
|
||||
$explode = explode('/', $this->getField('key'));
|
||||
@ -32,7 +32,7 @@ class Page extends Content {
|
||||
return $explode[0];
|
||||
}
|
||||
|
||||
// Returns the parent key, if the page doesn't have a parent returns FALSE.
|
||||
// Returns the parent key, if the page doesn't have a parent returns FALSE
|
||||
public function parentKey()
|
||||
{
|
||||
$explode = explode('/', $this->getField('key'));
|
||||
@ -43,7 +43,7 @@ class Page extends Content {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns the parent method output, if the page doesn't have a parent returns FALSE.
|
||||
// Returns the parent method output, if the page doesn't have a parent returns FALSE
|
||||
public function parentMethod($method)
|
||||
{
|
||||
global $pages;
|
||||
@ -55,6 +55,7 @@ class Page extends Content {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns an array with all children's key
|
||||
public function children()
|
||||
{
|
||||
$tmp = array();
|
||||
|
@ -13,11 +13,7 @@ class Post extends Content {
|
||||
parent::__construct(PATH_POSTS.$key.DS);
|
||||
}
|
||||
|
||||
public function key()
|
||||
{
|
||||
return $this->getField('key');
|
||||
}
|
||||
|
||||
// Returns the post slug
|
||||
public function slug()
|
||||
{
|
||||
return $this->getField('key');
|
||||
@ -28,4 +24,5 @@ class Post extends Content {
|
||||
{
|
||||
return ($this->getField('status')==='scheduled');
|
||||
}
|
||||
|
||||
}
|
@ -14,6 +14,14 @@ class Security extends dbJSON
|
||||
parent::__construct(PATH_DATABASES.'security.php');
|
||||
}
|
||||
|
||||
// Authentication key
|
||||
// --------------------------------------------------------------------
|
||||
public function key1()
|
||||
{
|
||||
return $this->db['key1'];
|
||||
}
|
||||
|
||||
|
||||
// ====================================================
|
||||
// TOKEN FOR CSRF
|
||||
// ====================================================
|
||||
|
239
bl-languages/ar_MA.json
Normal file
239
bl-languages/ar_MA.json
Normal file
@ -0,0 +1,239 @@
|
||||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "اللغة العربية",
|
||||
"english-name": "Arabic",
|
||||
"last-update": "2016-04-16",
|
||||
"author": "english4ar.com",
|
||||
"email": "",
|
||||
"website": "english4ar.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": "مشاركة جديدة",
|
||||
"new-page": "صفحة جديدة",
|
||||
"html-and-markdown-code-supported": "شيفرات HTML و Markdown مدعومة",
|
||||
"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": "يستخدم",
|
||||
"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": "البريد الالكتروني لن يتم عرضه علنا. موصى به لاستعادة كلمة السر والإخطارات.",
|
||||
"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 حرفا.",
|
||||
|
||||
"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": "ماهي الخطوة التالية",
|
||||
|
||||
"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": "أكمل النموذج، إختر إسم وكلمة سر للمدير",
|
||||
"password-visible-field": "كلمة السر، الحقل مرئي!",
|
||||
"install": "تثبيث",
|
||||
"choose-your-language": "إختر لغتك",
|
||||
"next": "التالـي",
|
||||
"the-password-field-is-empty": "حقل كلمة السر فارغ",
|
||||
"your-email-address-is-invalid":".البريد الإلكتروني غير صحيح",
|
||||
"proceed-anyway": "!تـابع",
|
||||
"drafts":"المسودات",
|
||||
"ip-address-has-been-blocked": "IP تم حظر.",
|
||||
"try-again-in-a-few-minutes": ".أعد المحاولة بعد دقائق",
|
||||
"date": "التاريخ",
|
||||
|
||||
"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":"إعدادات بريد الحساب",
|
||||
"sender-email": "بريد المرسل",
|
||||
"emails-will-be-sent-from-this-address":".سوف ترسل الرسائل من هذا البريد",
|
||||
"bludit-login-access-code": "BLUDIT - رمز الدخول",
|
||||
"check-your-inbox-for-your-login-access-code":"راجع بريدك للحصول على رمز الدخول",
|
||||
"there-was-a-problem-sending-the-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":"هذا وصف موجز لنفسك أو لموقعك، لتغيير هذا النص تذهب إلى لوحة المشرف، إعدادات، والإضافات، وتعديل في إضافة About",
|
||||
"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",
|
||||
|
||||
"site-information": "معلومات الموقع",
|
||||
"date-and-time-formats": "تنسيق التاريخ والوقت",
|
||||
"activate": "تفعيل",
|
||||
"deactivate": "تعطيل",
|
||||
|
||||
"cover-image": "صورة الغلاف",
|
||||
"blog": "المدونة",
|
||||
"more-images": "المزيد من الصور",
|
||||
|
||||
"click-here-to-cancel": ".انقر هنا إلى إلغاء",
|
||||
"type-the-tag-and-press-enter": ".أكتب العلامات وإضغظ زر الإدخال",
|
||||
"add": "أضـف",
|
||||
"manage-your-bludit-from-the-admin-panel": "إدارة الموقع[admin area]({{ADMIN_AREA_LINK}})",
|
||||
"there-are-no-images":"لا توجد صور بعد",
|
||||
|
||||
"click-on-the-image-for-options": "إضغط على الصورة للمزيد من خيارات.",
|
||||
"set-as-cover-image": "جعلها صورة للغلاف",
|
||||
"delete-image": "حذف الصورة",
|
||||
"image-description": "وصف الصورة",
|
||||
|
||||
"social-networks-links": "روابط الشبكات الإجتماعية"
|
||||
}
|
@ -200,7 +200,7 @@
|
||||
"view-and-edit-your-profile": "Преглед и редактиране на профила ви.",
|
||||
|
||||
"password-must-be-at-least-6-characters-long": "Паролата трябва да е с дължина най-малко 6 символа",
|
||||
"images": "Изображения",
|
||||
"images":"Изображения",
|
||||
"upload-image": "Прикачи изображение",
|
||||
"drag-and-drop-or-click-here": "Влачите и пускате или натиснете тук",
|
||||
"insert-image": "Вмъкни изображение",
|
||||
@ -232,6 +232,10 @@
|
||||
"click-on-the-image-for-options": "Кликнете върху изображението за опции.",
|
||||
"set-as-cover-image": "Задай като обложка ",
|
||||
"delete-image": "Изтрий изображенито",
|
||||
"image-description": "Описание на изображението "
|
||||
"image-description": "Описание на изображението ",
|
||||
"social-networks-links": "Социалните мрежи",
|
||||
|
||||
"email-access-code": "Имейл код за достъп",
|
||||
"current-format": "Текущ формат"
|
||||
}
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
{
|
||||
"native": "Deutsch (Schweiz)",
|
||||
"english-name": "German",
|
||||
"last-update": "2016-02-15",
|
||||
"last-update": "2016-05-31",
|
||||
"author": "Clickwork",
|
||||
"email": "egoetschel@clickwork.ch",
|
||||
"website": "http://www.clickwork.ch"
|
||||
"website": "https://clickwork.ch"
|
||||
},
|
||||
|
||||
|
||||
"username": "Benutzername",
|
||||
"password": "Passwort",
|
||||
"confirm-password": "Passwort wiederholen",
|
||||
@ -222,5 +222,12 @@
|
||||
"click-here-to-cancel": "Abbrechen",
|
||||
"type-the-tag-and-press-enter": "Schlagwort eingeben und mit \"Enter\" hinzufügen.",
|
||||
"manage-your-bludit-from-the-admin-panel": "Verwalte Bludit im [Administrationsbereich](./admin/).",
|
||||
"there-are-no-images":"Keine Bilder vorhanden"
|
||||
"there-are-no-images":"Keine Bilder vorhanden",
|
||||
"click-on-the-image-for-options": "Für die Bildoptionen auf das Bild klicken.",
|
||||
"set-as-cover-image": "Als Hauptbild verwenden",
|
||||
"delete-image": "Bild löschen",
|
||||
"image-description": "Bildbeschreibung",
|
||||
"social-networks-links": "Links zu sozialen Netzwerken",
|
||||
"email-access-code": "Zugangscode zuschicken",
|
||||
"current-format": "Aktuelles Datumsformat"
|
||||
}
|
||||
|
@ -3,10 +3,10 @@
|
||||
{
|
||||
"native": "Deutsch (Deutschland)",
|
||||
"english-name": "German",
|
||||
"last-update": "2016-02-15",
|
||||
"last-update": "2016-05-31",
|
||||
"author": "Clickwork",
|
||||
"email": "egoetschel@clickwork.ch",
|
||||
"website": "http://www.clickwork.ch"
|
||||
"website": "https://clickwork.ch"
|
||||
},
|
||||
|
||||
"username": "Benutzername",
|
||||
@ -222,5 +222,12 @@
|
||||
"click-here-to-cancel": "Abbrechen",
|
||||
"type-the-tag-and-press-enter": "Schlagwort eingeben und mit \"Enter\" hinzufügen.",
|
||||
"manage-your-bludit-from-the-admin-panel": "Verwalte Bludit im [Administrationsbereich](./admin/).",
|
||||
"there-are-no-images":"Keine Bilder vorhanden"
|
||||
"there-are-no-images":"Keine Bilder vorhanden",
|
||||
"click-on-the-image-for-options": "Für die Bildoptionen auf das Bild klicken.",
|
||||
"set-as-cover-image": "Als Hauptbild verwenden",
|
||||
"delete-image": "Bild löschen",
|
||||
"image-description": "Bildbeschreibung",
|
||||
"social-networks-links": "Links zu sozialen Netzwerken",
|
||||
"email-access-code": "Zugangscode zuschicken",
|
||||
"current-format": "Aktuelles Datumsformat"
|
||||
}
|
||||
|
@ -235,5 +235,10 @@
|
||||
"delete-image": "Delete image",
|
||||
"image-description": "Image description",
|
||||
|
||||
"social-networks-links": "Social networks links"
|
||||
"social-networks-links": "Social networks links",
|
||||
|
||||
"email-access-code": "Email access code",
|
||||
"current-format": "Current format",
|
||||
|
||||
"welcome": "Welcome"
|
||||
}
|
@ -226,6 +226,7 @@
|
||||
|
||||
"click-here-to-cancel": "Clic aquí para cancelar.",
|
||||
"type-the-tag-and-press-enter": "Escriba la etiqueta y presione enter.",
|
||||
"add": "Agregar",
|
||||
"manage-your-bludit-from-the-admin-panel": "Administre su Bludit desde el [panel de administración]({{ADMIN_AREA_LINK}})",
|
||||
"there-are-no-images":"No hay imagenes",
|
||||
|
||||
@ -234,5 +235,10 @@
|
||||
"delete-image": "Eliminar imagen",
|
||||
"image-description": "Descripción de la imagen",
|
||||
|
||||
"social-networks-links": "Redes sociales enlaces"
|
||||
"social-networks-links": "Redes sociales enlaces",
|
||||
|
||||
"email-access-code": "Código de acceso via email",
|
||||
"current-format": "Formato actual",
|
||||
|
||||
"welcome": "Bienvenido"
|
||||
}
|
239
bl-languages/fa_IR.JSON
Normal file
239
bl-languages/fa_IR.JSON
Normal file
@ -0,0 +1,239 @@
|
||||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "فارسی (Iran)",
|
||||
"english-name": "Persian",
|
||||
"last-update": "2016-03-13",
|
||||
"author": "Abdulhalim",
|
||||
"email": "abdulhalim.po@gmail.com",
|
||||
"website": "http://getpunbb.ir"
|
||||
},
|
||||
|
||||
"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": "نوشته جدید",
|
||||
"new-page": "صفحه جدید",
|
||||
"html-and-markdown-code-supported": "HTML و کد Markdown پشتیبانی میشود",
|
||||
"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": "نسخه بلودیت",
|
||||
"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": "آدرس ایمیل بصورت خصوصی نمایش داده نمیشود . برای بازیابی پسورد و اطلاع رسانی ها توصیه میشود.",
|
||||
"use-this-field-to-name-your-site": "از این کادر برای نامگذاری سایت خود استفاده کنید ، این نام بالای تمام صفحات سایت شما نمایش داده میشود.",
|
||||
"you-can-add-a-site-description-to-provide": "میتوانید توضیحات سایت را برای ارائه یک شرح حال کوتاه در مورد سایت خود اضافه کنید.",
|
||||
"use-this-field-to-add-a-catchy-phrase": "از این کادر برای اضافه کردن یک عبارت جذاب در سایت خود استفاده کنید.",
|
||||
"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 کاراکتر نباشد.",
|
||||
|
||||
"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": "حالا چه کنیم ؟",
|
||||
|
||||
"follow-bludit-on": "بلودیت را دنبال کنید",
|
||||
"visit-the-support-forum": "برای دریافت پشتیبانی از [انجمن بلودیت](https://forum.bludit.com) دیدن کنید",
|
||||
"read-the-documentation-for-more-information": "برای کسب اطلاعات بیشتر [مستندات](https://docs.bludit.com) را مطالعه کنید",
|
||||
"share-with-your-friends-and-enjoy": "با دوستانتان به اشتراک گذاشته و لذت ببرید",
|
||||
"the-page-has-not-been-found": "صفحه مورد نظر یافت نشد.",
|
||||
"error": "خطا",
|
||||
"bludit-installer": "نصب کننده بلودیت",
|
||||
"welcome-to-the-bludit-installer": "به نصب کننده بلودیت خوش آمدید",
|
||||
"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":"آدرس ایمیل شما معتبر نمیباشد.",
|
||||
"proceed-anyway": "درهرصورت ادامه داده شود!",
|
||||
"drafts":"پیش نویس",
|
||||
"ip-address-has-been-blocked": "آدرس IP مسدود شده.",
|
||||
"try-again-in-a-few-minutes": "لطفا ً چند دقیقه دیگر دوباره تلاش کنید.",
|
||||
"date": "تاریخ",
|
||||
|
||||
"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":"تنظیمات حساب ایمیل",
|
||||
"sender-email": "ایمیل ارسال کننده",
|
||||
"emails-will-be-sent-from-this-address":"ایمیل ها از این آدرس ارسال خواهند شد.",
|
||||
"bludit-login-access-code": "بلودیت - کد دسترسی ورود به سایت",
|
||||
"check-your-inbox-for-your-login-access-code":"ایمیل خود را برای کد دسترسی ورود به سایت بررسی نمائید",
|
||||
"there-was-a-problem-sending-the-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": "به بلودیت خوش آمدید",
|
||||
|
||||
"site-information": "اطلاعات سایت",
|
||||
"date-and-time-formats": "فرمت تاریخ و زمان",
|
||||
"activate": "بکار انداختن",
|
||||
"deactivate": "از کار انداختن",
|
||||
|
||||
"cover-image": "تصویر کاور",
|
||||
"blog": "بلاگ",
|
||||
"more-images": "تصاویر بیشتر",
|
||||
|
||||
"click-here-to-cancel": "برای انصراف اینجا را کلیک کنید.",
|
||||
"type-the-tag-and-press-enter": "برچسب را نوشته و دکمه انتر را بزنید.",
|
||||
"add": "افزودن",
|
||||
"manage-your-bludit-from-the-admin-panel": "بلودیت خود را از [محیط مدیریت]({{ADMIN_AREA_LINK}}) کنترل کنید",
|
||||
"there-are-no-images":"هیچ تصویری وجود ندارد",
|
||||
|
||||
"click-on-the-image-for-options": "برای گزینه ها بر روی تصویر کلیک کنید.",
|
||||
"set-as-cover-image": "انتخاب بعنوان تصویر کاور",
|
||||
"delete-image": "حذف تصویر",
|
||||
"image-description": "توضیحات تصویر",
|
||||
|
||||
"social-networks-links": "لینک های شبکه های اجتماعی"
|
||||
}
|
242
bl-languages/fi_FI.json
Normal file
242
bl-languages/fi_FI.json
Normal file
@ -0,0 +1,242 @@
|
||||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Suomi (Suomi)",
|
||||
"english-name": "Finnish",
|
||||
"last-update": "2016-06-11",
|
||||
"author": "Tuomas K.",
|
||||
"email": "",
|
||||
"website": ""
|
||||
},
|
||||
|
||||
"username": "Käyttäjätunnus",
|
||||
"password": "Salasana",
|
||||
"confirm-password": "Vahvista salasana",
|
||||
"editor": "Kirjoittaja",
|
||||
"dashboard": "Hallintapaneeli",
|
||||
"role": "Tyyppi",
|
||||
"post": "Blogikirjoitus",
|
||||
"posts": "Blogikirjoitukset",
|
||||
"users": "Käyttäjät",
|
||||
"administrator": "Ylläpitäjä",
|
||||
"add": "Lisää",
|
||||
"cancel": "Peruuta",
|
||||
"content": "Sisältö",
|
||||
"title": "Otsikko",
|
||||
"no-parent": "Ei ole",
|
||||
"edit-page": "Muokkaa sivua",
|
||||
"edit-post": "Muokkaa blogikirjoitusta",
|
||||
"add-a-new-user": "Lisää uusi käyttäjä",
|
||||
"parent": "Onko tämä jonkun sivun alasivu?",
|
||||
"friendly-url": "Sivun osoite",
|
||||
"description": "Kuvaus",
|
||||
"posted-by": "Julkaisija",
|
||||
"tags": "Tagit",
|
||||
"position": "Sijainti navigaatiossa",
|
||||
"save": "Tallenna",
|
||||
"draft": "Luonnos",
|
||||
"delete": "Poista",
|
||||
"registered": "Käyttäjä luotu",
|
||||
"notifications": "Ilmoitukset",
|
||||
"profile": "Profiili",
|
||||
"email": "Sähköpostiosoite",
|
||||
"settings": "Asetukset",
|
||||
"general": "Yleiset",
|
||||
"advanced": "Lisäasetukset",
|
||||
"regional": "Alueellinen",
|
||||
"about": "Tietoja",
|
||||
"login": "Kirjaudu sisään",
|
||||
"logout": "Kirjaudu ulos",
|
||||
"manage": "Hallitse",
|
||||
"themes": "Teemat",
|
||||
"prev-page": "Edellinen sivu",
|
||||
"next-page": "Seuraava sivu",
|
||||
"configure-plugin": "Lisäosan asetukset",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Haluatko varmasti poistaa? Tätä toimintoa ei voi perua.",
|
||||
"site-title": "Sivuston otsikko",
|
||||
"site-slogan": "Mainoslause",
|
||||
"site-description": "Sivuston kuvaus",
|
||||
"footer-text": "Alapalkin teksti",
|
||||
"posts-per-page": "Blogikirjoituksia per sivu",
|
||||
"site-url": "Sivuston URL-osoite",
|
||||
"writting-settings": "Kirjoittamisen asetukset",
|
||||
"url-filters": "Osoitteiden asetukset",
|
||||
"page": "Sivu",
|
||||
"pages": "Sivut",
|
||||
"home": "Etusivu",
|
||||
"welcome-back": "Tervetuloa takaisin",
|
||||
"language": "Kieli",
|
||||
"website": "Julkinen sivusto",
|
||||
"timezone": "Aikavyöhyke",
|
||||
"locale": "Maa/Kieli",
|
||||
"new-post": "Uusi blogikirjoitus",
|
||||
"new-page": "Uusi sivu",
|
||||
"html-and-markdown-code-supported": "HTML sekä Markdown toimivat",
|
||||
"manage-posts": "Hallitse blogikirjoituksia",
|
||||
"published-date": "Julkaisuaika",
|
||||
"modified-date": "Muokattu aika",
|
||||
"empty-title": "Tyhjä otsikko",
|
||||
"plugins": "Lisäosat",
|
||||
"install-plugin": "Asenna lisäosa",
|
||||
"uninstall-plugin": "Poista lisäosa",
|
||||
"new-password": "Uusi salasana",
|
||||
"edit-user": "Muokkaa käyttäjää",
|
||||
"publish-now": "Julkaise nyt",
|
||||
"first-name": "Etunimi",
|
||||
"last-name": "Sukunimi",
|
||||
"bludit-version": "Bludit:in versio",
|
||||
"powered-by": "Virtaa antaa: ",
|
||||
"recent-posts": "Viimeisimmät blogikirjoitukset",
|
||||
"manage-pages": "Hallitse sivuja",
|
||||
"advanced-options": "Lisäasetukset",
|
||||
"user-deleted": "Käyttäjä poistettu",
|
||||
"page-added-successfully": "Sivu lisätty onnistuneesti",
|
||||
"post-added-successfully": "Blogikirjoitus lisätty onnistuneesti",
|
||||
"the-post-has-been-deleted-successfully": "Blogikirjoitus poistettu",
|
||||
"the-page-has-been-deleted-successfully": "Sivu poistettu",
|
||||
"username-or-password-incorrect": "Käyttäjätunnus tai salasana virheellinen",
|
||||
"database-regenerated": "Tietokanta uudelleengeneroitu",
|
||||
"the-changes-have-been-saved": "Muutokset on tallennettu",
|
||||
"enable-more-features-at": "Ota käyttöön lisää ominaisuuksia",
|
||||
"username-already-exists": "Käyttäjätunnus on jo olemassa",
|
||||
"username-field-is-empty": "Käyttäjätunnus on tyhjä",
|
||||
"the-password-and-confirmation-password-do-not-match":"Salasana ja sen vahvistus eivät täsmää",
|
||||
"user-has-been-added-successfully": "Käyttäjä lisätty onnistuneesti",
|
||||
"you-do-not-have-sufficient-permissions": "Sinulla ei ole tarvittavia oikeuksia tälle sivulle. Ota yhteyttä ylläpitäjään.",
|
||||
"settings-advanced-writting-settings": "Asetukset->Lisäasetukset->Kirjoittamisen asetukset",
|
||||
"new-posts-and-pages-synchronized": "Uudet sivut ja blogikirjoitukset synkronisoitu.",
|
||||
"you-can-choose-the-users-privilege": "Voit valita käyttäjän tyypin. Kirjoittaja voi ainostaan muokata sivuja ja blogikirjoituksia, ylläpitäjä myös muuttaa asetuksia.",
|
||||
"email-will-not-be-publicly-displayed": "Sähköpostia ei näytetä julkisesti. Suositeltu salasanan palauttamiseen ja ilmoituksiin.",
|
||||
"use-this-field-to-name-your-site": "Kirjoita tähän sivusi nimi. Se näkyy jokaisen sivun yläreunassa.",
|
||||
"use-this-field-to-add-a-catchy-phrase": "Voit keksiä tähän esimerkiksi mainoslauseen tms.",
|
||||
"you-can-add-a-site-description-to-provide": "Voit lisätä lyhyen kuvauksen sivustostasi.",
|
||||
"you-can-add-a-small-text-on-the-bottom": "Voit lisätä pienen tekstinpätkän jokaisen sivun loppuun. Se voi olla vaikkapa sivuston nimi, yhteystietoja, päivämäärä, jne.",
|
||||
"number-of-posts-to-show-per-page": "Kuinka monta blogikirjoitusta yhdellä sivulla saa näkyä.",
|
||||
"the-url-of-your-site": "Sivustosi internetosoite.",
|
||||
"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-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ä.",
|
||||
|
||||
"delete-the-user-and-all-its-posts":"Poista käyttäjä, sekä kaikki sen blogikirjoitukset",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "Poista käyttäjä, ja siirrä sen blogikirjoitukset ylläpitäjän nimiin",
|
||||
"read-more": "Lue lisää...",
|
||||
"show-blog": "Näytä blogi",
|
||||
"default-home-page": "Sivuston etusivu",
|
||||
"version": "Versio",
|
||||
"there-are-no-drafts": "Ei luonnoksia.",
|
||||
"create-a-new-article-for-your-blog":"Kirjoita blogiisi.",
|
||||
"create-a-new-page-for-your-website":"Luo uusi sivu sivustollesi.",
|
||||
"invite-a-friend-to-collaborate-on-your-website":"Tee ystävällesi omat tunnukset, niin hänkin voi kirjoittaa sivustollesi",
|
||||
"change-your-language-and-region-settings":"Muuta kielen ja alueen asetuksia.",
|
||||
"language-and-timezone":"Kieli ja aikavyöhyke",
|
||||
"author": "Tekijä",
|
||||
"start-here": "Aloita tästä",
|
||||
"install-theme": "Asenna teema",
|
||||
"first-post": "Ensimmäinen blogikirjoitus",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "Onneksi olkoon! **Bludit** on nyt asennettu!",
|
||||
"whats-next": "Mitä seuraavaksi?",
|
||||
|
||||
"follow-bludit-on": "Seuraa Bludit:ia",
|
||||
"visit-the-support-forum": "Vieraile [foorumilla](https://forum.bludit.com) jos tarvitse tukea",
|
||||
"read-the-documentation-for-more-information": "[Dokumentaatiosta](https://docs.bludit.com) löydät paljon lisää tietoa",
|
||||
"share-with-your-friends-and-enjoy": "Jaa ystäviesi kanssa ja nauti!",
|
||||
"the-page-has-not-been-found": "Etsimääsi sivua ei löydy.",
|
||||
"error": "Virhe",
|
||||
"bludit-installer": "Bludit Installer",
|
||||
"welcome-to-the-bludit-installer": "Tervetuloa asentamaan Bludit!",
|
||||
"complete-the-form-choose-a-password-for-the-username-admin": "Täytä lomake, valitse salasana käyttäjälle « admin » (sivuston ylläpitäjä)",
|
||||
"password-visible-field": "Salasana, näkyvä kenttä!",
|
||||
"install": "Asenna",
|
||||
"choose-your-language": "Valitse kielesi",
|
||||
"next": "Seuraava",
|
||||
"the-password-field-is-empty": "Salasanakenttä on tyhjä",
|
||||
"your-email-address-is-invalid":"Sähköpostiosoitteesi on vääränlainen.",
|
||||
"proceed-anyway": "Jatka silti!",
|
||||
"drafts":"Luonnokset",
|
||||
"ip-address-has-been-blocked": "IP osoitteesi on estetty.",
|
||||
"try-again-in-a-few-minutes": "Yritä uudelleen muutaman minuutin päästä.",
|
||||
"date": "Päivämäärä",
|
||||
|
||||
"scheduled": "Ajastettu",
|
||||
"publish": "Julkaise",
|
||||
"please-check-your-theme-configuration": "Tarkista teeman asetukset.",
|
||||
"plugin-label": "Lisäosan nimi",
|
||||
"enabled": "Käytössä",
|
||||
"disabled": "Poissa käytöstä",
|
||||
"cli-mode": "CLI-tila",
|
||||
"command-line-mode": "Komentorivitila",
|
||||
"enable-the-command-line-mode-if-you-add-edit": "Ota käyttöön komentorivitila, jos lisää, muokkaat tai poistat sivuja tai blogikirjoituksia suoraan tiedostojärjestemästä",
|
||||
|
||||
"configure": "Asetukset",
|
||||
"uninstall": "Poista",
|
||||
"change-password": "Muuta salasana",
|
||||
"to-schedule-the-post-just-select-the-date-and-time": "Ajastaaksesi lähetyksen, valitse päivä ja aika.",
|
||||
"write-the-tags-separated-by-commas": "Kirjoita tagit erotetuna pilkuilla.",
|
||||
"status": "Tila",
|
||||
"published": "Julkaistu",
|
||||
"scheduled-posts": "Ajastetut blogikirjoitukset",
|
||||
"statistics": "Tilastot",
|
||||
"name": "Nimi",
|
||||
"email-account-settings":"Sähköpostin asetukset",
|
||||
"sender-email": "Lähettäjän sähköpostiosoite",
|
||||
"emails-will-be-sent-from-this-address":"Sähköpostit tullaan lähettämään tästä osoitteesta.",
|
||||
"bludit-login-access-code": "BLUDIT - Kirjautumisen tunnistautumiskoodi",
|
||||
"check-your-inbox-for-your-login-access-code":"Tunnistautumiskoodi on lähetetty sinulle sähköpostilla",
|
||||
"there-was-a-problem-sending-the-email":"Sähköpostin lähettämisessä tapahtui ongelma",
|
||||
"back-to-login-form": "Takaisin",
|
||||
"send-me-a-login-access-code": "Lähetä minulle tunnistautumiskoodi",
|
||||
"get-login-access-code": "Lähetä tunnistautumiskoodi",
|
||||
"email-notification-login-access-code": "<p>Tämä on ilmoitus sivustoltasi {{WEBSITE_NAME}}</p><p>Jos pyysit kirjautumisen tunnistautumiskoodia, paina tästä linkistä:</p><p>{{LINK}}</p>",
|
||||
"there-are-no-scheduled-posts": "Ei ajastettuja blogikirjoituksia",
|
||||
"show-password": "Näytä salasana",
|
||||
"edit-or-remove-your=pages": "Lisää, muokkaa ja poista sivujasi",
|
||||
"edit-or-remove-your-blogs-posts": "Lisää, muokkaa ja poista blogikirjoituksiasi",
|
||||
"general-settings": "Yleiset asetukset",
|
||||
"advanced-settings": "Lisäasetukset",
|
||||
"manage-users": "Hallitse käyttäjiä",
|
||||
"view-and-edit-your-profile": "Näytä ja muokkaa oma profiilisi",
|
||||
|
||||
"password-must-be-at-least-6-characters-long": "Salasanan täytyy olla vähintään 6 merkkiä pitkä",
|
||||
"images": "Kuvat",
|
||||
"upload-image": "Lähetä image",
|
||||
"drag-and-drop-or-click-here": "Klikkaa tästä, tai vedä kuva tänne",
|
||||
"insert-image": "Lisää kuva",
|
||||
"supported-image-file-types": "Tuetut kuvatyypit",
|
||||
"date-format": "Päivämäärän muoto",
|
||||
"time-format": "Ajan muoto",
|
||||
"chat-with-developers-and-users-on-gitter":"Keskustele muiden kehittäjien ja käyttäjien kanssa [Gitterissä](https://gitter.im/dignajar/bludit)",
|
||||
"this-is-a-brief-description-of-yourself-our-your-site":"Tämä on lyhyt kuvaus sinusta, tai sivustostasi. Voit muuttaa tätä hallintapaneelista kohdasta Asetukset->Lisäosat, ja muokkaa lisäosan \"About\" asetuksia",
|
||||
"profile-picture": "Profiilikuva",
|
||||
"the-about-page-is-very-important": "Tietoja-sivu on tärkeä työkalu mahdollisille asiakkaillesi. Niille asiakkaille, jotka miettivät, kuka on tämän mahtavan sivuston takana, sinun Tietoja-sivu on ensimmäinen paikka josta katsoa.",
|
||||
"change-this-pages-content-on-the-admin-panel": "Voit muokata tämän sivun sisältöä hallintapaneelista, kohdasta Hallitse->Sivut, ja paina \"Tietoja\".",
|
||||
"about-your-site-or-yourself": "Sivustostasi tai sinusta.",
|
||||
"welcome-to-bludit": "Bludit toivottaa sinut tervetulleeksi!",
|
||||
|
||||
"site-information": "Sivuston tiedot",
|
||||
"date-and-time-formats": "Päivämäärän ja ajan esitysmuodot",
|
||||
"activate": "Ota käyttöön",
|
||||
"deactivate": "Poista käytöstä",
|
||||
|
||||
"cover-image": "Artikkelikuva",
|
||||
"blog": "Blogi",
|
||||
"more-images": "Lisää kuvia",
|
||||
|
||||
"click-here-to-cancel": "Paina tästä peruaksesi.",
|
||||
"type-the-tag-and-press-enter": "Kirjoita tagi, ja paina enter.",
|
||||
"add": "Lisää",
|
||||
"manage-your-bludit-from-the-admin-panel": "Voit hallita Bludit:ia [hallintapaneelista]({{ADMIN_AREA_LINK}})",
|
||||
"there-are-no-images":"Ei kuvia",
|
||||
|
||||
"click-on-the-image-for-options": "Paina kuvaa saadaksesi lisätietoja.",
|
||||
"set-as-cover-image": "Aseta artikkelikuvaksi",
|
||||
"delete-image": "Poista kuva",
|
||||
"image-description": "Kuvan kuvaus",
|
||||
|
||||
"social-networks-links": "Sosiaalisen median linkit",
|
||||
|
||||
"email-access-code": "Pyydä tunnistautumiskoodi",
|
||||
"current-format": "Nykyinen muoto"
|
||||
}
|
0
bl-languages/fr_FR.json
Executable file → Normal file
0
bl-languages/fr_FR.json
Executable file → Normal file
@ -3,7 +3,7 @@
|
||||
{
|
||||
"native": "Русский (Россия)",
|
||||
"english-name": "Russian",
|
||||
"last-update": "2015-11-17",
|
||||
"last-update": "2016-06-01",
|
||||
"author": "Сергей Ворон",
|
||||
"email": "sergey@voron.pw",
|
||||
"website": "http://voron.pw"
|
||||
@ -235,9 +235,8 @@
|
||||
"delete-image": "Удалить изображение",
|
||||
"image-description": "Описание изображения",
|
||||
|
||||
"social-networks": "Социальные сети",
|
||||
"twitter-username": "Имя пользователя в Twitter",
|
||||
"facebook-username": "Имя пользователя в Facebook",
|
||||
"google-username": "Имя пользователя в Google",
|
||||
"instagram-username": "Имя пользователя в Instagram"
|
||||
"social-networks-links": "Социальные сети",
|
||||
|
||||
"email-access-code": "Проверочный код email",
|
||||
"current-format": "Текущий формат"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-15",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
7
bl-plugins/api/languages/en_US.json
Normal file
7
bl-plugins/api/languages/en_US.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Interface to interact with Bludit using HTTP protocol."
|
||||
}
|
||||
}
|
7
bl-plugins/api/languages/es_AR.json
Normal file
7
bl-plugins/api/languages/es_AR.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Interfaz para interactuar con Bludit mediante el protocolo HTTP."
|
||||
}
|
||||
}
|
10
bl-plugins/api/metadata.json
Normal file
10
bl-plugins/api/metadata.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
211
bl-plugins/api/plugin.php
Normal file
211
bl-plugins/api/plugin.php
Normal file
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
|
||||
class pluginAPI extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
global $Security;
|
||||
|
||||
// This key is used for request such as get the list of all posts and pages
|
||||
$authKey = md5($Security->key1().time().DOMAIN_BASE);
|
||||
|
||||
$this->dbFields = array(
|
||||
'ping'=>0, // 0 = false, 1 = true
|
||||
'authKey'=>$authKey, // Private key
|
||||
'showAllAmount'=>15 // Amount of posts and pages for return
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
$html = '';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<input type="hidden" name="ping" value="0">';
|
||||
$html .= '<input name="ping" id="jsping" type="checkbox" value="1" '.($this->getDbField('ping')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jsping">Ping Bludit.com</label>';
|
||||
$html .= '<div class="tip">Enable this feature to share your posts and pages with Bludit.com.</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<p><b>Authorization Key:</b> '.$this->getDbField('authKey').'</p>';
|
||||
$html .= '<div class="tip">This key is private, do not share it with anyone.</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<p><b>Show all posts:</b> <a href="'.DOMAIN_BASE.'api/show/all/posts/'.$this->getDbField('authKey').'">'.DOMAIN_BASE.'api/show/all/posts/'.$this->getDbField('authKey').'</a></p>';
|
||||
$html .= '<div class="tip">Get all posts from this site.</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<p><b>Show all pages:</b> <a href="'.DOMAIN_BASE.'api/show/all/pages/'.$this->getDbField('authKey').'">'.DOMAIN_BASE.'api/show/all/pages/'.$this->getDbField('authKey').'</a></p>';
|
||||
$html .= '<div class="tip">Get all pages from this site.</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<p><b>Show post:</b> <a href="'.DOMAIN_BASE.'api/show/post/{POST-NAME}">'.DOMAIN_BASE.'api/show/post/{POST-NAME}</a></p>';
|
||||
$html .= '<div class="tip">Get a particular post, change the {POST-NAME} with the post friendly url.</div>';
|
||||
$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 .= '<div class="tip">Get a particular page, change the {PAGE-NAME} with the page friendly url.</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function afterFormSave()
|
||||
{
|
||||
$this->ping();
|
||||
}
|
||||
|
||||
private function ping()
|
||||
{
|
||||
if($this->getDbField('ping')) {
|
||||
|
||||
// Get the authentication key
|
||||
$authKey = $this->getDbField('authKey');
|
||||
|
||||
// Just a request HTTP with the website URL
|
||||
Log::set( file_get_contents('https://www.bludit.com/api.php?authKey='.$authKey) );
|
||||
}
|
||||
}
|
||||
|
||||
private function getPost($key)
|
||||
{
|
||||
// Generate the object Post
|
||||
$Post = buildPost($key);
|
||||
|
||||
if(!$Post) {
|
||||
return json_encode(array(
|
||||
'status'=>'0',
|
||||
'bludit'=>'Bludit API plugin',
|
||||
'message'=>'The post doesn\'t exist'
|
||||
));
|
||||
}
|
||||
|
||||
return $Post->json();
|
||||
}
|
||||
|
||||
private function getAllPosts()
|
||||
{
|
||||
$posts = buildPostsForPage(0, $this->getDbField('showAllAmount'), true, false);
|
||||
|
||||
$tmp = array();
|
||||
|
||||
foreach($posts as $Post) {
|
||||
array_push($tmp, $Post->json( $returnsArray=true ));
|
||||
}
|
||||
|
||||
return json_encode($tmp);
|
||||
}
|
||||
|
||||
private function getPage($key)
|
||||
{
|
||||
// Generate the object Page
|
||||
$Page = buildPage($key);
|
||||
|
||||
if(!$Page) {
|
||||
return json_encode(array(
|
||||
'status'=>'0',
|
||||
'bludit'=>'Bludit API plugin',
|
||||
'message'=>'The page doesn\'t exist'
|
||||
));
|
||||
}
|
||||
|
||||
return $Page->json();
|
||||
}
|
||||
|
||||
private function getAllPages()
|
||||
{
|
||||
$pages = buildAllPages();
|
||||
|
||||
$tmp = array();
|
||||
|
||||
foreach($pages as $Page) {
|
||||
if($Page->published()) {
|
||||
array_push($tmp, $Page->json( $returnsArray=true ));
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode($tmp);
|
||||
}
|
||||
|
||||
public function beforeRulesLoad()
|
||||
{
|
||||
global $Url;
|
||||
|
||||
// The URI start with /api/
|
||||
$startString = HTML_PATH_ROOT.'api/';
|
||||
$URI = $Url->uri();
|
||||
$length = mb_strlen($startString, CHARSET);
|
||||
if( mb_substr($URI, 0, $length)!=$startString ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remove the first part of the URI
|
||||
$URI = ltrim($URI, HTML_PATH_ROOT.'api/');
|
||||
|
||||
// Parameters
|
||||
// ------------------------------------------------------------
|
||||
// show post {post slug}
|
||||
// show page {page slug}
|
||||
// show all posts {AUTH KEY}
|
||||
// show all pages {AUTH KEY}
|
||||
|
||||
// Get parameters
|
||||
$parameters = explode('/', $URI);
|
||||
|
||||
for($i=0; $i<4; $i++) {
|
||||
if(empty($parameters[$i])) {
|
||||
return false;
|
||||
} else {
|
||||
// Sanizite
|
||||
$parameters[$i] = Sanitize::html($parameters[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Default JSON
|
||||
$json = json_encode(array(
|
||||
'status'=>'0',
|
||||
'bludit'=>'Bludit API plugin',
|
||||
'message'=>'Check the parameters'
|
||||
));
|
||||
|
||||
if($parameters[0]==='show') {
|
||||
|
||||
if($parameters[1]==='all') {
|
||||
|
||||
// Authentication key from the URI
|
||||
$authKey = $parameters[3];
|
||||
|
||||
// Compare keys
|
||||
if( $authKey===$this->getDbField('authKey') ) {
|
||||
|
||||
if($parameters[2] === 'posts') {
|
||||
$json = $this->getAllPosts();
|
||||
}
|
||||
elseif($parameters[2] === 'pages') {
|
||||
$json = $this->getAllPages();
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($parameters[1]==='post' || $parameters[1]==='page') {
|
||||
|
||||
$key = $parameters[2];
|
||||
|
||||
if($parameters[1] === 'post') {
|
||||
$json = $this->getPost($key);
|
||||
}
|
||||
elseif($parameters[1] === 'page') {
|
||||
$json = $this->getPage($key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Print the JSON
|
||||
header('Content-Type: application/json');
|
||||
exit($json);
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-13",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -8,9 +8,9 @@ class pluginDisqus extends Plugin {
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'shortname'=>'',
|
||||
'enablePages'=>false,
|
||||
'enablePosts'=>false,
|
||||
'enableDefaultHomePage'=>false
|
||||
'enablePages'=>0,
|
||||
'enablePosts'=>0,
|
||||
'enableDefaultHomePage'=>1
|
||||
);
|
||||
}
|
||||
|
||||
@ -44,17 +44,20 @@ class pluginDisqus extends Plugin {
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<input name="enablePages" id="jsenablePages" type="checkbox" value="true" '.($this->getDbField('enablePages')?'checked':'').'>';
|
||||
$html .= '<input type="hidden" name="enablePages" value="0">';
|
||||
$html .= '<input name="enablePages" id="jsenablePages" type="checkbox" value="1" '.($this->getDbField('enablePages')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jsenablePages">'.$Language->get('Enable Disqus on pages').'</label>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<input name="enablePosts" id="jsenablePosts" type="checkbox" value="true" '.($this->getDbField('enablePosts')?'checked':'').'>';
|
||||
$html .= '<input type="hidden" name="enablePosts" value="0">';
|
||||
$html .= '<input name="enablePosts" id="jsenablePosts" type="checkbox" value="1" '.($this->getDbField('enablePosts')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jsenablePosts">'.$Language->get('Enable Disqus on posts').'</label>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<input name="enableDefaultHomePage" id="jsenableDefaultHomePage" type="checkbox" value="true" '.($this->getDbField('enableDefaultHomePage')?'checked':'').'>';
|
||||
$html .= '<input type="hidden" name="enableDefaultHomePage" value="0">';
|
||||
$html .= '<input name="enableDefaultHomePage" id="jsenableDefaultHomePage" type="checkbox" value="1" '.($this->getDbField('enableDefaultHomePage')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jsenableDefaultHomePage">'.$Language->get('Enable Disqus on default home page').'</label>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-13",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -31,13 +31,15 @@ class pluginGoogleTools extends Plugin {
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
$html = PHP_EOL.'<!-- Google Webmasters Tools -->'.PHP_EOL;
|
||||
$html .= '<meta name="google-site-verification" content="'.$this->getDbField('google-site-verification').'">'.PHP_EOL;
|
||||
global $Url;
|
||||
|
||||
if(Text::isEmpty($this->getDbField('google-site-verification'))) {
|
||||
if(Text::isEmpty($this->getDbField('google-site-verification')) || !($Url->whereAmI()=='home')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$html = PHP_EOL.'<!-- Google Webmasters Tools -->'.PHP_EOL;
|
||||
$html .= '<meta name="google-site-verification" content="'.$this->getDbField('google-site-verification').'">'.PHP_EOL;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@ -60,4 +62,4 @@ class pluginGoogleTools extends Plugin {
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
9
bl-plugins/latest_posts/languages/de_CH.json
Normal file
9
bl-plugins/latest_posts/languages/de_CH.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Neueste Beiträge",
|
||||
"description": "Anzeige der neuesten Beiträge."
|
||||
},
|
||||
|
||||
"amount-of-posts": "Anzahl der Beiträge"
|
||||
}
|
9
bl-plugins/latest_posts/languages/de_DE.json
Normal file
9
bl-plugins/latest_posts/languages/de_DE.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Neueste Beiträge",
|
||||
"description": "Anzeige der neuesten Beiträge."
|
||||
},
|
||||
|
||||
"amount-of-posts": "Anzahl der Beiträge"
|
||||
}
|
@ -5,6 +5,5 @@
|
||||
"description": "Shows the latest posts published."
|
||||
},
|
||||
|
||||
"amount-of-posts": "Amount of posts",
|
||||
"show-home-link": "Show home link"
|
||||
}
|
||||
"amount-of-posts": "Amount of posts"
|
||||
}
|
||||
|
@ -5,6 +5,5 @@
|
||||
"description": "Muestra las últimas entradas publicadas."
|
||||
},
|
||||
|
||||
"amount-of-posts": "Cantidad de entradas",
|
||||
"show-home-link": "Mostrar vínculo a inicio"
|
||||
"amount-of-posts": "Cantidad de entradas"
|
||||
}
|
||||
|
@ -5,6 +5,5 @@
|
||||
"description": "Muestra las últimas entradas publicadas."
|
||||
},
|
||||
|
||||
"amount-of-posts": "Cantidad de entradas",
|
||||
"show-home-link": "Mostrar vínculo a inicio"
|
||||
"amount-of-posts": "Cantidad de entradas"
|
||||
}
|
||||
|
@ -5,6 +5,5 @@
|
||||
"description": "Muestra las últimas entradas publicadas."
|
||||
},
|
||||
|
||||
"amount-of-posts": "Cantidad de entradas",
|
||||
"show-home-link": "Mostrar vínculo a inicio"
|
||||
"amount-of-posts": "Cantidad de entradas"
|
||||
}
|
||||
|
@ -5,6 +5,5 @@
|
||||
"description": "公開された最近の投稿を表示します。"
|
||||
},
|
||||
|
||||
"amount-of-posts": "投稿表示数",
|
||||
"show-home-link": "ホーム・リンクを表示"
|
||||
}
|
||||
"amount-of-posts": "投稿表示数"
|
||||
}
|
||||
|
9
bl-plugins/latest_posts/languages/ru_RU.json
Normal file
9
bl-plugins/latest_posts/languages/ru_RU.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Последние записи",
|
||||
"description": "Показывает последние опубликованные записи."
|
||||
},
|
||||
|
||||
"amount-of-posts": "Количество записей"
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-13",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-20",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ class pluginMaintenanceMode extends Plugin {
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'enable'=>false,
|
||||
'enable'=>0,
|
||||
'message'=>'Temporarily down for maintenance.'
|
||||
);
|
||||
}
|
||||
@ -15,7 +15,8 @@ class pluginMaintenanceMode extends Plugin {
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<input name="enable" id="jsenable" type="checkbox" value="true" '.($this->getDbField('enable')?'checked':'').'>';
|
||||
$html .= '<input type="hidden" name="enable" value="0">';
|
||||
$html .= '<input name="enable" id="jsenable" type="checkbox" value="1" '.($this->getDbField('enable')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jsenable">'.$Language->get('Enable maintenance mode').'</label>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-13",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -2,21 +2,13 @@
|
||||
|
||||
class pluginOpenGraph extends Plugin {
|
||||
|
||||
// Returns the first image that is in the content
|
||||
// Returns the first image from the HTML content
|
||||
private function getImage($content)
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadHTML('<meta http-equiv="content-type" content="text/html; charset=utf-8">'.$content);
|
||||
$finder = new DomXPath($dom);
|
||||
|
||||
/* DEPRECATED
|
||||
$images = $finder->query("//img[contains(@class, 'bludit-img-opengraph')]");
|
||||
|
||||
if($images->length==0) {
|
||||
$images = $finder->query("//img");
|
||||
}
|
||||
*/
|
||||
|
||||
$images = $finder->query("//img");
|
||||
|
||||
if($images->length>0)
|
||||
@ -49,6 +41,7 @@ class pluginOpenGraph extends Plugin {
|
||||
|
||||
switch($Url->whereAmI())
|
||||
{
|
||||
// The user filter by post
|
||||
case 'post':
|
||||
$og['type'] = 'article';
|
||||
$og['title'] = $Post->title().' | '.$og['title'];
|
||||
@ -59,6 +52,7 @@ class pluginOpenGraph extends Plugin {
|
||||
$content = $Post->content();
|
||||
break;
|
||||
|
||||
// The user filter by page
|
||||
case 'page':
|
||||
$og['type'] = 'article';
|
||||
$og['title'] = $Page->title().' | '.$og['title'];
|
||||
@ -69,7 +63,9 @@ class pluginOpenGraph extends Plugin {
|
||||
$content = $Page->content();
|
||||
break;
|
||||
|
||||
// The user is in the homepage
|
||||
default:
|
||||
// The image it's from the first post
|
||||
if(isset($posts[0])) {
|
||||
$og['image'] = $posts[0]->coverImage(false);
|
||||
$content = $posts[0]->content();
|
||||
@ -85,21 +81,18 @@ class pluginOpenGraph extends Plugin {
|
||||
$html .= '<meta property="og:url" content="'.$og['url'].'">'.PHP_EOL;
|
||||
$html .= '<meta property="og:siteName" content="'.$og['siteName'].'">'.PHP_EOL;
|
||||
|
||||
$domain = trim($Site->domain(),'/');
|
||||
$urlImage = $domain.HTML_PATH_UPLOADS;
|
||||
// If the post o page doesn't have a coverImage try to get an image from the HTML content
|
||||
if($og['image']===false) {
|
||||
|
||||
// If the post o page doesn't have a coverImage try to get it from the content
|
||||
if($og['image']===false)
|
||||
{
|
||||
// Get the image from the content
|
||||
$src = $this->getImage( $content );
|
||||
|
||||
if($src!==false) {
|
||||
$html .= '<meta property="og:image" content="'.$urlImage.$og['image'].'">'.PHP_EOL;
|
||||
$html .= '<meta property="og:image" content="'.DOMAIN.$src.'">'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$html .= '<meta property="og:image" content="'.$urlImage.$og['image'].'">'.PHP_EOL;
|
||||
else {
|
||||
$html .= '<meta property="og:image" content="'.DOMAIN_UPLOADS.$og['image'].'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-13",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ class pluginPages extends Plugin {
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'homeLink'=>true,
|
||||
'homeLink'=>1,
|
||||
'label'=>'Pages'
|
||||
);
|
||||
}
|
||||
@ -20,7 +20,8 @@ class pluginPages extends Plugin {
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<input name="homeLink" id="jshomeLink" type="checkbox" value="true" '.($this->getDbField('homeLink')?'checked':'').'>';
|
||||
$html .= '<input type="hidden" name="homeLink" value="0">';
|
||||
$html .= '<input name="homeLink" id="jshomeLink" type="checkbox" value="1" '.($this->getDbField('homeLink')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jshomeLink">'.$Language->get('Show home link').'</label>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
7
bl-plugins/rss/languages/ar_MA.json
Normal file
7
bl-plugins/rss/languages/ar_MA.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "هذه الإضافة تساعد على توليد تغذية RSS لموقعك."
|
||||
}
|
||||
}
|
7
bl-plugins/rss/languages/ru_RU.json
Normal file
7
bl-plugins/rss/languages/ru_RU.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "Этот плагин генерирует RSS трансляцию на сайте."
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-13",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
4
bl-plugins/simplemde/css/simplemde.min.css
vendored
4
bl-plugins/simplemde/css/simplemde.min.css
vendored
File diff suppressed because one or more lines are too long
19
bl-plugins/simplemde/js/simplemde.min.js
vendored
19
bl-plugins/simplemde/js/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2,9 +2,9 @@
|
||||
"author": "NextStepWebs",
|
||||
"email": "",
|
||||
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
|
||||
"version": "1.10.0",
|
||||
"releaseDate": "2015-01-22",
|
||||
"version": "1.11.2",
|
||||
"releaseDate": "2016-06-14",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class pluginsimpleMDE extends Plugin {
|
||||
$this->dbFields = array(
|
||||
'tabSize'=>'2',
|
||||
'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen", "guide"',
|
||||
'autosave'=>false
|
||||
'autosave'=>0
|
||||
);
|
||||
}
|
||||
|
||||
@ -33,7 +33,8 @@ class pluginsimpleMDE extends Plugin {
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<input name="autosave" id="jsautosave" type="checkbox" value="true" '.($this->getDbField('autosave')?'checked':'').'>';
|
||||
$html .= '<input type="hidden" name="autosave" value="0">';
|
||||
$html .= '<input name="autosave" id="jsautosave" type="checkbox" value="1" '.($this->getDbField('autosave')?'checked':'').'>';
|
||||
$html .= '<label class="forCheckbox" for="jsautosave">'.$Language->get('Autosave').'</label>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -63,10 +64,10 @@ class pluginsimpleMDE extends Plugin {
|
||||
|
||||
// Hack for Bludit
|
||||
$html .= '<style>
|
||||
.editor-toolbar { background: #f1f1f1; }
|
||||
.editor-toolbar { background: #f1f1f1; border-radius: 0 !important; }
|
||||
.editor-toolbar::before { margin-bottom: 2px !important }
|
||||
.editor-toolbar::after { margin-top: 2px !important }
|
||||
.CodeMirror, .CodeMirror-scroll { min-height: 400px !important; }
|
||||
.CodeMirror, .CodeMirror-scroll { min-height: 400px !important; border-radius: 0 !important; }
|
||||
</style>';
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-01-30",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class pluginSitemap extends Plugin {
|
||||
// Create url, loc and lastmod elements
|
||||
$url = $doc->createElement('url');
|
||||
$loc = $doc->createElement('loc', $Site->url());
|
||||
$lastmod = $doc->createElement('lastmod', '');
|
||||
$lastmod = $doc->createElement('lastmod', Date::current(SITEMAP_DATE_FORMAT));
|
||||
|
||||
// Append loc and lastmod -> url
|
||||
$url->appendChild($loc);
|
||||
|
@ -3,5 +3,9 @@
|
||||
{
|
||||
"name": "Anzeige aller Schlagwörter",
|
||||
"description": "Anzeige aller Schlagwörter in der Seitenleiste (bei Themes mit Seitenleiste)."
|
||||
}
|
||||
},
|
||||
"sort-the-tag-list-by": "Sortierung der Schlagwörter nach",
|
||||
"alphabetical-order": "Alphabetische Reihenfolge",
|
||||
"number-of-times-each-tag-has-been-used": "Anzahl der Verwendung",
|
||||
"date-each-tag-was-first-used": "Datum der ersten Verwendung"
|
||||
}
|
@ -3,9 +3,5 @@
|
||||
{
|
||||
"name": "Tags list",
|
||||
"description": "Shows all tags."
|
||||
},
|
||||
"tag-sort-order": "Sort the tag list by",
|
||||
"tag-sort-alphabetical": "Alphabetical order",
|
||||
"tag-sort-count": "Number of times each tag has been used",
|
||||
"tag-sort-date": "Date each tag was first used"
|
||||
}
|
||||
}
|
||||
|
@ -3,5 +3,9 @@
|
||||
{
|
||||
"name": "Список тегов",
|
||||
"description": "Показывает все теги."
|
||||
}
|
||||
}
|
||||
},
|
||||
"tag-sort-order": "Сортировать по",
|
||||
"tag-sort-alphabetical": "алфавиту",
|
||||
"tag-sort-count": "количеству",
|
||||
"tag-sort-date": "дате"
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-plugins",
|
||||
"version": "1.1",
|
||||
"releaseDate": "2016-02-13",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "1.4",
|
||||
"releaseDate": "2016-05-28",
|
||||
"license": "MIT",
|
||||
"requires": "Bludit v1.1",
|
||||
"compatible": "1.0,1.1,1.1.2,1.3,1.4",
|
||||
"notes": ""
|
||||
}
|
||||
|
@ -20,9 +20,11 @@ class pluginTags extends Plugin {
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= $Language->get('tag-sort-order').': <select name="sort">';
|
||||
$html .= $Language->get('Sort the tag list by').': <select name="sort">';
|
||||
|
||||
foreach(array('alpha'=>'tag-sort-alphabetical', 'count'=>'tag-sort-count', 'date'=>'tag-sort-date') as $key=>$value) {
|
||||
foreach(array('alpha' => 'Alphabetical order',
|
||||
'count' => 'Number of times each tag has been used',
|
||||
'date' => 'Date each tag was first used') as $key=>$value) {
|
||||
if ($key == $this->getDbField('sort')) {
|
||||
$html .= '<option value="'.$key.'" selected>'.$Language->get($value).'</option>';
|
||||
} else {
|
||||
|
@ -1,83 +0,0 @@
|
||||
/* Blogme hacks */
|
||||
|
||||
#wrapper {
|
||||
width: 1100px !important;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
min-width: 12em !important;
|
||||
}
|
||||
|
||||
article.post {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
article.post div.title h1 {
|
||||
font-weight: normal;
|
||||
margin: 0 !important;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
article.post div.info {
|
||||
font-size: 0.9em;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
article.post div.info > span {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
div.cover-image {
|
||||
border-bottom: 1px solid rgba(160, 160, 160, 0.3);
|
||||
display: flex;
|
||||
left: -3em;
|
||||
margin: -3em 0 3em;
|
||||
position: relative;
|
||||
width: calc(100% + 6em);
|
||||
}
|
||||
|
||||
h2.blog-title {
|
||||
font-size: 2em;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.plugin ul {
|
||||
list-style: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.plugin li {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.plugin-pages ul.children {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* Just for Plugin tags */
|
||||
.plugin-tags li {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#menu-bottom {
|
||||
bottom: 0;
|
||||
display: block;
|
||||
margin: 20px;
|
||||
background: rgba(220, 220, 220, 0.52);
|
||||
position: fixed;
|
||||
right: 0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#menu-bottom > a {
|
||||
margin: 0 10px;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,115 +0,0 @@
|
||||
/*
|
||||
Future Imperfect by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
skel.breakpoints({
|
||||
xlarge: '(max-width: 1200px)',
|
||||
large: '(max-width: 1010px)',
|
||||
medium: '(max-width: 1200px)',
|
||||
small: '(max-width: 1100px)',
|
||||
xsmall: '(max-width: 480px)'
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
var $window = $(window),
|
||||
$body = $('body'),
|
||||
$menu = $('#menu'),
|
||||
$sidebar = $('#sidebar'),
|
||||
$main = $('#main');
|
||||
|
||||
// Disable animations/transitions until the page has loaded.
|
||||
$body.addClass('is-loading');
|
||||
|
||||
$window.on('load', function() {
|
||||
window.setTimeout(function() {
|
||||
$body.removeClass('is-loading');
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// Fix: Placeholder polyfill.
|
||||
$('form').placeholder();
|
||||
|
||||
// Prioritize "important" elements on medium.
|
||||
skel.on('+medium -medium', function() {
|
||||
$.prioritize(
|
||||
'.important\\28 medium\\29',
|
||||
skel.breakpoint('medium').active
|
||||
);
|
||||
});
|
||||
|
||||
// IE<=9: Reverse order of main and sidebar.
|
||||
if (skel.vars.IEVersion <= 9)
|
||||
$main.insertAfter($sidebar);
|
||||
|
||||
// Menu.
|
||||
$menu
|
||||
.appendTo($body)
|
||||
.panel({
|
||||
delay: 500,
|
||||
hideOnClick: true,
|
||||
hideOnSwipe: true,
|
||||
resetScroll: true,
|
||||
resetForms: true,
|
||||
side: 'right',
|
||||
target: $body,
|
||||
visibleClass: 'is-menu-visible'
|
||||
});
|
||||
|
||||
// Search (header).
|
||||
var $search = $('#search'),
|
||||
$search_input = $search.find('input');
|
||||
|
||||
$body
|
||||
.on('click', '[href="#search"]', function(event) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
// Not visible?
|
||||
if (!$search.hasClass('visible')) {
|
||||
|
||||
// Reset form.
|
||||
$search[0].reset();
|
||||
|
||||
// Show.
|
||||
$search.addClass('visible');
|
||||
|
||||
// Focus input.
|
||||
$search_input.focus();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$search_input
|
||||
.on('keydown', function(event) {
|
||||
|
||||
if (event.keyCode == 27)
|
||||
$search_input.blur();
|
||||
|
||||
})
|
||||
.on('blur', function() {
|
||||
window.setTimeout(function() {
|
||||
$search.removeClass('visible');
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// Intro.
|
||||
var $intro = $('#intro');
|
||||
|
||||
// Move to main on <=large, back to sidebar on >large.
|
||||
skel
|
||||
.on('+large', function() {
|
||||
$intro.prependTo($main);
|
||||
})
|
||||
.on('-large', function() {
|
||||
$intro.prependTo($sidebar);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
@ -1,62 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Include HTML meta tags -->
|
||||
<?php include(PATH_THEME_PHP.'head.php') ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Wrapper -->
|
||||
<div id="wrapper">
|
||||
|
||||
<!-- Main -->
|
||||
<div id="main">
|
||||
|
||||
<?php
|
||||
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') )
|
||||
{
|
||||
include(PATH_THEME_PHP.'home.php');
|
||||
}
|
||||
elseif($Url->whereAmI()=='post')
|
||||
{
|
||||
include(PATH_THEME_PHP.'post.php');
|
||||
}
|
||||
elseif($Url->whereAmI()=='page')
|
||||
{
|
||||
include(PATH_THEME_PHP.'page.php');
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Show the sidebar if the user is in home -->
|
||||
<?php if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') ) { ?>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<section id="sidebar">
|
||||
<?php include(PATH_THEME_PHP.'sidebar.php') ?>
|
||||
</section>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<?php Theme::jquery() ?>
|
||||
<script src="<?php echo HTML_PATH_THEME ?>assets/js/skel.min.js"></script>
|
||||
<script src="<?php echo HTML_PATH_THEME ?>assets/js/util.js"></script>
|
||||
<!--[if lte IE 8]><script src="<?php echo HTML_PATH_THEME ?>assets/js/ie/respond.min.js"></script><![endif]-->
|
||||
<script src="<?php echo HTML_PATH_THEME ?>assets/js/main.js"></script>
|
||||
|
||||
<!-- Plugins Site Body End -->
|
||||
<?php Theme::plugins('siteBodyEnd') ?>
|
||||
|
||||
<div id="menu-bottom">
|
||||
<?php
|
||||
//echo '<a href="'.HTML_PATH_THEME.'">'.$L->g('Home').'</a>';
|
||||
echo '<a href="#">'.$L->g('Top').'</a>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"theme-data":
|
||||
{
|
||||
"name": "Blogme",
|
||||
"description": "Minimalistisches und übersichtliches Theme, das die Verwendung von Hauptbildern unterstützt. Das Theme basiert auf dem Theme Future Imperfect."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"theme-data":
|
||||
{
|
||||
"name": "Blogme",
|
||||
"description": "Minimalistisches und übersichtliches Theme, das die Verwendung von Hauptbildern unterstützt. Das Theme basiert auf dem Theme Future Imperfect."
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"theme-data":
|
||||
{
|
||||
"name": "Blogme",
|
||||
"description": "Minimalist and clean, with cover image supported, based on Future Imperfect."
|
||||
},
|
||||
"top": "Top"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user