Merge branch 'dignajar/master'

This commit is contained in:
Frédéric K 2015-08-29 22:55:41 +02:00
commit b23a06e6db
141 changed files with 4041 additions and 4816 deletions

7
admin/README Normal file
View File

@ -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

View File

@ -22,7 +22,7 @@ $_newPages = $dbPages->regenerate();
$_draftPosts = array();
foreach($posts as $Post)
{
if(!$Post->published()) {
if($Post->draft()) {
array_push($_draftPosts, $Post);
}
}
@ -34,4 +34,3 @@ foreach($pages as $Page)
array_push($_draftPages, $Page);
}
}

View File

@ -26,6 +26,8 @@ function editPage($args)
{
$dbPages->regenerate();
//$dbTags->reindexPages( $dbPages->db );
Alert::set($Language->g('The changes have been saved'));
Redirect::page('admin', 'edit-page/'.$args['key']);
}

View File

@ -7,6 +7,7 @@
function editPost($args)
{
global $dbPosts;
global $dbTags;
global $Language;
// Post status, published or draft.
@ -20,6 +21,9 @@ function editPost($args)
// Edit the post.
if( $dbPosts->edit($args) )
{
// Regenerate the database tags
$dbTags->reindexPosts( $dbPosts->db );
Alert::set($Language->g('The changes have been saved'));
Redirect::page('admin', 'edit-post/'.$args['key']);
}
@ -32,10 +36,14 @@ function editPost($args)
function deletePost($key)
{
global $dbPosts;
global $dbTags;
global $Language;
if( $dbPosts->delete($key) )
{
// Regenerate the database tags
$dbTags->reindexPosts( $dbPosts->db );
Alert::set($Language->g('The post has been deleted successfully'));
Redirect::page('admin', 'manage-posts');
}

View File

@ -24,6 +24,8 @@ function addPage($args)
// Add the page.
if( $dbPages->add($args) )
{
//$dbTags->reindexPages( $dbPages->db );
Alert::set($Language->g('Page added successfully'));
Redirect::page('admin', 'manage-pages');
}

View File

@ -11,6 +11,7 @@
function addPost($args)
{
global $dbPosts;
global $dbTags;
global $Language;
// Page status, published or draft.
@ -24,6 +25,9 @@ function addPost($args)
// Add the page.
if( $dbPosts->add($args) )
{
// Regenerate the database tags
$dbTags->reindexPosts( $dbPosts->db );
Alert::set($Language->g('Post added successfully'));
Redirect::page('admin', 'manage-posts');
}

View File

@ -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'])) {

View File

@ -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

View File

@ -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>

View File

@ -20,6 +20,10 @@ div.unit-80 {
text-align: center;
}
span.label {
margin-right: 8px;
}
/* ----------- FONTS AWESOME ----------- */
.fa-right {
margin-right: 5px;
@ -201,7 +205,6 @@ div.dashboardBox ul.menu li.description:last-child {
/* ----------- FORMS ----------- */
form h4 {
border-bottom: 1px solid #e2e2e2;
font-weight: 300;
@ -210,9 +213,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 {

View File

@ -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

View File

@ -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

View File

@ -6,26 +6,17 @@
<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 +112,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>

View File

@ -2,56 +2,54 @@
<form method="post" action="" class="forms">
<input type="hidden" id="jskey" name="key" value="<?php echo $_Post->key() ?>">
<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() ?>">
</label>
<label>
<?php $Language->p('Title') ?>
<input id="jstitle" name="title" type="text" class="width-90" value="<?php echo $_Post->title() ?>">
</label>
<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>
</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>
<?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>
<?php $Language->p('Friendly Url') ?>
<div class="input-groups width-50">
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
<input id="jsslug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
</div>
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
</label>
<label>
<?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>
<label>
<?php $Language->p('Description') ?>
<input id="jsdescription" type="text" name="description" class="width-50" value="<?php echo $_Post->description() ?>">
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
</label>
<label>
<?php $Language->p('Friendly Url') ?>
<div class="input-groups width-50">
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
<input id="jsslug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
</div>
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
</label>
<label>
<?php $Language->p('Tags') ?>
<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>
<label>
<?php $Language->p('Description') ?>
<input id="jsdescription" type="text" name="description" class="width-50" value="<?php echo $_Post->description() ?>">
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
</label>
<button class="btn btn-blue" name="publish"><?php echo ($_Post->published()?$Language->p('Save'):$Language->p('Publish now')) ?></button>
<button class="btn" name="draft"><?php $Language->p('Draft') ?></button>
<button id="jsdelete" class="btn" name="delete"><?php $Language->p('Delete') ?></button>
<label>
<?php $Language->p('Tags') ?>
<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')) ?></button>
<button class="btn" name="draft"><?php $Language->p('Draft') ?></button>
<button id="jsdelete" class="btn" name="delete"><?php $Language->p('Delete') ?></button>
</form>
@ -59,25 +57,30 @@
$(document).ready(function()
{
var key = $("#jskey").val();
var key = $("#jskey").val();
$("#jstitle").keyup(function() {
var slug = $(this).val();
$("#jsdate").datetimepicker({format:"<?php echo DB_DATE_FORMAT ?>"});
checkSlugPost(slug, key, $("#jsslug"));
});
$("#jstitle").keyup(function() {
var slug = $(this).val();
checkSlugPost(slug, key, $("#jsslug"));
});
$("#jsslug").keyup(function() {
var slug = $("#jsslug").val();
$("#jsslug").keyup(function() {
var slug = $("#jsslug").val();
checkSlugPost(slug, key, $("#jsslug"));
});
checkSlugPost(slug, key, $("#jsslug"));
});
$("#jsdelete").click(function() {
if(confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")==false) {
return false;
}
});
$("#jsdelete").click(function() {
if(!confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")) {
event.preventDefault();
}
});
$("#jsadvancedButton").click(function() {
$("#jsadvancedOptions").slideToggle();
return false;
});
});

View File

@ -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>';
}

View File

@ -4,26 +4,17 @@
<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 +95,11 @@ $(document).ready(function()
checkSlugPage(text, parent, "", $("#jsslug"));
});
$("#jsadvancedButton").click(function() {
$("#jsadvancedOptions").slideToggle();
return false;
});
});
</script>

View File

@ -2,54 +2,51 @@
<form method="post" action="" class="forms">
<label>
<?php $Language->p('Title') ?>
<input id="jstitle" name="title" type="text" class="width-80">
</label>
<label>
<?php $Language->p('Title') ?>
<input id="jstitle" name="title" type="text" class="width-90">
</label>
<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>
</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>
<?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>
<?php $Language->p('Friendly Url') ?>
<div class="input-groups width-50">
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
<input id="jsslug" name="slug" type="text">
</div>
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
</label>
<label>
<?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>
<label>
<?php $Language->p('Description') ?>
<input id="jsdescription" name="description" type="text" class="width-50">
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
</label>
<label>
<?php $Language->p('Friendly Url') ?>
<div class="input-groups width-50">
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
<input id="jsslug" name="slug" type="text">
</div>
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
</label>
<label>
<?php $Language->p('Tags') ?>
<input id="jstags" name="tags" type="text" class="width-50">
<span class="forms-desc"><?php $Language->p('write-the-tags-separeted-by-comma') ?></span>
</label>
<label>
<?php $Language->p('Description') ?>
<input id="jsdescription" name="description" type="text" class="width-50">
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
</label>
</div>
<label>
<?php $Language->p('Tags') ?>
<input id="jstags" name="tags" type="text" class="width-50">
<span class="forms-desc"><?php $Language->p('write-the-tags-separeted-by-comma') ?></span>
</label>
<button class="btn btn-blue" name="publish"><?php $Language->p('Publish now') ?></button>
<button class="btn" name="draft"><?php $Language->p('Draft') ?></button>
</div>
<button class="btn btn-blue" name="publish"><?php $Language->p('Publish') ?></button>
<button class="btn" name="draft"><?php $Language->p('Draft') ?></button>
</form>
@ -57,18 +54,24 @@
$(document).ready(function()
{
$("#jsdate").datetimepicker({format:"<?php echo DB_DATE_FORMAT ?>"});
$("#jstitle").keyup(function() {
var slug = $(this).val();
$("#jstitle").keyup(function() {
var slug = $(this).val();
checkSlugPost(slug, "", $("#jsslug"));
});
checkSlugPost(slug, "", $("#jsslug"));
});
$("#jsslug").keyup(function() {
var slug = $("#jsslug").val();
$("#jsslug").keyup(function() {
var slug = $("#jsslug").val();
checkSlugPost(slug, "", $("#jsslug"));
});
checkSlugPost(slug, "", $("#jsslug"));
});
$("#jsadvancedButton").click(function() {
$("#jsadvancedOptions").slideToggle();
return false;
});
});

View File

@ -81,16 +81,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>

View File

@ -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>';
}
?>

View File

@ -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

View File

@ -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 detect locale/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
// ============================================================================
@ -190,6 +197,12 @@ function install($adminPassword, $email)
error_log($errorText, 0);
}
if(!mkdir(PATH_PLUGINS_DATABASES.'simplemde', $dirpermissions, true))
{
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES;
error_log($errorText, 0);
}
if(!mkdir(PATH_UPLOADS, $dirpermissions, true))
{
$errorText = 'Error when trying to created the directory=>'.PATH_UPLOADS;
@ -209,8 +222,7 @@ function install($adminPassword, $email)
'username'=>'admin',
'tags'=>'',
'status'=>'published',
'unixTimeCreated'=>1430686755,
'unixTimeModified'=>0,
'date'=>$currentDate,
'position'=>0
)
);
@ -223,10 +235,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 +247,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 +258,6 @@ function install($adminPassword, $email)
'uriPost'=>'/post/',
'uriPage'=>'/',
'uriTag'=>'/tag/',
'advancedOptions'=>'false',
'url'=>'http://'.DOMAIN.HTML_PATH_ROOT
);
@ -255,7 +265,6 @@ function install($adminPassword, $email)
$salt = getRandomString();
$passwordHash = sha1($adminPassword.$salt);
$registered = time();
// File users.php
$data = array(
@ -267,7 +276,7 @@ function install($adminPassword, $email)
'password'=>$passwordHash,
'salt'=>$salt,
'email'=>$email,
'registered'=>$registered
'registered'=>$currentDate
)
);
@ -282,15 +291,34 @@ 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')
'label'=>$Language->get('Pages'),
'position'=>'0'
);
file_put_contents(PATH_PLUGINS_DATABASES.'pages'.DS.'db.php', $dataHead.json_encode($data, 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
),
JSON_PRETTY_PRINT),
LOCK_EX
);
// File tags.php
$data = array(
'postsIndex'=>array(),
'pagesIndex'=>array()
);
file_put_contents(PATH_DATABASES.'tags.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
// File index.txt for error page
$data = 'Title: '.$Language->get('Error').'
Content: '.$Language->get('The page has not been found');
@ -301,11 +329,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').'

View File

@ -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);
}
//
}
}
?>

