';
echo '
';
echo '
';
+
+$cnt_labels = count($fc_labels);
+$arr_checked_labels = explode(",", $get_shortcode['textlib_labels']);
+
+for($i=0;$i<$cnt_labels;$i++) {
+ $label_title = $fc_labels[$i]['label_title'];
+ $label_id = $fc_labels[$i]['label_id'];
+ $label_color = $fc_labels[$i]['label_color'];
+
+ if(in_array("$label_id", $arr_checked_labels)) {
+ $checked_label = "checked";
+ } else {
+ $checked_label = "";
+ }
+
+ $checkbox_set_labels .= '
';
+ $checkbox_set_labels .= '';
+ $checkbox_set_labels .= '';
+ $checkbox_set_labels .= '
';
+}
+
+echo '
';
+
+
+
echo '
';
if($get_shortcode['textlib_id'] != '') {
diff --git a/acp/core/pages.snippets.php b/acp/core/pages.snippets.php
index 8d5d5f09..808ced0e 100644
--- a/acp/core/pages.snippets.php
+++ b/acp/core/pages.snippets.php
@@ -210,7 +210,7 @@
}
$snippet_label_filter = substr("$snippet_label_filter", 0, -3); // cut the last ' OR'
-$filter_string = "WHERE textlib_id IS NOT NULL";
+$filter_string = "WHERE textlib_id IS NOT NULL AND textlib_type NOT IN('shortcode')";
if($_SESSION['type'] == 'all') {
$filter_type = '';
diff --git a/acp/core/system.syspref.php b/acp/core/system.syspref.php
index 15adf7b7..a066a5a3 100644
--- a/acp/core/system.syspref.php
+++ b/acp/core/system.syspref.php
@@ -50,6 +50,20 @@
}
+/* save date/time settings */
+
+if(isset($_POST['save_datetime'])) {
+
+ $data = $db_content->update("fc_preferences", [
+ "prefs_timezone" => $prefs_timezone,
+ "prefs_dateformat" => $prefs_dateformat,
+ "prefs_timeformat" => $prefs_timeformat
+ ], [
+ "prefs_id" => 1
+ ]);
+
+}
+
@@ -242,7 +256,105 @@
echo '';
echo '';
+$timezones = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
+
+/* date and time settings */
+echo '
';
+
+echo '
';
/* User Preferences */
echo '
';
diff --git a/acp/core/upload_addons.php b/acp/core/upload_addons.php
index 0362d593..377e10ec 100644
--- a/acp/core/upload_addons.php
+++ b/acp/core/upload_addons.php
@@ -287,7 +287,7 @@
echo '
';
if(count($all_uploads) < 1) {
- echo '
'.$lang['msg_nothing_to_install'].'
';
+ echo '
'.$lang['msg_nothing_to_install'].' '.$icon['sync_alt'].' reload
';
} else {
echo '
';
diff --git a/acp/templates/dashboard_top.tpl b/acp/templates/dashboard_top.tpl
index 416e9095..3935d785 100644
--- a/acp/templates/dashboard_top.tpl
+++ b/acp/templates/dashboard_top.tpl
@@ -8,6 +8,7 @@
{tab_pages_stats}
+
{pages_list}
@@ -18,6 +19,10 @@
+
+
+
{posts_list}
@@ -35,6 +41,10 @@
{comments_list}
+
+
@@ -45,6 +55,7 @@
{tab_user_stats}
+
{user_list}
@@ -55,6 +66,10 @@
+
+
diff --git a/acp/versions.php b/acp/versions.php
index 1019df85..865e91ee 100755
--- a/acp/versions.php
+++ b/acp/versions.php
@@ -1,5 +1,5 @@
\ No newline at end of file
diff --git a/core/posts-display.php b/core/posts-display.php
index 8c54bde6..160020cc 100644
--- a/core/posts-display.php
+++ b/core/posts-display.php
@@ -7,7 +7,7 @@
$post_images = explode("<->", $post_data['post_images']);
-$post_releasedate = date('Y-m-d H:i',$post_data['post_releasedate']);
+$post_releasedate = date("$prefs_dateformat $prefs_timeformat",$post_data['post_releasedate']);
$post_releasedate_year = date('Y',$post_data['post_releasedate']);
$post_releasedate_month = date('m',$post_data['post_releasedate']);
$post_releasedate_day = date('d',$post_data['post_releasedate']);
diff --git a/core/posts-list.php b/core/posts-list.php
index 3473e1b3..9fffd077 100644
--- a/core/posts-list.php
+++ b/core/posts-list.php
@@ -126,11 +126,11 @@
$posts_list = '';
foreach($get_posts as $k => $post) {
- $post_releasedate = date('Y-m-d',$get_posts[$k]['post_releasedate']);
+ $post_releasedate = date($prefs_dateformat,$get_posts[$k]['post_releasedate']);
$post_releasedate_year = date('Y',$get_posts[$k]['post_releasedate']);
$post_releasedate_month = date('m',$get_posts[$k]['post_releasedate']);
$post_releasedate_day = date('d',$get_posts[$k]['post_releasedate']);
- $post_releasedate_time = date('H:i:s',$get_posts[$k]['post_releasedate']);
+ $post_releasedate_time = date($prefs_timeformat,$get_posts[$k]['post_releasedate']);
/* event dates */
@@ -224,7 +224,6 @@
$post_teaser = htmlspecialchars_decode($get_posts[$k]['post_teaser']);
$post_text = htmlspecialchars_decode($get_posts[$k]['post_text']);
- $post_releasedate = date('d.m.Y',$get_posts[$k]['post_releasedate']);
$post_categories = explode('<->',$get_posts[$k]['post_categories']);
$cat_str = '';
diff --git a/index.php b/index.php
index ef3cd468..876b2972 100644
--- a/index.php
+++ b/index.php
@@ -194,6 +194,17 @@
$$key = stripslashes($val);
}
+
+if($prefs_dateformat == '') {
+ $prefs_dateformat = 'Y-m-d';
+}
+
+if($prefs_timeformat == '') {
+ $prefs_timeformat = 'H:i:s';
+}
+
+
+
if(!empty($page_contents['page_modul'])) {
include 'modules/'.$page_contents['page_modul'].'/index.php';
}
@@ -221,6 +232,23 @@
}
+/* reset of the user-defined theme */
+if(isset($_POST['reset_theme'])) {
+ unset($_SESSION['prefs_template']);
+}
+
+/* set the theme defined by the user */
+if(isset($_POST['set_theme'])) {
+ $set_theme = 'styles/'.sanitizeUserInputs($_POST['set_theme']);
+ if(is_dir($set_theme)) {
+ $_SESSION['prefs_template'] = sanitizeUserInputs($_POST['set_theme']);
+ }
+}
+
+if($_SESSION['prefs_template'] != '') {
+ $prefs_template = $_SESSION['prefs_template'];
+}
+
// default template
$fc_template = $prefs_template;
$fc_template_layout = $prefs_template_layout;
diff --git a/install/contents/fc_preferences.php b/install/contents/fc_preferences.php
index 2976e864..6a05ef6e 100644
--- a/install/contents/fc_preferences.php
+++ b/install/contents/fc_preferences.php
@@ -54,6 +54,12 @@
"prefs_anonymize_ip" => "VARCHAR(20) NOT NULL DEFAULT ''",
"prefs_xml_sitemap" => "VARCHAR(20) NOT NULL DEFAULT ''",
+ /* Date and Time */
+
+ "prefs_timezone" => "VARCHAR(20) NOT NULL DEFAULT ''",
+ "prefs_dateformat" => "VARCHAR(100) NOT NULL DEFAULT ''",
+ "prefs_timeformat" => "VARCHAR(100) NOT NULL DEFAULT ''",
+
/* E-Mail */
"prefs_mailer_adr" => "VARCHAR(100) NOT NULL DEFAULT ''",
diff --git a/lib/lang/de/dict-backend.php b/lib/lang/de/dict-backend.php
index c32076c7..fc8fbf5e 100644
--- a/lib/lang/de/dict-backend.php
+++ b/lib/lang/de/dict-backend.php
@@ -456,6 +456,11 @@
$lang['acp_session_lifetime'] = 'ACP Session Lifetime (Sekunden)';
+$lang['label_datetime_settings'] = 'Datums- und Uhrzeit-Einstellungen';
+$lang['label_datetime_timezone'] = 'Zeitzone';
+$lang['label_datetime_dateformat'] = 'Datumsformat';
+$lang['label_datetime_timeformat'] = 'Zeitformat';
+
/* Rights Management */
$lang['drm_description'] = "Der Benutzer darf folgende Aktionen durchführen";
diff --git a/lib/lang/en/dict-backend.php b/lib/lang/en/dict-backend.php
index 3b6be252..7ca5c499 100644
--- a/lib/lang/en/dict-backend.php
+++ b/lib/lang/en/dict-backend.php
@@ -456,6 +456,11 @@
$lang['acp_session_lifetime'] = 'ACP Session Lifetime (Seconds)';
+$lang['label_datetime_settings'] = 'Date and Time Settings';
+$lang['label_datetime_timezone'] = 'Timezone';
+$lang['label_datetime_dateformat'] = 'Dateformat';
+$lang['label_datetime_timeformat'] = 'Timeformat';
+
/* rights management */