Updated language dictionary, improves on Admin panel, Title on each section
This commit is contained in:
parent
f38f426edf
commit
e4227394a8
@ -1,26 +1,4 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
Redirect::page('admin', 'dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('About');
|
@ -4,9 +4,9 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
Redirect::page('admin', 'dashboard');
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@ -21,9 +21,8 @@ if($Login->role()!=='admin') {
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
if( createUser($_POST) ) {
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if (createUser($_POST)) {
|
||||
Redirect::page('users');
|
||||
}
|
||||
}
|
||||
@ -31,3 +30,6 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Add a new user');
|
@ -4,6 +4,11 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
@ -19,3 +24,6 @@
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Categories');
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
@ -59,3 +59,6 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Plugin').' - '.$plugin->name();
|
@ -101,11 +101,5 @@
|
||||
// Try update Bludit
|
||||
//updateBludit();
|
||||
|
||||
// Get draft pages
|
||||
$_draftPages = array();
|
||||
foreach($pages as $Page)
|
||||
{
|
||||
if(!$Page->published()) {
|
||||
array_push($_draftPages, $Page);
|
||||
}
|
||||
}
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Dashboard');
|
@ -4,10 +4,16 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// This function is used on the VIEW to show the tables
|
||||
function printTable($title, $array) {
|
||||
echo '<h2>'.$title.'</h2>';
|
||||
echo '
|
||||
@ -47,3 +53,5 @@ function printTable($title, $array) {
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
$layout['title'] .= ' - '.$Language->g('Developers');
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
@ -21,8 +21,7 @@ if($Login->role()!=='admin') {
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD']=='POST') {
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if (isset($_POST['delete'])) {
|
||||
deleteCategory($_POST['categoryKey']);
|
||||
}
|
||||
@ -36,14 +35,14 @@ if ($_SERVER['REQUEST_METHOD']=='POST') {
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
$categoryKey = $layout['parameters'];
|
||||
|
||||
if( !$dbCategories->exists($categoryKey) ) {
|
||||
if (!$dbCategories->exists($categoryKey)) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the category: '.$categoryKey);
|
||||
Redirect::page('categories');
|
||||
}
|
||||
|
||||
$category = $dbCategories->getName($layout['parameters']);
|
||||
|
||||
$layout['title'] .= ' - '.$Language->g('Edit Category').' - '.$category;
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Edit Category').' - '.$category;
|
@ -46,4 +46,5 @@ if( !$dbPages->exists($layout['parameters']) ) {
|
||||
|
||||
$page = $pagesByKey[$layout['parameters']];
|
||||
|
||||
$layout['title'] .= ' - '.$Language->g('Edit Content');
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Edit Content').' - '.$page->title();
|
@ -51,3 +51,6 @@ $User = $dbUsers->getUser($layout['parameters']);
|
||||
if($User===false) {
|
||||
Redirect::page('users');
|
||||
}
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Edit user');
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
@ -25,28 +25,5 @@ if($Login->role()!=='admin') {
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
$pluginClassName = $layout['parameters'];
|
||||
|
||||
// Check if the plugin exists
|
||||
if( isset($plugins['all'][$pluginClassName]) ) {
|
||||
$plugin = $plugins['all'][$pluginClassName];
|
||||
|
||||
// Plugins for Bludit PRO
|
||||
$blackList = array('pluginTimeMachine', 'pluginRemoteContent');
|
||||
if( in_array($pluginClassName, $blackList) && !defined('BLUDIT_PRO') ) {
|
||||
Redirect::page('plugins');
|
||||
}
|
||||
|
||||
// Install plugin
|
||||
if( $plugin->install() ) {
|
||||
// Add to syslog
|
||||
$Syslog->add(array(
|
||||
'dictionaryKey'=>'plugin-installed',
|
||||
'notes'=>$plugin->name()
|
||||
));
|
||||
|
||||
// Create an alert
|
||||
Alert::set($Language->g('Plugin installed'));
|
||||
}
|
||||
}
|
||||
|
||||
activatePlugin($pluginClassName);
|
||||
Redirect::page('plugins');
|
||||
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
Redirect::page('admin', 'dashboard');
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@ -59,3 +59,6 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('New category');
|
@ -27,3 +27,6 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('New content');
|
@ -19,3 +19,6 @@
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Manage Content');
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
@ -24,3 +24,6 @@ if($Login->role()!=='admin') {
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Plugins');
|
@ -4,69 +4,15 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
Redirect::page('admin', 'dashboard');
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
function setSettings($args)
|
||||
{
|
||||
global $Site;
|
||||
global $Language;
|
||||
global $Syslog;
|
||||
global $dbPages;
|
||||
|
||||
// Add slash at the begin and end
|
||||
$args['uriPage'] = Text::addSlashes($args['uriPage']);
|
||||
$args['uriTag'] = Text::addSlashes($args['uriTag']);
|
||||
$args['uriCategory'] = Text::addSlashes($args['uriCategory']);
|
||||
|
||||
if( ($args['uriPage']==$args['uriTag']) ||
|
||||
($args['uriPage']==$args['uriCategory']) ||
|
||||
($args['uriTag']==$args['uriCategory'])
|
||||
) {
|
||||
$args = array();
|
||||
}
|
||||
|
||||
if( $Site->set($args) ) {
|
||||
// Add to syslog
|
||||
$Syslog->add(array(
|
||||
'dictionaryKey'=>'changes-on-settings',
|
||||
'notes'=>''
|
||||
));
|
||||
|
||||
// Check actual order by, if different than the new settings sort pages
|
||||
if( $Site->orderBy()!=ORDER_BY ) {
|
||||
if( $Site->orderBy()=='date' ) {
|
||||
$dbPages->sortByDate();
|
||||
}
|
||||
else {
|
||||
$dbPages->sortByPosition();
|
||||
}
|
||||
|
||||
// Save database state
|
||||
$dbPages->save();
|
||||
|
||||
// Re-index categories
|
||||
reindexCategories();
|
||||
|
||||
// Re-index tags
|
||||
reindextags();
|
||||
}
|
||||
|
||||
// Create an alert
|
||||
Alert::set( $Language->g('The changes have been saved') );
|
||||
}
|
||||
|
||||
// Redirect
|
||||
Redirect::page('settings-advanced');
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
@ -75,9 +21,9 @@ function setSettings($args)
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
setSettings($_POST);
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
editSettings($_POST);
|
||||
Redirect::page('settings-advanced');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@ -96,4 +42,7 @@ foreach($allPublishedPages as $key=>$page) {
|
||||
}
|
||||
|
||||
ksort($homepageOptions);
|
||||
}
|
||||
}
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Advanced Settings');
|
@ -4,52 +4,15 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
Redirect::page('admin', 'dashboard');
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
function setSettings($args)
|
||||
{
|
||||
global $Site;
|
||||
global $Language;
|
||||
global $Syslog;
|
||||
|
||||
// Add slash at the begin and end.
|
||||
// This fields are in the settings->advanced mode
|
||||
if(isset($args['form-advanced'])) {
|
||||
$args['url'] = Text::addSlashes($args['url'],false,true);
|
||||
$args['uriPost'] = Text::addSlashes($args['uriPost']);
|
||||
$args['uriPage'] = Text::addSlashes($args['uriPage']);
|
||||
$args['uriTag'] = Text::addSlashes($args['uriTag']);
|
||||
|
||||
if(($args['uriPost']==$args['uriPage']) || ($args['uriPost']==$args['uriTag']) || ($args['uriPage']==$args['uriTag']) )
|
||||
{
|
||||
$args = array();
|
||||
}
|
||||
}
|
||||
|
||||
if( $Site->set($args) ) {
|
||||
// Add to syslog
|
||||
$Syslog->add(array(
|
||||
'dictionaryKey'=>'changes-on-settings',
|
||||
'notes'=>''
|
||||
));
|
||||
|
||||
// Create an alert
|
||||
Alert::set( $Language->g('The changes have been saved') );
|
||||
|
||||
// Redirect
|
||||
Redirect::page('settings-general');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
@ -58,12 +21,14 @@ function setSettings($args)
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
setSettings($_POST);
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
editSettings($_POST);
|
||||
Redirect::page('settings-general');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('General Settings');
|
@ -4,9 +4,9 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
Redirect::page('admin', 'dashboard');
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@ -21,14 +21,14 @@ if($Login->role()!=='admin') {
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
if (editSettings($_POST)) {
|
||||
Alert::set($Language->g('the-changes-have-been-saved'));
|
||||
Redirect::page('settings-regional');
|
||||
}
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
editSettings($_POST);
|
||||
Redirect::page('settings-regional');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Language and timezone');
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
@ -22,3 +22,6 @@ if($Login->role()!=='admin') {
|
||||
// ============================================================================
|
||||
|
||||
$themes = buildThemes();
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Themes');
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ if($Login->role()!=='admin') {
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
@ -25,8 +25,5 @@ if($Login->role()!=='admin') {
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
$pluginClassName = $layout['parameters'];
|
||||
|
||||
$Plugin = new $pluginClassName;
|
||||
$Plugin->uninstall();
|
||||
|
||||
Redirect::page('plugins');
|
||||
deactivatePlugin($pluginClassName);
|
||||
Redirect::page('plugins');
|
@ -77,3 +77,6 @@ if($_user===false) {
|
||||
}
|
||||
|
||||
$_user['username'] = $layout['parameters'];
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Change password');
|
@ -4,8 +4,8 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
if ($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
@ -29,3 +29,6 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$Language->g('Users');
|
@ -63,6 +63,7 @@
|
||||
.uk-button {
|
||||
border-radius: 2px !important;
|
||||
padding: 1px 20px !important;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.uk-button-primary {
|
||||
@ -701,6 +702,7 @@ div.plugin-links > span.separator {
|
||||
#jsformplugin button[type=submit].small {
|
||||
font-size: 0.9em;
|
||||
min-height: 20px;
|
||||
background: #E6E6E6;
|
||||
}
|
||||
|
||||
#jsformplugin > div > label,
|
||||
|
@ -248,6 +248,58 @@ function pluginEnabled($pluginName) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function activatePlugin($pluginClassName) {
|
||||
global $plugins;
|
||||
global $Syslog;
|
||||
global $Language;
|
||||
|
||||
// Check if the plugin exists
|
||||
if (isset($plugins['all'][$pluginClassName])) {
|
||||
$plugin = $plugins['all'][$pluginClassName];
|
||||
$blackList = array('pluginTimeMachine', 'pluginRemoteContent');
|
||||
if (in_array($pluginClassName, $blackList) && !defined('BLUDIT_PRO')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($plugin->install()) {
|
||||
// Add to syslog
|
||||
$Syslog->add(array(
|
||||
'dictionaryKey'=>'plugin-activated',
|
||||
'notes'=>$plugin->name()
|
||||
));
|
||||
|
||||
// Create an alert
|
||||
Alert::set($Language->g('plugin-activated'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function deactivatePlugin($pluginClassName) {
|
||||
global $plugins;
|
||||
global $Syslog;
|
||||
global $Language;
|
||||
|
||||
// Check if the plugin exists
|
||||
if (isset($plugins['all'][$pluginClassName])) {
|
||||
$plugin = $plugins['all'][$pluginClassName];
|
||||
|
||||
if ($plugin->uninstall()) {
|
||||
// Add to syslog
|
||||
$Syslog->add(array(
|
||||
'dictionaryKey'=>'plugin-deactivated',
|
||||
'notes'=>$plugin->name()
|
||||
));
|
||||
|
||||
// Create an alert
|
||||
Alert::set($Language->g('plugin-deactivated'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function printDebug($array) {
|
||||
echo '<pre>';
|
||||
var_dump($array);
|
||||
@ -497,6 +549,7 @@ function createUser($args) {
|
||||
function editSettings($args) {
|
||||
global $Site;
|
||||
global $Syslog;
|
||||
global $Language;
|
||||
|
||||
if (isset($args['language'])) {
|
||||
if ($args['language']!=$Site->language()) {
|
||||
@ -509,13 +562,35 @@ function editSettings($args) {
|
||||
}
|
||||
}
|
||||
|
||||
if( $Site->set($args) ) {
|
||||
// Add to syslog
|
||||
if (isset($args['uriPage'])) {
|
||||
$args['uriPage'] = Text::addSlashes($args['uriPage']);
|
||||
}
|
||||
if (isset($args['uriTag'])) {
|
||||
$args['uriTag'] = Text::addSlashes($args['uriTag']);
|
||||
}
|
||||
if (isset($args['uriCategory'])) {
|
||||
$args['uriCategory'] = Text::addSlashes($args['uriCategory']);
|
||||
}
|
||||
|
||||
if ($Site->set($args)) {
|
||||
// Check current order-by if changed it reorder the content
|
||||
if ($Site->orderBy()!=ORDER_BY) {
|
||||
if ($Site->orderBy()=='date') {
|
||||
$dbPages->sortByDate();
|
||||
} else {
|
||||
$dbPages->sortByPosition();
|
||||
}
|
||||
$dbPages->save();
|
||||
}
|
||||
|
||||
// Add syslog
|
||||
$Syslog->add(array(
|
||||
'dictionaryKey'=>'changes-on-settings',
|
||||
'notes'=>''
|
||||
));
|
||||
|
||||
// Create alert
|
||||
Alert::set($Language->g('The changes have been saved'));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,9 @@
|
||||
"thanks-for-support-bludit": "Thanks for support Bludit",
|
||||
"upgrade-to-bludit-pro": "Upgrade to Bludit PRO",
|
||||
"language": "Language",
|
||||
"plugin": "Plugin",
|
||||
"plugins": "Plugins",
|
||||
"developers": "Developers",
|
||||
"themes": "Themes",
|
||||
"about": "About",
|
||||
"url": "URL",
|
||||
@ -39,12 +41,14 @@
|
||||
"manage-content": "Manage content",
|
||||
"add-new-content": "Add new content",
|
||||
"new-category": "New category",
|
||||
"you-do-not-have-sufficient-permissions": "You do not have sufficient permissions",
|
||||
"add-a-new-user": "Add a new user",
|
||||
"url-associated-with-the-page": "URL associated with the page.",
|
||||
"language-and-timezone": "Language and timezone",
|
||||
"change-your-language-and-region-settings": "Change your language and region settings.",
|
||||
"notifications": "Notifications",
|
||||
"plugin-installed": "Plugin installed",
|
||||
"plugin-activated": "Plugin activated",
|
||||
"plugin-deactivated": "Plugin deactivated",
|
||||
"new-theme-configured": "New theme configured",
|
||||
"changes-on-settings": "Changes on settings",
|
||||
"plugin-configured": "Plugin configured",
|
||||
@ -188,5 +192,9 @@
|
||||
"token": "Token",
|
||||
"current-status": "Current status",
|
||||
"upload-image": "Upload image",
|
||||
"this-token-is-similar-to-your-password-you-should-not-share-it": "This token is similar to your password, you should not share it."
|
||||
"this-token-is-similar-to-your-password-you-should-not-share-it": "This token is similar to your password, you should not share it.",
|
||||
"the-changes-have-been-saved": "The changes have been saved",
|
||||
"label": "Label",
|
||||
"links": "Links",
|
||||
"this-title-is-almost-always-used-in-the-sidebar-of-the-site": "This title is almost always used in the sidebar of the site."
|
||||
}
|
@ -17,7 +17,7 @@ class pluginAbout extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Label').'</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Title of the plugin for the sidebar').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
|
@ -3,5 +3,9 @@
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Interface to interact with Bludit using HTTP protocol. <br> Read more about this plugin on <a href=\"https://docs.bludit.com/en/api/introduction\">API Introduction</a>."
|
||||
}
|
||||
},
|
||||
"api-token": "API Token",
|
||||
"amount-of-pages": "Amount of pages",
|
||||
"this-is-the-maximum-of-pages-to-return-when-you-call-to": "This is the maximum of pages to return when you call to /api/pages",
|
||||
"this-token-is-for-read-only-and-is-regenerated-every-time-you-install-the-plugin": "This token is for read only and is regenerated every time you install the plugin"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Interfaz para interactuar con Bludit mediante el protocolo HTTP."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Interface om te communiceren met Bludit via het HTTP protocol."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Интерфейс для взаимодействия с Bludit через HTTP протокол."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Bludit'e HTTP protokolü üzerinden erişmek için arayüz."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "API",
|
||||
"description": "Інтерфейс для взаємодії з Bludit за допомогою протоколу HTTP."
|
||||
}
|
||||
}
|
@ -28,7 +28,7 @@ class pluginAPI extends Plugin {
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$Language->get('Amount of pages').'</label>';
|
||||
$html .= '<input id="jsamountOfItems" name="amountOfItems" type="text" value="'.$this->getValue('amountOfItems').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('The amount of pages to return when you call to /api/pages').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This is the maximum of pages to return when you call to').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
|
@ -3,5 +3,7 @@
|
||||
{
|
||||
"name": "Categories",
|
||||
"description": "Shows all categories on the system on the sidebar."
|
||||
}
|
||||
},
|
||||
"categories-without-content": "Categories without content",
|
||||
"show-the-categories-without-content": "Show the categories without content."
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class pluginCategories extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Label').'</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Title of the plugin for the sidebar').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
|
@ -4,7 +4,6 @@
|
||||
"name": "Fixed pages",
|
||||
"description": "Shows the fixed pages on the sidebar, this plugin is useful when you want to create a blog with static pages."
|
||||
},
|
||||
"home-page": "Home page",
|
||||
"show-home-link": "Show home link",
|
||||
"amount-of-items": "Amount of items"
|
||||
"home-link": "Home link",
|
||||
"show-the-home-link-on-the-sidebar": "Show the home link on the sidebar."
|
||||
}
|
@ -19,7 +19,7 @@ class pluginFixedPages extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Label').'</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Title of the plugin for the sidebar').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
|
@ -3,5 +3,6 @@
|
||||
{
|
||||
"name": "Links",
|
||||
"description": "Shows a link list in the sidebar, you can modify these links in settings."
|
||||
}
|
||||
},
|
||||
"add-a-new-link": "Add a new link"
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ class pluginLinks extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Label').'</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Title of the plugin for the sidebar').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
|
@ -18,7 +18,7 @@ class pluginMenu extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Label').'</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Title of the plugin for the sidebar').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
|
@ -20,7 +20,7 @@ class pluginPages extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Label').'</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Title of the plugin for the sidebar').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "هذه الإضافة تساعد على توليد تغذية RSS لموقعك."
|
||||
}
|
||||
}
|
@ -3,5 +3,6 @@
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "This plugin generates an RSS feed of your site."
|
||||
}
|
||||
},
|
||||
"amount-of-items-to-show-on-the-feed": "Amount of items to show on the feed."
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "Este plugin genera contenido RSS Feed para su sitio."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "サイトのRSSフィードを生成します。"
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "Deze plugin genereerd een RSS Feed voor je website."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS Feed",
|
||||
"description": "Этот плагин генерирует RSS трансляцию на сайте."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "RSS-канал",
|
||||
"description": "Цей плагін генерує RSS для вашого сайту."
|
||||
}
|
||||
}
|
@ -18,6 +18,7 @@ class pluginRSS extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Amount of items').'</label>';
|
||||
$html .= '<input id="jsamountOfItems" name="amountOfItems" type="text" value="'.$this->getValue('amountOfItems').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Amount of items to show on the feed').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Етикети",
|
||||
"description": "Покажи всички етикети."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Anzeige aller Schlagwörter",
|
||||
"description": "Anzeige aller Schlagwörter in der Seitenleiste (bei Themes mit Seitenleiste)."
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Anzeige aller Schlagwörter",
|
||||
"description": "Anzeige aller Schlagwörter in der Seitenleiste (bei Themes mit Seitenleiste)."
|
||||
},
|
||||
"sort-the-tag-list-by": "Sortierung der Schlagwörter nach",
|
||||
"alphabetical-order": "Alphabetische Reihenfolge",
|
||||
"number-of-times-each-tag-has-been-used": "Anzahl der Verwendung",
|
||||
"date-each-tag-was-first-used": "Datum der ersten Verwendung"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Listado de tags",
|
||||
"description": "Muestra los tags de forma ordenada y muestra la cantidad de posts asociados a un tag."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Liste de mots clés",
|
||||
"description": "Affiche la lise de tous les mots clés."
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Tags list",
|
||||
"description": "すべてのタグを表示します。"
|
||||
},
|
||||
"tag-sort-order": "タグ・リストの順番",
|
||||
"tag-sort-alphabetical": "アルファベット順",
|
||||
"tag-sort-count": "タグの利用回数順",
|
||||
"tag-sort-date": "最初に利用されたタグ順"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Tag lijst",
|
||||
"description": "Toon alle tags."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Lista tagów",
|
||||
"description": "Wyświetla wszystkie tagi w postaci listy."
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Список тегов",
|
||||
"description": "Показывает все теги."
|
||||
},
|
||||
"tag-sort-order": "Сортировать по",
|
||||
"tag-sort-alphabetical": "алфавиту",
|
||||
"tag-sort-count": "количеству",
|
||||
"tag-sort-date": "дате"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Tag listesi",
|
||||
"description": "Bütün tagları gösterir."
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Список тегів",
|
||||
"description": "Показує всі теги."
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ class pluginTags extends Plugin {
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Label').'</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$Language->get('Title of the plugin for the sidebar').'</span>';
|
||||
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
|
Loading…
Reference in New Issue
Block a user