diff --git a/cms/data/content.sqlite b/cms/data/content.sqlite index d8faf9f..e96d41d 100644 Binary files a/cms/data/content.sqlite and b/cms/data/content.sqlite differ diff --git a/cms/data/userdata.sqlite b/cms/data/userdata.sqlite index fa94fc9..235b3b5 100644 Binary files a/cms/data/userdata.sqlite and b/cms/data/userdata.sqlite differ diff --git a/cms/includes/edit.inc.php b/cms/includes/edit.inc.php index d703044..39fbcc6 100644 --- a/cms/includes/edit.inc.php +++ b/cms/includes/edit.inc.php @@ -5,23 +5,9 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id'])) { $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'main'; - if($settings['wysiwyg_editor'] && isset($_SESSION[$settings['session_prefix'].'wysiwyg']) && $_SESSION[$settings['session_prefix'].'wysiwyg']==1) - { - $wysiwyg_opt = true; - $wysiwyg = true; - } - elseif(!empty($settings['wysiwyg_editor'])) - { - $wysiwyg_opt = true; - $wysiwyg = false; - } - else - { - $wysiwyg_opt = false; - $wysiwyg = false; - } + if(isset($_SESSION[$settings['session_prefix'].'wysiwyg']) && $_SESSION[$settings['session_prefix'].'wysiwyg']==1) $wysiwyg = true; - if($wysiwyg_opt && isset($_REQUEST['enable_wysiwyg'])) + if(isset($_REQUEST['enable_wysiwyg'])) { $wysiwyg = true; $dbr = Database::$userdata->prepare("UPDATE ".Database::$db_settings['userdata_table']." SET wysiwyg=1 WHERE id=:id"); @@ -29,19 +15,16 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id'])) $dbr->execute(); $_SESSION[$settings['session_prefix'].'wysiwyg'] = 1; } - if($wysiwyg_opt && isset($_REQUEST['disable_wysiwyg'])) + if(isset($_REQUEST['disable_wysiwyg'])) { - $wysiwyg = false; + unset($wysiwyg); $dbr = Database::$userdata->prepare("UPDATE ".Database::$db_settings['userdata_table']." SET wysiwyg=0 WHERE id=:id"); $dbr->bindParam(':id', $_SESSION[$settings['session_prefix'].'user_id'], PDO::PARAM_INT); $dbr->execute(); $_SESSION[$settings['session_prefix'].'wysiwyg'] = 0; } - - $template->assign('wysiwyg_opt',$wysiwyg_opt); - $template->assign('wysiwyg',$wysiwyg); - - #if($wysiwyg) include('./modules/fckeditor/fckeditor.php'); + + if(isset($wysiwyg)) $template->assign('wysiwyg', true); include(BASE_PATH.'cms/config/page_types.conf.php'); $template->assign('page_types',$page_types); diff --git a/cms/index.php b/cms/index.php index ea33e6b..d878210 100644 --- a/cms/index.php +++ b/cms/index.php @@ -3,24 +3,32 @@ * phpSQLiteCMS - a simple and lightweight PHP web content management system * based on PHP and SQLite * - * @author Mark Alexander Hoschek - * @copyright 2006-2010 Mark Alexander Hoschek - * @version 2.0.5 + * @author Mark Hoschek < mail at mark-hoschek dot de > + * @copyright Mark Hoschek 2014 + * @version 3.x * @link http://phpsqlitecms.net/ * @package phpSQLiteCMS * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * The MIT License (MIT) * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Copyright (c) 2014 Mark Hoschek * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ try diff --git a/cms/lang/bulgarian.admin.lang.php b/cms/lang/bulgarian.admin.lang.php index bca0b94..287fe8e 100644 --- a/cms/lang/bulgarian.admin.lang.php +++ b/cms/lang/bulgarian.admin.lang.php @@ -58,6 +58,7 @@ $lang['login_password'] = 'Парола:'; $lang['login_submit'] = 'Вход'; # content +$lang['wysiwyg_label'] = 'WYSIWYG'; $lang['enable_wysiwyg_editor'] = 'WYSIWYG режим'; $lang['disable_wysiwyg_editor'] = 'Text режим'; $lang['change_edit_mode_notice'] = 'Внимание! Настоящите промени няма да бъдат съхранени при смяна на режима на редактиране!'; @@ -435,8 +436,6 @@ $lang['settings_index_page'] = 'Начална страница'; $lang['settings_error_page'] = 'Error страница'; $lang['default_page_language'] = 'Език по подразбиране на страниците'; $lang['admin_language'] = 'Език на административната част'; -$lang['wysiwyg_editor'] = 'WYSIWYG редактор'; -$lang['wysiwyg_editor_enabled'] = 'WYSIWYG редакторът е разрешен'; $lang['settings_caching'] = 'Кеширане'; $lang['settings_caching_enabled'] = 'кеширането е разрешено'; $lang['settings_name'] = 'Име'; diff --git a/cms/lang/english.admin.lang.php b/cms/lang/english.admin.lang.php index e21fad4..455df9e 100644 --- a/cms/lang/english.admin.lang.php +++ b/cms/lang/english.admin.lang.php @@ -53,8 +53,9 @@ $lang['login_password'] = 'Password:'; $lang['login_submit'] = 'Log in'; # content -$lang['enable_wysiwyg_editor'] = 'WYSIWYG editor'; -$lang['disable_wysiwyg_editor'] = 'Source code'; +$lang['wysiwyg_label'] = 'WYSIWYG'; +$lang['enable_wysiwyg_editor'] = 'Enable WYSIWYG editor'; +$lang['disable_wysiwyg_editor'] = 'Disable WYSIWYG editor'; $lang['change_edit_mode_notice'] = 'Caution! Current changes will not be saved when switching edit mode!'; $lang['values_comma_separated'] = 'several values separated by comma'; $lang['page_overview'] = 'Page overview'; @@ -430,8 +431,6 @@ $lang['settings_index_page'] = 'Main page'; $lang['settings_error_page'] = 'Error page'; $lang['default_page_language'] = 'Default page language'; $lang['admin_language'] = 'Administration language'; -$lang['wysiwyg_editor'] = 'WYSIWYG editor'; -$lang['wysiwyg_editor_enabled'] = 'WYSIWYG editor enabled'; $lang['settings_caching'] = 'Caching'; $lang['settings_caching_enabled'] = 'caching enabled'; $lang['settings_name'] = 'Name'; diff --git a/cms/lang/german.admin.lang.php b/cms/lang/german.admin.lang.php index f2dd68b..e8e1e28 100644 --- a/cms/lang/german.admin.lang.php +++ b/cms/lang/german.admin.lang.php @@ -53,8 +53,9 @@ $lang['login_password'] = 'Passwort:'; $lang['login_submit'] = 'Login'; # content -$lang['enable_wysiwyg_editor'] = 'WYSIWYG-Editor'; -$lang['disable_wysiwyg_editor'] = 'Quelltext'; +$lang['wysiwyg_label'] = 'WYSIWYG'; +$lang['enable_wysiwyg_editor'] = 'WYSIWYG-Editor aktivieren'; +$lang['disable_wysiwyg_editor'] = 'WYSIWYG-Editor deaktivieren'; $lang['change_edit_mode_notice'] = 'Achtung! Aktuelle Änderungen werden beim Umschalten nicht übernommen!'; $lang['values_comma_separated'] = 'mehrere Werte durch Komma getrennt'; $lang['page_overview'] = 'Seitenübersicht'; @@ -430,8 +431,6 @@ $lang['settings_index_page'] = 'Hauptseite'; $lang['settings_error_page'] = 'Fehlerseite'; $lang['default_page_language'] = 'Standard-Sprache für Seiten'; $lang['admin_language'] = 'Administrations-Sprache'; -$lang['wysiwyg_editor'] = 'WYSIWYG-Editor'; -$lang['wysiwyg_editor_enabled'] = 'WYSIWYG-Editor aktiviert'; $lang['settings_caching'] = 'Caching'; $lang['settings_caching_enabled'] = 'Caching aktiviert'; $lang['settings_name'] = 'Name'; diff --git a/cms/lang/russian.admin.lang.php b/cms/lang/russian.admin.lang.php index adf29d2..5e7e1f5 100644 --- a/cms/lang/russian.admin.lang.php +++ b/cms/lang/russian.admin.lang.php @@ -57,8 +57,9 @@ $lang['login_password'] = 'Пароль:'; $lang['login_submit'] = 'Войти'; # content -$lang['enable_wysiwyg_editor'] = 'WYSIWYG'; -$lang['disable_wysiwyg_editor'] = 'Text'; +$lang['wysiwyg_label'] = 'WYSIWYG'; +$lang['enable_wysiwyg_editor'] = 'Включить визуальный редактор'; +$lang['disable_wysiwyg_editor'] = 'Отключить визуальный редактор'; $lang['change_edit_mode_notice'] = 'Внимание! При смене режима все несохранённые изменения будут потеряны!'; $lang['values_comma_separated'] = 'Перечислите значения через запятую'; $lang['page_overview'] = 'Страницы'; @@ -434,8 +435,6 @@ $lang['settings_index_page'] = 'Главная страница'; $lang['settings_error_page'] = 'Страница ошибок'; $lang['default_page_language'] = 'Язык по умолчанию'; $lang['admin_language'] = 'Язык Админ-центра'; -$lang['wysiwyg_editor'] = 'Визуальный редактор'; -$lang['wysiwyg_editor_enabled'] = 'Визуальный редактор разрешён'; $lang['settings_caching'] = 'Кэширование'; $lang['settings_caching_enabled'] = 'Кэширование разрешено'; $lang['settings_name'] = 'Имя'; diff --git a/cms/lang/spanish.admin.lang.php b/cms/lang/spanish.admin.lang.php index 60385f9..48c4ca7 100644 --- a/cms/lang/spanish.admin.lang.php +++ b/cms/lang/spanish.admin.lang.php @@ -55,8 +55,9 @@ $lang['login_password'] = 'Contraseña:'; $lang['login_submit'] = 'iniciar sesión'; # content -$lang['enable_wysiwyg_editor'] = 'Modo WYSIWYG'; -$lang['disable_wysiwyg_editor'] = 'Modo texto'; +$lang['wysiwyg_label'] = 'WYSIWYG'; +$lang['enable_wysiwyg_editor'] = 'Activar editor WYSIWYG'; +$lang['disable_wysiwyg_editor'] = 'Desactivar editor WYSIWYG'; $lang['change_edit_mode_notice'] = '¡Atención! ¡Los cambios actuales no se grabarán al cambiar el modo de edición!'; $lang['values_comma_separated'] = 'varios valores separados por comas'; $lang['page_overview'] = 'Relación de páginas'; @@ -433,8 +434,6 @@ $lang['settings_index_page'] = 'Página principal'; $lang['settings_error_page'] = 'Página de error'; $lang['default_page_language'] = 'Idioma por defecto para las páginas'; $lang['admin_language'] = 'Idioma de la interfaz de administración'; -$lang['wysiwyg_editor'] = 'Editor WYSIWYG'; -$lang['wysiwyg_editor_enabled'] = 'Editor WYSIWYG activado'; $lang['settings_caching'] = 'Cacheo'; $lang['settings_caching_enabled'] = 'Cacheo activado'; $lang['settings_name'] = 'Nombre'; diff --git a/cms/templates/admin/main.tpl b/cms/templates/admin/main.tpl index d3a46f3..4c1edb9 100644 --- a/cms/templates/admin/main.tpl +++ b/cms/templates/admin/main.tpl @@ -46,7 +46,7 @@ - + diff --git a/cms/templates/admin/subtemplates/edit.inc.tpl b/cms/templates/admin/subtemplates/edit.inc.tpl index 882970f..f81c635 100644 --- a/cms/templates/admin/subtemplates/edit.inc.tpl +++ b/cms/templates/admin/subtemplates/edit.inc.tpl @@ -52,32 +52,21 @@ - -
- -
- -
-
- -
- - - + + - - +
- +
@@ -109,11 +98,6 @@
-
@@ -121,16 +105,9 @@
- - -
@@ -383,13 +360,6 @@
- - -
-*/ ?>
@@ -428,7 +398,6 @@ -
diff --git a/cms/templates/admin/subtemplates/settings.inc.tpl b/cms/templates/admin/subtemplates/settings.inc.tpl index 093e89a..227b651 100644 --- a/cms/templates/admin/subtemplates/settings.inc.tpl +++ b/cms/templates/admin/subtemplates/settings.inc.tpl @@ -84,11 +84,6 @@
-
- -