Skip to content

Commit

Permalink
Increase reply depth
Browse files Browse the repository at this point in the history
  • Loading branch information
commentics committed Jan 28, 2024
1 parent 4df28be commit 670e5e1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
4 changes: 2 additions & 2 deletions comments/backend/controller/settings/layout_comments.php
Expand Up @@ -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 */
Expand Down
Expand Up @@ -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.';
Expand Down
35 changes: 35 additions & 0 deletions comments/frontend/view/default/template/main/comments.tpl
Expand Up @@ -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
Expand Down

0 comments on commit 670e5e1

Please sign in to comment.