From 2a2b86aa3ddbd522930a367967b91e0be66caa2e Mon Sep 17 00:00:00 2001 From: KuJoe Date: Sat, 14 Sep 2024 12:01:11 -0400 Subject: [PATCH 1/4] Add the ability to disable comments per post Provide a drop down in the add/edit posts for the author to specify if comments should be enabled or disabled for that specific post. --- lang/en_US.ini | 3 ++ system/admin/admin.php | 22 ++++++++--- system/admin/views/add-content.html.php | 6 +++ system/admin/views/edit-content.html.php | 7 ++++ system/htmly.php | 47 ++++++++++++++---------- system/includes/functions.php | 9 ++++- themes/blog/post.html.php | 3 +- themes/clean/post.html.php | 15 +++++--- themes/doks/post.html.php | 26 +++++++------ themes/logs/post.html.php | 15 +++++--- themes/readable/post.html.php | 15 +++++--- themes/twentyfifteen/post.html.php | 29 ++++++++------- themes/twentysixteen/post.html.php | 46 ++++++++++++----------- 13 files changed, 150 insertions(+), 93 deletions(-) diff --git a/lang/en_US.ini b/lang/en_US.ini index fbe88a37..2fab0130 100644 --- a/lang/en_US.ini +++ b/lang/en_US.ini @@ -321,3 +321,6 @@ msg_error_field_req_feedurl = "You need to specify the feed url." rss_feeds_description_select = "RSS Description" rss_description_body = "Post Body" rss_description_meta = "Post Meta Description" +comment_state = "Comments Status" +comments_enabled = "Enabled" +comments_disabled = "Disabled" \ No newline at end of file diff --git a/system/admin/admin.php b/system/admin/admin.php index bf11de3b..a6e6057b 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -120,7 +120,7 @@ function remove_accent($str) } // Add content -function add_content($title, $tag, $url, $content, $user, $draft, $category, $type, $description = null, $media = null, $dateTime = null, $autoSave = null) +function add_content($title, $tag, $url, $content, $user, $draft, $category, $type, $comments, $description = null, $media = null, $dateTime = null, $autoSave = null) { if (!is_null($autoSave)) { $draft = 'draft'; @@ -213,12 +213,17 @@ function add_content($title, $tag, $url, $content, $user, $draft, $category, $ty } else { $tagmd = ""; } - if ($media!== null) { - $post_media = "\n"; + if ($media !== null) { + $post_media = "\n"; } else { $post_media = ""; } - $post_content = "" . $post_description . $tagmd . $post_media . "\n\n" . $content; + if ($comments == "false") { + $comment = "\n"; + } else { + $comment = ""; + } + $post_content = "" . $post_description . $tagmd . $comment . $post_media . "\n\n" . $content; if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) { @@ -273,7 +278,7 @@ function add_content($title, $tag, $url, $content, $user, $draft, $category, $ty } // Edit content -function edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, $type, $destination = null, $description = null, $date = null, $media = null, $autoSave = null) +function edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, $type, $comments, $destination = null, $description = null, $date = null, $media = null, $autoSave = null) { $tag = explode(',', preg_replace("/\s*,\s*/", ",", rtrim($tag, ','))); $tag = array_filter(array_unique($tag)); @@ -363,7 +368,12 @@ function edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publ } else { $post_media = ""; } - $post_content = "" . $post_description . $tagmd . $post_media . "\n\n" . $content; + if ($comments == "false") { + $comment = "\n"; + } else { + $comment = ""; + } + $post_content = "" . $post_description . $tagmd . $comment . $post_media . "\n\n" . $content; $dirBlog = $dir[0] . '/' . $dir[1] . '/' . $dir[2] . '/' . $category . '/' . $type . '/'; $dirDraft = $dir[0] . '/' . $dir[1] . '/' . $dir[2] . '/' . $category . '/draft/'; diff --git a/system/admin/views/add-content.html.php b/system/admin/views/add-content.html.php index f468d039..37caaec0 100644 --- a/system/admin/views/add-content.html.php +++ b/system/admin/views/add-content.html.php @@ -109,6 +109,12 @@ function extractLast( term ) {
+ + +
diff --git a/system/admin/views/edit-content.html.php b/system/admin/views/edit-content.html.php index 22a2bc50..12e230aa 100644 --- a/system/admin/views/edit-content.html.php +++ b/system/admin/views/edit-content.html.php @@ -14,6 +14,7 @@ $oldtitle = get_content_tag('t', $content, 'Untitled'); $olddescription = get_content_tag('d', $content); $oldtag = get_content_tag('tag', $content); +$oldcomment = check_comments_state($content); $oldcontent = remove_html_comments($content); $oldimage = get_content_tag('image', $content); @@ -155,6 +156,12 @@ function extractLast( term ) {
+ + +
diff --git a/system/htmly.php b/system/htmly.php index 49146681..59ad3878 100644 --- a/system/htmly.php +++ b/system/htmly.php @@ -722,6 +722,7 @@ $category = from($_REQUEST, 'category'); $date = from($_REQUEST, 'date'); $time = from($_REQUEST, 'time'); + $comments = from($_REQUEST, 'comments'); $dateTime = null; if ($date !== null && $time !== null) { $dateTime = $date . ' ' . $time; @@ -736,17 +737,17 @@ } if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($is_post)) { - add_content($title, $tag, $url, $content, $user, $draft, $category, 'post', $description, null, $dateTime); + add_content($title, $tag, $url, $content, $user, $draft, $category, 'post', $description, null, $dateTime, $comments); } elseif ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($image)) { - add_content($title, $tag, $url, $content, $user, $draft, $category, 'image', $description, $image, $dateTime); + add_content($title, $tag, $url, $content, $user, $draft, $category, 'image', $description, $image, $dateTime, $comments); } elseif ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($video)) { - add_content($title, $tag, $url, $content, $user, $draft, $category, 'video', $description, $video, $dateTime); + add_content($title, $tag, $url, $content, $user, $draft, $category, 'video', $description, $video, $dateTime, $comments); } elseif ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($audio)) { - add_content($title, $tag, $url, $content, $user, $draft, $category, 'audio', $description, $audio, $dateTime); + add_content($title, $tag, $url, $content, $user, $draft, $category, 'audio', $description, $audio, $dateTime, $comments); } elseif ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($quote)) { - add_content($title, $tag, $url, $content, $user, $draft, $category, 'quote', $description, $quote, $dateTime); + add_content($title, $tag, $url, $content, $user, $draft, $category, 'quote', $description, $quote, $dateTime, $comments); } elseif ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($link)) { - add_content($title, $tag, $url, $content, $user, $draft, $category, 'link', $description, $link, $dateTime); + add_content($title, $tag, $url, $content, $user, $draft, $category, 'link', $description, $link, $dateTime, $comments); } else { $message['error'] = ''; if (empty($title)) { @@ -799,6 +800,7 @@ 'postAudio' => $audio, 'postTag' => $tag, 'postUrl' => $url, + 'postComments' => $comments, 'postContent' => $content, 'type' => $type, 'is_admin' => true, @@ -914,6 +916,7 @@ $addEdit = $_REQUEST['addEdit']; $user = $_SESSION[site_url()]['user']; $role = user('role', $user); + $comments = $_REQUEST['comments']; if (empty($url)) { $url = $title; @@ -971,11 +974,11 @@ if (!empty($title) && !empty($tag) && !empty($content)) { if ($addEdit == 'add') { - $response = add_content($title, $tag, $url, $content, $user, $draft, $category, $type, $description, $media, $dateTime, $autoSave); + $response = add_content($title, $tag, $url, $content, $user, $draft, $category, $type, $description, $media, $dateTime, $autoSave, $comments); } else { $arr = explode('/', $oldfile); if ($user === $arr[1] || $role === 'editor' || $role === 'admin') { - $response = edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, $type, $destination, $description, $dateTime, $media, $autoSave); + $response = edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, $type, $destination, $description, $dateTime, $media, $autoSave, $comments); } } } @@ -3706,6 +3709,7 @@ $description = from($_REQUEST, 'description'); $date = from($_REQUEST, 'date'); $time = from($_REQUEST, 'time'); + $comments = from($_REQUEST, 'comments'); $dateTime = null; $revertPost = from($_REQUEST, 'revertpost'); $publishDraft = from($_REQUEST, 'publishdraft'); @@ -3738,27 +3742,27 @@ if ($user === $arr[1] || $role === 'editor' || $role === 'admin') { if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($image)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'image', $destination, $description, $dateTime, $image); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'image', $comments, $destination, $description, $dateTime, $image); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($video)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'video', $destination, $description, $dateTime, $video); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'video', $comments, $destination, $description, $dateTime, $video); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($link)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'link', $destination, $description, $dateTime, $link); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'link', $comments, $destination, $description, $dateTime, $link); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($quote)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'quote', $destination, $description, $dateTime, $quote); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'quote', $comments, $destination, $description, $dateTime, $quote); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($audio)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'audio', $destination, $description, $dateTime, $audio); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'audio', $comments, $destination, $description, $dateTime, $audio); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($is_post)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'post', $destination, $description, $dateTime, null); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'post', $comments, $destination, $description, $dateTime, null); } else { $message['error'] = ''; @@ -3816,6 +3820,7 @@ 'postUrl' => $url, 'type' => $type, 'is_admin' => true, + 'postComments' => $comments, 'postContent' => $content, 'bodyclass' => 'edit-post', 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Edit_content') @@ -4889,6 +4894,7 @@ $description = from($_REQUEST, 'description'); $date = from($_REQUEST, 'date'); $time = from($_REQUEST, 'time'); + $comments = $_REQUEST['comments']; $dateTime = null; $revertPost = from($_REQUEST, 'revertpost'); $publishDraft = from($_REQUEST, 'publishdraft'); @@ -4922,27 +4928,27 @@ if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($image)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'image', $destination, $description, $dateTime, $image); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'image', $comments, $destination, $description, $dateTime, $image); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($video)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'video', $destination, $description, $dateTime, $video); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'video', $comments, $destination, $description, $dateTime, $video); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($link)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'link', $destination, $description, $dateTime, $link); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'link', $comments, $destination, $description, $dateTime, $link); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($quote)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'quote', $destination, $description, $dateTime, $quote); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'quote', $comments, $destination, $description, $dateTime, $quote); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($audio)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'audio', $destination, $description, $dateTime, $audio); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'audio', $comments, $destination, $description, $dateTime, $audio); } else if ($proper && !empty($title) && !empty($tag) && !empty($content) && !empty($is_post)) { - edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'post', $destination, $description, $dateTime, null); + edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publishDraft, $category, 'post', $comments, $destination, $description, $dateTime, null); } else { $message['error'] = ''; @@ -5000,6 +5006,7 @@ 'postUrl' => $url, 'type' => $type, 'postContent' => $content, + 'postComments' => $comments, 'is_admin' => true, 'bodyclass' => 'edit-post', 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . $title diff --git a/system/includes/functions.php b/system/includes/functions.php index 70262040..7e789270 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -3720,10 +3720,17 @@ function get_content_tag($tag, $string, $alt = null) return $alt; } +// Check if comments are disabled inside the markdown files (true = disabled) +function check_comments_state($content) +{ + $tag = ''; + return strpos($content, $tag) !== false ? "false" : "true"; +} + // Strip html comment function remove_html_comments($content) { - $patterns = array('/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/'); + $patterns = array('/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/', '/(\s|)(\s|)/'); return preg_replace($patterns, '', $content); } diff --git a/themes/blog/post.html.php b/themes/blog/post.html.php index 71c5649d..7a9ce9e1 100644 --- a/themes/blog/post.html.php +++ b/themes/blog/post.html.php @@ -93,7 +93,8 @@
- +', $post->body); ?> +
diff --git a/themes/clean/post.html.php b/themes/clean/post.html.php index ce526374..67664ff6 100644 --- a/themes/clean/post.html.php +++ b/themes/clean/post.html.php @@ -61,11 +61,14 @@ related)?>
- -
- - -
+ ', $post->body); ?> + + +
+ + +
+
@@ -76,7 +79,7 @@
- + title, $p->url) ?>
\ No newline at end of file diff --git a/themes/doks/post.html.php b/themes/doks/post.html.php index 3e31f06f..6d486152 100644 --- a/themes/doks/post.html.php +++ b/themes/doks/post.html.php @@ -68,20 +68,22 @@ - - - title, $post->url) ?> - - - -
- -
- +', $post->body); ?> + -
+ title, $post->url) ?> + + + +
+ +
+ + +
+ +
-
diff --git a/themes/logs/post.html.php b/themes/logs/post.html.php index c22c9184..4c0f446b 100644 --- a/themes/logs/post.html.php +++ b/themes/logs/post.html.php @@ -61,11 +61,14 @@ related)?>
- -
- - -
+ ', $post->body); ?> + + +
+ + +
+
@@ -76,7 +79,7 @@ »
- + title, $p->url) ?> \ No newline at end of file diff --git a/themes/readable/post.html.php b/themes/readable/post.html.php index e981cbe2..703e1abd 100644 --- a/themes/readable/post.html.php +++ b/themes/readable/post.html.php @@ -59,11 +59,14 @@ related)?>
- -
- - -
+ ', $post->body); ?> + + +
+ + +
+
@@ -74,7 +77,7 @@
- + title, $p->url) ?> \ No newline at end of file diff --git a/themes/twentyfifteen/post.html.php b/themes/twentyfifteen/post.html.php index 0258a503..7d42e880 100644 --- a/themes/twentyfifteen/post.html.php +++ b/themes/twentyfifteen/post.html.php @@ -69,21 +69,24 @@ - - title, $p->url) ?> - - - - - -
- -
- +', $post->body); ?> + -
+ title, $p->url) ?> + + + + + +
+ +
+ + +
+ +
-
-', $post->body); ?> - -
-
-
-
-

