diff --git a/cms/data/content.sqlite b/cms/data/content.sqlite index 28bdfd4..2ea9a04 100644 Binary files a/cms/data/content.sqlite and b/cms/data/content.sqlite differ diff --git a/cms/data/entries.sqlite b/cms/data/entries.sqlite index f54ffd2..1660dd2 100644 Binary files a/cms/data/entries.sqlite and b/cms/data/entries.sqlite differ diff --git a/cms/data/userdata.sqlite b/cms/data/userdata.sqlite index 2cb0b3b..6d0ebab 100644 Binary files a/cms/data/userdata.sqlite and b/cms/data/userdata.sqlite differ diff --git a/cms/includes/page_types/simple_news.php b/cms/includes/page_types/simple_news.php index a754dda..4a1526a 100644 --- a/cms/includes/page_types/simple_news.php +++ b/cms/includes/page_types/simple_news.php @@ -1,5 +1,5 @@ prepare("UPDATE ".Database::$db_settings['news_table']." SET time=:time, title=:title, teaser=:teaser, text=:text, text_formatting=:text_formatting, linkname=:linkname WHERE id=:id"); + $dbr = Database::$content->prepare("UPDATE ".Database::$db_settings['news_table']." SET time=:time, title=:title, teaser=:teaser, text=:text, linkname=:linkname WHERE id=:id"); $dbr->bindParam(':id', $_POST['id'], PDO::PARAM_INT); $dbr->bindParam(':time', $time, PDO::PARAM_INT); $dbr->bindParam(':title', $title, PDO::PARAM_STR); $dbr->bindParam(':teaser', $teaser, PDO::PARAM_STR); $dbr->bindParam(':text', $text, PDO::PARAM_STR); - $dbr->bindParam(':text_formatting', $text_formatting, PDO::PARAM_INT); + #$dbr->bindParam(':text_formatting', $text_formatting, PDO::PARAM_INT); $dbr->bindParam(':linkname', $linkname, PDO::PARAM_STR); $dbr->execute(); $id = $_POST['id']; @@ -63,7 +63,7 @@ if($authorized_to_edit && isset($_POST['text'])) $dbr->bindParam(':title', $title, PDO::PARAM_STR); $dbr->bindParam(':teaser', $teaser, PDO::PARAM_STR); $dbr->bindParam(':text', $text, PDO::PARAM_STR); - $dbr->bindParam(':text_formatting', $text_formatting, PDO::PARAM_INT); + #$dbr->bindParam(':text_formatting', $text_formatting, PDO::PARAM_INT); $dbr->bindParam(':linkname', $linkname, PDO::PARAM_STR); $dbr->execute(); #$id = $dbr->lastInsertId(); @@ -104,7 +104,7 @@ if($authorized_to_edit && isset($_POST['text'])) $edit_news['title'] = isset($_POST['title']) ? htmlspecialchars($_POST['title']) : ''; $edit_news['teaser'] = isset($_POST['teaser']) ? htmlspecialchars($_POST['teaser']) : ''; $edit_news['text'] = isset($_POST['text']) ? htmlspecialchars($_POST['text']) : ''; - $edit_news['text_formatting'] = isset($_POST['text_formatting']) && $_POST['text_formatting']==1 ? 1 : 0; + #$edit_news['text_formatting'] = isset($_POST['text_formatting']) && $_POST['text_formatting']==1 ? 1 : 0; $edit_news['link'] = isset($_POST['link']) ? htmlspecialchars($_POST['link']) : ''; $edit_news['linkname'] = isset($_POST['linkname']) ? htmlspecialchars($_POST['linkname']) : ''; $edit_news['time'] = isset($_POST['time']) ? htmlspecialchars($_POST['time']) : date("Y-m-d H:i:s"); @@ -119,8 +119,8 @@ if($authorized_to_edit && isset($_POST['text'])) if($authorized_to_edit && isset($_GET['get_1']) && $_GET['get_1']=='add_item') { - $edit_news['text_formatting'] = $settings['default_formatting']; - $edit_news['text_formatting'] = 1; + #$edit_news['text_formatting'] = $settings['default_formatting']; + #$edit_news['text_formatting'] = 1; $edit_news['linkname'] = Localization::$lang['simple_news_default_linkname']; $edit_news['time'] = date("Y-m-d H:i:s", time()); if($settings['wysiwyg_editor'] && isset($_SESSION[$settings['session_prefix'].'wysiwyg']) && $_SESSION[$settings['session_prefix'].'wysiwyg']==1) $template->assign('wysiwyg', true); @@ -139,7 +139,7 @@ if($authorized_to_edit && isset($_GET['get_1']) && $_GET['get_1']=='add_item') } elseif($authorized_to_edit && isset($_GET['get_1']) && isset($_GET['get_2']) && $_GET['get_2']=='edit') { - $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, text_formatting, linkname FROM ".Database::$db_settings['news_table']." WHERE id=:id LIMIT 1"); + $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, linkname FROM ".Database::$db_settings['news_table']." WHERE id=:id LIMIT 1"); $dbr->bindParam(':id', $_GET['get_1'], PDO::PARAM_STR); $dbr->execute(); $edit_news_item_data = $dbr->fetch(); @@ -149,7 +149,7 @@ elseif($authorized_to_edit && isset($_GET['get_1']) && isset($_GET['get_2']) && $edit_news['title'] = htmlspecialchars($edit_news_item_data['title']); $edit_news['teaser'] = htmlspecialchars($edit_news_item_data['teaser']); $edit_news['text'] = htmlspecialchars($edit_news_item_data['text']); - $edit_news['text_formatting'] = $edit_news_item_data['text_formatting']; + #$edit_news['text_formatting'] = $edit_news_item_data['text_formatting']; $edit_news['linkname'] = htmlspecialchars($edit_news_item_data['linkname']); $edit_news['time'] = date("Y-m-d H:i:s", $edit_news_item_data['time']); $template->assign('edit_news', $edit_news); @@ -177,7 +177,7 @@ elseif($authorized_to_edit && isset($_GET['get_1']) && isset($_GET['get_2']) && } elseif($authorized_to_edit && isset($_GET['get_1']) && isset($_GET['get_2']) && $_GET['get_2']=='delete') { - $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, text_formatting, linkname FROM ".Database::$db_settings['news_table']." WHERE id=:id LIMIT 1"); + $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, linkname FROM ".Database::$db_settings['news_table']." WHERE id=:id LIMIT 1"); $dbr->bindParam(':id', $_GET['get_1'], PDO::PARAM_STR); $dbr->execute(); $delete_news_item_data = $dbr->fetch(); @@ -199,7 +199,7 @@ elseif($authorized_to_edit && isset($_GET['get_1']) && isset($_GET['get_2']) && elseif(isset($_GET['get_1']) && $_GET['get_1']=='rss') { $rss = true; - $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, text_formatting, linkname FROM ".Database::$db_settings['news_table']." WHERE page_id=:page_id AND time<=:now ORDER BY time DESC LIMIT ".$settings['rss_maximum_items']); + $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, linkname FROM ".Database::$db_settings['news_table']." WHERE page_id=:page_id AND time<=:now ORDER BY time DESC LIMIT ".$settings['rss_maximum_items']); $dbr->bindParam(':page_id', $data['id'], PDO::PARAM_STR); $dbr->bindValue(':now', time(), PDO::PARAM_STR); $dbr->execute(); @@ -213,8 +213,8 @@ elseif(isset($_GET['get_1']) && $_GET['get_1']=='rss') } else { - if($rss_data['text_formatting']==1) $rss_items[$i]['content'] = auto_html($rss_data['text']); - else $rss_items[$i]['content'] = $rss_data['text']; + #if($rss_data['text_formatting']==1) $rss_items[$i]['content'] = auto_html($rss_data['text']); + $rss_items[$i]['content'] = $rss_data['text']; } $rss_items[$i]['linkname'] = htmlspecialchars($rss_data['linkname']); $rss_items[$i]['link'] = BASE_URL.PAGE.','.$rss_data['id']; @@ -228,7 +228,7 @@ elseif(isset($_GET['get_1']) && $_GET['get_1']=='rss') } elseif(isset($_GET['get_1']) && intval($_GET['get_1'])>0) // item opened { - $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, text_formatting FROM ".Database::$db_settings['news_table']." WHERE id=:id LIMIT 1"); + $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text FROM ".Database::$db_settings['news_table']." WHERE id=:id LIMIT 1"); $dbr->bindParam(':id', $_GET['get_1'], PDO::PARAM_STR); $dbr->execute(); $note_data = $dbr->fetch(); @@ -237,8 +237,8 @@ elseif(isset($_GET['get_1']) && intval($_GET['get_1'])>0) // item opened $news_item['id'] = $note_data['id']; $news_item['title'] = htmlspecialchars($note_data['title']); $news_item['teaser'] = htmlspecialchars($note_data['teaser']); - if($note_data['text_formatting']==1) $news_item['text'] = auto_html($note_data['text']); - else $news_item['text'] = $note_data['text']; + #if($note_data['text_formatting']==1) $news_item['text'] = auto_html($note_data['text']); + $news_item['text'] = $note_data['text']; $news_item['time'] = date("Y-m-d H:i:s", $note_data['time']); $template->assign('display_time', true); $localization->replacePlaceholder('time', $note_data['time'], 'page_time', Localization::FORMAT_TIME); @@ -280,7 +280,7 @@ else // overview if($current_page<1) $current_page = 1; if($current_page>$total_pages) $current_page = $total_pages; - $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, text_formatting, linkname FROM ".Database::$db_settings['news_table']." WHERE page_id=:page_id ORDER BY time DESC LIMIT ".(($current_page-1)*$settings['simple_news_per_page']).", ".$settings['simple_news_per_page']); // AND time<=:now + $dbr = Database::$content->prepare("SELECT id, time, title, teaser, text, linkname FROM ".Database::$db_settings['news_table']." WHERE page_id=:page_id ORDER BY time DESC LIMIT ".(($current_page-1)*$settings['simple_news_per_page']).", ".$settings['simple_news_per_page']); // AND time<=:now $dbr->bindParam(':page_id', $data['id'], PDO::PARAM_STR); //$dbr->bindValue(':now', time(), PDO::PARAM_STR); $dbr->execute(); @@ -291,8 +291,8 @@ else // overview $news[$i]['time'] = $news_data['time']; $news[$i]['title'] = $news_data['title']; $news[$i]['teaser'] = $news_data['teaser']; - if($news_data['text_formatting']==1) $news[$i]['text'] = auto_html($news_data['text']); - else $news[$i]['text'] = $news_data['text']; + #if($news_data['text_formatting']==1) $news[$i]['text'] = auto_html($news_data['text']); + $news[$i]['text'] = $news_data['text']; $news[$i]['linkname'] = $news_data['linkname']; $localization->bindReplacePlaceholder($news_data['id'], 'time', $news_data['time'], 'simple_news_time', Localization::FORMAT_TIME); $i++; diff --git a/cms/lang/english.page.lang.php b/cms/lang/english.page.lang.php index d074f8a..18e9ec6 100644 --- a/cms/lang/english.page.lang.php +++ b/cms/lang/english.page.lang.php @@ -122,10 +122,10 @@ $lang['simple_news_edit_text_format'] = 'auto formatting'; $lang['simple_news_edit_linkname'] = 'Link name:'; $lang['simple_news_default_linkname'] = 'moreā¦'; $lang['simple_news_edit_time'] = 'Date/time:'; -$lang['simple_news_edit_time_format'] = '(YYYY-MM-DD HH:MM:SS)'; +$lang['simple_news_edit_time_format'] = 'YYYY-MM-DD HH:MM:SS'; $lang['simple_news_add_item'] = 'Add entry'; $lang['simple_news_edit_item'] = 'Edit item'; -$lang['simple_news_delete_confirm'] = 'Do you really want to delete this entry?'; +$lang['simple_news_delete_confirm'] = 'Delete this entry?'; $lang['error_news_no_title'] = 'No title specified'; $lang['error_news_no_text'] = 'No text entered'; $lang['error_news_time_invalid'] = 'invalid date/time format'; diff --git a/cms/templates/subtemplates/formmailer.inc.tpl b/cms/templates/subtemplates/formmailer.inc.tpl index a0e6c72..44ccfcf 100644 --- a/cms/templates/subtemplates/formmailer.inc.tpl +++ b/cms/templates/subtemplates/formmailer.inc.tpl @@ -34,7 +34,7 @@ -
+ diff --git a/cms/templates/subtemplates/simple_news.inc.tpl b/cms/templates/subtemplates/simple_news.inc.tpl index 806f925..f290cdd 100644 --- a/cms/templates/subtemplates/simple_news.inc.tpl +++ b/cms/templates/subtemplates/simple_news.inc.tpl @@ -9,37 +9,56 @@ - @@ -49,7 +68,7 @@[ - « +