View File

@ -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);
}
}
?>

View File

@ -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();

View File

@ -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.
$Page->setField($field, $value, false);
}
// 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);

View File

@ -17,14 +17,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,18 +34,8 @@ 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.
$Post->setField($field, $value, false);
}
// Not overwrite the value from file.
$Post->setField($field, $value, false);
}
// Content in raw format
@ -53,7 +43,8 @@ function buildPost($key)
$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,7 +59,7 @@ function buildPost($key)
$user = $dbUsers->getDb( $Post->username() );
$Post->setField('authorFirstName', $user['firstName'], false);
$Post->setField('authorLastName', $user['lastName'], false);
}
@ -83,7 +74,7 @@ function build_posts_per_page($pageNumber=0, $amount=5, $draftPosts=false)
$list = $dbPosts->getPage($pageNumber, $amount, $draftPosts);
// There are not post for the pageNumber then NotFound page
// There are not post for the pageNumber then true Not found page
if(empty($list) && $pageNumber>0) {
$Url->setNotFound(true);
}
@ -98,6 +89,8 @@ function build_posts_per_page($pageNumber=0, $amount=5, $draftPosts=false)
}
}
// ============================================================================
// Main
// ============================================================================
@ -122,6 +115,10 @@ if( ($Url->whereAmI()==='post') && ($Url->notFound()===false) )
$posts[0] = $Post;
}
}
elseif( ($Url->whereAmI()==='tag') && ($Url->notFound()===false) )
{
}
// Build post per page
else

