From 670e5e18f35096cdd743e68ab17cdadd6eee6bbb Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 28 Jan 2024 21:31:43 +0000 Subject: [PATCH] Increase reply depth --- .../controller/settings/layout_comments.php | 4 +-- .../english/settings/layout_comments.php | 2 +- .../view/default/template/main/comments.tpl | 35 +++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/comments/backend/controller/settings/layout_comments.php b/comments/backend/controller/settings/layout_comments.php index 7c10a824..9b219fd6 100644 --- a/comments/backend/controller/settings/layout_comments.php +++ b/comments/backend/controller/settings/layout_comments.php @@ -1120,8 +1120,8 @@ private function validate() /* Reply */ - if (!isset($this->request->post['reply_max_depth']) || !$this->validation->isInt($this->request->post['reply_max_depth']) || $this->request->post['reply_max_depth'] < 1 || $this->request->post['reply_max_depth'] > 5) { - $this->error['reply_max_depth'] = sprintf($this->data['lang_error_range'], 1, 5); + if (!isset($this->request->post['reply_max_depth']) || !$this->validation->isInt($this->request->post['reply_max_depth']) || $this->request->post['reply_max_depth'] < 1 || $this->request->post['reply_max_depth'] > 10) { + $this->error['reply_max_depth'] = sprintf($this->data['lang_error_range'], 1, 10); } /* Custom */ diff --git a/comments/backend/view/default/language/english/settings/layout_comments.php b/comments/backend/view/default/language/english/settings/layout_comments.php index c3c21342..5ea74d53 100644 --- a/comments/backend/view/default/language/english/settings/layout_comments.php +++ b/comments/backend/view/default/language/english/settings/layout_comments.php @@ -188,7 +188,7 @@ $_['lang_hint_reply'] = 'Whether to allow the user to reply to each comment.'; $_['lang_hint_quick_reply'] = 'Whether to show a simple form below the comment.'; $_['lang_hint_hide_replies'] = 'Whether to initially hide the replies with a link to show them.'; -$_['lang_hint_reply_max_depth'] = 'How many levels of replies before the reply link is hidden. Enter a number of 1 or higher. Make sure that the width of the replies can fit on your page.'; +$_['lang_hint_reply_max_depth'] = 'How many levels of replies before the reply link is hidden. Enter a number between 1 and 10. Make sure that the width of the replies can fit on your page.'; $_['lang_hint_average_rating'] = 'Whether to show the average rating of the page.'; $_['lang_hint_guest'] = 'Whether to allow users to rate without leaving a comment.'; $_['lang_hint_custom'] = 'Whether to show a few words of your own choosing.'; diff --git a/comments/frontend/view/default/template/main/comments.tpl b/comments/frontend/view/default/template/main/comments.tpl index 65b23ff0..918174e2 100644 --- a/comments/frontend/view/default/template/main/comments.tpl +++ b/comments/frontend/view/default/template/main/comments.tpl @@ -67,6 +67,41 @@ @set reply_depth = 5 @increase count @template comment/{{ comment_layout }} + + @foreach comment.reply_id as comment + @set reply_depth = 6 + @increase count + @template comment/{{ comment_layout }} + + @foreach comment.reply_id as comment + @set reply_depth = 7 + @increase count + @template comment/{{ comment_layout }} + + @foreach comment.reply_id as comment + @set reply_depth = 8 + @increase count + @template comment/{{ comment_layout }} + + @foreach comment.reply_id as comment + @set reply_depth = 9 + @increase count + @template comment/{{ comment_layout }} + + @foreach comment.reply_id as comment + @set reply_depth = 10 + @increase count + @template comment/{{ comment_layout }} + @endforeach + + @endforeach + + @endforeach + + @endforeach + + @endforeach + @endforeach @endforeach