Comments

- -
- - -
- -
-
-
-
+comments == "true"): ?> + +
+
+
+
+

Comments

+ +
+ + +
+ +
+
+
+
+ \ No newline at end of file diff --git a/themes/clean/post.html.php b/themes/clean/post.html.php index 67664ff6..5df3732d 100644 --- a/themes/clean/post.html.php +++ b/themes/clean/post.html.php @@ -61,8 +61,7 @@ related)?>
- ', $post->body); ?> - + comments == "true"): ?>
@@ -79,7 +78,7 @@
- + comments == "true"): ?> title, $p->url) ?> \ No newline at end of file diff --git a/themes/doks/post.html.php b/themes/doks/post.html.php index 6d486152..7773521c 100644 --- a/themes/doks/post.html.php +++ b/themes/doks/post.html.php @@ -68,8 +68,7 @@ -', $post->body); ?> - +comments == "true"): ?> title, $post->url) ?> diff --git a/themes/logs/post.html.php b/themes/logs/post.html.php index 4c0f446b..be52fa45 100644 --- a/themes/logs/post.html.php +++ b/themes/logs/post.html.php @@ -61,8 +61,7 @@ related)?>
- ', $post->body); ?> - + comments == "true"): ?>
@@ -79,7 +78,7 @@ »
- + comments == "true"): ?> title, $p->url) ?> \ No newline at end of file diff --git a/themes/readable/post.html.php b/themes/readable/post.html.php index 703e1abd..ebb083b8 100644 --- a/themes/readable/post.html.php +++ b/themes/readable/post.html.php @@ -59,8 +59,7 @@ related)?>
- ', $post->body); ?> - + comments == "true"): ?>
@@ -77,7 +76,7 @@
- + comments == "true"): ?> title, $p->url) ?> \ No newline at end of file diff --git a/themes/twentyfifteen/post.html.php b/themes/twentyfifteen/post.html.php index 7d42e880..f0735c7a 100644 --- a/themes/twentyfifteen/post.html.php +++ b/themes/twentyfifteen/post.html.php @@ -62,15 +62,16 @@ tag; ?> - - - - url ?>> - + comments == "true"): ?> + + + + url ?>> + + -', $post->body); ?> - +comments == "true"): ?> title, $p->url) ?> diff --git a/themes/twentysixteen/post.html.php b/themes/twentysixteen/post.html.php index 3717e7d1..23108044 100644 --- a/themes/twentysixteen/post.html.php +++ b/themes/twentysixteen/post.html.php @@ -60,18 +60,17 @@ category;?> Tags tag;?> - - - - - url ?>> - - + comments == "true"): ?> + + + + url ?>> + + - ', $post->body); ?> - + comments == "true"): ?> title, $p->url) ?> From 1d2d2b32a427891cf16f7333a83796bfdb50e7b5 Mon Sep 17 00:00:00 2001 From: KuJoe Date: Sun, 15 Sep 2024 10:59:44 -0400 Subject: [PATCH 3/4] Revert "Fixed the themes to work properly with no-comments tag" This reverts commit a45fbafd3a22eae2db6e745cbb9abe0b1dc927ef. --- system/includes/functions.php | 6 +-- themes/blog/post.html.php | 61 ++++++++++++++---------------- themes/clean/post.html.php | 5 ++- themes/doks/post.html.php | 3 +- themes/logs/post.html.php | 5 ++- themes/readable/post.html.php | 5 ++- themes/twentyfifteen/post.html.php | 15 ++++---- themes/twentysixteen/post.html.php | 17 +++++---- 8 files changed, 56 insertions(+), 61 deletions(-) diff --git a/system/includes/functions.php b/system/includes/functions.php index 63f78b0c..7e789270 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -487,9 +487,6 @@ function get_posts($posts, $page = 1, $perpage = 0) $post->link = get_content_tag('link', $content); $post->quote = get_content_tag('quote', $content); $post->audio = get_content_tag('audio', $content); - - // Check if comments are enabled - $post->comments = check_comments_state($content); $tag = array(); $url = array(); @@ -551,7 +548,6 @@ function get_posts($posts, $page = 1, $perpage = 0) $post->body = automatic_toc($post->body, 'post-' . $post->date); } } - // Convert image tags to figures if ($caption == 'true') { @@ -3724,7 +3720,7 @@ function get_content_tag($tag, $string, $alt = null) return $alt; } -// Check if comments are disabled inside the markdown files (false = disabled) +// Check if comments are disabled inside the markdown files (true = disabled) function check_comments_state($content) { $tag = ''; diff --git a/themes/blog/post.html.php b/themes/blog/post.html.php index 6791cf85..7a9ce9e1 100644 --- a/themes/blog/post.html.php +++ b/themes/blog/post.html.php @@ -43,14 +43,12 @@ body; ?>
- tag;?> - comments == "true"): ?> - - - - url ?>> - - + tag;?> + + + + url ?>> +
- comments == "true"): ?> - - title, $p->url) ?> - - - - + + title, $p->url) ?> + + + related, true, config('related.count'));?> = 1) { ?> @@ -97,22 +93,21 @@ -comments == "true"): ?> - -
-
-
-
-