View File

@ -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

View File

@ -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,18 +26,21 @@ 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');
if( Text::isEmpty($args['username']) ) {
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 +111,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,6 +289,80 @@ class dbPages extends dbJSON
return $this->db;
}
public function regenerate()
{
$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);
$tmpPaths = glob(PATH_PAGES.'*', 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;
}
// Recovery pages from subdirectories
$subPaths = glob($directory.DS.'*', GLOB_ONLYDIR);
foreach($subPaths as $subDirectory)
{
$subKey = basename($subDirectory);
if(file_exists($subDirectory.DS.'index.txt')) {
// The key is composed by the directory/subdirectory
$newPaths[$key.'/'.$subKey] = true;
}
}
}
foreach($newPaths as $key=>$value)
{
if(!isset($this->db[$key])) {
$this->db[$key] = $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.
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 regenerate()
{
$db = $this->db;
@ -349,5 +429,5 @@ class dbPages extends dbJSON
return $this->db!=$db;
}
*/
}

View File

@ -3,15 +3,14 @@
class dbPosts extends dbJSON
{
private $dbFields = array(
'title'=> array('inFile'=>true, 'value'=>''),
'content'=> array('inFile'=>true, 'value'=>''),
'description'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''),
'status'=> array('inFile'=>false, 'value'=>'draft'),
'tags'=> array('inFile'=>false, 'value'=>''),
'allowComments'=> array('inFile'=>false, 'value'=>false),
'unixTimeCreated'=> array('inFile'=>false, 'value'=>0),
'unixTimeModified'=>array('inFile'=>false, 'value'=>0)
'title'=> array('inFile'=>true, 'value'=>''),
'content'=> array('inFile'=>true, 'value'=>''),
'description'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''),
'status'=> array('inFile'=>false, 'value'=>'draft'),
'tags'=> array('inFile'=>false, 'value'=>''),
'allowComments'=> array('inFile'=>false, 'value'=>false),
'date'=> array('inFile'=>false, 'value'=>'')
);
private $numberPosts = array(
@ -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)
{
@ -87,15 +95,14 @@ class dbPosts extends dbJSON
// 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();
if(!Valid::date($args['date'], DB_DATE_FORMAT)) {
$args['date'] = Date::current(DB_DATE_FORMAT);
}
// Verify arguments with the database fields.
@ -156,9 +163,9 @@ 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( !Valid::date($args['date'], DB_DATE_FORMAT) ) {
$args['date'] = Date::current(DB_DATE_FORMAT);
}
if( $this->delete($args['key']) ) {
return $this->add($args);
@ -196,6 +203,69 @@ class dbPosts extends dbJSON
return true;
}
public function regenerate()
{
$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;
}
/*
public function regenerate()
{
$db = $this->db;
@ -210,7 +280,7 @@ class dbPosts extends dbJSON
}
// Unix time stamp
$fields['unixTimeCreated'] = Date::unixTime();
$fields['date'] = Date::current(DB_DATE_FORMAT);
// Username
$fields['username'] = 'admin';
@ -249,7 +319,7 @@ class dbPosts extends dbJSON
return $this->db!=$db;
}
*/
public function getPage($pageNumber, $postPerPage, $draftPosts=false)
{
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
@ -311,15 +381,17 @@ class dbPosts extends dbJSON
return true;
}
// Remove the posts not published, status != published and date grater than current date.
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
private function removeUnpublished()
{
$tmp = array();
$currentDate = Date::current(DB_DATE_FORMAT);
foreach($this->db as $key=>$value)
foreach($this->db as $key=>$values)
{
if($value['status']==='published') {
$tmp[$key]=$value;
if( ($values['status']==='published') && ($values['date']<=$currentDate) ) {
$tmp[$key]=$values;
}
}
@ -330,12 +402,12 @@ class dbPosts extends dbJSON
{
// high to low
function high_to_low($a, $b) {
return $a['unixTimeCreated']<$b['unixTimeCreated'];
return $a['date']<$b['date'];
}
// low to high
function low_to_high($a, $b) {
return $a['unixTimeCreated']>$b['unixTimeCreated'];
return $a['date']>$b['date'];
}
$tmp = $this->db;

View File

@ -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'=>''),
'postsperpage'=>array('inFile'=>false, 'value'=>''),
'language'=> array('inFile'=>false, 'value'=>'en'),
'description'=> 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'),
'timezone'=> array('inFile'=>false, 'value'=>'America/Argentina/Buenos_Aires'),
'theme'=> array('inFile'=>false, 'value'=>'pure'),
'adminTheme'=> array('inFile'=>false, 'value'=>'kure'),
'homepage'=> array('inFile'=>false, 'value'=>''),
'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()

67
kernel/dbtags.class.php Normal file
View File

@ -0,0 +1,67 @@
<?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');
}
public function countPostsByTag($tagKey)
{
if( isset($this->db['postsIndex'][$tagKey]) ) {
return count($this->db['postsIndex'][$tagKey]['posts']);
}
else {
return false;
}
}
public function reindexPosts($db)
{
$tagsIndex = array();
$currentDate = Date::current(DB_DATE_FORMAT);
// Foreach post
foreach($db as $postKey=>$values)
{
if( ($values['status']==='published') && ($values['date']<=$currentDate) )
{
$explode = explode(',', $values['tags']);
// Foreach tag from post
foreach($explode as $tagName)
{
$tagName = trim($tagName);
$tagKey = Text::cleanUrl($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;
}
}
}

View File

@ -6,11 +6,11 @@ class dbUsers extends dbJSON
'firstName'=> array('inFile'=>false, 'value'=>''),
'lastName'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''),
'role'=> array('inFile'=>false, 'value'=>'editor'),
'role'=> array('inFile'=>false, 'value'=>'editor'),
'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)
'salt'=> array('inFile'=>false, 'value'=>'!Pink Floyd!Welcome to the machine!'),
'email'=> array('inFile'=>false, 'value'=>''),
'registered'=> array('inFile'=>false, 'value'=>'1985-03-15 10:00')
);
function __construct()
@ -93,7 +93,7 @@ class dbUsers extends dbJSON
public function delete($username)
{
unset($this->db[$username]);
if( $this->save() === false ) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
return false;
@ -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);

View File

@ -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)

View File

@ -171,7 +171,15 @@ class Text {
public static function imgRel2Abs($string, $base)
{
return preg_replace('/(src)="([^:"]*)(?:")/', "$1=\"$base$2\"", $string);
return preg_replace('/(?!code).(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);
}
}

View File

@ -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;
}
}

View File

@ -3,7 +3,7 @@
class Page extends fileContent
{
function __construct($key)
{
{
// Database Key
$this->setField('key', $key);
@ -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.
@ -195,4 +164,4 @@ class Page extends fileContent
return $this->getField('authorLastName');
}
}
}

View File

@ -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;
}
@ -65,7 +63,21 @@ class Post extends fileContent
// Returns TRUE if the post is published, FALSE otherwise.
public function published()
{
return ($this->getField('status')==='published');
$currentDate = Date::current(DB_DATE_FORMAT);
return ( ($this->getField('status')==='published') && ($this->getField('date')<=$currentDate) );
}
// Returns TRUE if the post is scheduled, FALSE otherwise.
public function scheduled()
{
$currentDate = Date::current(DB_DATE_FORMAT);
return ( ($this->getField('status')==='published') && ($this->getField('date')>$currentDate) );
}
// Returns TRUE if the post is draft, FALSE otherwise.
public function draft()
{
return ($this->getField('status')=='draft');
}
public function username()
@ -88,41 +100,17 @@ 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');
public function unixTimeModified()
{
return $this->getField('unixTimeModified');
}
public function dateCreated($format=false)
{
if($format===false) {
return $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);
}
public function timeago()
{
return $this->getField('timeago');
return $date;
}
public function tags()

