commit
1738e23986
12
README.md
12
README.md
|
@ -5,7 +5,16 @@ Bludit is a fast, simple, extensible and Flat file CMS.
|
|||
|
||||
- [Documentation](http://docs.bludit.com/en/)
|
||||
- [Help and Support](http://forum.bludit.com)
|
||||
- Follow Bludit on [Twitter](https://twitter.com/bludit) and [Facebook](https://www.facebook.com/pages/Bludit/239255789455913)
|
||||
- [Plugins](https://github.com/dignajar/bludit-plugins)
|
||||
- [Themes](https://github.com/dignajar/bludit-themes)
|
||||
- [More plugins and themes](http://forum.bludit.com/viewforum.php?f=14)
|
||||
|
||||
Social
|
||||
------
|
||||
|
||||
- [Twitter](https://twitter.com/bludit)
|
||||
- [Facebook](https://www.facebook.com/pages/Bludit/239255789455913)
|
||||
- [Google+](https://plus.google.com/+Bluditcms)
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
@ -18,7 +27,6 @@ You only need a Webserver with PHP support.
|
|||
* Apache with module [mod_rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html)
|
||||
* Ngnix with module [ngx_http_rewrite_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html)
|
||||
|
||||
|
||||
Installation guide
|
||||
------------------
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# Bludit
|
||||
|
||||
If you are reading this, you must enable rewrite module.
|
||||
|
||||
Documentation:
|
||||
- http://docs.bludit.com/en/getting-started/requirements
|
||||
- http://docs.bludit.com/en/troubleshooting/browser-returns-not-found
|
|
@ -16,13 +16,15 @@
|
|||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
$_newPosts = $dbPosts->regenerate();
|
||||
$_newPages = $dbPages->regenerate();
|
||||
//$_newPosts = $dbPosts->regenerateCli();
|
||||
$_newPages = $dbPages->regenerateCli();
|
||||
|
||||
$_newPages = $_newPosts = array();
|
||||
|
||||
$_draftPosts = array();
|
||||
foreach($posts as $Post)
|
||||
{
|
||||
if(!$Post->published()) {
|
||||
if($Post->draft()) {
|
||||
array_push($_draftPosts, $Post);
|
||||
}
|
||||
}
|
||||
|
@ -34,4 +36,3 @@ foreach($pages as $Page)
|
|||
array_push($_draftPages, $Page);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ function editPage($args)
|
|||
// Edit the page.
|
||||
if( $dbPages->edit($args) )
|
||||
{
|
||||
$dbPages->regenerate();
|
||||
$dbPages->regenerateCli();
|
||||
|
||||
Alert::set($Language->g('The changes have been saved'));
|
||||
Redirect::page('admin', 'edit-page/'.$args['key']);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
@ -20,6 +24,9 @@ function editPost($args)
|
|||
// Edit the post.
|
||||
if( $dbPosts->edit($args) )
|
||||
{
|
||||
// Reindex tags, this function is in 70.posts.php
|
||||
reIndexTagsPosts();
|
||||
|
||||
Alert::set($Language->g('The changes have been saved'));
|
||||
Redirect::page('admin', 'edit-post/'.$args['key']);
|
||||
}
|
||||
|
@ -27,6 +34,8 @@ function editPost($args)
|
|||
{
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to edit the post.');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function deletePost($key)
|
||||
|
@ -36,6 +45,9 @@ function deletePost($key)
|
|||
|
||||
if( $dbPosts->delete($key) )
|
||||
{
|
||||
// Reindex tags, this function is in 70.posts.php
|
||||
reIndexTagsPosts();
|
||||
|
||||
Alert::set($Language->g('The post has been deleted successfully'));
|
||||
Redirect::page('admin', 'manage-posts');
|
||||
}
|
||||
|
|
|
@ -22,6 +22,9 @@ function checkPost($args)
|
|||
// Verify User sanitize the input
|
||||
if( $Login->verifyUser($_POST['username'], $_POST['password']) )
|
||||
{
|
||||
// Renew the token. This token will be the same inside the session for multiple forms.
|
||||
$Security->generateToken();
|
||||
|
||||
Redirect::page('admin', 'dashboard');
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,9 @@ function addPost($args)
|
|||
// Add the page.
|
||||
if( $dbPosts->add($args) )
|
||||
{
|
||||
// Reindex tags, this function is in 70.posts.php
|
||||
reIndexTagsPosts();
|
||||
|
||||
Alert::set($Language->g('Post added successfully'));
|
||||
Redirect::page('admin', 'manage-posts');
|
||||
}
|
||||
|
@ -31,6 +34,8 @@ function addPost($args)
|
|||
{
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to create the post.');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
|
|
@ -18,10 +18,6 @@ function setSettings($args)
|
|||
global $Site;
|
||||
global $Language;
|
||||
|
||||
if(!isset($args['advancedOptions'])) {
|
||||
$args['advancedOptions'] = 'false';
|
||||
}
|
||||
|
||||
// Add slash at the begin and end.
|
||||
// This fields are in the settings->advanced mode
|
||||
if(isset($args['advanced'])) {
|
||||
|
|
|
@ -27,8 +27,8 @@ $themesPaths = Filesystem::listDirectories(PATH_THEMES);
|
|||
// Load each plugin clasess
|
||||
foreach($themesPaths as $themePath)
|
||||
{
|
||||
$langLocaleFile = $themePath.DS.'language'.DS.$Site->locale().'.json';
|
||||
$langDefaultFile = $themePath.DS.'language'.DS.'en_US.json';
|
||||
$langLocaleFile = $themePath.DS.'languages'.DS.$Site->locale().'.json';
|
||||
$langDefaultFile = $themePath.DS.'languages'.DS.'en_US.json';
|
||||
$database = false;
|
||||
|
||||
// Check if exists locale language
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bludit - Test rewrite module</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Error, enable rewrite module.</p>
|
||||
<p>
|
||||
<b>Documentation:</b><br>
|
||||
<a href="http://docs.bludit.com/en/getting-started/requirements">http://docs.bludit.com/en/getting-started/requirements</a> <br>
|
||||
<a href="http://docs.bludit.com/en/troubleshooting/browser-returns-not-found">http://docs.bludit.com/en/troubleshooting/browser-returns-not-found</a><br>
|
||||
</p>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -20,6 +20,10 @@ div.unit-80 {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
span.label {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* ----------- FONTS AWESOME ----------- */
|
||||
.fa-right {
|
||||
margin-right: 5px;
|
||||
|
@ -28,7 +32,7 @@ div.unit-80 {
|
|||
/* ----------- HEAD ----------- */
|
||||
#head {
|
||||
overflow: auto;
|
||||
border-top: 10px #f1f1f1 solid;
|
||||
border-top: 10px #eee solid;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
@ -101,6 +105,10 @@ h2.title {
|
|||
font-weight: normal;
|
||||
}
|
||||
|
||||
h2.title i.fa {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* ----------- TABLE ----------- */
|
||||
table {
|
||||
background-color: #fff;
|
||||
|
@ -201,7 +209,6 @@ div.dashboardBox ul.menu li.description:last-child {
|
|||
|
||||
|
||||
/* ----------- FORMS ----------- */
|
||||
|
||||
form h4 {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
font-weight: 300;
|
||||
|
@ -210,9 +217,27 @@ form h4 {
|
|||
width: 60%;
|
||||
}
|
||||
|
||||
p.advOptions {
|
||||
color: #777;
|
||||
font-size: 0.8em;
|
||||
#jsadvancedButton {
|
||||
display: block;
|
||||
margin-bottom: 1.1em;
|
||||
}
|
||||
|
||||
#jsadvancedOptions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #fff;
|
||||
background: #999999;
|
||||
padding: 0.3em 1.3em !important;
|
||||
}
|
||||
|
||||
.btn-blue {
|
||||
background: #2672ec;
|
||||
}
|
||||
|
||||
.btn-red {
|
||||
background: #EC2626;
|
||||
}
|
||||
|
||||
a.btn:hover {
|
||||
|
|
|
@ -0,0 +1,568 @@
|
|||
.xdsoft_datetimepicker {
|
||||
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #bbb;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
border-top: 1px solid #ccc;
|
||||
color: #333;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
padding: 8px;
|
||||
padding-left: 0;
|
||||
padding-top: 2px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_rtl {
|
||||
padding: 8px 0 8px 8px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker iframe {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 75px;
|
||||
height: 210px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*For IE8 or lower*/
|
||||
.xdsoft_datetimepicker button {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.xdsoft_noselect {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.xdsoft_noselect::selection { background: transparent }
|
||||
.xdsoft_noselect::-moz-selection { background: transparent }
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_inline {
|
||||
display: inline-block;
|
||||
position: static;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker * {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker {
|
||||
width: 224px;
|
||||
float: left;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_datepicker {
|
||||
float: right;
|
||||
margin-right: 8px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
|
||||
width: 256px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker {
|
||||
width: 58px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
margin-left: 8px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker {
|
||||
float: right;
|
||||
margin-right: 8px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 3px
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_mounthpicker {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label i,
|
||||
.xdsoft_datetimepicker .xdsoft_prev,
|
||||
.xdsoft_datetimepicker .xdsoft_next,
|
||||
.xdsoft_datetimepicker .xdsoft_today_button {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label i {
|
||||
opacity: 0.5;
|
||||
background-position: -92px -19px;
|
||||
display: inline-block;
|
||||
width: 9px;
|
||||
height: 20px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_prev {
|
||||
float: left;
|
||||
background-position: -20px 0;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_today_button {
|
||||
float: left;
|
||||
background-position: -70px 0;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_next {
|
||||
float: right;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_next,
|
||||
.xdsoft_datetimepicker .xdsoft_prev ,
|
||||
.xdsoft_datetimepicker .xdsoft_today_button {
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
border: 0 none;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 30px;
|
||||
opacity: 0.5;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
||||
outline: medium none;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
text-indent: 100%;
|
||||
white-space: nowrap;
|
||||
width: 20px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
|
||||
float: none;
|
||||
background-position: -40px -15px;
|
||||
height: 15px;
|
||||
width: 30px;
|
||||
display: block;
|
||||
margin-left: 14px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_prev,
|
||||
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_next {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
|
||||
background-position: -40px 0;
|
||||
margin-bottom: 7px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
|
||||
height: 151px;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
|
||||
background: #f5f5f5;
|
||||
border-top: 1px solid #ddd;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
border-collapse: collapse;
|
||||
cursor: pointer;
|
||||
border-bottom-width: 0;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_today_button:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_next:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_prev:hover {
|
||||
opacity: 1;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label {
|
||||
display: inline;
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
margin: 0;
|
||||
padding: 5px 3px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
background-color: #fff;
|
||||
float: left;
|
||||
width: 182px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label:hover>span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label:hover i {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
|
||||
border: 1px solid #ccc;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 30px;
|
||||
z-index: 101;
|
||||
display: none;
|
||||
background: #fff;
|
||||
max-height: 160px;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
||||
color: #fff;
|
||||
background: #ff8000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
|
||||
padding: 2px 10px 2px 5px;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
||||
background: #33aaff;
|
||||
box-shadow: #178fe5 0 1px 3px 0 inset;
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_month {
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_year{
|
||||
width: 48px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td > div {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar th {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
|
||||
width: 14.2857142%;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #ddd;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
border-collapse: collapse;
|
||||
cursor: pointer;
|
||||
height: 25px;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
|
||||
width: 12.5%;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar th {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
|
||||
color: #33aaff;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default {
|
||||
background: #ffe9d2;
|
||||
box-shadow: #ffb871 0 1px 4px 0 inset;
|
||||
color: #000;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint {
|
||||
background: #c1ffc9;
|
||||
box-shadow: #00dd1c 0 1px 4px 0 inset;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
|
||||
background: #33aaff;
|
||||
box-shadow: #178fe5 0 1px 3px 0 inset;
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
|
||||
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
|
||||
opacity: 0.5;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
|
||||
opacity: 0.2;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
|
||||
color: #fff !important;
|
||||
background: #ff8000 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
|
||||
background: #33aaff !important;
|
||||
box-shadow: #178fe5 0 1px 3px 0 inset !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
|
||||
color: inherit !important;
|
||||
background: inherit !important;
|
||||
box-shadow: inherit !important;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_calendar th {
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_copyright {
|
||||
color: #ccc !important;
|
||||
font-size: 10px;
|
||||
clear: both;
|
||||
float: none;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
|
||||
.xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
|
||||
|
||||
.xdsoft_time_box {
|
||||
position: relative;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.xdsoft_scrollbar >.xdsoft_scroller {
|
||||
background: #ccc !important;
|
||||
height: 20px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.xdsoft_scrollbar {
|
||||
position: absolute;
|
||||
width: 7px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_scrollbar {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
.xdsoft_scroller_box {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark {
|
||||
box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
|
||||
background: #000;
|
||||
border-bottom: 1px solid #444;
|
||||
border-left: 1px solid #333;
|
||||
border-right: 1px solid #333;
|
||||
border-top: 1px solid #333;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
|
||||
border-bottom: 1px solid #222;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
|
||||
background: #0a0a0a;
|
||||
border-top: 1px solid #222;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
|
||||
background-color: #000;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
|
||||
border: 1px solid #333;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
||||
color: #000;
|
||||
background: #007fff;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
||||
background: #cc5500;
|
||||
box-shadow: #b03e00 0 1px 3px 0 inset;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
||||
background: #0a0a0a;
|
||||
border: 1px solid #222;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
||||
background: #0e0e0e;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
|
||||
color: #cc5500;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default {
|
||||
background: #ffe9d2;
|
||||
box-shadow: #ffb871 0 1px 4px 0 inset;
|
||||
color:#000;
|
||||
}
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint {
|
||||
background: #c1ffc9;
|
||||
box-shadow: #00dd1c 0 1px 4px 0 inset;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
|
||||
background: #cc5500;
|
||||
box-shadow: #b03e00 0 1px 3px 0 inset;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
|
||||
color: #000 !important;
|
||||
background: #007fff !important;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
|
||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
|
||||
|
||||
.xdsoft_dark .xdsoft_time_box {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
|
||||
background: #333 !important;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_save_selected {
|
||||
display: block;
|
||||
border: 1px solid #dddddd !important;
|
||||
margin-top: 5px;
|
||||
width: 100%;
|
||||
color: #454551;
|
||||
font-size: 13px;
|
||||
}
|
||||
.xdsoft_datetimepicker .blue-gradient-button {
|
||||
font-family: "museo-sans", "Book Antiqua", sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
color: #82878c;
|
||||
height: 28px;
|
||||
position: relative;
|
||||
padding: 4px 17px 4px 33px;
|
||||
border: 1px solid #d7d8da;
|
||||
background: -moz-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
||||
/* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(73%, #f4f8fa));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
||||
/* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
||||
/* IE10+ */
|
||||
background: linear-gradient(to bottom, #fff 0%, #f4f8fa 73%);
|
||||
/* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f4f8fa',GradientType=0 );
|
||||
/* IE6-9 */
|
||||
}
|
||||
.xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
|
||||
color: #454551;
|
||||
background: -moz-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
||||
/* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
|
||||
/* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
||||
/* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
||||
/* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
||||
/* IE10+ */
|
||||
background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
|
||||
/* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
|
||||
/* IE6-9 */
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -9,10 +9,12 @@
|
|||
|
||||
<link rel="stylesheet" href="./css/kube.min.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" href="./css/default.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" href="./css/jquery.datetimepicker.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
<link rel="stylesheet" href="./css/css/font-awesome.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
|
||||
<script src="./js/jquery.min.js"></script>
|
||||
<script src="./js/kube.min.js"></script>
|
||||
<script src="./js/jquery.min.js?version=<?php echo BLUDIT_VERSION ?>"></script>
|
||||
<script src="./js/kube.min.js?version=<?php echo BLUDIT_VERSION ?>"></script>
|
||||
<script src="./js/jquery.datetimepicker.js?version=<?php echo BLUDIT_VERSION ?>"></script>
|
||||
|
||||
<!-- Plugins -->
|
||||
<?php Theme::plugins('adminHead') ?>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,10 @@
|
|||
|
||||
<?php makeNavbar('users'); ?>
|
||||
|
||||
<form method="post" action="" class="forms">
|
||||
<form method="post" action="" class="forms" autocomplete="off">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Username') ?>
|
||||
<input type="text" name="username" class="width-50" value="<?php echo (isset($_POST['username'])?$_POST['username']:'') ?>">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<form id="jsformplugin" method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
<input type="hidden" id="jskey" name="key" value="">
|
||||
|
||||
<?php
|
||||
|
|
|
@ -2,30 +2,22 @@
|
|||
|
||||
<form id="jsform" method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
<input type="hidden" id="jskey" name="key" value="<?php echo $_Page->key() ?>">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Title') ?>
|
||||
<input id="jstitle" name="title" type="text" class="width-80" value="<?php echo $_Page->title() ?>">
|
||||
<input id="jstitle" name="title" type="text" class="width-90" value="<?php echo $_Page->title() ?>">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<label class="width-90">
|
||||
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
|
||||
<textarea id="jscontent" name="content" rows="15" class="width-80"><?php echo $_Page->contentRaw(true, false) ?></textarea>
|
||||
<textarea id="jscontent" name="content" rows="15"><?php echo $_Page->contentRaw(false) ?></textarea>
|
||||
</label>
|
||||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="jsadvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<p class="advOptions">'.$Language->g('Enable more features at').' <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
|
||||
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||
}
|
||||
?>
|
||||
<button id="jsadvancedButton" class="btn btn-smaller"><?php $Language->p('Advanced options') ?></button>
|
||||
|
||||
<h4><?php $Language->p('Advanced options') ?></h4>
|
||||
<div id="jsadvancedOptions">
|
||||
|
||||
<?php
|
||||
// Remove setting pages parents if the page is a parent.
|
||||
|
@ -121,11 +113,16 @@ $(document).ready(function()
|
|||
});
|
||||
|
||||
$("#jsdelete").click(function() {
|
||||
if(!confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")) {
|
||||
event.preventDefault();
|
||||
if(confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")==false) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#jsadvancedButton").click(function() {
|
||||
$("#jsadvancedOptions").slideToggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
|
@ -2,31 +2,29 @@
|
|||
|
||||
<form method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
<input type="hidden" id="jskey" name="key" value="<?php echo $_Post->key() ?>">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Title') ?>
|
||||
<input id="jstitle" name="title" type="text" class="width-80" value="<?php echo $_Post->title() ?>">
|
||||
<input id="jstitle" name="title" type="text" class="width-90" value="<?php echo $_Post->title() ?>">
|
||||
</label>
|
||||
|
||||
<label class="width-90">
|
||||
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
|
||||
<textarea id="jscontent" name="content" rows="15"><?php echo $_Post->contentRaw(false) ?></textarea>
|
||||
</label>
|
||||
|
||||
<button id="jsadvancedButton" class="btn btn-smaller"><?php $Language->p('Advanced options') ?></button>
|
||||
|
||||
<div id="jsadvancedOptions">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
|
||||
<textarea id="jscontent" name="content" rows="15" class="width-80"><?php echo $_Post->contentRaw(true, false) ?></textarea>
|
||||
<?php $Language->p('Date') ?>
|
||||
<input name="date" id="jsdate" type="text" value="<?php echo $_Post->date() ?>">
|
||||
<span class="forms-desc"><?php $Language->p('You can schedule the post just select the date and time') ?></span>
|
||||
</label>
|
||||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="jsadvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<p class="advOptions">'.$Language->g('Enable more features at').' <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
|
||||
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||
}
|
||||
?>
|
||||
|
||||
<h4><?php $Language->p('Advanced options') ?></h4>
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Friendly Url') ?>
|
||||
<div class="input-groups width-50">
|
||||
|
@ -47,9 +45,10 @@
|
|||
<input id="jstags" name="tags" type="text" class="width-50" value="<?php echo $_Post->tags() ?>">
|
||||
<span class="forms-desc"><?php $Language->p('write-the-tags-separeted-by-comma') ?></span>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-blue" name="publish"><?php echo ($_Post->published()?$Language->p('Save'):$Language->p('Publish now')) ?></button>
|
||||
<button class="btn btn-blue" name="publish"><?php echo ($_Post->published()?$Language->p('Save'):$Language->p('Publish')) ?></button>
|
||||
<button class="btn" name="draft"><?php $Language->p('Draft') ?></button>
|
||||
<button id="jsdelete" class="btn" name="delete"><?php $Language->p('Delete') ?></button>
|
||||
|
||||
|
@ -61,24 +60,29 @@ $(document).ready(function()
|
|||
{
|
||||
var key = $("#jskey").val();
|
||||
|
||||
$("#jsdate").datetimepicker({format:"<?php echo DB_DATE_FORMAT ?>"});
|
||||
|
||||
$("#jstitle").keyup(function() {
|
||||
var slug = $(this).val();
|
||||
|
||||
checkSlugPost(slug, key, $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jsslug").keyup(function() {
|
||||
var slug = $("#jsslug").val();
|
||||
|
||||
checkSlugPost(slug, key, $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jsdelete").click(function() {
|
||||
if(!confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")) {
|
||||
event.preventDefault();
|
||||
if(confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")==false) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#jsadvancedButton").click(function() {
|
||||
$("#jsadvancedOptions").slideToggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
<div id="profile">
|
||||
<form method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
<input type="hidden" name="edit-user" value="true">
|
||||
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
|
||||
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
<h2 class="title"><?php $Language->p('Login') ?></h2>
|
||||
|
||||
<form method="post" action="<?php echo HTML_PATH_ADMIN_ROOT.'login' ?>" class="forms" autocomplete="off">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
|
||||
<label>
|
||||
<input type="text" name="username" placeholder="<?php $Language->p('Username') ?>" class="width-100" autocomplete="off">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="password" name="password" placeholder="<?php $Language->p('Password') ?>" class="width-100" autocomplete="off">
|
||||
</label>
|
||||
|
||||
<p>
|
||||
<button class="btn btn-blue width-100"><?php $Language->p('Login') ?></button>
|
||||
</p>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<tr>
|
||||
<th><?php $Language->p('Title') ?></th>
|
||||
<th><?php $Language->p('Published date') ?></th>
|
||||
<th><?php $Language->p('Modified date') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -15,10 +14,17 @@
|
|||
|
||||
foreach($posts as $Post)
|
||||
{
|
||||
$status = false;
|
||||
if($Post->scheduled()) {
|
||||
$status = $Language->g('Scheduled');
|
||||
}
|
||||
elseif(!$Post->published()) {
|
||||
$status = $Language->g('Draft');
|
||||
}
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($Post->published()?'':'<span class="label label-outline label-red smaller">'.$Language->g('Draft').'</span> ').($Post->title()?$Post->title():'<span class="label label-outline label-blue smaller">'.$Language->g('Empty title').'</span> ').'</a></td>';
|
||||
echo '<td>'.$Post->dateCreated().'</td>';
|
||||
echo '<td>'.$Post->timeago().'</td>';
|
||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($status?'<span class="label label-outline label-red smaller">'.$status.'</span>':'').($Post->title()?$Post->title():'<span class="label label-outline label-blue smaller">'.$Language->g('Empty title').'</span> ').'</a></td>';
|
||||
echo '<td>'.$Post->date().'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
|
|
|
@ -2,28 +2,21 @@
|
|||
|
||||
<form method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Title') ?>
|
||||
<input id="jstitle" name="title" type="text" class="width-80">
|
||||
<input id="jstitle" name="title" type="text" class="width-90">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<label class="width-90">
|
||||
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
|
||||
<textarea id="jscontent" name="content" rows="15" class="width-80"></textarea>
|
||||
<textarea id="jscontent" name="content" rows="15"></textarea>
|
||||
</label>
|
||||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="jsadvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<p class="advOptions">'.$Language->g('Enable more features at').' <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
|
||||
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||
}
|
||||
?>
|
||||
<button id="jsadvancedButton" class="btn btn-smaller"><?php $Language->p('Advanced options') ?></button>
|
||||
|
||||
<h4><?php $Language->p('Advanced options') ?></h4>
|
||||
<div id="jsadvancedOptions">
|
||||
|
||||
<label for="jsparent">
|
||||
<?php $Language->p('Parent') ?>
|
||||
|
@ -104,6 +97,11 @@ $(document).ready(function()
|
|||
checkSlugPage(text, parent, "", $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jsadvancedButton").click(function() {
|
||||
$("#jsadvancedOptions").slideToggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
|
@ -2,29 +2,28 @@
|
|||
|
||||
<form method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Title') ?>
|
||||
<input id="jstitle" name="title" type="text" class="width-80">
|
||||
<input id="jstitle" name="title" type="text" class="width-90">
|
||||
</label>
|
||||
|
||||
<label class="width-90">
|
||||
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
|
||||
<textarea id="jscontent" name="content" rows="15" ></textarea>
|
||||
</label>
|
||||
|
||||
<button id="jsadvancedButton" class="btn btn-smaller"><?php $Language->p('Advanced options') ?></button>
|
||||
|
||||
<div id="jsadvancedOptions">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
|
||||
<textarea id="jscontent" name="content" rows="15" class="width-80"></textarea>
|
||||
<?php $Language->p('Date') ?>
|
||||
<input name="date" id="jsdate" type="text">
|
||||
<span class="forms-desc"><?php $Language->p('You can schedule the post just select the date and time') ?></span>
|
||||
</label>
|
||||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="jsadvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<p class="advOptions">'.$Language->g('Enable more features at').' <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
|
||||
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||
}
|
||||
?>
|
||||
|
||||
<h4><?php $Language->p('Advanced options') ?></h4>
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Friendly Url') ?>
|
||||
<div class="input-groups width-50">
|
||||
|
@ -48,7 +47,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-blue" name="publish"><?php $Language->p('Publish now') ?></button>
|
||||
<button class="btn btn-blue" name="publish"><?php $Language->p('Publish') ?></button>
|
||||
<button class="btn" name="draft"><?php $Language->p('Draft') ?></button>
|
||||
|
||||
</form>
|
||||
|
@ -57,6 +56,7 @@
|
|||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#jsdate").datetimepicker({format:"<?php echo DB_DATE_FORMAT ?>"});
|
||||
|
||||
$("#jstitle").keyup(function() {
|
||||
var slug = $(this).val();
|
||||
|
@ -70,6 +70,11 @@ $(document).ready(function()
|
|||
checkSlugPost(slug, "", $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jsadvancedButton").click(function() {
|
||||
$("#jsadvancedOptions").slideToggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
<div id="general">
|
||||
<form method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Site title') ?>
|
||||
<input type="text" name="title" class="width-50" value="<?php echo $Site->title() ?>">
|
||||
|
@ -50,6 +53,9 @@
|
|||
|
||||
<div id="advanced">
|
||||
<form method="post" action="" class="forms">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
|
||||
<label for="postsperpage">
|
||||
<?php $Language->p('Posts per page') ?>
|
||||
<select name="postsperpage" class="width-50">
|
||||
|
@ -81,16 +87,6 @@
|
|||
<div class="forms-desc"><?php $Language->p('the-url-of-your-site') ?></div>
|
||||
</label>
|
||||
|
||||
<h4><?php $Language->p('Writting settings') ?></h4>
|
||||
|
||||
<ul class="forms-list">
|
||||
<li>
|
||||
<input type="checkbox" name="advancedOptions" id="advancedOptions" value="true" <?php echo $Site->advancedOptions()?'checked':'' ?>>
|
||||
<label for="advancedOptions"><?php $Language->p('Advanced options') ?></label>
|
||||
<div class="forms-desc"><?php $Language->p('add-or-edit-description-tags-or') ?></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4><?php $Language->p('URL Filters') ?></h4>
|
||||
|
||||
<label>
|
||||
|
@ -122,6 +118,9 @@
|
|||
|
||||
<div id="regional">
|
||||
<form method="post" action="" class="forms" name="form-regional">
|
||||
|
||||
<input type="hidden" id="jstoken" name="token" value="<?php $Security->printToken() ?>">
|
||||
|
||||
<label for="jslanguage">
|
||||
<?php $Language->p('Language') ?>
|
||||
<select id="jslanguage" name="language" class="width-50">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
echo '<td>'.$field['lastName'].'</td>';
|
||||
echo '<td>'.$field['role'].'</td>';
|
||||
echo '<td>'.$field['email'].'</td>';
|
||||
echo '<td>'.Date::format($field['registered'], '%d %B').'</td>';
|
||||
echo '<td>'.Date::format($field['registered'], DB_DATE_FORMAT, DB_DATE_FORMAT).'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
# Bludit
|
||||
|
||||
Set the correct permissions on this directory.
|
||||
Check the documentation: http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205
|
||||
|
||||
Documentation:
|
||||
- http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205
|
13
features.txt
13
features.txt
|
@ -38,10 +38,23 @@ Si cambia el parent
|
|||
verificar parent
|
||||
mover directorio adentro del parent
|
||||
|
||||
—————————
|
||||
Nuevo post
|
||||
- Reindex dbtags
|
||||
|
||||
—————————
|
||||
|
||||
Editar usuario
|
||||
1- Usuario logueado
|
||||
2- Ver si el usuario es administrador o si es el mismo usuario que se esta editando.
|
||||
|
||||
—————————
|
||||
dbTags
|
||||
Regenerate posts list
|
||||
- Al momento de regenerarla deberia enviarle la lista de post ordenada por fecha.
|
||||
- De esta forma la estructura esta ordenada para mostrarla.
|
||||
- El que hace el trabajo es el administrador
|
||||
|
||||
—————————
|
||||
New post->Publish->Manage posts
|
||||
New page->Publish->Manage pages
|
||||
|
|
104
install.php
104
install.php
|
@ -42,6 +42,9 @@ if(!defined('JSON_PRETTY_PRINT')) {
|
|||
// Check if JSON encode and decode are enabled.
|
||||
define('JSON', function_exists('json_encode'));
|
||||
|
||||
// Database format date
|
||||
define('DB_DATE_FORMAT', 'Y-m-d H:i');
|
||||
|
||||
// Charset, default UTF-8.
|
||||
define('CHARSET', 'UTF-8');
|
||||
|
||||
|
@ -64,9 +67,11 @@ include(PATH_HELPERS.'text.class.php');
|
|||
include(PATH_ABSTRACT.'dbjson.class.php');
|
||||
include(PATH_KERNEL.'dblanguage.class.php');
|
||||
include(PATH_HELPERS.'log.class.php');
|
||||
include(PATH_HELPERS.'date.class.php');
|
||||
|
||||
// Load language
|
||||
$localeFromHTTP = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
// Try to detect language from HTTP
|
||||
$explode = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
$localeFromHTTP = empty($explode[0])?'en_US':str_replace('-', '_', $explode[0]);
|
||||
|
||||
if(isset($_GET['language'])) {
|
||||
$localeFromHTTP = Sanitize::html($_GET['language']);
|
||||
|
@ -164,6 +169,8 @@ function install($adminPassword, $email)
|
|||
|
||||
$stdOut = array();
|
||||
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// ============================================================================
|
||||
// Create directories
|
||||
// ============================================================================
|
||||
|
@ -186,7 +193,19 @@ function install($adminPassword, $email)
|
|||
|
||||
if(!mkdir(PATH_PLUGINS_DATABASES.'pages', $dirpermissions, true))
|
||||
{
|
||||
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES;
|
||||
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'pages';
|
||||
error_log($errorText, 0);
|
||||
}
|
||||
|
||||
if(!mkdir(PATH_PLUGINS_DATABASES.'simplemde', $dirpermissions, true))
|
||||
{
|
||||
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'simplemde';
|
||||
error_log($errorText, 0);
|
||||
}
|
||||
|
||||
if(!mkdir(PATH_PLUGINS_DATABASES.'tags', $dirpermissions, true))
|
||||
{
|
||||
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'tags';
|
||||
error_log($errorText, 0);
|
||||
}
|
||||
|
||||
|
@ -209,8 +228,7 @@ function install($adminPassword, $email)
|
|||
'username'=>'admin',
|
||||
'tags'=>'',
|
||||
'status'=>'published',
|
||||
'unixTimeCreated'=>1430686755,
|
||||
'unixTimeModified'=>0,
|
||||
'date'=>$currentDate,
|
||||
'position'=>0
|
||||
)
|
||||
);
|
||||
|
@ -223,10 +241,9 @@ function install($adminPassword, $email)
|
|||
'description'=>'Welcome to Bludit',
|
||||
'username'=>'admin',
|
||||
'status'=>'published',
|
||||
'tags'=>'welcome, bludit, cms',
|
||||
'tags'=>'bludit, cms, flat-file',
|
||||
'allowComments'=>false,
|
||||
'unixTimeCreated'=>1430875199,
|
||||
'unixTimeModified'=>0
|
||||
'date'=>$currentDate
|
||||
)
|
||||
);
|
||||
file_put_contents(PATH_DATABASES.'posts.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
||||
|
@ -236,7 +253,7 @@ function install($adminPassword, $email)
|
|||
'title'=>'Bludit',
|
||||
'slogan'=>'cms',
|
||||
'description'=>'',
|
||||
'footer'=>'',
|
||||
'footer'=>Date::current('Y'),
|
||||
'language'=>$Language->getCurrentLocale(),
|
||||
'locale'=>$Language->getCurrentLocale(),
|
||||
'timezone'=>'UTC',
|
||||
|
@ -247,7 +264,6 @@ function install($adminPassword, $email)
|
|||
'uriPost'=>'/post/',
|
||||
'uriPage'=>'/',
|
||||
'uriTag'=>'/tag/',
|
||||
'advancedOptions'=>'false',
|
||||
'url'=>'http://'.DOMAIN.HTML_PATH_ROOT
|
||||
);
|
||||
|
||||
|
@ -255,7 +271,6 @@ function install($adminPassword, $email)
|
|||
|
||||
$salt = getRandomString();
|
||||
$passwordHash = sha1($adminPassword.$salt);
|
||||
$registered = time();
|
||||
|
||||
// File users.php
|
||||
$data = array(
|
||||
|
@ -267,7 +282,7 @@ function install($adminPassword, $email)
|
|||
'password'=>$passwordHash,
|
||||
'salt'=>$salt,
|
||||
'email'=>$email,
|
||||
'registered'=>$registered
|
||||
'registered'=>$currentDate
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -282,14 +297,61 @@ function install($adminPassword, $email)
|
|||
|
||||
file_put_contents(PATH_DATABASES.'security.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
||||
|
||||
|
||||
// File plugins/pages/db.php
|
||||
$data = array(
|
||||
'homeLink'=>true,
|
||||
'label'=>$Language->get('Pages')
|
||||
// File tags.php
|
||||
file_put_contents(
|
||||
PATH_DATABASES.'tags.php',
|
||||
$dataHead.json_encode(
|
||||
array(
|
||||
'postsIndex'=>array(
|
||||
'bludit'=>array('name'=>'Bludit', 'posts'=>array('first-post')),
|
||||
'cms'=>array('name'=>'cms', 'posts'=>array('first-post'))
|
||||
),
|
||||
'pagesIndex'=>array()
|
||||
),
|
||||
JSON_PRETTY_PRINT),
|
||||
LOCK_EX
|
||||
);
|
||||
|
||||
file_put_contents(PATH_PLUGINS_DATABASES.'pages'.DS.'db.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
||||
|
||||
// PLUGINS
|
||||
|
||||
// File plugins/pages/db.php
|
||||
file_put_contents(
|
||||
PATH_PLUGINS_DATABASES.'pages'.DS.'db.php',
|
||||
$dataHead.json_encode(
|
||||
array(
|
||||
'position'=>0,
|
||||
'homeLink'=>true,
|
||||
'label'=>$Language->get('Pages')
|
||||
),
|
||||
JSON_PRETTY_PRINT),
|
||||
LOCK_EX
|
||||
);
|
||||
|
||||
// File plugins/simplemde/db.php
|
||||
file_put_contents(
|
||||
PATH_PLUGINS_DATABASES.'simplemde'.DS.'db.php',
|
||||
$dataHead.json_encode(
|
||||
array(
|
||||
'position'=>0,
|
||||
'tabSize'=>4,
|
||||
'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen", "guide"'
|
||||
),
|
||||
JSON_PRETTY_PRINT),
|
||||
LOCK_EX
|
||||
);
|
||||
|
||||
// File plugins/tags/db.php
|
||||
file_put_contents(
|
||||
PATH_PLUGINS_DATABASES.'tags'.DS.'db.php',
|
||||
$dataHead.json_encode(
|
||||
array(
|
||||
'position'=>0,
|
||||
'label'=>$Language->get('Tags')
|
||||
),
|
||||
JSON_PRETTY_PRINT),
|
||||
LOCK_EX
|
||||
);
|
||||
|
||||
// File index.txt for error page
|
||||
$data = 'Title: '.$Language->get('Error').'
|
||||
|
@ -301,11 +363,9 @@ function install($adminPassword, $email)
|
|||
$data = 'Title: '.$Language->get('First post').'
|
||||
Content:
|
||||
|
||||
'.$Language->get('Congratulations you have successfully installed your Bludit').'
|
||||
---
|
||||
## '.$Language->get('Congratulations you have successfully installed your Bludit').'
|
||||
|
||||
'.$Language->get('Whats next').'
|
||||
---
|
||||
### '.$Language->get('Whats next').'
|
||||
- '.$Language->get('Manage your Bludit from the admin panel').'
|
||||
- '.$Language->get('Follow Bludit on').' [Twitter](https://twitter.com/bludit) / [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) / [Google+](https://plus.google.com/+Bluditcms)
|
||||
- '.$Language->get('Visit the support forum').'
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Content
|
||||
{
|
||||
public $vars;
|
||||
public $path;
|
||||
|
||||
function __construct($slug)
|
||||
{
|
||||
if($this->build($slug)===false)
|
||||
$this->vars = false;
|
||||
}
|
||||
|
||||
// Return true if valid post
|
||||
public function valid()
|
||||
{
|
||||
return($this->vars!==false);
|
||||
}
|
||||
|
||||
public function get_field($field)
|
||||
{
|
||||
if(isset($this->vars[$field]))
|
||||
return $this->vars[$field];
|
||||
return false;
|
||||
}
|
||||
|
||||
// $notoverwrite true if you don't want to replace the value if are set previusly
|
||||
public function setField($field, $value, $overwrite=true)
|
||||
{
|
||||
if($overwrite || empty($this->vars[$field]))
|
||||
{
|
||||
$this->vars[$field] = $value;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// DEBUG, se puede borrar
|
||||
public function show()
|
||||
{
|
||||
print_r($this->vars);
|
||||
}
|
||||
|
||||
private function build($slug)
|
||||
{
|
||||
// Check if directory exists for the slug
|
||||
/*$path = glob($this->path.$slug, GLOB_ONLYDIR);
|
||||
if(empty($path))
|
||||
return false;
|
||||
|
||||
|
||||
// Get the first element from the directories array
|
||||
//$path = $path[0];
|
||||
*/
|
||||
|
||||
$path = $this->path.$slug;
|
||||
if(!is_dir($path))
|
||||
return false;
|
||||
|
||||
// Path
|
||||
$this->setField('path', $path);
|
||||
|
||||
// Slug
|
||||
$this->setField('slug', $slug);
|
||||
|
||||
// Check if file exists
|
||||
$file = $path.'/index.txt';
|
||||
if(!file_exists($file))
|
||||
return false;
|
||||
|
||||
$tmp = 0;
|
||||
$lines = file($file);
|
||||
foreach($lines as $lineNumber=>$line)
|
||||
{
|
||||
$parts = array_map('trim', explode(':', $line, 2));
|
||||
|
||||
// Lowercase variable
|
||||
$parts[0] = Text::lowercase($parts[0]);
|
||||
|
||||
if($parts[0]==='content')
|
||||
{
|
||||
$tmp = $lineNumber;
|
||||
break;
|
||||
}
|
||||
|
||||
if( !empty($parts[0]) && !empty($parts[1]) )
|
||||
$this->vars[$parts[0]] = $parts[1];
|
||||
}
|
||||
|
||||
// Content
|
||||
if($tmp!=0)
|
||||
{
|
||||
$tmp++; // Next line after Content:
|
||||
$output = array_slice($lines, $tmp); // Lines after Content
|
||||
$this->vars['content'] = implode($output);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,78 +0,0 @@
|
|||
<?php
|
||||
|
||||
// Database serialize
|
||||
class DB_SERIALIZE
|
||||
{
|
||||
public $vars;
|
||||
public $file;
|
||||
public $firstLine;
|
||||
|
||||
function __construct($file, $firstLine=true)
|
||||
{
|
||||
$this->file = $file;
|
||||
|
||||
$lines = file($file);
|
||||
|
||||
$this->firstLine = $firstLine;
|
||||
|
||||
if($firstLine)
|
||||
{
|
||||
// Remove the first line.
|
||||
unset($lines[0]);
|
||||
}
|
||||
|
||||
$implode = implode($lines);
|
||||
|
||||
$this->vars = $this->unserialize($implode);
|
||||
}
|
||||
|
||||
public function save()
|
||||
{
|
||||
if($this->firstLine)
|
||||
$data = "<?php defined('BLUDIT') or die('Bludit CMS.'); ?>".PHP_EOL;
|
||||
else
|
||||
$data = '';
|
||||
|
||||
$data .= $this->serialize($this->vars);
|
||||
|
||||
// LOCK_EX flag to prevent anyone else writing to the file at the same time.
|
||||
return file_put_contents($this->file, $data, LOCK_EX);
|
||||
}
|
||||
|
||||
// DEBUG, ver si sirve para la instalacion, sino borrar
|
||||
public function setDb($db)
|
||||
{
|
||||
$this->vars = $db;
|
||||
|
||||
return $this->save();
|
||||
}
|
||||
|
||||
private function serialize($data)
|
||||
{
|
||||
// DEBUG: La idea es siempre serializar en json, habria que ver si siempre esta cargado json_enconde y decode
|
||||
if(JSON)
|
||||
return json_encode($data, JSON_PRETTY_PRINT);
|
||||
|
||||
return serialize($data);
|
||||
}
|
||||
|
||||
private function unserialize($data)
|
||||
{
|
||||
// DEBUG: La idea es siempre serializar en json, habria que ver si siempre esta cargado json_enconde y decode
|
||||
if(JSON)
|
||||
return json_decode($data, true);
|
||||
|
||||
return unserialize($data);
|
||||
}
|
||||
|
||||
// DEBUG, se puede borrar
|
||||
function show()
|
||||
{
|
||||
var_dump($this->vars);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -3,6 +3,7 @@
|
|||
class dbJSON
|
||||
{
|
||||
public $db;
|
||||
public $dbBackup;
|
||||
public $file;
|
||||
public $firstLine;
|
||||
|
||||
|
@ -12,6 +13,7 @@ class dbJSON
|
|||
{
|
||||
$this->file = $file;
|
||||
$this->db = array();
|
||||
$this->dbBackup = array();
|
||||
$this->firstLine = $firstLine;
|
||||
|
||||
if(file_exists($file))
|
||||
|
@ -35,6 +37,7 @@ class dbJSON
|
|||
}
|
||||
else {
|
||||
$this->db = $array;
|
||||
$this->dbBackup = $array;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -43,6 +46,12 @@ class dbJSON
|
|||
}
|
||||
}
|
||||
|
||||
public function restoreDb()
|
||||
{
|
||||
$this->db = $this->dbBackup;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns the amount of database items.
|
||||
public function count()
|
||||
{
|
||||
|
@ -52,17 +61,20 @@ class dbJSON
|
|||
// Save the JSON file.
|
||||
public function save()
|
||||
{
|
||||
$data = '';
|
||||
|
||||
if($this->firstLine) {
|
||||
$data = "<?php defined('BLUDIT') or die('Bludit CMS.'); ?>".PHP_EOL;
|
||||
}
|
||||
else {
|
||||
$data = '';
|
||||
}
|
||||
|
||||
// Serialize database
|
||||
$data .= $this->serialize($this->db);
|
||||
|
||||
// Backup the new database.
|
||||
$this->dbBackup = $this->db;
|
||||
|
||||
// LOCK_EX flag to prevent anyone else writing to the file at the same time.
|
||||
file_put_contents($this->file, $data, LOCK_EX);
|
||||
return file_put_contents($this->file, $data, LOCK_EX);
|
||||
}
|
||||
|
||||
private function serialize($data)
|
||||
|
|
|
@ -39,18 +39,22 @@ if( $layout['slug']==='ajax' )
|
|||
else
|
||||
{
|
||||
// Boot rules
|
||||
include(PATH_RULES.'70.build_posts.php');
|
||||
include(PATH_RULES.'70.build_pages.php');
|
||||
include(PATH_RULES.'70.posts.php');
|
||||
include(PATH_RULES.'70.pages.php');
|
||||
include(PATH_RULES.'80.plugins.php');
|
||||
include(PATH_RULES.'99.header.php');
|
||||
include(PATH_RULES.'99.paginator.php');
|
||||
include(PATH_RULES.'99.themes.php');
|
||||
include(PATH_RULES.'99.security.php');
|
||||
|
||||
if($Url->notFound() || !$Login->isLogged() || ($Url->slug()==='login') )
|
||||
{
|
||||
$layout['controller'] = 'login';
|
||||
$layout['view'] = 'login';
|
||||
$layout['template'] = 'login.php';
|
||||
|
||||
// Generate the token for the user not logged, when the user is loggued the token will be change.
|
||||
$Security->generateToken();
|
||||
}
|
||||
|
||||
// Plugins before admin area loaded
|
||||
|
|
|
@ -64,7 +64,10 @@ define('POSTS_PER_PAGE_ADMIN', 10);
|
|||
define('JSON', function_exists('json_encode'));
|
||||
|
||||
// TRUE if new posts hand-made set published, or FALSE for draft.
|
||||
define('HANDMADE_PUBLISHED', true);
|
||||
define('CLI_STATUS', 'published');
|
||||
|
||||
// Database format date
|
||||
define('DB_DATE_FORMAT', 'Y-m-d H:i');
|
||||
|
||||
// Charset, default UTF-8.
|
||||
define('CHARSET', 'UTF-8');
|
||||
|
@ -90,6 +93,7 @@ include(PATH_ABSTRACT.'plugin.class.php');
|
|||
include(PATH_KERNEL.'dbposts.class.php');
|
||||
include(PATH_KERNEL.'dbpages.class.php');
|
||||
include(PATH_KERNEL.'dbusers.class.php');
|
||||
include(PATH_KERNEL.'dbtags.class.php');
|
||||
include(PATH_KERNEL.'dblanguage.class.php');
|
||||
include(PATH_KERNEL.'dbsite.class.php');
|
||||
include(PATH_KERNEL.'post.class.php');
|
||||
|
@ -123,6 +127,7 @@ if(Session::started()===false) {
|
|||
$dbPosts = new dbPosts();
|
||||
$dbPages = new dbPages();
|
||||
$dbUsers = new dbUsers();
|
||||
$dbTags = new dbTags();
|
||||
$Site = new dbSite();
|
||||
$Url = new Url();
|
||||
$Parsedown = new Parsedown();
|
||||
|
|
|
@ -45,18 +45,11 @@ function build_page($key)
|
|||
// Foreach field from database.
|
||||
foreach($db as $field=>$value)
|
||||
{
|
||||
if($field=='unixTimeCreated')
|
||||
{
|
||||
// Format dates, not overwrite from file fields.
|
||||
$Page->setField('unixTimeCreated', $value, false);
|
||||
$Page->setField('date', Date::format($value, '%d %B'), false);
|
||||
$Page->setField('timeago', Date::timeago($value), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Other fields, not overwrite from file fields.
|
||||
// Not overwrite the value from file.
|
||||
$Page->setField($field, $value, false);
|
||||
}
|
||||
|
||||
// Overwrite the value on the db.
|
||||
//$dbPages->setDb($key, $field, $value);
|
||||
}
|
||||
|
||||
// Content in raw format
|
||||
|
@ -64,7 +57,8 @@ function build_page($key)
|
|||
$Page->setField('contentRaw', $Page->content(), true);
|
||||
|
||||
// Parse markdown content.
|
||||
$content = $Parsedown->text($contentRaw); // Parse Markdown.
|
||||
$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);
|
||||
|
|
@ -10,6 +10,23 @@ $posts = array();
|
|||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
function reIndexTagsPosts()
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbTags;
|
||||
|
||||
// Remove unpublished.
|
||||
$dbPosts->removeUnpublished();
|
||||
|
||||
// Regenerate the tags index for posts
|
||||
$dbTags->reindexPosts( $dbPosts->db );
|
||||
|
||||
// Restore de db on dbPost
|
||||
$dbPosts->restoreDb();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function buildPost($key)
|
||||
{
|
||||
global $dbPosts;
|
||||
|
@ -17,14 +34,14 @@ function buildPost($key)
|
|||
global $Parsedown;
|
||||
global $Site;
|
||||
|
||||
// Post object.
|
||||
// Post object, this get the content from the 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;
|
||||
}
|
||||
|
||||
// Page database.
|
||||
// Page database, this get the contente from the database json.
|
||||
$db = $dbPosts->getDb($key);
|
||||
if( !$db ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying build the post from database with key: '.$key);
|
||||
|
@ -34,26 +51,17 @@ function buildPost($key)
|
|||
// Foreach field from database.
|
||||
foreach($db as $field=>$value)
|
||||
{
|
||||
if($field=='unixTimeCreated')
|
||||
{
|
||||
// Format dates, not overwrite from file fields.
|
||||
$Post->setField('unixTimeCreated', $value, false);
|
||||
$Post->setField('date', Date::format($value, '%d %B'), false);
|
||||
$Post->setField('timeago', Date::timeago($value), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Other fields, not overwrite from file fields.
|
||||
// Not overwrite the value from file.
|
||||
$Post->setField($field, $value, false);
|
||||
}
|
||||
}
|
||||
|
||||
// Content in raw format
|
||||
$contentRaw = $Post->content();
|
||||
$Post->setField('contentRaw', $contentRaw, true);
|
||||
|
||||
// Parse the content
|
||||
$content = $Parsedown->text($contentRaw); // Parse Markdown.
|
||||
$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);
|
||||
|
||||
|
@ -68,30 +76,37 @@ function buildPost($key)
|
|||
$user = $dbUsers->getDb( $Post->username() );
|
||||
|
||||
$Post->setField('authorFirstName', $user['firstName'], false);
|
||||
|
||||
$Post->setField('authorLastName', $user['lastName'], false);
|
||||
}
|
||||
|
||||
return $Post;
|
||||
}
|
||||
|
||||
function build_posts_per_page($pageNumber=0, $amount=5, $draftPosts=false)
|
||||
function buildPostsForPage($pageNumber=0, $amount=POSTS_PER_PAGE_ADMIN, $removeUnpublished=true, $tagKey=false)
|
||||
{
|
||||
global $dbPosts;
|
||||
global $dbTags;
|
||||
global $posts;
|
||||
global $Url;
|
||||
|
||||
$list = $dbPosts->getPage($pageNumber, $amount, $draftPosts);
|
||||
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 post for the pageNumber then NotFound page
|
||||
// There are not posts for the page number then set the page notfound
|
||||
if(empty($list) && $pageNumber>0) {
|
||||
$Url->setNotFound(true);
|
||||
}
|
||||
|
||||
foreach($list as $slug=>$db)
|
||||
// Foreach post key, build the post.
|
||||
foreach($list as $postKey=>$values)
|
||||
{
|
||||
$Post = buildPost($slug);
|
||||
|
||||
$Post = buildPost($postKey);
|
||||
if($Post!==false) {
|
||||
array_push($posts, $Post);
|
||||
}
|
||||
|
@ -102,7 +117,13 @@ function build_posts_per_page($pageNumber=0, $amount=5, $draftPosts=false)
|
|||
// Main
|
||||
// ============================================================================
|
||||
|
||||
// Filter by post, then build it
|
||||
// Execute the scheduler.
|
||||
if( $dbPosts->scheduler() ) {
|
||||
// Reindex dbTags.
|
||||
reIndexTagsPosts();
|
||||
}
|
||||
|
||||
// Build specific post.
|
||||
if( ($Url->whereAmI()==='post') && ($Url->notFound()===false) )
|
||||
{
|
||||
$Post = buildPost( $Url->slug() );
|
||||
|
@ -123,16 +144,20 @@ if( ($Url->whereAmI()==='post') && ($Url->notFound()===false) )
|
|||
}
|
||||
|
||||
}
|
||||
// Build post per page
|
||||
// Build posts by specific tag.
|
||||
elseif( ($Url->whereAmI()==='tag') && ($Url->notFound()===false) )
|
||||
{
|
||||
buildPostsForPage($Url->pageNumber(), $Site->postsPerPage(), true, $Url->slug());
|
||||
}
|
||||
// Build posts for homepage or admin area.
|
||||
else
|
||||
{
|
||||
// Posts for admin area.
|
||||
if($Url->whereAmI()==='admin') {
|
||||
// Build post for admin area with drafts
|
||||
build_posts_per_page($Url->pageNumber(), POSTS_PER_PAGE_ADMIN, true);
|
||||
buildPostsForPage($Url->pageNumber(), POSTS_PER_PAGE_ADMIN, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Build post for the site, without the drafts posts
|
||||
build_posts_per_page($Url->pageNumber(), $Site->postsPerPage(), false);
|
||||
// Posts for homepage
|
||||
else {
|
||||
buildPostsForPage($Url->pageNumber(), $Site->postsPerPage(), true);
|
||||
}
|
||||
}
|
|
@ -64,14 +64,14 @@ function build_plugins()
|
|||
$Plugin = new $pluginClass;
|
||||
|
||||
// Set Plugin data
|
||||
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'language'.DS.$Site->locale().'.json';
|
||||
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.$Site->locale().'.json';
|
||||
if( Sanitize::pathFile($languageFilename) )
|
||||
{
|
||||
$database = new dbJSON($languageFilename, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'language'.DS.'en_US.json';
|
||||
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.'en_US.json';
|
||||
$database = new dbJSON($languageFilename, false);
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ function build_plugins()
|
|||
$Language->add($databaseArray);
|
||||
|
||||
// Push Plugin to array all plugins installed and not installed.
|
||||
array_push($plugins['all'], $Plugin);
|
||||
$plugins['all'][$pluginClass] = $Plugin;
|
||||
|
||||
// If the plugin installed
|
||||
if($Plugin->installed())
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Variables
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
$token = isset($_POST['token']) ? Sanitize::html($_POST['token']) : false;
|
||||
|
||||
if( !$Security->validateToken($token) )
|
||||
{
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying validate the token. Token ID: '.$token);
|
||||
|
||||
// Destroy the session.
|
||||
Session::destroy();
|
||||
|
||||
// Redirect to login panel.
|
||||
Redirect::page('admin', 'login');
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($_POST['token']);
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
|
@ -22,8 +22,8 @@ $theme = array(
|
|||
// Main
|
||||
// ============================================================================
|
||||
|
||||
$langLocaleFile = PATH_THEME.'language'.DS.$Site->locale().'.json';
|
||||
$langDefaultFile = PATH_THEME.'language'.DS.'en_US.json';
|
||||
$langLocaleFile = PATH_THEME.'languages'.DS.$Site->locale().'.json';
|
||||
$langDefaultFile = PATH_THEME.'languages'.DS.'en_US.json';
|
||||
$database = false;
|
||||
|
||||
// Check if exists locale language
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// Boot rules
|
||||
include(PATH_RULES.'70.build_posts.php');
|
||||
include(PATH_RULES.'70.build_pages.php');
|
||||
include(PATH_RULES.'70.posts.php');
|
||||
include(PATH_RULES.'70.pages.php');
|
||||
include(PATH_RULES.'80.plugins.php');
|
||||
include(PATH_RULES.'99.header.php');
|
||||
include(PATH_RULES.'99.paginator.php');
|
||||
|
@ -20,6 +20,9 @@ if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php') ) {
|
|||
if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'index.php') ) {
|
||||
include(PATH_THEMES.$Site->theme().DS.'index.php');
|
||||
}
|
||||
else {
|
||||
$Language->p('Please check your theme configuration');
|
||||
}
|
||||
|
||||
// Plugins after site loaded
|
||||
Theme::plugins('afterSiteLoad');
|
|
@ -11,8 +11,7 @@ class dbPages extends dbJSON
|
|||
'username'=> array('inFile'=>false, 'value'=>''),
|
||||
'tags'=> array('inFile'=>false, 'value'=>''),
|
||||
'status'=> array('inFile'=>false, 'value'=>'draft'),
|
||||
'unixTimeCreated'=> array('inFile'=>false, 'value'=>0),
|
||||
'unixTimeModified'=> array('inFile'=>false, 'value'=>0),
|
||||
'date'=> array('inFile'=>false, 'value'=>0),
|
||||
'position'=> array('inFile'=>false, 'value'=>0)
|
||||
);
|
||||
|
||||
|
@ -27,9 +26,6 @@ class dbPages extends dbJSON
|
|||
$dataForFile = array(); // This data will be saved in the file
|
||||
|
||||
$key = $this->generateKey($args['slug'], $args['parent']);
|
||||
if($key===false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The user is always the one loggued.
|
||||
$args['username'] = Session::get('username');
|
||||
|
@ -37,8 +33,10 @@ class dbPages extends dbJSON
|
|||
return false;
|
||||
}
|
||||
|
||||
// The current unix time stamp.
|
||||
$args['unixTimeCreated'] = Date::unixTime();
|
||||
// Current date.
|
||||
if(empty($args['date'])) {
|
||||
$args['date'] = Date::current(DB_DATE_FORMAT);
|
||||
}
|
||||
|
||||
// Verify arguments with the database fields.
|
||||
foreach($this->dbFields as $field=>$options)
|
||||
|
@ -109,9 +107,13 @@ class dbPages extends dbJSON
|
|||
return false;
|
||||
}
|
||||
|
||||
// Unix time created and modified.
|
||||
$args['unixTimeCreated'] = $this->db[$args['key']]['unixTimeCreated'];
|
||||
$args['unixTimeModified'] = Date::unixTime();
|
||||
// If the page is draft then the time created is now.
|
||||
if( $this->db[$args['key']]['status']=='draft' ) {
|
||||
$args['date'] = Date::current(DB_DATE_FORMAT);
|
||||
}
|
||||
else {
|
||||
$args['date'] = $this->db[$args['key']]['date'];
|
||||
}
|
||||
|
||||
// Verify arguments with the database fields.
|
||||
foreach($this->dbFields as $field=>$options)
|
||||
|
@ -283,31 +285,22 @@ class dbPages extends dbJSON
|
|||
return $this->db;
|
||||
}
|
||||
|
||||
public function regenerate()
|
||||
public function regenerateCli()
|
||||
{
|
||||
$db = $this->db;
|
||||
$paths = array();
|
||||
$newPaths = array();
|
||||
$fields = array();
|
||||
|
||||
// Complete $fields with the default values.
|
||||
// Default fields and value
|
||||
foreach($this->dbFields as $field=>$options) {
|
||||
if(!$options['inFile']) {
|
||||
$fields[$field] = $options['value'];
|
||||
}
|
||||
}
|
||||
|
||||
// Foreach new page set the unix time stamp.
|
||||
$fields['unixTimeCreated'] = Date::unixTime();
|
||||
$fields['status'] = CLI_STATUS;
|
||||
$fields['date'] = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Foreach new page set the owner admin.
|
||||
$fields['username'] = 'admin';
|
||||
|
||||
// Foreach new page set the status.
|
||||
if(HANDMADE_PUBLISHED) {
|
||||
$fields['status']='published';
|
||||
}
|
||||
|
||||
// Get the pages from the first level of directories
|
||||
$tmpPaths = glob(PATH_PAGES.'*', GLOB_ONLYDIR);
|
||||
foreach($tmpPaths as $directory)
|
||||
{
|
||||
|
@ -315,7 +308,7 @@ class dbPages extends dbJSON
|
|||
|
||||
if(file_exists($directory.DS.'index.txt')) {
|
||||
// The key is the directory name
|
||||
$paths[$key] = true;
|
||||
$newPaths[$key] = true;
|
||||
}
|
||||
|
||||
// Recovery pages from subdirectories
|
||||
|
@ -326,19 +319,34 @@ class dbPages extends dbJSON
|
|||
|
||||
if(file_exists($subDirectory.DS.'index.txt')) {
|
||||
// The key is composed by the directory/subdirectory
|
||||
$paths[$key.'/'.$subKey] = true;
|
||||
$newPaths[$key.'/'.$subKey] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove old posts from db
|
||||
foreach( array_diff_key($db, $paths) as $slug=>$data ) {
|
||||
unset($this->db[$slug]);
|
||||
foreach($newPaths as $key=>$value)
|
||||
{
|
||||
if(!isset($this->db[$key])) {
|
||||
$this->db[$key] = $fields;
|
||||
}
|
||||
|
||||
// Insert new posts to db
|
||||
foreach( array_diff_key($paths, $db) as $slug=>$data ) {
|
||||
$this->db[$slug] = $fields;
|
||||
$Page = new Page($key);
|
||||
|
||||
// Update all fields from FILE to DATABASE.
|
||||
foreach($fields as $f=>$v)
|
||||
{
|
||||
if($Page->getField($f)) {
|
||||
// DEBUG: Validar/Sanitizar valores, ej: validar formato fecha
|
||||
$this->db[$key][$f] = $Page->getField($f);
|
||||
}
|
||||
}
|
||||
|
||||
// DEBUG: Update tags
|
||||
}
|
||||
|
||||
// Remove old pages from db
|
||||
foreach( array_diff_key($db, $newPaths) as $key=>$data ) {
|
||||
unset($this->db[$key]);
|
||||
}
|
||||
|
||||
// Save the database.
|
||||
|
@ -349,5 +357,4 @@ class dbPages extends dbJSON
|
|||
|
||||
return $this->db!=$db;
|
||||
}
|
||||
|
||||
}
|
|
@ -7,16 +7,15 @@ class dbPosts extends dbJSON
|
|||
'content'=> array('inFile'=>true, 'value'=>''),
|
||||
'description'=> array('inFile'=>false, 'value'=>''),
|
||||
'username'=> array('inFile'=>false, 'value'=>''),
|
||||
'status'=> array('inFile'=>false, 'value'=>'draft'),
|
||||
'status'=> array('inFile'=>false, 'value'=>'draft'), // published, draft, scheduled
|
||||
'tags'=> array('inFile'=>false, 'value'=>''),
|
||||
'allowComments'=> array('inFile'=>false, 'value'=>false),
|
||||
'unixTimeCreated'=> array('inFile'=>false, 'value'=>0),
|
||||
'unixTimeModified'=>array('inFile'=>false, 'value'=>0)
|
||||
'date'=> array('inFile'=>false, 'value'=>'')
|
||||
);
|
||||
|
||||
private $numberPosts = array(
|
||||
'total'=>0,
|
||||
'withoutDrafts'=>0
|
||||
'published'=>0
|
||||
);
|
||||
|
||||
function __construct()
|
||||
|
@ -32,7 +31,7 @@ class dbPosts extends dbJSON
|
|||
return $this->numberPosts['total'];
|
||||
}
|
||||
|
||||
return $this->numberPosts['withoutDrafts'];
|
||||
return $this->numberPosts['published'];
|
||||
}
|
||||
|
||||
// Return an array with the post's database, FALSE otherwise.
|
||||
|
@ -45,6 +44,15 @@ class dbPosts extends dbJSON
|
|||
return false;
|
||||
}
|
||||
|
||||
public function setDb($key, $field, $value)
|
||||
{
|
||||
if($this->postExists($key)) {
|
||||
$this->db[$key][$field] = $value;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Return TRUE if the post exists, FALSE otherwise.
|
||||
public function postExists($key)
|
||||
{
|
||||
|
@ -83,19 +91,31 @@ class dbPosts extends dbJSON
|
|||
{
|
||||
$dataForDb = array(); // This data will be saved in the database
|
||||
$dataForFile = array(); // This data will be saved in the file
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Generate the database key.
|
||||
$key = $this->generateKey($args['slug']);
|
||||
|
||||
// The user is always the one loggued.
|
||||
// The user is always the who is loggued.
|
||||
$args['username'] = Session::get('username');
|
||||
if( Text::isEmpty($args['username']) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The current unix time stamp.
|
||||
if(empty($args['unixTimeCreated'])) {
|
||||
$args['unixTimeCreated'] = Date::unixTime();
|
||||
// Date
|
||||
if(!Valid::date($args['date'], DB_DATE_FORMAT)) {
|
||||
$args['date'] = $currentDate;
|
||||
}
|
||||
|
||||
// Schedule post?
|
||||
if( ($args['date']>$currentDate) && ($args['status']=='published') ) {
|
||||
$args['status'] = 'scheduled';
|
||||
}
|
||||
|
||||
// Tags
|
||||
if(Text::isNotEmpty($args['tags'])) {
|
||||
$cleanTags = array_map('trim', explode(',', $args['tags']));
|
||||
$args['tags'] = implode(',', $cleanTags);
|
||||
}
|
||||
|
||||
// Verify arguments with the database fields.
|
||||
|
@ -146,6 +166,10 @@ class dbPosts extends dbJSON
|
|||
|
||||
// Save the database
|
||||
$this->db[$key] = $dataForDb;
|
||||
|
||||
// Sort posts before save.
|
||||
$this->sortByDate();
|
||||
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
|
@ -156,10 +180,6 @@ class dbPosts extends dbJSON
|
|||
|
||||
public function edit($args)
|
||||
{
|
||||
// Unix time created and modified.
|
||||
$args['unixTimeCreated'] = $this->db[$args['key']]['unixTimeCreated'];
|
||||
$args['unixTimeModified'] = Date::unixTime();
|
||||
|
||||
if( $this->delete($args['key']) ) {
|
||||
return $this->add($args);
|
||||
}
|
||||
|
@ -196,78 +216,23 @@ class dbPosts extends dbJSON
|
|||
return true;
|
||||
}
|
||||
|
||||
public function regenerate()
|
||||
// Returns an array with a list of posts keys, filtered by a page number.
|
||||
public function getList($pageNumber, $postPerPage, $removeUnpublished=true)
|
||||
{
|
||||
$db = $this->db;
|
||||
$paths = array();
|
||||
$fields = array();
|
||||
$totalPosts = $this->numberPosts['total'];
|
||||
|
||||
// Default fields and value
|
||||
foreach($this->dbFields as $field=>$options) {
|
||||
if(!$options['inFile']) {
|
||||
$fields[$field] = $options['value'];
|
||||
}
|
||||
}
|
||||
|
||||
// Unix time stamp
|
||||
$fields['unixTimeCreated'] = Date::unixTime();
|
||||
|
||||
// Username
|
||||
$fields['username'] = 'admin';
|
||||
|
||||
if(HANDMADE_PUBLISHED) {
|
||||
$fields['status']='published';
|
||||
}
|
||||
|
||||
// Recovery pages from the first level of directories
|
||||
$tmpPaths = glob(PATH_POSTS.'*', GLOB_ONLYDIR);
|
||||
foreach($tmpPaths as $directory)
|
||||
{
|
||||
$key = basename($directory);
|
||||
|
||||
if(file_exists($directory.DS.'index.txt')) {
|
||||
// The key is the directory name
|
||||
$paths[$key] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove old posts from db
|
||||
foreach( array_diff_key($db, $paths) as $slug=>$data ) {
|
||||
unset($this->db[$slug]);
|
||||
}
|
||||
|
||||
// Insert new posts to db
|
||||
foreach( array_diff_key($paths, $db) as $slug=>$data ) {
|
||||
$this->db[$slug] = $fields;
|
||||
}
|
||||
|
||||
// Save the database.
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->db!=$db;
|
||||
}
|
||||
|
||||
public function getPage($pageNumber, $postPerPage, $draftPosts=false)
|
||||
{
|
||||
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
|
||||
// DEBUG: Se eliminan antes de ordenarlos porque sino los draft cuentan como publicados en el PostPerPage.
|
||||
if(!$draftPosts) {
|
||||
// Remove the unpublished posts.
|
||||
if($removeUnpublished) {
|
||||
$this->removeUnpublished();
|
||||
$this->numberPosts['withoutDrafts'] = count($this->db);
|
||||
$totalPosts = $this->numberPosts['published'];
|
||||
}
|
||||
|
||||
$init = (int) $postPerPage * $pageNumber;
|
||||
$end = (int) min( ($init + $postPerPage - 1), count($this->db) - 1 );
|
||||
$end = (int) min( ($init + $postPerPage - 1), $totalPosts - 1 );
|
||||
$outrange = $init<0 ? true : $init>$end;
|
||||
|
||||
// Sort posts
|
||||
$tmp = $this->sortByDate();
|
||||
|
||||
if(!$outrange) {
|
||||
return array_slice($tmp, $init, $postPerPage, true);
|
||||
return array_slice($this->db, $init, $postPerPage, true);
|
||||
}
|
||||
|
||||
return array();
|
||||
|
@ -302,6 +267,9 @@ class dbPosts extends dbJSON
|
|||
}
|
||||
}
|
||||
|
||||
// Sort posts before save.
|
||||
$this->sortByDate();
|
||||
|
||||
// Save the database.
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
|
@ -311,41 +279,140 @@ class dbPosts extends dbJSON
|
|||
return true;
|
||||
}
|
||||
|
||||
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
|
||||
private function removeUnpublished()
|
||||
// Remove unpublished posts, status != published.
|
||||
public function removeUnpublished()
|
||||
{
|
||||
$tmp = array();
|
||||
|
||||
foreach($this->db as $key=>$value)
|
||||
foreach($this->db as $key=>$values)
|
||||
{
|
||||
if($value['status']==='published') {
|
||||
$tmp[$key]=$value;
|
||||
if($values['status']!='published') {
|
||||
unset($this->db[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->db = $tmp;
|
||||
$this->numberPosts['published'] = count($this->db);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private function sortByDate($low_to_high=false)
|
||||
// Return TRUE if there are new posts published, FALSE otherwise.
|
||||
public function scheduler()
|
||||
{
|
||||
// high to low
|
||||
function high_to_low($a, $b) {
|
||||
return $a['unixTimeCreated']<$b['unixTimeCreated'];
|
||||
// Get current date.
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
$saveDatabase = false;
|
||||
|
||||
// Check scheduled posts and publish.
|
||||
foreach($this->db as $postKey=>$values)
|
||||
{
|
||||
if($values['status']=='scheduled')
|
||||
{
|
||||
// Publish post.
|
||||
if($values['date']<=$currentDate) {
|
||||
$this->db[$postKey]['status'] = 'published';
|
||||
$saveDatabase = true;
|
||||
}
|
||||
}
|
||||
elseif($values['status']=='published') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// low to high
|
||||
function low_to_high($a, $b) {
|
||||
return $a['unixTimeCreated']>$b['unixTimeCreated'];
|
||||
// Save the database.
|
||||
if($saveDatabase)
|
||||
{
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
}
|
||||
|
||||
$tmp = $this->db;
|
||||
return true;
|
||||
}
|
||||
|
||||
if($low_to_high)
|
||||
uasort($tmp, 'low_to_high');
|
||||
else
|
||||
uasort($tmp, 'high_to_low');
|
||||
return false;
|
||||
}
|
||||
|
||||
return $tmp;
|
||||
// Sort posts by date.
|
||||
public function sortByDate($HighToLow=true)
|
||||
{
|
||||
if($HighToLow) {
|
||||
uasort($this->db, array($this, 'sortHighToLow'));
|
||||
}
|
||||
else {
|
||||
uasort($this->db, array($this, 'sortLowToHigh'));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private function sortLowToHigh($a, $b) {
|
||||
return $a['date']>$b['date'];
|
||||
}
|
||||
|
||||
private function sortHighToLow($a, $b) {
|
||||
return $a['date']<$b['date'];
|
||||
}
|
||||
|
||||
public function regenerateCli()
|
||||
{
|
||||
$db = $this->db;
|
||||
$newPaths = array();
|
||||
$fields = array();
|
||||
|
||||
// Default fields and value
|
||||
foreach($this->dbFields as $field=>$options) {
|
||||
if(!$options['inFile']) {
|
||||
$fields[$field] = $options['value'];
|
||||
}
|
||||
}
|
||||
|
||||
$fields['status'] = CLI_STATUS;
|
||||
$fields['date'] = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Recovery pages from the first level of directories
|
||||
$tmpPaths = glob(PATH_POSTS.'*', GLOB_ONLYDIR);
|
||||
foreach($tmpPaths as $directory)
|
||||
{
|
||||
$key = basename($directory);
|
||||
|
||||
if(file_exists($directory.DS.'index.txt')) {
|
||||
// The key is the directory name
|
||||
$newPaths[$key] = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($newPaths as $key=>$value)
|
||||
{
|
||||
if(!isset($this->db[$key])) {
|
||||
$this->db[$key] = $fields;
|
||||
}
|
||||
|
||||
$Post = new Post($key);
|
||||
|
||||
// Update all fields from FILE to DATABASE.
|
||||
foreach($fields as $f=>$v)
|
||||
{
|
||||
if($Post->getField($f)) {
|
||||
// DEBUG: Validar/Sanitizar valores, ej: validar formato fecha
|
||||
$this->db[$key][$f] = $Post->getField($f);
|
||||
}
|
||||
}
|
||||
|
||||
// DEBUG: Update tags
|
||||
}
|
||||
|
||||
// Remove old posts from db
|
||||
foreach( array_diff_key($db, $newPaths) as $key=>$data ) {
|
||||
unset($this->db[$key]);
|
||||
}
|
||||
|
||||
// Save the database.
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->db!=$db;
|
||||
}
|
||||
|
||||
}
|
|
@ -3,22 +3,21 @@
|
|||
class dbSite extends dbJSON
|
||||
{
|
||||
private $dbFields = array(
|
||||
'title'=> array('inFile'=>false, 'value'=>''),
|
||||
'title'=> array('inFile'=>false, 'value'=>'I am Guybrush Threepwood, mighty developer'),
|
||||
'slogan'=> array('inFile'=>false, 'value'=>''),
|
||||
'description'=> array('inFile'=>false, 'value'=>''),
|
||||
'footer'=> array('inFile'=>false, 'value'=>''),
|
||||
'footer'=> array('inFile'=>false, 'value'=>'I wanna be a pirate!'),
|
||||
'postsperpage'=> array('inFile'=>false, 'value'=>''),
|
||||
'language'=> array('inFile'=>false, 'value'=>'en'),
|
||||
'locale'=> array('inFile'=>false, 'value'=>'en_US'),
|
||||
'timezone'=> array('inFile'=>false, 'value'=>'America/Argentina/Buenos_Aires'),
|
||||
'theme'=> array('inFile'=>false, 'value'=>'pure'),
|
||||
'adminTheme'=> array('inFile'=>false, 'value'=>'kure'),
|
||||
'adminTheme'=> array('inFile'=>false, 'value'=>'default'),
|
||||
'homepage'=> array('inFile'=>false, 'value'=>''),
|
||||
'uriPage'=> array('inFile'=>false, 'value'=>'/'),
|
||||
'uriPost'=> array('inFile'=>false, 'value'=>'/post/'),
|
||||
'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'),
|
||||
'url'=> array('inFile'=>false, 'value'=>''),
|
||||
'advancedOptions'=> array('inFile'=>false, 'value'=>'false')
|
||||
'url'=> array('inFile'=>false, 'value'=>'')
|
||||
);
|
||||
|
||||
function __construct()
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
class dbTags extends dbJSON
|
||||
{
|
||||
/*
|
||||
$postsIndex['tag1']['name'] = 'Tag 1';
|
||||
$postsIndex['tag1']['posts'] = array('post1','post2','post3');
|
||||
$postsIndex['tag2']['name'] = 'Tag 2';
|
||||
$postsIndex['tag2']['posts'] = array('post1','post5');
|
||||
*/
|
||||
private $dbFields = array(
|
||||
'postsIndex'=>array('inFile'=>false, 'value'=>array()),
|
||||
'pagesIndex'=>array('inFile'=>false, 'value'=>array())
|
||||
);
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct(PATH_DATABASES.'tags.php');
|
||||
}
|
||||
|
||||
// Returns an array with a list of posts keys, filtered by a page number and a tag key.
|
||||
public function getList($pageNumber, $postPerPage, $tagKey)
|
||||
{
|
||||
if( !isset($this->db['postsIndex'][$tagKey]) ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying get the posts list by the tag key: '.$tagKey);
|
||||
return array();
|
||||
}
|
||||
|
||||
$init = (int) $postPerPage * $pageNumber;
|
||||
$end = (int) min( ($init + $postPerPage - 1), $this->countPostsByTag($tagKey) - 1 );
|
||||
$outrange = $init<0 ? true : $init > $end;
|
||||
|
||||
if(!$outrange) {
|
||||
$list = $this->db['postsIndex'][$tagKey]['posts'];
|
||||
$tmp = array_flip($list); // Change the posts keys list in the array key.
|
||||
return array_slice($tmp, $init, $postPerPage, true);
|
||||
}
|
||||
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying get the list of posts, out of range?. Pagenumber: '.$pageNumber);
|
||||
return array();
|
||||
}
|
||||
|
||||
public function countPostsByTag($tagKey)
|
||||
{
|
||||
if( isset($this->db['postsIndex'][$tagKey]) ) {
|
||||
return count($this->db['postsIndex'][$tagKey]['posts']);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Regenerate the posts index for each tag.
|
||||
// (array) $db, the $db must be sorted by date and the posts published only.
|
||||
public function reindexPosts($db)
|
||||
{
|
||||
$tagsIndex = array();
|
||||
$currentDate = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Foreach post
|
||||
foreach($db as $postKey=>$values)
|
||||
{
|
||||
$explode = explode(',', $values['tags']);
|
||||
|
||||
// Foreach tag from post
|
||||
foreach($explode as $tagName)
|
||||
{
|
||||
$tagName = trim($tagName);
|
||||
$tagKey = $tagName;
|
||||
//$tagKey = Text::cleanUrl($tagName);
|
||||
|
||||
// If the tag is not empty.
|
||||
if(Text::isNotEmpty($tagName))
|
||||
{
|
||||
if( isset($tagsIndex[$tagKey]) ) {
|
||||
array_push($tagsIndex[$tagKey]['posts'], $postKey);
|
||||
}
|
||||
else {
|
||||
$tagsIndex[$tagKey]['name'] = $tagName;
|
||||
$tagsIndex[$tagKey]['posts'] = array($postKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->db['postsIndex'] = $tagsIndex;
|
||||
|
||||
if( $this->save() === false ) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -10,7 +10,7 @@ class dbUsers extends dbJSON
|
|||
'password'=> array('inFile'=>false, 'value'=>''),
|
||||
'salt'=> array('inFile'=>false, 'value'=>'!Pink Floyd!Welcome to the machine!'),
|
||||
'email'=> array('inFile'=>false, 'value'=>''),
|
||||
'registered'=> array('inFile'=>false, 'value'=>0)
|
||||
'registered'=> array('inFile'=>false, 'value'=>'1985-03-15 10:00')
|
||||
);
|
||||
|
||||
function __construct()
|
||||
|
@ -138,8 +138,8 @@ class dbUsers extends dbJSON
|
|||
return false;
|
||||
}
|
||||
|
||||
// The current unix time stamp.
|
||||
$dataForDb['registered'] = Date::unixTime();
|
||||
// Current date.
|
||||
$dataForDb['registered'] = Date::current(DB_DATE_FORMAT);
|
||||
|
||||
// Password
|
||||
$dataForDb['salt'] = Text::randomText(SALT_LENGTH);
|
||||
|
|
|
@ -8,12 +8,19 @@ class Date {
|
|||
return time();
|
||||
}
|
||||
|
||||
// Format a local time/date according to locale settings
|
||||
public static function format($time, $format)
|
||||
// Return the local time/date according to locale settings.
|
||||
public static function current($format)
|
||||
{
|
||||
$date = strftime($format, $time);
|
||||
$Date = new DateTime();
|
||||
return $Date->format($format);
|
||||
}
|
||||
|
||||
return $date;
|
||||
// Format a local time/date according to locale settings.
|
||||
public static function format($date, $currentFormat, $outputFormat)
|
||||
{
|
||||
$Date = DateTime::createFromFormat($currentFormat, $date);
|
||||
|
||||
return $Date->format($outputFormat);
|
||||
}
|
||||
|
||||
public static function timeago($time)
|
||||
|
|
|
@ -25,7 +25,8 @@ class Session {
|
|||
// Gets current cookies params.
|
||||
$cookieParams = session_get_cookie_params();
|
||||
|
||||
session_set_cookie_params($cookieLifetime,
|
||||
session_set_cookie_params(
|
||||
$cookieLifetime,
|
||||
$cookieParams["path"],
|
||||
$cookieParams["domain"],
|
||||
$secure,
|
||||
|
|
|
@ -52,29 +52,6 @@ class Text {
|
|||
return $text;
|
||||
}
|
||||
|
||||
/*
|
||||
public static function cleanUrl($string, $separator='-')
|
||||
{
|
||||
// Delete characters
|
||||
$string = str_replace(array("“", "”", "!", "*", "'", """, "(", ")", ";", ":", "@", "&", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]", "|"),'',$string);
|
||||
$string = preg_replace('![^\\pL\d]+!u', $separator, $string);
|
||||
|
||||
// Remove spaces
|
||||
$string = str_replace(' ',$separator, $string);
|
||||
|
||||
//remove any additional characters that might appear after translit
|
||||
//$string = preg_replace('![^-\w]+!', '', $string);
|
||||
|
||||
// Replace multiple dashes
|
||||
$string = preg_replace('/-{2,}/', $separator, $string);
|
||||
|
||||
// Make a string lowercase
|
||||
$string = self::lowercase($string);
|
||||
|
||||
return $string;
|
||||
}
|
||||
*/
|
||||
|
||||
public static function cleanUrl($string, $separator='-')
|
||||
{
|
||||
if(function_exists('iconv')) {
|
||||
|
@ -174,4 +151,11 @@ class Text {
|
|||
return preg_replace('/(src)="([^:"]*)(?:")/', "$1=\"$base$2\"", $string);
|
||||
}
|
||||
|
||||
public static function pre2htmlentities($string)
|
||||
{
|
||||
return preg_replace_callback('/<pre.*?><code(.*?)>(.*?)<\/code><\/pre>/imsu',
|
||||
create_function('$input', 'return "<pre><code $input[1]>".htmlentities($input[2])."</code></pre>";'),
|
||||
$string);
|
||||
}
|
||||
|
||||
}
|
|
@ -24,4 +24,11 @@ class Valid {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Thanks, http://php.net/manual/en/function.checkdate.php#113205
|
||||
public static function date($date, $format='Y-m-d H:i:s')
|
||||
{
|
||||
$tmp = DateTime::createFromFormat($format, $date);
|
||||
return $tmp && $tmp->format($format) == $date;
|
||||
}
|
||||
|
||||
}
|
|
@ -16,10 +16,8 @@ class Page extends fileContent
|
|||
return $this->getField('title');
|
||||
}
|
||||
|
||||
// Returns the content.
|
||||
// This content is markdown parser.
|
||||
// $fullContent, TRUE returns all content, if FALSE returns the first part of the content.
|
||||
// $html, TRUE returns the content without satinize, FALSE otherwise.
|
||||
// Returns the content. This content is markdown parser.
|
||||
// (boolean) $html, TRUE returns the content without satinize, FALSE otherwise.
|
||||
public function content($html=true)
|
||||
{
|
||||
// This content is not sanitized.
|
||||
|
@ -32,16 +30,14 @@ class Page extends fileContent
|
|||
return Sanitize::html($content);
|
||||
}
|
||||
|
||||
// Returns the content.
|
||||
// This content is not markdown parser.
|
||||
// $fullContent, TRUE returns all content, if FALSE returns the first part of the content.
|
||||
// $html, TRUE returns the content without satinize, FALSE otherwise.
|
||||
public function contentRaw($html=true)
|
||||
// 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($html) {
|
||||
if($raw) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
@ -69,44 +65,17 @@ class Page extends fileContent
|
|||
return $this->getField('position');
|
||||
}
|
||||
|
||||
// Returns the post date in unix timestamp format, UTC-0.
|
||||
public function unixTimeCreated()
|
||||
{
|
||||
return $this->getField('unixTimeCreated');
|
||||
}
|
||||
|
||||
public function unixTimeModified()
|
||||
{
|
||||
return $this->getField('unixTimeModified');
|
||||
}
|
||||
|
||||
// Returns the post date according to locale settings and format settings.
|
||||
public function dateCreated($format=false)
|
||||
public function date($format=false)
|
||||
{
|
||||
if($format===false) {
|
||||
return $this->getField('date');
|
||||
$date = $this->getField('date');
|
||||
|
||||
if($format) {
|
||||
// En %d %b deberia ir el formato definido por el usuario
|
||||
return Date::format($date, DB_DATE_FORMAT, '%d %B');
|
||||
}
|
||||
|
||||
$unixTimeCreated = $this->unixTimeCreated();
|
||||
|
||||
return Date::format($unixTimeCreated, $format);
|
||||
}
|
||||
|
||||
public function dateModified($format=false)
|
||||
{
|
||||
if($format===false) {
|
||||
return $this->getField('date');
|
||||
}
|
||||
|
||||
$unixTimeModified = $this->unixTimeModified();
|
||||
|
||||
return Date::format($unixTimeModified, $format);
|
||||
}
|
||||
|
||||
// Returns the time ago
|
||||
public function timeago()
|
||||
{
|
||||
return $this->getField('timeago');
|
||||
return $date;
|
||||
}
|
||||
|
||||
// Returns the page slug.
|
||||
|
|
|
@ -18,19 +18,18 @@ class Post extends fileContent
|
|||
|
||||
// Returns the content.
|
||||
// This content is markdown parser.
|
||||
// $fullContent, TRUE returns all content, if FALSE returns the first part of the content.
|
||||
// $html, TRUE returns the content without satinize, FALSE otherwise.
|
||||
public function content($fullContent=true, $html=true)
|
||||
// (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)
|
||||
{
|
||||
// This content is not sanitized.
|
||||
$content = $this->getField('content');
|
||||
|
||||
if(!$fullContent)
|
||||
{
|
||||
if(!$fullContent) {
|
||||
$content = $this->getField('breakContent');
|
||||
}
|
||||
|
||||
if($html) {
|
||||
if($raw) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
@ -42,15 +41,14 @@ class Post extends fileContent
|
|||
return $this->getField('readMore');
|
||||
}
|
||||
|
||||
// Returns the content.
|
||||
// This content is not markdown parser.
|
||||
// $html, TRUE returns the content without satinize, FALSE otherwise.
|
||||
public function contentRaw($html=true)
|
||||
// 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($html) {
|
||||
if($raw) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
@ -68,6 +66,18 @@ class Post extends fileContent
|
|||
return ($this->getField('status')==='published');
|
||||
}
|
||||
|
||||
// Returns TRUE if the post is scheduled, FALSE otherwise.
|
||||
public function scheduled()
|
||||
{
|
||||
return ($this->getField('status')==='scheduled');
|
||||
}
|
||||
|
||||
// Returns TRUE if the post is draft, FALSE otherwise.
|
||||
public function draft()
|
||||
{
|
||||
return ($this->getField('status')=='draft');
|
||||
}
|
||||
|
||||
public function username()
|
||||
{
|
||||
return $this->getField('username');
|
||||
|
@ -88,46 +98,31 @@ class Post extends fileContent
|
|||
return $this->getField('description');
|
||||
}
|
||||
|
||||
public function unixTimeCreated()
|
||||
// Returns the post date according to locale settings and format settings.
|
||||
public function date($format=false)
|
||||
{
|
||||
return $this->getField('unixTimeCreated');
|
||||
$date = $this->getField('date');
|
||||
|
||||
if($format) {
|
||||
// En %d %b deberia ir el formato definido por el usuario
|
||||
return Date::format($date, DB_DATE_FORMAT, '%d %B');
|
||||
}
|
||||
|
||||
public function unixTimeModified()
|
||||
return $date;
|
||||
}
|
||||
|
||||
public function tags($returnsArray=false)
|
||||
{
|
||||
return $this->getField('unixTimeModified');
|
||||
global $Url;
|
||||
|
||||
$tags = $this->getField('tags');
|
||||
|
||||
if($returnsArray) {
|
||||
return explode(',', $tags);
|
||||
}
|
||||
|
||||
public function dateCreated($format=false)
|
||||
{
|
||||
if($format===false) {
|
||||
return $this->getField('date');
|
||||
else {
|
||||
return $tags;
|
||||
}
|
||||
|
||||
$unixTimeCreated = $this->unixTimeCreated();
|
||||
|
||||
return Date::format($unixTimeCreated, $format);
|
||||
}
|
||||
|
||||
public function dateModified($format=false)
|
||||
{
|
||||
if($format===false) {
|
||||
return $this->getField('date');
|
||||
}
|
||||
|
||||
$unixTimeModified = $this->unixTimeModified();
|
||||
|
||||
return Date::format($unixTimeModified, $format);
|
||||
}
|
||||
|
||||
public function timeago()
|
||||
{
|
||||
return $this->getField('timeago');
|
||||
}
|
||||
|
||||
public function tags()
|
||||
{
|
||||
return $this->getField('tags');
|
||||
}
|
||||
|
||||
public function slug()
|
||||
|
|
|
@ -13,6 +13,42 @@ class Security extends dbJSON
|
|||
parent::__construct(PATH_DATABASES.'security.php');
|
||||
}
|
||||
|
||||
// ====================================================
|
||||
// TOKEN FOR CSRF
|
||||
// ====================================================
|
||||
|
||||
// Generate and save the token in Session.
|
||||
public function generateToken()
|
||||
{
|
||||
$token = Text::randomText(8);
|
||||
$token = sha1($token);
|
||||
|
||||
Session::set('token', $token);
|
||||
}
|
||||
|
||||
// Validate the token.
|
||||
public function validateToken($token)
|
||||
{
|
||||
$sessionToken = Session::get('token');
|
||||
|
||||
return ( !empty($sessionToken) && ($sessionToken===$token) );
|
||||
}
|
||||
|
||||
// Returns the token.
|
||||
public function getToken()
|
||||
{
|
||||
return Session::get('token');
|
||||
}
|
||||
|
||||
public function printToken()
|
||||
{
|
||||
echo Session::get('token');
|
||||
}
|
||||
|
||||
// ====================================================
|
||||
// BRUTE FORCE PROTECTION
|
||||
// ====================================================
|
||||
|
||||
public function isBlocked()
|
||||
{
|
||||
$ip = $this->getUserIp();
|
||||
|
|
|
@ -100,9 +100,15 @@ class Url
|
|||
}
|
||||
|
||||
// Return the filter used
|
||||
public function filters($type)
|
||||
public function filters($type, $trim=true)
|
||||
{
|
||||
return $this->filters[$type];
|
||||
$filter = $this->filters[$type];
|
||||
|
||||
if($trim) {
|
||||
$filter = trim($filter, '/');
|
||||
}
|
||||
|
||||
return $filter;
|
||||
}
|
||||
|
||||
// Return: home, tag, post
|
||||
|
|
|
@ -0,0 +1,148 @@
|
|||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Czech (Czech Republik)",
|
||||
"english-name": "Czech",
|
||||
"last-update": "2015-06-14",
|
||||
"author": "honigp",
|
||||
"email": "honigp@seznam.cz",
|
||||
"website": "honigp.cz"
|
||||
},
|
||||
|
||||
"username": "Jméno",
|
||||
"password": "Heslo",
|
||||
"confirm-password": "Heslo znovu",
|
||||
"editor": "Editor",
|
||||
"dashboard": "Nástěnka",
|
||||
"role": "Úroveň",
|
||||
"post": "Zveřejnit",
|
||||
"posts": "Počet příspěvků",
|
||||
"users": "Počet uživatelů",
|
||||
"administrator": "Administrátor",
|
||||
"add": "Přidat",
|
||||
"cancel": "Zrušit",
|
||||
"content": "Obsah",
|
||||
"title": "Nadpis",
|
||||
"no-parent": "Bez zdroje",
|
||||
"edit-page": "Upravit stránku",
|
||||
"edit-post": "Upravit příspěvek",
|
||||
"add-a-new-user": "Přidání nového uživatele",
|
||||
"parent": "Zdroj",
|
||||
"friendly-url": "Pěkné URL",
|
||||
"description": "Popis",
|
||||
"posted-by": "Přidat",
|
||||
"tags": "Štítky",
|
||||
"position": "Umístit",
|
||||
"save": "Uložit",
|
||||
"draft": "Návrh",
|
||||
"delete": "Smazat",
|
||||
"registered": "Registrace",
|
||||
"Notifications": "Oznámení",
|
||||
"profile": "Profil",
|
||||
"email": "Email",
|
||||
"settings": "Nastavení",
|
||||
"general": "Obecné",
|
||||
"advanced": "Pokročilé",
|
||||
"regional": "Region",
|
||||
"about": "O systému",
|
||||
"login": "Přihlásit",
|
||||
"logout": "Odhlásit",
|
||||
"manage": "Správa obsahu",
|
||||
"themes": "Motiv",
|
||||
"prev-page": "Předchozí stránka",
|
||||
"next-page": "Následující stránka",
|
||||
"configure-plugin": "nastavení pluginů",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Potvrdit odstranění,tato akce nelze vrátit zpět.",
|
||||
"site-title": "Název webu",
|
||||
"site-slogan": "Slogan webu",
|
||||
"site-description": "Popis webu",
|
||||
"footer-text": "Patička text",
|
||||
"posts-per-page": "Příspěvků na stránku",
|
||||
"site-url": "Adresa webu",
|
||||
"writting-settings": "Nastavení psaní",
|
||||
"url-filters": "URL filtr",
|
||||
"page": "Stránka",
|
||||
"pages": "Stránky",
|
||||
"home": "Domů",
|
||||
"welcome-back": "Vítejte",
|
||||
"language": "Jazyk",
|
||||
"website": "Stránka",
|
||||
"timezone": "Časová zóna",
|
||||
"locale": "Místní",
|
||||
"new-post": "Nový příspěvek",
|
||||
"html-and-markdown-code-supported": "Podpora HTML a Markdown",
|
||||
"new-page": "Nová stránka",
|
||||
"manage-posts": "Správa příspěvků",
|
||||
"published-date": "Publikováno",
|
||||
"modified-date": "Datum úpravy",
|
||||
"empty-title": "Prázdný titul",
|
||||
"plugins": "Pluginy",
|
||||
"install-plugin": "Instalovat plugin",
|
||||
"uninstall-plugin": "Odinstalovat plugin",
|
||||
"new-password": "Nové heslo",
|
||||
"edit-user": "Upravit uživatele",
|
||||
"publish-now": "Publikovat nyní",
|
||||
"first-name": "Jméno",
|
||||
"last-name": "Příjmení",
|
||||
"bludit-version": "Bludit verze",
|
||||
"powered-by": "Powered by",
|
||||
"recent-posts": "Poslední příspěvky",
|
||||
"manage-pages": "Správa stránek",
|
||||
"advanced-options": "Pokročilé možnosti",
|
||||
"user-deleted": "Uživatel smazán",
|
||||
"page-added-successfully": "Stránka přidána",
|
||||
"post-added-successfully": "Příspěvek přidán",
|
||||
"the-post-has-been-deleted-successfully": "Příspěvek byl úspěšně smazán",
|
||||
"the-page-has-been-deleted-successfully": "Stránka byla úspěšně smazána",
|
||||
"username-or-password-incorrect": "Uživatelské jméno nebo heslo není správné",
|
||||
"database-regenerated": "Databáze regeneruje",
|
||||
"the-changes-have-been-saved": "Změny byly uloženy",
|
||||
"enable-more-features-at": "Další funkce na",
|
||||
"username-already-exists": "Uživatelské jméno již existuje",
|
||||
"username-field-is-empty": "Uživatelské jméno je prázdné",
|
||||
"the-password-and-confirmation-password-do-not-match":"Heslo a potvrzení hesla se neshodují",
|
||||
"user-has-been-added-successfully": "Uživatel byl úspěšně přidán",
|
||||
"you-do-not-have-sufficient-permissions": "Nemáte dostatečná oprávnění pro přístup k této stránce, obraťte se na správce.",
|
||||
"settings-advanced-writting-settings": "Nastavení->Pokročilé->Nastavení psaní",
|
||||
"new-posts-and-pages-synchronized": "Nové příspěvky a stránky synchronizované.",
|
||||
"you-can-choose-the-users-privilege": "Můžete si vybrat oprávnění uživatele.Editor může jen psát stránky a příspěvky.",
|
||||
"email-will-not-be-publicly-displayed": "E-mail nebude veřejně zobrazen. Doporučuje se heslo pro obnovení a oznámení.",
|
||||
"use-this-field-to-name-your-site": "V tomto poli lze pojmenovat vaše stránky, zobrazí se v horní části každé stránky vašeho webu.",
|
||||
"use-this-field-to-add-a-catchy-prhase": "Pomocí tohoto pole přidejte chytlavý slogan na vašem webu.",
|
||||
"you-can-add-a-site-description-to-provide": "Můžete přidat popis webu nebo krátký životopis.",
|
||||
"you-can-add-a-small-text-on-the-bottom": "Můžete přidat text v patičce každé stránky. např: autorská práva, vlastník, data, atd",
|
||||
"number-of-posts-to-show-per-page": "Počet příspěvků na stránce.",
|
||||
"the-url-of-your-site": "Adresa URL vašich stránek.",
|
||||
"add-or-edit-description-tags-or": "Přidat nebo upravit popis,značky,pěkné URL.",
|
||||
"select-your-sites-language": "Vyberte jazyk svých stránek.",
|
||||
"select-a-timezone-for-a-correct": "Vyberte časové pásmo pro správné zobrazení data / času na vašem webu.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Můžete použít toto pole pro definování parametrů souvisejících s jazykem a zemí.",
|
||||
"you-can-modify-the-url-which-identifies":"Můžete upravit adresu URL, která identifikuje stránku. Ne víc než 150 znaků.",
|
||||
"this-field-can-help-describe-the-content": "Zde můžete napsat obsah několika slovy. Ne víc než 150 znaků.",
|
||||
"write-the-tags-separeted-by-comma": "Napište štítky oddělené čárkou. např: štítek1, štítek2, štítek3",
|
||||
"delete-the-user-and-all-its-posts":"Odstranit uživatele a všechny jeho příspěvky",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "Odstranit uživatele a spojit své příspěvky na uživatele admin",
|
||||
"read-more": "Čtěte více",
|
||||
"show-blog": "Zobrazit blog",
|
||||
"default-home-page": "Výchozí domovská stránka",
|
||||
"version": "Verze",
|
||||
"there-are-no-drafts": "Nejsou k dispozici žádné návrhy.",
|
||||
"create-a-new-article-for-your-blog":"Vytvořte nový článek pro váš blog.",
|
||||
"create-a-new-page-for-your-website":"Vytvořte novou stránku pro vaše webové stránky.",
|
||||
"invite-a-friend-to-collaborate-on-your-website":"Pozvěte přátele ke spolupráci na svých webových stránkách.",
|
||||
"change-your-language-and-region-settings":"Změna nastavení jazyka a regionu.",
|
||||
"language-and-timezone":"Jazyk a časová zóna",
|
||||
"author": "Autor",
|
||||
"start-here": "Začněte zde",
|
||||
"install-theme": "Instalovat motiv",
|
||||
"first-post": "První příspěvek",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "Blahopřejeme právě jste nainstalovaly **Bludit**",
|
||||
"whats-next": "Kam dál",
|
||||
"manage-your-bludit-from-the-admin-panel": "Správa vašeho webu [admin area](./admin/)",
|
||||
"follow-bludit-on": "Follow Bludit on",
|
||||
"visit-the-support-forum": "Navštivte [forum](http://forum.bludit.com) fórum",
|
||||
"read-the-documentation-for-more-information": "Čtětě [documentation](http://docs.bludit.com) více informaví",
|
||||
"share-with-your-friends-and-enjoy": "Podělte se se svými přáteli a užívejte si",
|
||||
"the-page-has-not-been-found": "Stránka nenalezena.",
|
||||
"error": "Error"
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Deutsch (Deutschland)",
|
||||
"english-name": "German",
|
||||
"last-update": "2015-08-09",
|
||||
"author": "Edi",
|
||||
"email": "egoetschel@clickwork.ch",
|
||||
"website": "http://www.clickwork.ch"
|
||||
},
|
||||
|
||||
"username": "Benutzername",
|
||||
"password": "Passwort",
|
||||
"confirm-password": "Passwort wiederholen",
|
||||
"editor": "Editor",
|
||||
"dashboard": "Dashboard",
|
||||
"role": "Rolle",
|
||||
"post": "Beitrag",
|
||||
"posts": "Beiträge",
|
||||
"users": "Benutzer",
|
||||
"administrator": "Administrator",
|
||||
"add": "Hinzufügen",
|
||||
"cancel": "Abbrechen",
|
||||
"content": "Inhalt",
|
||||
"title": "Titel",
|
||||
"no-parent": "Keine übergeordnete Seite",
|
||||
"edit-page": "Seite bearbeiten",
|
||||
"edit-post": "Beitrag bearbeiten",
|
||||
"add-a-new-user": "Neuer Benutzer",
|
||||
"parent": "Übergeordnete Seite",
|
||||
"friendly-url": "Pretty URL",
|
||||
"description": "Beschreibung",
|
||||
"posted-by": "Veröffentlicht von",
|
||||
"tags": "Schlagwörter",
|
||||
"position": "Position",
|
||||
"save": "Speichern",
|
||||
"draft": "Entwurf",
|
||||
"delete": "Löschen",
|
||||
"registered": "Hinzugefügt",
|
||||
"Notifications": "Benachrichtigungen",
|
||||
"profile": "Profil",
|
||||
"email": "E-Mail",
|
||||
"settings": "Einstellungen",
|
||||
"general": "Allgemein",
|
||||
"advanced": "Erweitert",
|
||||
"regional": "Lokalisierung",
|
||||
"about": "Systeminformation",
|
||||
"login": "Anmelden",
|
||||
"logout": "Abmelden",
|
||||
"manage": "Verwaltung",
|
||||
"themes": "Themes",
|
||||
"prev-page": "Vorhergehende Seite",
|
||||
"next-page": "Nächste Seite",
|
||||
"configure-plugin": "Plugin konfigurieren",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Bestaetige das Loeschen, dieser Vorgang kann nicht rueckgaengig gemacht werden.",
|
||||
"site-title": "Titel der Webseite",
|
||||
"site-slogan": "Untertitel",
|
||||
"site-description": "Informationen zur Website",
|
||||
"footer-text": "Footer-Text",
|
||||
"posts-per-page": "Beiträge pro Seite",
|
||||
"site-url": "URL der Website",
|
||||
"writting-settings": "Beitrags- und Seiteneinstellungen",
|
||||
"url-filters": "URL-Erweiterungen",
|
||||
"page": "Seite",
|
||||
"pages": "Seiten",
|
||||
"home": "Hauptseite",
|
||||
"welcome-back": "Willkommen",
|
||||
"language": "Sprache",
|
||||
"website": "Zur Website",
|
||||
"timezone": "Zeitzone",
|
||||
"locale": "Locale",
|
||||
"new-post": "Neuer Beitrag",
|
||||
"html-and-markdown-code-supported": "HTML und Markdown werden unterstützt",
|
||||
"new-page": "Neue Seite",
|
||||
"manage-posts": "Beiträge verwalten",
|
||||
"published-date": "Veröffentlicht",
|
||||
"modified-date": "Letzte Änderung",
|
||||
"empty-title": "Kein Titel",
|
||||
"plugins": "Plugins",
|
||||
"install-plugin": "Plugin installieren",
|
||||
"uninstall-plugin": "Plugin deinstallieren",
|
||||
"new-password": "Neues Passwort",
|
||||
"edit-user": "Benutzer bearbeiten",
|
||||
"publish-now": "Veröffentlichen",
|
||||
"first-name": "Vorname",
|
||||
"last-name": "Nachname",
|
||||
"bludit-version": "Bludit Version",
|
||||
"powered-by": "Diese Website wurde eingerichtet mit",
|
||||
"recent-posts": "Neueste Beiträge",
|
||||
"manage-pages": "Seiten verwalten",
|
||||
"advanced-options": "Erweiterte Einstellungen",
|
||||
"user-deleted": "Der Benutzer wurde gelöscht.",
|
||||
"page-added-successfully": "Die Seite wurde veröffentlicht.",
|
||||
"post-added-successfully": "Die Seite wurde veröffentlicht.",
|
||||
"the-post-has-been-deleted-successfully": "Der Beitrag wurde gelöscht.",
|
||||
"the-page-has-been-deleted-successfully": "Die Seite wurde gelöscht.",
|
||||
"username-or-password-incorrect": "Der Benutzername oder das Passwort ist falsch.",
|
||||
"database-regenerated": "Die Datenbank wurde neu aufgebaut.",
|
||||
"the-changes-have-been-saved": "Die Änderungen wurden gespeichert.",
|
||||
"enable-more-features-at": "Zusätzlich Felder können aktiviert werden unter",
|
||||
"username-already-exists": "Diesen Benutzernamen gibt es bereits.",
|
||||
"username-field-is-empty": "Es muss ein Benutzername eingegeben werden.",
|
||||
"the-password-and-confirmation-password-do-not-match":"Die eingegebenen Passwörter stimmen nicht überein.",
|
||||
"user-has-been-added-successfully": "Der Benutzer wurde hinzugefügt.",
|
||||
"you-do-not-have-sufficient-permissions": "Du bist nicht berechtigt, die Seite aufzurufen.",
|
||||
"settings-advanced-writting-settings": "Einstellungen->Erweitert->Beitrags- und Seiteneinstellungen",
|
||||
"new-posts-and-pages-synchronized": "Neue Beitrãge und Seitenwurden synchronisiert.",
|
||||
"you-can-choose-the-users-privilege": "Rechte des Benutzers. Ein Editor kann nur Seiten anlegen und Beiträge schreiben.",
|
||||
"email-will-not-be-publicly-displayed": "Die E-Mail wird nicht öffentlich gezeigt. Sie wird für die Wiederherstellung des Passworts und Benachrichtigungen verwendet.",
|
||||
"use-this-field-to-name-your-site": "Name der Website, wie er auf jeder Seite angezeigt wird.",
|
||||
"use-this-field-to-add-a-catchy-prhase": "Untertitel oder Slogan der Website.",
|
||||
"you-can-add-a-site-description-to-provide": "Kurze Beschreibung der Website fúr Suchmaschinen.",
|
||||
"you-can-add-a-small-text-on-the-bottom": "Text im Fussbereich jeder Seite. Beispielsweise: Copyright-Hinweis, Eigentümer der Website usw.",
|
||||
"number-of-posts-to-show-per-page": "Anzahl der Beiträge, die auf einer Seite gezeigt werden..",
|
||||
"the-url-of-your-site": "URL der Website.",
|
||||
"add-or-edit-description-tags-or": "Beschreibungen, Schlagwörter und Pretty URL hinzufügen oder ändern.",
|
||||
"select-your-sites-language": "Sprache der Website.",
|
||||
"select-a-timezone-for-a-correct": "Zeitzone für die richtige Anzeige des Datums und der Zeit auf der Website.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Parameter mit Bezug auf die verwendete Sprache und das Land. Beispielsweise: de_DE, de_CH usw.",
|
||||
"you-can-modify-the-url-which-identifies":"Der URL kann selbst angepasst werden. Möglich sind höchstens 150 Zeichen.",
|
||||
"this-field-can-help-describe-the-content": "Kurze Inhaltsbeschreibung. Möglich sind höchstens 150 Zeichen.",
|
||||
"write-the-tags-separeted-by-comma": "Schlagwörter getrennt durch Kommas. Beispielsweise: Schlagwort1, Schlagwort2, Schlagwort3",
|
||||
"delete-the-user-and-all-its-posts":"Benutzer und alle seine Beiträge löschen",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "Benutzer löschen und seine Beiträge dem Administrator zuordnen",
|
||||
"read-more": "Weiterlesen",
|
||||
"show-blog": "Blog zeigen",
|
||||
"default-home-page": "Hauptseite",
|
||||
"version": "Version",
|
||||
"there-are-no-drafts": "Es sind keine Entwürfe vorhanden.",
|
||||
"create-a-new-article-for-your-blog":"Einen neuen Beitrag schreiben.",
|
||||
"create-a-new-page-for-your-website":"Eine neue Seite anlegen.",
|
||||
"invite-a-friend-to-collaborate-on-your-website":"Einen neuen Benutzer hinzufügen.",
|
||||
"change-your-language-and-region-settings":"Sprache ändern und Lokalisierung.",
|
||||
"language-and-timezone":"Sprache und Zeitzone",
|
||||
"author": "Autor",
|
||||
"start-here": "Direktzugriff",
|
||||
"install-theme": "Theme installieren",
|
||||
"first-post": "Erster Beitrag",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "Gratulation, Du hast erfolgreich **Bludit** installiert!",
|
||||
"whats-next": "Und so geht es weiter;",
|
||||
"manage-your-bludit-from-the-admin-panel": "Verwalte Bludit im [Administrationsbereich](./admin/).",
|
||||
"follow-bludit-on": "Folge Bludit bei",
|
||||
"visit-the-support-forum": "Besuche das [Forum](http://forum.bludit.com), um Hilfe zu erhalten.",
|
||||
"read-the-documentation-for-more-information": "Lies die [Dokumentation](http://docs.bludit.com) für weitere Informationen.",
|
||||
"share-with-your-friends-and-enjoy": "Teile Bludit mit Deinen Freunden und geniesse es.",
|
||||
"the-page-has-not-been-found": "Die Seite wurde nicht gefunden.",
|
||||
"error": "Fehler"
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "English (United State)",
|
||||
"native": "English (United States)",
|
||||
"english-name": "English",
|
||||
"last-update": "2015-06-28",
|
||||
"author": "Diego",
|
||||
|
@ -157,5 +157,10 @@
|
|||
"proceed-anyway": "Proceed anyway!",
|
||||
"drafts":"Drafts",
|
||||
"ip-address-has-been-blocked": "IP address has been blocked.",
|
||||
"try-again-in-a-few-minutes": "Try again in a few minutes."
|
||||
"try-again-in-a-few-minutes": "Try again in a few minutes.",
|
||||
"date": "Date",
|
||||
"you-can-schedule-the-post-just-select-the-date-and-time": "You can schedule the post, just select the date and time.",
|
||||
"scheduled": "Scheduled",
|
||||
"publish": "Publish",
|
||||
"please-check-your-theme-configuration": "Please check your theme configuration."
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Español (España)",
|
||||
"english-name": "Spanish",
|
||||
"last-update": "2015-08-28",
|
||||
"author": "Tak-MK",
|
||||
"email": "snavarrotd {at} gmail {dot} com",
|
||||
"website": "http://sevendats.com"
|
||||
},
|
||||
|
||||
"username": "Nombre de usuario",
|
||||
"password": "Contraseña",
|
||||
"confirm-password": "Confirmar contraseña",
|
||||
"editor": "Editor",
|
||||
"dashboard": "Panel",
|
||||
"role": "Rol",
|
||||
"post": "Post",
|
||||
"posts": "Posts",
|
||||
"users": "Usuarios",
|
||||
"administrator": "Administrador",
|
||||
"add": "Agregar",
|
||||
"cancel": "Cancel",
|
||||
"content": "Contenido",
|
||||
"title": "Título",
|
||||
"no-parent": "Sin padre",
|
||||
"edit-page": "Editar página",
|
||||
"edit-post": "Editar post",
|
||||
"add-a-new-user": "Agregar nuevo usuario",
|
||||
"parent": "Padre",
|
||||
"friendly-url": "URL Amigable",
|
||||
"description": "Descripción",
|
||||
"posted-by": "Publicado por",
|
||||
"tags": "Etiquetas",
|
||||
"position": "Posición",
|
||||
"save": "Guardar",
|
||||
"draft": "Borrador",
|
||||
"delete": "Eliminar",
|
||||
"registered": "Registrado",
|
||||
"Notifications": "Notificaciones",
|
||||
"profile": "Perfil",
|
||||
"email": "Correo electrónico",
|
||||
"settings": "Ajustes",
|
||||
"general": "General",
|
||||
"advanced": "Avanzado",
|
||||
"regional": "Regional",
|
||||
"about": "Acerca de",
|
||||
"login": "Iniciar sesión",
|
||||
"logout": "Cerrar sesión",
|
||||
"manage": "Administrar",
|
||||
"themes": "Temas",
|
||||
"prev-page": "Pag. anterior",
|
||||
"next-page": "Pag. siguiente",
|
||||
"configure-plugin": "Configurar plugin",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Confirmar eliminación, esta operación no se puede deshacer.",
|
||||
"site-title": "Título del sitio",
|
||||
"site-slogan": "Eslogan del sitio",
|
||||
"site-description": "Descripción del sitio",
|
||||
"footer-text": "Texto de pie de página",
|
||||
"posts-per-page": "Posts por página",
|
||||
"site-url": "URL del sitio",
|
||||
"writting-settings": "Ajustes de redacción",
|
||||
"url-filters": "Filtros URL",
|
||||
"page": "página",
|
||||
"pages": "páginas",
|
||||
"home": "Inicio",
|
||||
"welcome-back": "Bienvenido",
|
||||
"language": "Lenguaje",
|
||||
"website": "Sitio web",
|
||||
"timezone": "Zona horaria",
|
||||
"locale": "Codificación",
|
||||
"new-post": "Nuevo post",
|
||||
"new-page": "Nueva página",
|
||||
"html-and-markdown-code-supported": "Código HTML y Markdown soportado",
|
||||
"manage-posts": "Administrar posts",
|
||||
"published-date": "Fecha de publicación",
|
||||
"modified-date": "Fecha de modificación",
|
||||
"empty-title": "Título vacío",
|
||||
"plugins": "Plugins",
|
||||
"install-plugin": "Instalar plugin",
|
||||
"uninstall-plugin": "Desinstalar plugin",
|
||||
"new-password": "Nueva contraseña",
|
||||
"edit-user": "Editar usuario",
|
||||
"publish-now": "Publicar",
|
||||
"first-name": "Nombre",
|
||||
"last-name": "Apellido",
|
||||
"bludit-version": "Bludit versión",
|
||||
"powered-by": "Corriendo con",
|
||||
"recent-posts": "Posts recientes",
|
||||
"manage-pages": "Administrar páginas",
|
||||
"advanced-options": "Opciones avanzadas",
|
||||
"user-deleted": "Usuario eliminado",
|
||||
"page-added-successfully": "Página agregada con éxito",
|
||||
"post-added-successfully": "Post agregado con éxito ",
|
||||
"the-post-has-been-deleted-successfully": "El post ha sido eliminado con éxito",
|
||||
"the-page-has-been-deleted-successfully": "La página ha sido eliminada con éxito",
|
||||
"username-or-password-incorrect": "Nombre de usuario o contraseña incorrectos",
|
||||
"database-regenerated": "Base de datos regenerada",
|
||||
"the-changes-have-been-saved": "Los cambios han sido guardados",
|
||||
"enable-more-features-at": "Habilitar más funciones en",
|
||||
"username-already-exists": "El nombre de usuario ya existe",
|
||||
"username-field-is-empty": "El campo nombre de usuario esta vacío",
|
||||
"the-password-and-confirmation-password-do-not-match": "Las contraseñas no coinciden",
|
||||
"user-has-been-added-successfully": "El usuario ha sido creado con éxito",
|
||||
"you-do-not-have-sufficient-permissions": "No tiene suficientes permisos para acceder a esta página, contacta con el administrador.",
|
||||
"settings-advanced-writting-settings": "Ajustes->Avanzado->Ajustes de redacción",
|
||||
"new-posts-and-pages-synchronized": "Nuevos posts y páginas sincronizados.",
|
||||
"you-can-choose-the-users-privilege": "Puede elegir los privilegios del usuario. El rol editor solo puede redactar páginas y post.",
|
||||
"email-will-not-be-publicly-displayed": "El correo electrónico no será visible. Recomendado para recuperar la contraseña y notificaciones.",
|
||||
"use-this-field-to-name-your-site": "Utilice este campo para nombrar su sitio, aparecerá en la parte superior de cada página de su sitio.",
|
||||
"use-this-field-to-add-a-catchy-phrase": "Utilice este campo para agregar un slogan a su sitio.",
|
||||
"you-can-add-a-site-description-to-provide": "Puede agregar una descripción del sitio para proporcionar una breve biografía o descripción de su sitio.",
|
||||
"you-can-add-a-small-text-on-the-bottom": "Puede agregar un pequeño texto en el pie de página. ej: copyright, autor, fechas, etc.",
|
||||
"number-of-posts-to-show-per-page": "Numero de posts a mostrar por página.",
|
||||
"the-url-of-your-site": "URL de su sitio.",
|
||||
"add-or-edit-description-tags-or": "Agregar o editar la descripción, tags y modificar la URL amigable.",
|
||||
"select-your-sites-language": "Seleccione el lenguaje de su sitio.",
|
||||
"select-a-timezone-for-a-correct": "Seleccione la zona horaria para una correcta visualización de las fechas.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Puede utilizar este campo para definir un conjunto de parámetros relacionados con el idioma, país y preferencias especiales.",
|
||||
"you-can-modify-the-url-which-identifies": "Puede modificar la dirección URL que identifica una página o post usando palabras clave legible. No más de 150 caracteres.",
|
||||
"this-field-can-help-describe-the-content": "Este campo puede ayudar a describir el contenido en pocas palabras. No más de 150 caracteres.",
|
||||
"write-the-tags-separeted-by-comma": "Escribir los tags separados por comas. ej: tag1, tag2, tag3",
|
||||
"delete-the-user-and-all-its-posts": "Eliminar el usuario y sus posts",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "Eliminar el usuario y asociar los posts al usuario admin",
|
||||
"read-more": "Leer más",
|
||||
"show-blog": "Mostrar blog",
|
||||
"default-home-page": "página de inicio predeterminada",
|
||||
"version": "Versión",
|
||||
"there-are-no-drafts": "No hay borradores",
|
||||
"create-a-new-article-for-your-blog":"Crear un nuevo artículo para su blog.",
|
||||
"create-a-new-page-for-your-website":"Crear una nueva página para su sitio web.",
|
||||
"invite-a-friend-to-collaborate-on-your-website":"Invite a un amigo para colaborar en el sitio web.",
|
||||
"change-your-language-and-region-settings":"Cambiar la configuración de idioma y región.",
|
||||
"language-and-timezone":"Idioma y zona horaria",
|
||||
"author": "Autor",
|
||||
"start-here": "Comience aquí",
|
||||
"install-theme": "Instalar tema",
|
||||
"first-post": "Primer post",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "Felicitación, usted ha instalado **Bludit** exitosamente",
|
||||
"whats-next": "Siguientes pasos",
|
||||
"manage-your-bludit-from-the-admin-panel": "Administre su Bludit desde el [panel de administración](./admin/)",
|
||||
"follow-bludit-on": "Siga Bludit en",
|
||||
"visit-the-support-forum": "Visite el [foro](http://forum.bludit.com) para soporte",
|
||||
"read-the-documentation-for-more-information": "Lea la [documentación](http://docs.bludit.com) para mas información",
|
||||
"share-with-your-friends-and-enjoy": "Compartí con tus amigos y a disfrutar",
|
||||
"the-page-has-not-been-found": "La página no fue encontrada.",
|
||||
"error": "Error",
|
||||
"bludit-installer": "Instalador de Bludit",
|
||||
"welcome-to-the-bludit-installer": "Bienvenido al asistente para la instalación de Bludit",
|
||||
"complete-the-form-choose-a-password-for-the-username-admin": "Complete el formulario y elija una contraseña para el usuario « admin »",
|
||||
"password-visible-field": "Contraseña, ¡este campo es visible!",
|
||||
"install": "Instalar",
|
||||
"the-password-field-is-empty": "Debe completar el campo contraseña",
|
||||
"your-email-address-is-invalid":"Su dirección de correo es inválida.",
|
||||
"proceed-anyway": "¡Continuar de todas formas!",
|
||||
"drafts":"Borradores",
|
||||
"ip-address-has-been-blocked":"La dirección IP fue bloqueada.",
|
||||
"try-again-in-a-few-minutes": "Vuelva a intentar en unos minutos."
|
||||
}
|
|
@ -47,7 +47,6 @@
|
|||
"about": "Acerca de...",
|
||||
"login": "Ingresar",
|
||||
"logout": "Salir",
|
||||
"dasbhoard": "Dasbhoard",
|
||||
"manage": "Administrar",
|
||||
"themes": "Temas",
|
||||
"prev-page": "Página Anterior",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
"native": "Français (France)",
|
||||
"english-name": "French",
|
||||
"last-update": "2015-08-02",
|
||||
"last-update": "2015-08-29",
|
||||
"author": "Fred",
|
||||
"email": "",
|
||||
"website": ""
|
||||
|
@ -149,5 +149,18 @@
|
|||
"welcome-to-the-bludit-installer": "Bienvenue dans l’assistant d’installation de Bludit",
|
||||
"complete-the-form-choose-a-password-for-the-username-admin": "Complétez le formulaire et choisissez un mot de passe pour l’utilisateur « admin »",
|
||||
"password-visible-field": "Mot de passe, champ visible !",
|
||||
"install": "Installer"
|
||||
"install": "Installer",
|
||||
"choose-your-language": "Sélectionnez votre langue",
|
||||
"next": "Suivant",
|
||||
"the-password-field-is-empty": "Le champ du mot de passe est vide",
|
||||
"your-email-address-is-invalid":"Votre adresse e-mail est invalide.",
|
||||
"proceed-anyway": "Continuer malgré tout !",
|
||||
"drafts": "En attente de publication",
|
||||
"ip-address-has-been-blocked": "Votre adresse IP a été bloquée.",
|
||||
"try-again-in-a-few-minutes": "Essayez de nouveau dans quelques minutes.",
|
||||
"date": "Date",
|
||||
"you-can-schedule-the-post-just-select-the-date-and-time": "Vous pouvez planifier une date de publication de vos articles, il suffit de sélectionner la date et l’heure dans le calendrier qui s’ouvre en pop-up.",
|
||||
"scheduled": "Planification",
|
||||
"publish": "Publier",
|
||||
"please-check-your-theme-configuration": "Veuillez vérifier la configuration de votre thème."
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
{
|
||||
"language-data":
|
||||
{
|
||||
"native": "Polish - Polski",
|
||||
"english-name": "Polish",
|
||||
"last-update": "2015-09-04",
|
||||
"author": "tom-asz",
|
||||
"email": "",
|
||||
"website": "tomektutoria.eu"
|
||||
},
|
||||
|
||||
"username": "Użytkownik",
|
||||
"password": "Hasło",
|
||||
"confirm-password": "Potwierdź hasło",
|
||||
"editor": "Edytor",
|
||||
"dashboard": "Pulpit nawigacyjny",
|
||||
"role": "Rola",
|
||||
"post": "Post",
|
||||
"posts": "Posty",
|
||||
"users": "Użytkownicy",
|
||||
"administrator": "Administrator",
|
||||
"add": "Dodaj",
|
||||
"cancel": "Anuluj",
|
||||
"content": "Zawartość",
|
||||
"title": "Tytuł",
|
||||
"no-parent": "Bez rodzica",
|
||||
"edit-page": "Edytuj stronę",
|
||||
"edit-post": "Edytuj post",
|
||||
"add-a-new-user": "Dodaj nowego użytkownika",
|
||||
"parent": "Rodzic",
|
||||
"friendly-url": "Przyjazny URL",
|
||||
"description": "Opis",
|
||||
"posted-by": "Napisane przez",
|
||||
"tags": "Tagi",
|
||||
"position": "Pozycja",
|
||||
"save": "Zapisz",
|
||||
"draft": "Projekt",
|
||||
"delete": "Usuń",
|
||||
"registered": "Zarejestrowany",
|
||||
"Notifications": "Powiadomienia",
|
||||
"profile": "Profil",
|
||||
"email": "Email",
|
||||
"settings": "Ustawienia",
|
||||
"general": "Ogólne",
|
||||
"advanced": "Zaawansowane",
|
||||
"regional": "Regionalne",
|
||||
"about": "O nas",
|
||||
"login": "Zaloguj",
|
||||
"logout": "Wyloguj",
|
||||
"manage": "Zarządzaj",
|
||||
"themes": "Motywy",
|
||||
"prev-page": "Poprzednia strona",
|
||||
"next-page": "Następna strona",
|
||||
"configure-plugin": "Skonfiguruj plugin",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Potwierdź usunięcie, czynność ta nie może być cofnięta.",
|
||||
"site-title": "Nazwa strony",
|
||||
"site-slogan": "Slogan strony",
|
||||
"site-description": "Opis strony",
|
||||
"footer-text": "Tekst w stopce",
|
||||
"posts-per-page": "Posty na stronie:",
|
||||
"site-url": "Adres strony",
|
||||
"writting-settings": "Ustawienie pisania",
|
||||
"url-filters": "Filtr URL",
|
||||
"page": "Strona",
|
||||
"pages": "Strony",
|
||||
"home": "Home",
|
||||
"welcome-back": "Witaj ponownie",
|
||||
"language": "Język",
|
||||
"website": "Strona WWW",
|
||||
"timezone": "Strefa czasowa",
|
||||
"locale": "Ustawienia regionalne",
|
||||
"new-post": "Nowy post",
|
||||
"html-and-markdown-code-supported": "Kod HTML i Markdown obsługiwany",
|
||||
"new-page": "Nowa strona",
|
||||
"manage-posts": "Zarządzaj postami",
|
||||
"published-date": "Data opublikowania",
|
||||
"modified-date": "Data modyfikacji",
|
||||
"empty-title": "Brak tytułu",
|
||||
"plugins": "Wtyczki",
|
||||
"install-plugin": "Zainstaluj wtyczkę",
|
||||
"uninstall-plugin": "Odinstaluj wtyczkę",
|
||||
"new-password": "Nowe hasło",
|
||||
"edit-user": "Edycja użytkownika",
|
||||
"publish-now": "Opublikuj teraz",
|
||||
"first-name": "Imię",
|
||||
"last-name": "Nazwisko",
|
||||
"bludit-version": "Wersja Bludit",
|
||||
"powered-by": "Silnik",
|
||||
"recent-posts": "Najnowsze posty",
|
||||
"manage-pages": "Zarządzaj stronami",
|
||||
"advanced-options": "Zaawansowane opcje",
|
||||
"user-deleted": "Użytkownik usunięty",
|
||||
"page-added-successfully": "Strona dodany pomyślnie",
|
||||
"post-added-successfully": "Post dodany pomyślnie",
|
||||
"the-post-has-been-deleted-successfully": "Post został pomyślnie usunięty",
|
||||
"the-page-has-been-deleted-successfully": "Strona została pomyślnie usunięta",
|
||||
"username-or-password-incorrect": "Nazwa użytkownika lub hasło nieprawidłowe",
|
||||
"database-regenerated": "Baza danych regenerowana",
|
||||
"the-changes-have-been-saved": "Zmiany zostały zapisane",
|
||||
"enable-more-features-at": "Włącz więcej funkcji w",
|
||||
"username-already-exists": "Nazwa użytkownika już istnieje",
|
||||
"username-field-is-empty": "Pole nazwa użytkownika jest puste",
|
||||
"the-password-and-confirmation-password-do-not-match":"Hasło i potwierdzenie hasła nie pasują do siebie",
|
||||
"user-has-been-added-successfully": "Użytkownik został dodany pomyślnie",
|
||||
"you-do-not-have-sufficient-permissions": "Nie masz wystarczających uprawnień dostępu do tej strony, skontaktuj się z administratorem.",
|
||||
"settings-advanced-writting-settings": "Ustawienia->Zaawansowane->Ustawienia pisania",
|
||||
"new-posts-and-pages-synchronized": "Nowe posty i strony zsynchronizowane.",
|
||||
"you-can-choose-the-users-privilege": "Możesz wybrać przywilej użytkownika. Edytor może tylko pisać strony i posty.",
|
||||
"email-will-not-be-publicly-displayed": "E-mail nie będzie wyświetlany publicznie. Zalecany dla odzyskiwania hasła i powiadomień.",
|
||||
"use-this-field-to-name-your-site": "Pole to służy do nazwy witryny, pojawi się na górze każdej stronie.",
|
||||
"use-this-field-to-add-a-catchy-phrase": "Pole to służy do dodawania chwytliwego tytułu na swojej stronie.",
|
||||
"you-can-add-a-site-description-to-provide": "Możesz dodać opis witryny, aby zapewnić krótki życiorys lub opis swojej strony.",
|
||||
"you-can-add-a-small-text-on-the-bottom": "Możesz dodać mały tekst na dole każdej strony. np: prawo autorskie, właściciel, daty, itp",
|
||||
"number-of-posts-to-show-per-page": "Wyświetlana iczba postów na stronie.",
|
||||
"the-url-of-your-site": "Adres URL witryny.",
|
||||
"add-or-edit-description-tags-or": "Dodać lub edytować opis, tagi lub zmodyfikować przyjazne URL.",
|
||||
"select-your-sites-language": "Wybierz język witryny.",
|
||||
"select-a-timezone-for-a-correct": "Wybierz strefę czasową, dla prawidłowego wyświetlania data / czas na swojej stronie.",
|
||||
"you-can-use-this-field-to-define-a-set-of": "Możesz użyć tego pola, aby zdefiniować zestaw parametrów związanych z językiem, kraju i szczególnych preferencji.",
|
||||
"you-can-modify-the-url-which-identifies":"Możesz zmienić adres URL, który identyfikuje stronę lub pisać przy użyciu słów kluczowych w postaci czytelnej dla człowieka. Nie więcej niż 150 znaków.",
|
||||
"this-field-can-help-describe-the-content": "To pole może pomóc opisać zawartość w kilku słowach. Nie więcej niż 150 znaków.",
|
||||
"write-the-tags-separeted-by-comma": "Napisz tagi oddzielając je przecinkami np: tag1, tag2, tag3",
|
||||
"delete-the-user-and-all-its-posts":"Usuń użytkownika i wszystkich jego posty",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "Usuń użytkownika i powiązać jego posty do użytkownika administratora",
|
||||
"read-more": "Więcej",
|
||||
"show-blog": "Zobacz blog",
|
||||
"default-home-page": "Domyślna strona główna",
|
||||
"version": "Wersja",
|
||||
"there-are-no-drafts": "Brak projektów.",
|
||||
"create-a-new-article-for-your-blog":"Utwórz nowy artykuł na swoim blogu.",
|
||||
"create-a-new-page-for-your-website":"Tworzenie nowej strony na swojej stronie internetowej.",
|
||||
"invite-a-friend-to-collaborate-on-your-website":"Zaproś przyjaciół do współpracy na swojej stronie internetowej.",
|
||||
"change-your-language-and-region-settings":"Zmień ustawienia języka i regionu.",
|
||||
"language-and-timezone":"Język i strefa czasowa",
|
||||
"author": "Autor",
|
||||
"start-here": "Zacznij tutaj",
|
||||
"install-theme": "Zainstaluj motyw",
|
||||
"first-post": "Pierwszy post",
|
||||
"congratulations-you-have-successfully-installed-your-bludit": "Gratulacje pomyślnie zainstalowano **Bludit**",
|
||||
"whats-next": "Co dalej",
|
||||
"manage-your-bludit-from-the-admin-panel": "Zarządzaj Bludit z [obszaru administracyjnego](./admin/)",
|
||||
"follow-bludit-on": "Śledź Bludit na",
|
||||
"visit-the-support-forum": "Odwiedź [forum](http://forum.bludit.com) wsparcia",
|
||||
"read-the-documentation-for-more-information": "Przeczytaj [dokumentację](http://docs.bludit.com) po więcej informacji",
|
||||
"share-with-your-friends-and-enjoy": "Podziel się z przyjaciółmi i ciesz się z Bludit",
|
||||
"the-page-has-not-been-found": "Strona nie została odnaleziona.",
|
||||
"error": "Błąd",
|
||||
"bludit-installer": "Bludit Instalator",
|
||||
"welcome-to-the-bludit-installer": "Zapraszamy do instalatora Bludit",
|
||||
"complete-the-form-choose-a-password-for-the-username-admin": "Wpisz hasło dla użytkownika « admin »",
|
||||
"password-visible-field": "Hasło, widoczne pola!",
|
||||
"install": "Instaluj",
|
||||
"choose-your-language": "Wybierz język",
|
||||
"next": "Dalej",
|
||||
"the-password-field-is-empty": "Pole hasło jest puste",
|
||||
"your-email-address-is-invalid":"Twój adres e-mail jest nieprawidłowy.",
|
||||
"proceed-anyway": "Kontynuuj mimo to!",
|
||||
"drafts":"Projekt",
|
||||
"ip-address-has-been-blocked": "Adres IP został zablokowany.",
|
||||
"try-again-in-a-few-minutes": "Spróbuj ponownie za kilka minut.",
|
||||
"date": "Data",
|
||||
"you-can-schedule-the-post-just-select-the-date-and-time": "Możesz zaplanować post, po prostu wybierz datę i czas.",
|
||||
"scheduled": "Zaplanowane",
|
||||
"publish": "Opublikuj",
|
||||
"please-check-your-theme-configuration": "Proszę sprawdzić konfigurację szablonu"
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Disqus système de commentaire",
|
||||
"description": "Disqus est un service Web de discussion et de commentaires d'articles centralisé avec authentification unique. Il est nécessaire de s’inscrire sur Disqus.com avant d’utiliser ce plugin.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "http://www.bludit.com",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-02"
|
||||
},
|
||||
"disqus-shortname": "Votre ID Disqus",
|
||||
"enable-disqus-on-pages": "Activer Disqus sur les pages",
|
||||
"enable-disqus-on-posts": "Activer Disqus sur les articles",
|
||||
"enable-disqus-on-default-home-page": "Activer Disqus sur la page d’accueil"
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Mode de Maintenance",
|
||||
"description": "Configurer votre site sur le mode de maintenance, vous pouvez accéder à la zone d'administration.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "http://www.bludit.com",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-02"
|
||||
},
|
||||
|
||||
"enable-maintence-mode": "Activer le mode de maintence",
|
||||
"message": "Message"
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Open Graph",
|
||||
"description": "Permets à n’importe quelle page web de devenir l’objet enrichi d’un graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que n’importe quel autre objet sur Facebook.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "http://www.bludit.com",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-02"
|
||||
}
|
||||
}
|
|
@ -31,10 +31,17 @@ class pluginPages extends Plugin {
|
|||
{
|
||||
global $Language;
|
||||
global $pagesParents;
|
||||
global $Site;
|
||||
global $Site, $Url;
|
||||
$home = $Url->whereAmI()==='home';
|
||||
|
||||
$html = '<div class="plugin plugin-pages">';
|
||||
$html .= '<h2>'.$this->getDbField('label').'</h2>';
|
||||
|
||||
// If the label is not empty, print it.
|
||||
$label = $this->getDbField('label');
|
||||
if( !empty($label) ) {
|
||||
$html .= '<h2>'.$label.'</h2>';
|
||||
}
|
||||
|
||||
$html .= '<div class="plugin-content">';
|
||||
|
||||
$parents = $pagesParents[NO_PARENT_CHAR];
|
||||
|
@ -42,15 +49,17 @@ class pluginPages extends Plugin {
|
|||
$html .= '<ul>';
|
||||
|
||||
if($this->getDbField('homeLink')) {
|
||||
$html .= '<li><a class="parent" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a></li>';
|
||||
$current = ($Site->homeLink()==$home) ? ' class="active"' : '';
|
||||
$html .= '<li' .$current. '><a class="parent" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a></li>';
|
||||
}
|
||||
|
||||
foreach($parents as $parent)
|
||||
{
|
||||
//if($Site->homepage()!==$parent->key())
|
||||
{
|
||||
$current_parent = ($parent->slug()==$Url->slug()) ? ' class="active"' : '';
|
||||
// Print the parent
|
||||
$html .= '<li><a class="parent" href="'.$parent->permalink().'">'.$parent->title().'</a>';
|
||||
$html .= '<li' .$current_parent. '><a class="parent" href="'.$parent->permalink().'">'.$parent->title().'</a>';
|
||||
|
||||
// Check if the parent has children
|
||||
if(isset($pagesParents[$parent->key()]))
|
||||
|
@ -61,7 +70,8 @@ class pluginPages extends Plugin {
|
|||
$html .= '<ul>';
|
||||
foreach($children as $child)
|
||||
{
|
||||
$html .= '<li><a class="children" href="'.$child->permalink().'">'.$child->title().'</a></li>';
|
||||
$current_child = ($child->slug()==$Url->slug()) ? ' class="active"' : '';
|
||||
$html .= '<li' .$current_child. '><a class="children" href="'.$child->permalink().'">'.$child->title().'</a></li>';
|
||||
}
|
||||
$html .= '</ul>';
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "SimpleMDE",
|
||||
"description": "A simple, beautiful, and embeddable JavaScript markdown editor.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-27"
|
||||
},
|
||||
"toolbar": "Toolbar",
|
||||
"tab-size": "Tab size"
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "SimpleMDE",
|
||||
"description": "Simple, facil y hermoso editor Markdown.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-27"
|
||||
},
|
||||
"toolbar": "Barra de herramientas",
|
||||
"tab-size": "Tamaño de la tabulación"
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "SimpleMDE",
|
||||
"description": "Un éditeur Markdown en JavaScript simple, beau, et intégrable.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-27"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
|
||||
class pluginsimpleMDE extends Plugin {
|
||||
|
||||
private $loadWhenController = array(
|
||||
'new-post',
|
||||
'new-page',
|
||||
'edit-post',
|
||||
'edit-page'
|
||||
);
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'tabSize'=>'2',
|
||||
'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen", "guide"'
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Toolbar').'</label>';
|
||||
$html .= '<input name="toolbar" id="jstoolbar" type="text" value="'.$this->getDbField('toolbar').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$Language->get('Tab size').'</label>';
|
||||
$html .= '<input name="tabSize" id="jstabSize" type="text" value="'.$this->getDbField('tabSize').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function adminHead()
|
||||
{
|
||||
global $layout;
|
||||
|
||||
$html = '';
|
||||
|
||||
// Load CSS and JS only on Controllers in array.
|
||||
if(in_array($layout['controller'], $this->loadWhenController))
|
||||
{
|
||||
// Path plugin.
|
||||
$pluginPath = $this->htmlPath();
|
||||
|
||||
// Load CSS
|
||||
$html .= '<link rel="stylesheet" href="'.$pluginPath.'css/simplemde.min.css">';
|
||||
|
||||
// Load Javascript
|
||||
$html .= '<script src="'.$pluginPath.'js/simplemde.min.js"></script>';
|
||||
|
||||
// Hack for Bludit
|
||||
$html .= '<style>
|
||||
.editor-toolbar::before { margin-bottom: 2px !important }
|
||||
.editor-toolbar::after { margin-top: 2px !important }
|
||||
</style>';
|
||||
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function adminBodyEnd()
|
||||
{
|
||||
global $layout;
|
||||
|
||||
$html = '';
|
||||
|
||||
// Load CSS and JS only on Controllers in array.
|
||||
if(in_array($layout['controller'], $this->loadWhenController))
|
||||
{
|
||||
$pluginPath = $this->htmlPath();
|
||||
|
||||
$html = '<script>$(document).ready(function() { ';
|
||||
$html .=
|
||||
'var simplemde = new SimpleMDE({
|
||||
element: document.getElementById("jscontent"),
|
||||
status: false,
|
||||
toolbarTips: true,
|
||||
toolbarGuideIcon: true,
|
||||
autofocus: false,
|
||||
lineWrapping: true,
|
||||
indentWithTabs: true,
|
||||
tabSize: '.$this->getDbField('tabSize').',
|
||||
spellChecker: false,
|
||||
toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).']
|
||||
});';
|
||||
$html .= '}); </script>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Tinymce",
|
||||
"description": "Tinymce is an easy HTML editor, with many plugins and very customizable.",
|
||||
"name": "Tags list",
|
||||
"description": "Shows all tags.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "http://www.bludit.com",
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Tinymce",
|
||||
"description": "Tinymce es un editor HTML, facilita al usuario crear contenido enriquecido.",
|
||||
"name": "Liste de mots clés",
|
||||
"description": "Affiche la lise de tous les mots clés.",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "http://www.bludit.com",
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
class pluginTags extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'label'=>'Tags'
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>Plugin label</label>';
|
||||
$html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteSidebar()
|
||||
{
|
||||
global $Language;
|
||||
global $dbTags;
|
||||
global $Url;
|
||||
|
||||
$db = $dbTags->db['postsIndex'];
|
||||
$filter = $Url->filters('tag');
|
||||
|
||||
$html = '<div class="plugin plugin-tags">';
|
||||
$html .= '<h2>'.$this->getDbField('label').'</h2>';
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<ul>';
|
||||
|
||||
foreach($db as $tagKey=>$fields)
|
||||
{
|
||||
$count = $dbTags->countPostsByTag($tagKey);
|
||||
|
||||
// Print the parent
|
||||
$html .= '<li><a href="'.HTML_PATH_ROOT.$filter.'/'.$tagKey.'">'.$fields['name'].' ('.$count.')</a></li>';
|
||||
}
|
||||
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
body {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
*:first-child {
|
||||
margin-top: 0;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Tinymce",
|
||||
"description": "Tinymce是一個簡單易使用的HTML編輯器,有著非常多的延伸模組與高自訂性",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "http://www.bludit.com",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-02"
|
||||
}
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
<?php
|
||||
|
||||
class pluginTinymce extends Plugin {
|
||||
|
||||
private $loadWhenController = array(
|
||||
'new-post',
|
||||
'new-page',
|
||||
'edit-post',
|
||||
'edit-page'
|
||||
);
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'plugins'=>'autoresize, fullscreen, pagebreak, link, textcolor, code',
|
||||
'toolbar'=>'bold italic underline strikethrough | alignleft aligncenter alignright | bullist numlist | styleselect | link forecolor backcolor removeformat | pagebreak code fullscreen'
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>Tinymce plugins</label>';
|
||||
$html .= '<input name="plugins" id="jsplugins" type="text" value="'.$this->getDbField('plugins').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Tinymce toolbar</label>';
|
||||
$html .= '<input name="toolbar" id="jstoolbar" type="text" value="'.$this->getDbField('toolbar').'">';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function adminHead()
|
||||
{
|
||||
global $Language;
|
||||
global $Site;
|
||||
global $layout;
|
||||
|
||||
$html = '';
|
||||
|
||||
// Load CSS and JS only on Controllers in array.
|
||||
if(in_array($layout['controller'], $this->loadWhenController))
|
||||
{
|
||||
$language = $Site->shortLanguage();
|
||||
$pluginPath = $this->htmlPath();
|
||||
|
||||
$html = '<script src="'.$pluginPath.'tinymce/tinymce.min.js"></script>';
|
||||
$html .= '<script src="'.$pluginPath.'tinymce/jquery.tinymce.min.js"></script>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function adminBodyEnd()
|
||||
{
|
||||
global $Language;
|
||||
global $Site;
|
||||
global $layout;
|
||||
|
||||
$html = '';
|
||||
|
||||
// Load CSS and JS only on Controllers in array.
|
||||
if(in_array($layout['controller'], $this->loadWhenController))
|
||||
{
|
||||
$language = $Site->shortLanguage();
|
||||
$pluginPath = $this->htmlPath();
|
||||
|
||||
$html = '<script>$(document).ready(function() { ';
|
||||
$html .= '$("#jscontent").tinymce({
|
||||
plugins: "'.$this->getDbField('plugins').'",
|
||||
toolbar: "'.$this->getDbField('toolbar').'",
|
||||
content_css: "'.$pluginPath.'css/editor.css",
|
||||
theme: "modern",
|
||||
height:"400px",
|
||||
width:"80%",
|
||||
statusbar: false,
|
||||
menubar:false,
|
||||
browser_spellcheck: true,
|
||||
autoresize_bottom_margin: "50",
|
||||
pagebreak_separator: "'.PAGE_BREAK.'",
|
||||
paste_as_text: true,
|
||||
document_base_url: "'.HTML_PATH_UPLOADS.'"
|
||||
})';
|
||||
$html .= '}); </script>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
!function(a){function b(){function b(a){"remove"===a&&this.each(function(a,b){var c=e(b);c&&c.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=tinymce.get(b.id.replace(/_parent$/,""));c&&c.remove()})}function d(a){var c,d=this;if(null!=a)b.call(d),d.each(function(b,c){var d;(d=tinymce.get(c.id))&&d.setContent(a)});else if(d.length>0&&(c=tinymce.get(d[0].id)))return c.getContent()}function e(a){var b=null;return a&&a.id&&g.tinymce&&(b=tinymce.get(a.id)),b}function f(a){return!!(a&&a.length&&g.tinymce&&a.is(":tinymce"))}var h={};a.each(["text","html","val"],function(b,g){var i=h[g]=a.fn[g],j="text"===g;a.fn[g]=function(b){var g=this;if(!f(g))return i.apply(g,arguments);if(b!==c)return d.call(g.filter(":tinymce"),b),i.apply(g.not(":tinymce"),arguments),g;var h="",k=arguments;return(j?g:g.eq(0)).each(function(b,c){var d=e(c);h+=d?j?d.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):d.getContent({save:!0}):i.apply(a(c),k)}),h}}),a.each(["append","prepend"],function(b,d){var g=h[d]=a.fn[d],i="prepend"===d;a.fn[d]=function(a){var b=this;return f(b)?a!==c?("string"==typeof a&&b.filter(":tinymce").each(function(b,c){var d=e(c);d&&d.setContent(i?a+d.getContent():d.getContent()+a)}),g.apply(b.not(":tinymce"),arguments),b):void 0:g.apply(b,arguments)}}),a.each(["remove","replaceWith","replaceAll","empty"],function(c,d){var e=h[d]=a.fn[d];a.fn[d]=function(){return b.call(this,d),e.apply(this,arguments)}}),h.attr=a.fn.attr,a.fn.attr=function(b,g){var i=this,j=arguments;if(!b||"value"!==b||!f(i))return g!==c?h.attr.apply(i,j):h.attr.apply(i,j);if(g!==c)return d.call(i.filter(":tinymce"),g),h.attr.apply(i.not(":tinymce"),j),i;var k=i[0],l=e(k);return l?l.getContent({save:!0}):h.attr.apply(a(k),j)}}var c,d,e,f=[],g=window;a.fn.tinymce=function(c){function h(){var d=[],f=0;e||(b(),e=!0),l.each(function(a,b){var e,g=b.id,h=c.oninit;g||(b.id=g=tinymce.DOM.uniqueId()),tinymce.get(g)||(e=new tinymce.Editor(g,c,tinymce.EditorManager),d.push(e),e.on("init",function(){var a,b=h;l.css("visibility",""),h&&++f==d.length&&("string"==typeof b&&(a=-1===b.indexOf(".")?null:tinymce.resolve(b.replace(/\.\w+$/,"")),b=tinymce.resolve(b)),b.apply(a||tinymce,d))}))}),a.each(d,function(a,b){b.render()})}var i,j,k,l=this,m="";if(!l.length)return l;if(!c)return window.tinymce?tinymce.get(l[0].id):null;if(l.css("visibility","hidden"),g.tinymce||d||!(i=c.script_url))1===d?f.push(h):h();else{d=1,j=i.substring(0,i.lastIndexOf("/")),-1!=i.indexOf(".min")&&(m=".min"),g.tinymce=g.tinyMCEPreInit||{base:j,suffix:m},-1!=i.indexOf("gzip")&&(k=c.language||"en",i=i+(/\?/.test(i)?"&":"?")+"js=true&core=true&suffix="+escape(m)+"&themes="+escape(c.theme||"modern")+"&plugins="+escape(c.plugins||"")+"&languages="+(k||""),g.tinyMCE_GZ||(g.tinyMCE_GZ={start:function(){function b(a){tinymce.ScriptLoader.markDone(tinymce.baseURI.toAbsolute(a))}b("langs/"+k+".js"),b("themes/"+c.theme+"/theme"+m+".js"),b("themes/"+c.theme+"/langs/"+k+".js"),a.each(c.plugins.split(","),function(a,c){c&&(b("plugins/"+c+"/plugin"+m+".js"),b("plugins/"+c+"/langs/"+k+".js"))})},end:function(){}}));var n=document.createElement("script");n.type="text/javascript",n.onload=n.onreadystatechange=function(b){b=b||window.event,2===d||"load"!=b.type&&!/complete|loaded/.test(n.readyState)||(tinymce.dom.Event.domLoaded=1,d=2,c.script_loaded&&c.script_loaded(),h(),a.each(f,function(a,b){b()}))},n.src=i,document.body.appendChild(n)}return l},a.extend(a.expr[":"],{tinymce:function(a){var b;return a.id&&"tinymce"in window&&(b=tinymce.get(a.id),b&&b.editorManager===tinymce)?!0:!1}})}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;d=e.getParent(f.getNode(),"ol,ul"),d&&d.nodeName==b&&c!==!1||a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList"),c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})});
|
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="";"A"==b.tagName&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(b){a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:b.data.name}))}})}a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})});
|
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("autolink",function(a){function b(a){e(a,-1,"(",!0)}function c(a){e(a,0,"",!0)}function d(a){e(a,-1,"",!1)}function e(a,b,c){function d(a,b){if(0>b&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,h,i,j,k,l,m,n,o,p;if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(n=g.endContainer.previousSibling,!n){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;n=g.endContainer.firstChild.nextSibling}if(o=n.length,e(n,o),f(n,o),g.endOffset<5)return;h=g.endOffset,j=n}else{if(j=g.endContainer,3!=j.nodeType&&j.firstChild){for(;3!=j.nodeType&&j.firstChild;)j=j.firstChild;3==j.nodeType&&(e(j,0),f(j,j.nodeValue.length))}h=1==g.endOffset?2:g.endOffset-1-b}i=h;do e(j,h>=2?h-2:0),f(j,h>=1?h-1:0),h-=1,p=g.toString();while(" "!=p&&""!==p&&160!=p.charCodeAt(0)&&h-2>=0&&p!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(j,h),f(j,i),h+=1):0===g.startOffset?(e(j,0),f(j,i)):(e(j,h),f(j,i)),l=g.toString(),"."==l.charAt(l.length-1)&&f(j,i-1),l=g.toString(),m=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),m&&("www."==m[1]?m[1]="http://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),k=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,m[1]+m[2]),a.selection.moveToBookmark(k),a.nodeChanged())}var f;return a.on("keydown",function(b){return 13==b.keyCode?d(a):void 0}),tinymce.Env.ie?void a.on("focus",function(){if(!f){f=!0;try{a.execCommand("AutoUrlDetect",!1,!0)}catch(b){}}}):(a.on("keypress",function(c){return 41==c.keyCode?b(a):void 0}),void a.on("keyup",function(b){return 32==b.keyCode?c(a):void 0}))});
|
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("autoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(d){var g,h,i,j,k,l,m,n,o,p,q,r,s=tinymce.DOM;if(h=a.getDoc()){if(i=h.body,j=h.documentElement,k=e.autoresize_min_height,!i||d&&"setcontent"===d.type&&d.initial||b())return void(i&&j&&(i.style.overflowY="auto",j.style.overflowY="auto"));m=a.dom.getStyle(i,"margin-top",!0),n=a.dom.getStyle(i,"margin-bottom",!0),o=a.dom.getStyle(i,"padding-top",!0),p=a.dom.getStyle(i,"padding-bottom",!0),q=a.dom.getStyle(i,"border-top-width",!0),r=a.dom.getStyle(i,"border-bottom-width",!0),l=i.offsetHeight+parseInt(m,10)+parseInt(n,10)+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10),(isNaN(l)||0>=l)&&(l=tinymce.Env.ie?i.scrollHeight:tinymce.Env.webkit&&0===i.clientHeight?0:i.offsetHeight),l>e.autoresize_min_height&&(k=l),e.autoresize_max_height&&l>e.autoresize_max_height?(k=e.autoresize_max_height,i.style.overflowY="auto",j.style.overflowY="auto"):(i.style.overflowY="hidden",j.style.overflowY="hidden",i.scrollTop=0),k!==f&&(g=k-f,s.setStyle(a.iframeElement,"height",k+"px"),f=k,tinymce.isWebKit&&0>g&&c(d))}}function d(a,b,e){setTimeout(function(){c({}),a--?d(a,b,e):e&&e()},b)}var e=a.settings,f=0;a.settings.inline||(e.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),e.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",c),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){d(20,100,function(){d(5,1e3)})}),a.addCommand("mceAutoResize",c))});
|
|
@ -1 +0,0 @@
|
|||
tinymce._beforeUnloadHandler=function(){var a;return tinymce.each(tinymce.editors,function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&b.getParam("autosave_ask_before_unload",!0)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a},tinymce.PluginManager.add("autosave",function(a){function b(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function c(){var a=parseInt(n.getItem(k+"time"),10)||0;return(new Date).getTime()-a>m.autosave_retention?(d(!1),!1):!0}function d(b){n.removeItem(k+"draft"),n.removeItem(k+"time"),b!==!1&&a.fire("RemoveDraft")}function e(){!j()&&a.isDirty()&&(n.setItem(k+"draft",a.getContent({format:"raw",no_events:!0})),n.setItem(k+"time",(new Date).getTime()),a.fire("StoreDraft"))}function f(){c()&&(a.setContent(n.getItem(k+"draft"),{format:"raw"}),a.fire("RestoreDraft"))}function g(){l||(setInterval(function(){a.removed||e()},m.autosave_interval),l=!0)}function h(){var b=this;b.disabled(!c()),a.on("StoreDraft RestoreDraft RemoveDraft",function(){b.disabled(!c())}),g()}function i(){a.undoManager.beforeChange(),f(),d(),a.undoManager.add()}function j(b){var c=a.settings.forced_root_block;return b=tinymce.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+c+"[^>]*>((\xa0| |[ ]|<br[^>]*>)+?|)</"+c+">|<br>$","i").test(b)}var k,l,m=a.settings,n=tinymce.util.LocalStorage;k=m.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",k=k.replace(/\{path\}/g,document.location.pathname),k=k.replace(/\{query\}/g,document.location.search),k=k.replace(/\{id\}/g,a.id),m.autosave_interval=b(m.autosave_interval,"30s"),m.autosave_retention=b(m.autosave_retention,"20m"),a.addButton("restoredraft",{title:"Restore last draft",onclick:i,onPostRender:h}),a.addMenuItem("restoredraft",{text:"Restore last draft",onclick:i,onPostRender:h,context:"file"}),a.settings.autosave_restore_when_empty!==!1&&(a.on("init",function(){c()&&j()&&f()}),a.on("saveContent",function(){d()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=c,this.storeDraft=e,this.restoreDraft=f,this.removeDraft=d,this.isEmpty=j});
|
|
@ -1 +0,0 @@
|
|||
!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),b(/<font>(.*?)<\/font>/gi,"$1"),b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),b(/<\/(strong|b)>/gi,"[/b]"),b(/<(strong|b)>/gi,"[b]"),b(/<\/(em|i)>/gi,"[/i]"),b(/<(em|i)>/gi,"[i]"),b(/<\/u>/gi,"[/u]"),b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),b(/<u>/gi,"[u]"),b(/<blockquote[^>]*>/gi,"[quote]"),b(/<\/blockquote>/gi,"[/quote]"),b(/<br \/>/gi,"\n"),b(/<br\/>/gi,"\n"),b(/<br>/gi,"\n"),b(/<p>/gi,""),b(/<\/p>/gi,"\n"),b(/ |\u00a0/gi," "),b(/"/gi,'"'),b(/</gi,"<"),b(/>/gi,">"),b(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/\n/gi,"<br />"),b(/\[b\]/gi,"<strong>"),b(/\[\/b\]/gi,"</strong>"),b(/\[i\]/gi,"<em>"),b(/\[\/i\]/gi,"</em>"),b(/\[u\]/gi,"<u>"),b(/\[\/u\]/gi,"</u>"),b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})});
|
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("colorpicker",function(a){function b(b,c){function d(a){var b=new tinymce.util.Color(a),c=b.toRgb();f.fromJSON({r:c.r,g:c.g,b:c.b,hex:b.toHex().substr(1)}),e(b.toHex())}function e(a){f.find("#preview")[0].getEl().style.background=a}var f=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:c,onchange:function(){var a=this.rgb();f&&(f.find("#r").value(a.r),f.find("#g").value(a.g),f.find("#b").value(a.b),f.find("#hex").value(this.value().substr(1)),e(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=f.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,d(b),void c.value(b)):(b={r:f.find("#r").value(),g:f.find("#g").value(),b:f.find("#b").value()},c.value(b),void d(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){b("#"+this.toJSON().hex)}});d(c)}a.settings.color_picker_callback||(a.settings.color_picker_callback=b)});
|
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("contextmenu",function(a){var b,c=a.settings.contextmenu_never_use_native;a.on("contextmenu",function(d){var e,f=a.getDoc();if(!d.ctrlKey||c){if(d.preventDefault(),tinymce.Env.mac&&tinymce.Env.webkit&&2==d.button&&f.caretRangeFromPoint&&a.selection.setRng(f.caretRangeFromPoint(d.x,d.y)),e=a.settings.contextmenu||"link image inserttable | cell row column deletetable",b)b.show();else{var g=[];tinymce.each(e.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",g.push(c))});for(var h=0;h<g.length;h++)"|"==g[h].text&&(0===h||h==g.length-1)&&g.splice(h,1);b=new tinymce.ui.Menu({items:g,context:"contextmenu",classes:"contextmenu"}).renderTo(),a.on("remove",function(){b.remove(),b=null})}var i={x:d.pageX,y:d.pageY};a.inline||(i=tinymce.DOM.getPos(a.getContentAreaContainer()),i.x+=d.clientX,i.y+=d.clientY),b.moveTo(i.x,i.y)}})});
|
|
@ -1 +0,0 @@
|
|||
tinymce.PluginManager.add("directionality",function(a){function b(b){var c,d=a.dom,e=a.selection.getSelectedBlocks();e.length&&(c=d.getAttrib(e[0],"dir"),tinymce.each(e,function(a){d.getParent(a.parentNode,"*[dir='"+b+"']",d.getRoot())||(c!=b?d.setAttrib(a,"dir",b):d.setAttrib(a,"dir",null))}),a.nodeChanged())}function c(a){var b=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(c){b.push(c+"[dir="+a+"]")}),b.join(",")}a.addCommand("mceDirectionLTR",function(){b("ltr")}),a.addCommand("mceDirectionRTL",function(){b("rtl")}),a.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:c("ltr")}),a.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:c("rtl")})});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue