From 772ed656b95fc96d469d276f74017bdf25a6a4d9 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 13 Jan 2021 20:05:07 +0100 Subject: [PATCH 01/19] add page_classes freely definable classes for navigation (each page can have its own classes) --- acp/core/pages.edit.php | 5 +++++ acp/core/pages.edit_form.php | 7 +++++-- acp/versions.php | 6 +++--- core/functions/func_get_content.php | 2 +- core/functions/func_navigation.php | 3 +++ install/contents/fc_pages.php | 1 + install/contents/fc_pages_cache.php | 1 + lib/lang/de/dict-backend.php | 1 + lib/lang/en/dict-backend.php | 1 + styles/default/templates/navigation.tpl | 2 +- 10 files changed, 22 insertions(+), 7 deletions(-) diff --git a/acp/core/pages.edit.php b/acp/core/pages.edit.php index cda28223..e1cbae67 100755 --- a/acp/core/pages.edit.php +++ b/acp/core/pages.edit.php @@ -267,6 +267,7 @@ "page_linkname" => "$page_linkname", "page_permalink" => "$page_permalink", "page_permalink_short" => "$page_permalink_short", + "page_classes" => "$page_classes", "page_hash" => "$page_hash", "page_type_of_use" => "$page_type_of_use", "page_redirect" => "$page_redirect", @@ -337,6 +338,7 @@ "page_linkname" => "$page_linkname", "page_permalink" => "$page_permalink", "page_permalink_short" => "$page_permalink_short", + "page_classes" => "$page_classes", "page_hash" => "$page_hash", "page_type_of_use" => "$page_type_of_use", "page_redirect" => "$page_redirect", @@ -395,6 +397,7 @@ "page_linkname" => "$page_linkname", "page_permalink" => "$page_permalink", "page_permalink_short" => "$page_permalink_short", + "page_classes" => "$page_classes", "page_hash" => "$page_hash", "page_type_of_use" => "$page_type_of_use", "page_redirect" => "$page_redirect", @@ -466,6 +469,7 @@ "page_linkname" => "$page_linkname", "page_permalink" => "$page_language", "page_permalink_short" => "$page_permalink_short", + "page_classes" => "$page_classes", "page_hash" => "$page_hash", "page_type_of_use" => "$page_type_of_use", "page_redirect" => "$page_redirect", @@ -530,6 +534,7 @@ "page_linkname" => "$page_linkname", "page_permalink" => "$page_language", "page_permalink_short" => "$page_permalink_short", + "page_classes" => "$page_classes", "page_hash" => "$page_hash", "page_type_of_use" => "$page_type_of_use", "page_redirect" => "$page_redirect", diff --git a/acp/core/pages.edit_form.php b/acp/core/pages.edit_form.php index d3ccade7..280542df 100644 --- a/acp/core/pages.edit_form.php +++ b/acp/core/pages.edit_form.php @@ -202,10 +202,13 @@ echo'
'; echo '
'; -echo '
'; +echo '
'; echo tpl_form_control_group('',$lang['f_page_linkname'],''); echo '
'; -echo '
'; +echo '
'; +echo tpl_form_control_group('',$lang['f_page_classes'],""); +echo '
'; +echo '
'; echo tpl_form_control_group('',$lang['f_page_hash'],""); echo '
'; echo '
'; diff --git a/acp/versions.php b/acp/versions.php index 18854738..c2d086ac 100755 --- a/acp/versions.php +++ b/acp/versions.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/core/functions/func_get_content.php b/core/functions/func_get_content.php index baf5b61e..c42b0fce 100644 --- a/core/functions/func_get_content.php +++ b/core/functions/func_get_content.php @@ -75,7 +75,7 @@ function get_content($page, $mode = 'p') { $nav_sql_filter = "WHERE page_status != 'draft' AND page_status != 'ghost' AND page_language = '$languagePack'"; } - $nav_sql = "SELECT page_id, page_hash, page_language, page_linkname, page_permalink, page_title, page_sort, page_status + $nav_sql = "SELECT page_id, page_classes, page_hash, page_language, page_linkname, page_permalink, page_title, page_sort, page_status FROM fc_pages $nav_sql_filter ORDER BY page_sort DESC"; $fc_nav = $db_content->query("$nav_sql")->fetchAll(); diff --git a/core/functions/func_navigation.php b/core/functions/func_navigation.php index 61fda7f0..0bb4d46f 100644 --- a/core/functions/func_navigation.php +++ b/core/functions/func_navigation.php @@ -38,6 +38,7 @@ function show_mainmenu() { $menu[$i]['page_title'] = stripslashes($fc_nav[$i]['page_title']); $menu[$i]['page_permalink'] = $fc_nav[$i]['page_permalink']; $menu[$i]['page_hash'] = $fc_nav[$i]['page_hash']; + $menu[$i]['page_classes'] = $fc_nav[$i]['page_classes']; $menu[$i]['link_status'] = $fc_defs['main_nav_class']; if(left_string($current_page_sort) == left_string($menu[$i]['page_sort']) ) { @@ -149,6 +150,7 @@ function build_submenu($index,$level=1) { $submenu[$index]['page_sort'] = $fc_nav[$index]['page_sort']; $submenu[$index]['page_permalink'] = $fc_nav[$index]['page_permalink']; $submenu[$index]['page_hash'] = $fc_nav[$index]['page_hash']; + $submenu[$index]['page_classes'] = $fc_nav[$index]['page_classes']; $submenu[$index]['page_linkname'] = stripslashes($fc_nav[$index]['page_linkname']); $submenu[$index]['page_title'] = stripslashes($fc_nav[$index]['page_title']); @@ -194,6 +196,7 @@ function show_sitemap() { $page_title = $fc_nav[$i]['page_title']; $page_status = $fc_nav[$i]['page_status']; $page_hash = $fc_nav[$i]['page_hash']; + $page_classes = $fc_nav[$i]['page_classes']; $page_permalink = $fc_nav[$i]['page_permalink']; $li_class = ''; diff --git a/install/contents/fc_pages.php b/install/contents/fc_pages.php index 8a4662cd..ab40a367 100644 --- a/install/contents/fc_pages.php +++ b/install/contents/fc_pages.php @@ -16,6 +16,7 @@ "page_redirect" => "VARCHAR(100) NOT NULL DEFAULT ''", "page_redirect_code" => "VARCHAR(20) NOT NULL DEFAULT ''", "page_funnel_uri" => "VARCHAR(500) NOT NULL DEFAULT ''", + "page_classes" => "VARCHAR(100) NOT NULL DEFAULT ''", "page_hash" => "VARCHAR(50) NOT NULL DEFAULT ''", "page_psw" => "VARCHAR(255) NOT NULL DEFAULT ''", "page_title" => "VARCHAR(255) NOT NULL DEFAULT ''", diff --git a/install/contents/fc_pages_cache.php b/install/contents/fc_pages_cache.php index 8018d83b..e34642d1 100644 --- a/install/contents/fc_pages_cache.php +++ b/install/contents/fc_pages_cache.php @@ -25,6 +25,7 @@ "page_redirect" => "VARCHAR(100) NOT NULL DEFAULT ''", "page_redirect_code" => "VARCHAR(20) NOT NULL DEFAULT ''", "page_funnel_uri" => "VARCHAR(500) NOT NULL DEFAULT ''", + "page_classes" => "VARCHAR(100) NOT NULL DEFAULT ''", "page_hash" => "VARCHAR(50) NOT NULL DEFAULT ''", "page_psw" => "VARCHAR(255) NOT NULL DEFAULT ''", "page_title" => "VARCHAR(255) NOT NULL DEFAULT ''", diff --git a/lib/lang/de/dict-backend.php b/lib/lang/de/dict-backend.php index 7244148e..3589ffff 100644 --- a/lib/lang/de/dict-backend.php +++ b/lib/lang/de/dict-backend.php @@ -215,6 +215,7 @@ $lang['f_page_permalink'] = "Permalink"; $lang['f_page_permalink_short'] = "Permalink"; $lang['f_page_permalink_short'] = "Kurz-Link"; +$lang['f_page_classes'] = "Klassen"; $lang['f_page_hash'] = "Hash"; $lang['f_page_redirect'] = "Weiterleitung"; $lang['btn_redirect'] = "Weiterleitungen"; diff --git a/lib/lang/en/dict-backend.php b/lib/lang/en/dict-backend.php index 2a45efeb..d157f168 100644 --- a/lib/lang/en/dict-backend.php +++ b/lib/lang/en/dict-backend.php @@ -218,6 +218,7 @@ $lang['f_page_linkname'] = "Linkname"; $lang['f_page_permalink'] = "Permalink"; $lang['f_page_permalink_short'] = "Short-Link"; +$lang['f_page_classes'] = "Classes"; $lang['f_page_hash'] = "Hash"; $lang['f_page_redirect'] = "Redirect"; $lang['btn_redirect'] = "Redirects"; diff --git a/styles/default/templates/navigation.tpl b/styles/default/templates/navigation.tpl index 7d213d14..7758251c 100644 --- a/styles/default/templates/navigation.tpl +++ b/styles/default/templates/navigation.tpl @@ -9,7 +9,7 @@
{post_releasedate} -

{post_title}

+

{post_title}

{post_teaser} -

{post_external_link}

+

{post_external_link}

{post_cats}

-

{read_more_text}

\ No newline at end of file diff --git a/styles/default/templates/posts/post-list-m-wo.tpl b/styles/default/templates/posts/post-list-m-wo.tpl index e9091cc1..6593b9e0 100644 --- a/styles/default/templates/posts/post-list-m-wo.tpl +++ b/styles/default/templates/posts/post-list-m-wo.tpl @@ -2,7 +2,7 @@ {post_author} {post_releasedate}

{post_title}

- + {post_teaser}

{post_cats}

From a5955e730c8f2574698cc5ff032a6775566f962c Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 5 Feb 2021 11:29:39 +0100 Subject: [PATCH 19/19] increase version info (build 143) --- acp/versions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acp/versions.php b/acp/versions.php index c4438257..010d9b57 100755 --- a/acp/versions.php +++ b/acp/versions.php @@ -1,5 +1,5 @@ \ No newline at end of file