148
languages/cs_CZ.json Executable file
View File

@ -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"
}

149
languages/de_DE.json Executable file
View File

@ -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&auml;ge",
"users": "Benutzer",
"administrator": "Administrator",
"add": "Hinzuf&uuml;gen",
"cancel": "Abbrechen",
"content": "Inhalt",
"title": "Titel",
"no-parent": "Keine &uuml;bergeordnete Seite",
"edit-page": "Seite bearbeiten",
"edit-post": "Beitrag bearbeiten",
"add-a-new-user": "Neuer Benutzer",
"parent": "&Uuml;bergeordnete Seite",
"friendly-url": "Pretty URL",
"description": "Beschreibung",
"posted-by": "Ver&ouml;ffentlicht von",
"tags": "Schlagw&ouml;rter",
"position": "Position",
"save": "Speichern",
"draft": "Entwurf",
"delete": "L&ouml;schen",
"registered": "Hinzugef&uuml;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&auml;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&auml;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&uuml;tzt",
"new-page": "Neue Seite",
"manage-posts": "Beitr&auml;ge verwalten",
"published-date": "Ver&ouml;ffentlicht",
"modified-date": "Letzte &Auml;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&ouml;ffentlichen",
"first-name": "Vorname",
"last-name": "Nachname",
"bludit-version": "Bludit Version",
"powered-by": "Diese Website wurde eingerichtet mit",
"recent-posts": "Neueste Beitr&auml;ge",
"manage-pages": "Seiten verwalten",
"advanced-options": "Erweiterte Einstellungen",
"user-deleted": "Der Benutzer wurde gel&ouml;scht.",
"page-added-successfully": "Die Seite wurde ver&ouml;ffentlicht.",
"post-added-successfully": "Die Seite wurde ver&ouml;ffentlicht.",
"the-post-has-been-deleted-successfully": "Der Beitrag wurde gel&ouml;scht.",
"the-page-has-been-deleted-successfully": "Die Seite wurde gel&ouml;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 &Auml;nderungen wurden gespeichert.",
"enable-more-features-at": "Zus&auml;tzlich Felder k&ouml;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&ouml;rter stimmen nicht &uuml;berein.",
"user-has-been-added-successfully": "Der Benutzer wurde hinzugef&uuml;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&atilde;ge und Seitenwurden synchronisiert.",
"you-can-choose-the-users-privilege": "Rechte des Benutzers. Ein Editor kann nur Seiten anlegen und Beitr&auml;ge schreiben.",
"email-will-not-be-publicly-displayed": "Die E-Mail wird nicht &ouml;ffentlich gezeigt. Sie wird f&uuml;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&uacute;r Suchmaschinen.",
"you-can-add-a-small-text-on-the-bottom": "Text im Fussbereich jeder Seite. Beispielsweise: Copyright-Hinweis, Eigent&uuml;mer der Website usw.",
"number-of-posts-to-show-per-page": "Anzahl der Beitr&auml;ge, die auf einer Seite gezeigt werden..",
"the-url-of-your-site": "URL der Website.",
"add-or-edit-description-tags-or": "Beschreibungen, Schlagw&ouml;rter und Pretty URL hinzuf&uuml;gen oder &auml;ndern.",
"select-your-sites-language": "Sprache der Website.",
"select-a-timezone-for-a-correct": "Zeitzone f&uuml;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&ouml;glich sind h&ouml;chstens 150 Zeichen.",
"this-field-can-help-describe-the-content": "Kurze Inhaltsbeschreibung. M&ouml;glich sind h&ouml;chstens 150 Zeichen.",
"write-the-tags-separeted-by-comma": "Schlagw&ouml;rter getrennt durch Kommas. Beispielsweise: Schlagwort1, Schlagwort2, Schlagwort3",
"delete-the-user-and-all-its-posts":"Benutzer und alle seine Beitr&auml;ge l&ouml;schen",
"delete-the-user-and-associate-its-posts-to-admin-user": "Benutzer l&ouml;schen und seine Beitr&auml;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&uuml;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&uuml;gen.",
"change-your-language-and-region-settings":"Sprache &auml;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&uuml;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"
}

