Limit the number of links in comments with this extension. You can set the maximum number of links allowed in a comment by setting the content
value in the .\lot\x\comment.guard.link\state.php
file. The link
property is used to determine whether or not to remove an anchor that surrounds the comment author’s name in the default comment markup. Note that this will also remove the link field in the comment form.
<?php
return [
'content' => 5,
'link' => false
];
If you set the content
value to true
, it will allow links in comments. Value as a number less than 0
will convert all links in comment content to plain text. If you set the content
value to 0
or false
, it will not allow any links in comments. Value as a number greater than 0
will limit the number of links you can put in a comment.
If you set the link
value to true
, then it is the same as enabling the link field in the comment form. If you set the link
value to 0
or false
, it will remove the link field in the comment form. Value as a number less than 0
will remove the link field in the comment form, including the anchor tags surrounding the comment author’s name in the existing comments.
Key | Value | Description |
---|---|---|
content | -1 | Disallow links in comments and remove all links in existing comments. |
content | 0 | Disallow links in comments. |
content | 5 | Allow a maximum of 5 links to be included in a comment. |
content | false | Disallow links in comments. |
content | true | Allow links in comments. |
link | -1 | Hide the link field in the comment form and remove the anchor tags surrounding the comment author’s name. |
link | 0 | Hide the link field in the comment form. |
link | false | Hide the link field in the comment form. |
link | true | Show the link field in the comment form. |
This extension does not change the existing comments data, it only changes their presentation when they are presented in the default comments layout.
0 Comments
No comments yet.