Comments

- -
- - -
- -
-
-
-
- +', $post->body); ?> + +
+
+
+
+

Comments

+ +
+ + +
+ +
+
+
+
\ No newline at end of file diff --git a/themes/clean/post.html.php b/themes/clean/post.html.php index 5df3732d..67664ff6 100644 --- a/themes/clean/post.html.php +++ b/themes/clean/post.html.php @@ -61,7 +61,8 @@ related)?>
- comments == "true"): ?> + ', $post->body); ?> +
@@ -78,7 +79,7 @@
- comments == "true"): ?> + title, $p->url) ?> \ No newline at end of file diff --git a/themes/doks/post.html.php b/themes/doks/post.html.php index 7773521c..6d486152 100644 --- a/themes/doks/post.html.php +++ b/themes/doks/post.html.php @@ -68,7 +68,8 @@ -comments == "true"): ?> +', $post->body); ?> + title, $post->url) ?> diff --git a/themes/logs/post.html.php b/themes/logs/post.html.php index be52fa45..4c0f446b 100644 --- a/themes/logs/post.html.php +++ b/themes/logs/post.html.php @@ -61,7 +61,8 @@ related)?>
- comments == "true"): ?> + ', $post->body); ?> +
@@ -78,7 +79,7 @@ »
- comments == "true"): ?> + title, $p->url) ?> \ No newline at end of file diff --git a/themes/readable/post.html.php b/themes/readable/post.html.php index ebb083b8..703e1abd 100644 --- a/themes/readable/post.html.php +++ b/themes/readable/post.html.php @@ -59,7 +59,8 @@ related)?>
- comments == "true"): ?> + ', $post->body); ?> +
@@ -76,7 +77,7 @@
- comments == "true"): ?> + title, $p->url) ?> \ No newline at end of file diff --git a/themes/twentyfifteen/post.html.php b/themes/twentyfifteen/post.html.php index f0735c7a..7d42e880 100644 --- a/themes/twentyfifteen/post.html.php +++ b/themes/twentyfifteen/post.html.php @@ -62,16 +62,15 @@ tag; ?> - comments == "true"): ?> - - - - url ?>> - - + + + + url ?>> + -comments == "true"): ?> +', $post->body); ?> + title, $p->url) ?> diff --git a/themes/twentysixteen/post.html.php b/themes/twentysixteen/post.html.php index 23108044..3717e7d1 100644 --- a/themes/twentysixteen/post.html.php +++ b/themes/twentysixteen/post.html.php @@ -60,17 +60,18 @@ category;?> Tags tag;?> - comments == "true"): ?> - - - - url ?>> - - + + + + + url ?>> + + - comments == "true"): ?> + ', $post->body); ?> + title, $p->url) ?> From dea76bc776e621bdda40a241cbabc709a5981c52 Mon Sep 17 00:00:00 2001 From: KuJoe Date: Sun, 15 Sep 2024 11:05:59 -0400 Subject: [PATCH 4/4] Revert theme changes for no-comments tag. --- themes/blog/post.html.php | 3 +- themes/clean/post.html.php | 15 ++++------ themes/doks/post.html.php | 25 ++++++++--------- themes/logs/post.html.php | 15 ++++------ themes/readable/post.html.php | 15 ++++------ themes/twentyfifteen/post.html.php | 29 +++++++++---------- themes/twentysixteen/post.html.php | 45 ++++++++++++++---------------- 7 files changed, 64 insertions(+), 83 deletions(-) diff --git a/themes/blog/post.html.php b/themes/blog/post.html.php index 7a9ce9e1..71c5649d 100644 --- a/themes/blog/post.html.php +++ b/themes/blog/post.html.php @@ -93,8 +93,7 @@ -', $post->body); ?> - +
diff --git a/themes/clean/post.html.php b/themes/clean/post.html.php index 67664ff6..ce526374 100644 --- a/themes/clean/post.html.php +++ b/themes/clean/post.html.php @@ -61,14 +61,11 @@ related)?>
- ', $post->body); ?> - - -
- - -
- + +
+ + +
@@ -79,7 +76,7 @@
- + title, $p->url) ?>
\ No newline at end of file diff --git a/themes/doks/post.html.php b/themes/doks/post.html.php index 6d486152..5428a1fd 100644 --- a/themes/doks/post.html.php +++ b/themes/doks/post.html.php @@ -68,22 +68,19 @@ -', $post->body); ?> - - - title, $post->url) ?> - + + title, $post->url) ?> + - -
- -
- - -
- -
+ +
+ +
+ +
+ +
diff --git a/themes/logs/post.html.php b/themes/logs/post.html.php index 4c0f446b..c22c9184 100644 --- a/themes/logs/post.html.php +++ b/themes/logs/post.html.php @@ -61,14 +61,11 @@ related)?>
- ', $post->body); ?> - - -
- - -
- + +
+ + +
@@ -79,7 +76,7 @@ »
- + title, $p->url) ?> \ No newline at end of file diff --git a/themes/readable/post.html.php b/themes/readable/post.html.php index 703e1abd..e981cbe2 100644 --- a/themes/readable/post.html.php +++ b/themes/readable/post.html.php @@ -59,14 +59,11 @@ related)?>
- ', $post->body); ?> - - -
- - -
- + +
+ + +
@@ -77,7 +74,7 @@
- + title, $p->url) ?> \ No newline at end of file diff --git a/themes/twentyfifteen/post.html.php b/themes/twentyfifteen/post.html.php index 7d42e880..0258a503 100644 --- a/themes/twentyfifteen/post.html.php +++ b/themes/twentyfifteen/post.html.php @@ -69,24 +69,21 @@ -', $post->body); ?> - - - title, $p->url) ?> - - - + + title, $p->url) ?> + + + + + +
+ +
- -
- -
- - -
- -
+ +
+