View File

@ -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,9 @@
"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"
}

159
languages/es_ES.json Executable file
View File

@ -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."
}

View File

@ -47,7 +47,6 @@
"about": "Acerca de...",
"login": "Ingresar",
"logout": "Salir",
"dasbhoard": "Dasbhoard",
"manage": "Administrar",
"themes": "Temas",
"prev-page": "Página Anterior",
@ -127,4 +126,4 @@
"delete-the-user-and-all-its-posts":"Eliminar el usuario y todos sus mensajes",
"delete-the-user-and-associate-its-posts-to-admin-user": "Eliminar el usuario y asociar sus mensajes al usuario administrador",
"read-more": "Leer más"
}
}

File diff suppressed because one or more lines are too long

14
plugins/simplemde/js/simplemde.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,12 @@
{
"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"
}
}

71
plugins/simplemde/plugin.php Executable file
View File

@ -0,0 +1,71 @@
<?php
class pluginsimpleMDE extends Plugin {
private $loadWhenController = array(
'new-post',
'new-page',
'edit-post',
'edit-page'
);
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 .= '<link rel="stylesheet" href="'.$pluginPath.'css/simplemde.min.css">';
$html .= '<script src="'.$pluginPath.'js/simplemde.min.js"></script>';
//$html = '<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">';
//$html .= '<link rel="stylesheet" href="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">';
//$html .= '<script src="//cdn.jsdelivr.net/simplemde/latest/simplemde.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 .=
'var simplemde = new SimpleMDE({
element: document.getElementById("jscontent"),
status: false,
toolbarTips: true,
toolbarGuideIcon: true,
autofocus: false,
lineWrapping: false,
indentWithTabs: true,
tabSize: 4,
spellChecker: false
});';
$html .= '}); </script>';
}
return $html;
}
}

View File

@ -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",

52
plugins/tags/plugin.php Executable file
View File

@ -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;
$html = '<div class="plugin plugin-tags">';
$html .= '<h2>'.$this->getDbField('label').'</h2>';
$html .= '<div class="plugin-content">';
$db = $dbTags->db['postsIndex'];
$html .= '<ul>';
foreach($db as $tagKey=>$fields)
{
$count = $dbTags->countPostsByTag($tagKey);
// Print the parent
$html .= '<li><a href="'.HTML_PATH_ROOT.$Url->filters('tag').$tagKey.'">'.$fields['name'].' ('.$count.')</a></li>';
}
$html .= '</ul>';
$html .= '</div>';
$html .= '</div>';
return $html;
}
}

View File

@ -1,7 +0,0 @@
body {
font-size: 0.9em;
}
*:first-child {
margin-top: 0;
}

View File

@ -1,12 +0,0 @@
{
"plugin-data":
{
"name": "Tinymce",
"description": "Tinymce es un editor HTML, facilita al usuario crear contenido enriquecido.",
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}
}

View File

@ -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"
}
}

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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)}})});

View File

@ -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})});

View File

@ -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}))});

View File

@ -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))});

View File

@ -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|&nbsp;|[ ]|<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});

View File

@ -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(/&nbsp;|\u00a0/gi," "),b(/&quot;/gi,'"'),b(/&lt;/gi,"<"),b(/&gt;/gi,">"),b(/&amp;/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>&nbsp;'),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();

File diff suppressed because one or more lines are too long

View File

@ -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})});

View File

@ -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)});

View File

@ -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)}})});

View File

@ -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")})});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("emoticons",function(a,b){function c(){var a;return a='<table role="list" class="mce-grid">',tinymce.each(d,function(c){a+="<tr>",tinymce.each(c,function(c){var d=b+"/img/smiley-"+c+".gif";a+='<td><a href="#" data-mce-url="'+d+'" data-mce-alt="'+c+'" tabindex="-1" role="option" aria-label="'+c+'"><img src="'+d+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),a+="</tr>"}),a+="</table>"}var d=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent('<img src="'+c.getAttribute("data-mce-url")+'" alt="'+c.getAttribute("data-mce-alt")+'" />'),this.hide())}},tooltip:"Emoticons"})});

View File

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<h3>Custom dialog</h3>
Input some text: <input id="content">
<button onclick="top.tinymce.activeEditor.windowManager.getWindows()[0].close();">Close window</button>
</body>
</html>

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("example",function(a,b){a.addButton("example",{text:"My button",icon:!1,onclick:function(){a.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(b){a.insertContent("Title: "+b.data.title)}})}}),a.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){a.windowManager.open({title:"TinyMCE site",url:b+"/dialog.html",width:600,height:400,buttons:[{text:"Insert",onclick:function(){var b=a.windowManager.getWindows()[0];a.insertContent(b.getContentWindow().document.getElementById("content").value),b.close()}},{text:"Close",onclick:"close"}]})}})});

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("example_dependency",function(){},["example"]);

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){function c(){j.setStyle(m,"height",b().h-(l.clientHeight-m.clientHeight))}var k,l,m,n,o=document.body,p=document.documentElement;i=!i,l=a.getContainer(),k=l.style,m=a.getContentAreaContainer().firstChild,n=m.style,i?(d=n.width,e=n.height,n.width=n.height="100%",g=k.width,h=k.height,k.width=k.height="",j.addClass(o,"mce-fullscreen"),j.addClass(p,"mce-fullscreen"),j.addClass(l,"mce-fullscreen"),j.bind(window,"resize",c),c(),f=c):(n.width=d,n.height=e,g&&(k.width=g),h&&(k.height=h),j.removeClass(o,"mce-fullscreen"),j.removeClass(p,"mce-fullscreen"),j.removeClass(l,"mce-fullscreen"),j.unbind(window,"resize",f)),a.fire("FullscreenStateChanged",{state:i})}var d,e,f,g,h,i=!1,j=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Meta+Alt+F","",c)}),a.on("remove",function(){f&&j.unbind(window,"resize",f)}),a.addCommand("mceFullScreen",c),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return i}})});

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"<hr />")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("importcss",function(a){function b(a){return"string"==typeof a?function(b){return-1!==b.indexOf(a)}:a instanceof RegExp?function(b){return a.test(b)}:a}function c(b,c){function d(a,b){var g,h=a.href;if(h&&c(h,b)){f(a.imports,function(a){d(a,!0)});try{g=a.cssRules||a.rules}catch(i){}f(g,function(a){a.styleSheet?d(a.styleSheet,!0):a.selectorText&&f(a.selectorText.split(","),function(a){e.push(tinymce.trim(a))})})}}var e=[],g={};f(a.contentCSS,function(a){g[a]=!0}),c||(c=function(a,b){return b||g[a]});try{f(b.styleSheets,function(a){d(a)})}catch(h){}return e}function d(b){var c,d=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b);if(d){var e=d[1],f=d[2].substr(1).split(".").join(" "),g=tinymce.makeMap("a,img");return d[1]?(c={title:b},a.schema.getTextBlockElements()[e]?c.block=e:a.schema.getBlockElements()[e]||g[e.toLowerCase()]?c.selector=e:c.inline=e):d[2]&&(c={inline:"span",title:b.substr(1),classes:f}),a.settings.importcss_merge_classes!==!1?c.classes=f:c.attributes={"class":f},c}}var e=this,f=tinymce.each;a.on("renderFormatsMenu",function(g){var h=a.settings,i={},j=h.importcss_selector_converter||d,k=b(h.importcss_selector_filter),l=g.control;a.settings.importcss_append||l.items().remove();var m=[];tinymce.each(h.importcss_groups,function(a){a=tinymce.extend({},a),a.filter=b(a.filter),m.push(a)}),f(c(g.doc||a.getDoc(),b(h.importcss_file_filter)),function(b){if(-1===b.indexOf(".mce-")&&!i[b]&&(!k||k(b))){var c,d=j.call(e,b);if(d){var f=d.name||tinymce.DOM.uniqueId();if(m)for(var g=0;g<m.length;g++)if(!m[g].filter||m[g].filter(b)){m[g].item||(m[g].item={text:m[g].title,menu:[]}),c=m[g].item.menu;break}a.formatter.register(f,d);var h=tinymce.extend({},l.settings.itemDefaults,{text:d.title,format:f});c?c.push(h):l.add(h)}i[b]=!0}}),f(m,function(a){l.add(a.item)}),g.control.renderNew()}),e.convertSelectorToFormat=d});

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("insertdatetime",function(a){function b(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(i[c.getMonth()])),b=b.replace("%b",""+a.translate(h[c.getMonth()])),b=b.replace("%A",""+a.translate(g[c.getDay()])),b=b.replace("%a",""+a.translate(f[c.getDay()])),b=b.replace("%%","%")}function c(c){var d=b(c);if(a.settings.insertdatetime_element){var e;e=b(/%[HMSIp]/.test(c)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),d='<time datetime="'+e+'">'+d+"</time>";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var d,e,f="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),h="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" "),j=[];a.addCommand("mceInsertDate",function(){c(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){c(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){c(d||e)},menu:j}),tinymce.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){e||(e=a),j.push({text:b(a),onclick:function(){d=a,c(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:j,context:"insert"})});

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("layer",function(a){function b(a){do if(a.className&&-1!=a.className.indexOf("mceItemLayer"))return a;while(a=a.parentNode)}function c(b){var c=a.dom;tinymce.each(c.select("div,p",b),function(a){/^(absolute|relative|fixed)$/i.test(a.style.position)&&(a.hasVisual?c.addClass(a,"mceItemVisualAid"):c.removeClass(a,"mceItemVisualAid"),c.addClass(a,"mceItemLayer"))})}function d(c){var d,e,f=[],g=b(a.selection.getNode()),h=-1,i=-1;for(e=[],tinymce.walk(a.getBody(),function(a){1==a.nodeType&&/^(absolute|relative|static)$/i.test(a.style.position)&&e.push(a)},"childNodes"),d=0;d<e.length;d++)f[d]=e[d].style.zIndex?parseInt(e[d].style.zIndex,10):0,0>h&&e[d]==g&&(h=d);if(0>c){for(d=0;d<f.length;d++)if(f[d]<f[h]){i=d;break}i>-1?(e[h].style.zIndex=f[i],e[i].style.zIndex=f[h]):f[h]>0&&(e[h].style.zIndex=f[h]-1)}else{for(d=0;d<f.length;d++)if(f[d]>f[h]){i=d;break}i>-1?(e[h].style.zIndex=f[i],e[i].style.zIndex=f[h]):e[h].style.zIndex=f[h]+1}a.execCommand("mceRepaint")}function e(){var b=a.dom,c=b.getPos(b.getParent(a.selection.getNode(),"*")),d=a.getBody();a.dom.add(d,"div",{style:{position:"absolute",left:c.x,top:c.y>20?c.y:20,width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},a.selection.getContent()||a.getLang("layer.content")),tinymce.Env.ie&&b.setHTML(d,d.innerHTML)}function f(){var c=b(a.selection.getNode());c||(c=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")),c&&("absolute"==c.style.position.toLowerCase()?(a.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""}),a.dom.removeClass(c,"mceItemVisualAid"),a.dom.removeClass(c,"mceItemLayer")):(c.style.left||(c.style.left="20px"),c.style.top||(c.style.top="20px"),c.style.width||(c.style.width=c.width?c.width+"px":"100px"),c.style.height||(c.style.height=c.height?c.height+"px":"100px"),c.style.position="absolute",a.dom.setAttrib(c,"data-mce-style",""),a.addVisual(a.getBody())),a.execCommand("mceRepaint"),a.nodeChanged())}a.addCommand("mceInsertLayer",e),a.addCommand("mceMoveForward",function(){d(1)}),a.addCommand("mceMoveBackward",function(){d(-1)}),a.addCommand("mceMakeAbsolute",function(){f()}),a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"}),a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"}),a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"}),a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"}),a.on("init",function(){tinymce.Env.ie&&a.getDoc().execCommand("2D-Position",!1,!0)}),a.on("mouseup",function(c){var d=b(c.target);d&&a.dom.setAttrib(d,"data-mce-style","")}),a.on("mousedown",function(c){var d,e=c.target,f=a.getDoc();tinymce.Env.gecko&&(b(e)?"on"!==f.designMode&&(f.designMode="on",e=f.body,d=e.parentNode,d.removeChild(e),d.appendChild(e)):"on"==f.designMode&&(f.designMode="off"))}),a.on("NodeChange",c)});

View File

@ -1 +0,0 @@
!function(a){a.on("AddEditor",function(a){a.editor.settings.inline_styles=!1}),a.PluginManager.add("legacyoutput",function(b,c,d){b.on("init",function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",d=a.explode(b.settings.font_size_style_values),e=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignjustify:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(b){return a.inArray(d,b.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),a.each("b,i,u,strike".split(","),function(a){e.addValidElements(a+"[*]")}),e.getElementRule("font")||e.addValidElements("font[face|size|color|style]"),a.each(c.split(","),function(a){var b=e.getElementRule(a);b&&(b.attributes.align||(b.attributes.align={},b.attributesOrder.push("align")))})}),b.addButton("fontsizeselect",function(){var a=[],c="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",d=b.settings.fontsize_formats||c;return b.$.each(d.split(" "),function(b,c){var d=c,e=c,f=c.split("=");f.length>1&&(d=f[0],e=f[1]),a.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:a,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.size:"")})},onclick:function(a){a.control.settings.value&&b.execCommand("FontSize",!1,a.control.settings.value)}}}),b.addButton("fontselect",function(){function a(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e=[],f=a(b.settings.font_formats||c);return d.each(f,function(a,b){e.push({text:{raw:b[0]},value:b[1],textStyle:-1==b[1].indexOf("dings")?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.face:"")})},onselect:function(a){a.control.settings.value&&b.execCommand("FontName",!1,a.control.settings.value)}}})})}(tinymce);

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("link",function(a){function b(b){return function(){var c=a.settings.link_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b&&b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){function d(a){var b=l.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#href").value(a.control.value())}function e(b){var c=[];return tinymce.each(a.dom.select("a:not([href])"),function(a){var d=a.name||a.id;d&&c.push({text:d,value:"#"+d,selected:-1!=b.indexOf("#"+d)})}),c.length?(c.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:c,onselect:d}):void 0}function f(){!k&&0===u.text.length&&m&&this.parent().parent().find("#text")[0].value(this.value())}function g(b){var c=b.meta||{};o&&o.value(a.convertURL(this.value(),"href")),tinymce.each(b.meta,function(a,b){l.find("#"+b).value(a)}),c.text||f.call(this)}function h(a){var b=v.getContent();if(/</.test(b)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(b)||-1==b.indexOf("href=")))return!1;if(a){var c,d=a.childNodes;if(0===d.length)return!1;for(c=d.length-1;c>=0;c--)if(3!=d[c].nodeType)return!1}return!0}var i,j,k,l,m,n,o,p,q,r,s,t,u={},v=a.selection,w=a.dom;i=v.getNode(),j=w.getParent(i,"a[href]"),m=h(),u.text=k=j?j.innerText||j.textContent:v.getContent({format:"text"}),u.href=j?w.getAttrib(j,"href"):"",j?u.target=w.getAttrib(j,"target"):a.settings.default_link_target&&(u.target=a.settings.default_link_target),(t=w.getAttrib(j,"rel"))&&(u.rel=t),(t=w.getAttrib(j,"class"))&&(u["class"]=t),(t=w.getAttrib(j,"title"))&&(u.title=t),m&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){u.text=this.value()}}),b&&(o={type:"listbox",label:"Link list",values:c(b,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:d,value:a.convertURL(u.href,"href"),onPostRender:function(){o=this}}),a.settings.target_list!==!1&&(a.settings.target_list||(a.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),q={name:"target",type:"listbox",label:"Target",values:c(a.settings.target_list)}),a.settings.rel_list&&(p={name:"rel",type:"listbox",label:"Rel",values:c(a.settings.rel_list)}),a.settings.link_class_list&&(r={name:"class",type:"listbox",label:"Class",values:c(a.settings.link_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),a.settings.link_title!==!1&&(s={name:"title",type:"textbox",label:"Title",value:u.title}),l=a.windowManager.open({title:"Insert link",data:u,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:g,onkeyup:f},n,s,e(u.href),o,p,q,r],onSubmit:function(b){function c(b,c){var d=a.selection.getRng();window.setTimeout(function(){a.windowManager.confirm(b,function(b){a.selection.setRng(d),c(b)})},0)}function d(){var b={href:e,target:u.target?u.target:null,rel:u.rel?u.rel:null,"class":u["class"]?u["class"]:null,title:u.title?u.title:null};j?(a.focus(),m&&u.text!=k&&("innerText"in j?j.innerText=u.text:j.textContent=u.text),w.setAttribs(j,b),v.select(j),a.undoManager.add()):m?a.insertContent(w.createHTML("a",b,w.encode(u.text))):a.execCommand("mceInsertLink",!1,b)}var e;return u=tinymce.extend(u,b.data),(e=u.href)?e.indexOf("@")>0&&-1==e.indexOf("//")&&-1==e.indexOf("mailto:")?void c("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(e="mailto:"+e),d()}):a.settings.link_assume_external_targets&&!/^\w+:/i.test(e)||!a.settings.link_assume_external_targets&&/^\s*www\./i.test(e)?void c("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(e="http://"+e),d()}):void d():void a.execCommand("unlink")}})}a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]"}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addShortcut("Meta+K","",b(d)),a.addCommand("mceLink",b(d)),this.showDialog=d,a.addMenuItem("link",{icon:"link",text:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]",context:"insert",prependToContext:!0})});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
tinymce.PluginManager.add("nonbreaking",function(a){var b=a.getParam("nonbreaking_force_tab");if(a.addCommand("mceNonBreaking",function(){a.insertContent(a.plugins.visualchars&&a.plugins.visualchars.state?'<span class="mce-nbsp">&nbsp;</span>':"&nbsp;"),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;c>d;d++)a.execCommand("mceNonBreaking")}})}});

Some files were not shown because too many files have changed in this diff Show More