You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/comment/entries.md
+24-20Lines changed: 24 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Here is a basic example showing how you might use the comment tag:
22
22
<p>By {name} on {comment_date format="%Y %m %d"}</p>
23
23
{/exp:comment:entries}
24
24
25
-
NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag.
25
+
NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag. If you do, the outer tag will parse and resolve many of these variables and conditionals before the Comment Entries tag has the chance to do so.
26
26
27
27
## Parameters
28
28
@@ -158,12 +158,6 @@ This variable will always display the absolute total number of results that are
158
158
159
159
The _opposite_ of `{absolute_count}`, in that it displays the entry count position counting backwards from the absolute total. Works across pagination, so the fifth entry in a list of fifteen entries would display "10".
160
160
161
-
### `{allow_comments}`
162
-
163
-
{if allow_comments}
164
-
165
-
TRUE / FALSE, Whether or not the entry being displayed allows comments. Typically used as a conditional.
166
-
167
161
### `{author}`
168
162
169
163
The comment author's screen name, if a member; otherwise, this variable will display the name submitted with the comment.
@@ -196,10 +190,6 @@ The URL to the avatar image associated with the entry's author. Typically used a
TRUE / FALSE, Whether a member has permission to edit a given comment AND/OR close that comment. Used in conjunction with [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end).
202
-
203
193
### `{channel_id}`
204
194
205
195
The ID number of the channel that the comment belongs to.
@@ -289,12 +279,6 @@ If five entries are being displayed per page, then for the fourth entry on the p
289
279
290
280
The date on which the comment was edited. See [Date Variable Formatting](templates/date-variable-formatting.md) for more information.
291
281
292
-
### `{editable}`
293
-
294
-
{if editable}Show Edit{/if}
295
-
296
-
This variable will be used in a conditional to allow [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). It indicates whether a member has [permission to edit a given comment](control-panel/member-manager.md#createedit-all-member-roles).
297
-
298
282
### `{email}`
299
283
300
284
The comment author's email address, if specified.
@@ -453,7 +437,15 @@ These are totally dynamic in that any profile field you create for your members
453
437
454
438
[TOC=3]
455
439
456
-
The following special conditionals are available:
440
+
The following special conditionals are available.
441
+
442
+
NOTE: **Important:** Avoid using Template Caching on any Template containing these conditional that are user-specific. If you do not avoid caching, then data will not be dynamic for each user. Instead, whoever happens to load the page when it gets cached will have their conditionals applied to every subsequent visitor until the cache expires.
443
+
444
+
### `{if allow_comments}`
445
+
446
+
{if allow_comments} content {/if}
447
+
448
+
TRUE / FALSE, Whether or not the entry being displayed allows comments. Typically used as a conditional.
457
449
458
450
### `{if avatar}`
459
451
@@ -463,20 +455,32 @@ This special conditional lets you conditionally display content if the current e
TRUE / FALSE, Whether a member has permission to edit a given comment AND/OR close that comment. Used in conjunction with [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end).
461
+
466
462
### `{if comments_expired}`
467
463
464
+
{if comments_expired} content {/if}
465
+
468
466
If commenting has expired (and expiration is not set to be [overridden by moderation](comment/control-panel.md)), the contents of this conditional will be displayed.
469
467
470
468
NOTE: **Note:**`{if no_results}` has precedence over this conditional. If there are no comments, this conditional is not evaluated.
471
469
472
470
### `{if comments_disabled}`
473
471
474
-
{if comments_disabled}
472
+
{if comments_disabled} content {/if}
475
473
476
474
If commenting has been disabled, the contents of this conditional will be displayed.
477
475
478
476
NOTE: **Note:**`{if no_results}` has precedence over this conditional. If there are no comments, this conditional is not evaluated.
479
477
478
+
### `{if editable}`
479
+
480
+
{if editable} Show Edit Form {/if}
481
+
482
+
TRUE / FALSE, This variable will be used in a conditional to allow [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). It indicates whether a member has [permission to edit a given comment](control-panel/member-manager.md#createedit-all-member-roles).
483
+
480
484
### `{if is_ignored}`
481
485
482
486
{if is_ignored} content {/if}
@@ -509,7 +513,7 @@ Or you can use Javascript to allow the user to read the comment if they wish:
NOTE: **Important:** Avoid using Template Caching on any Template containing this conditional. If you do not avoid caching, then data will not be dynamic for each user. Instead, whoever happens to load the page when it is cached will have their ignore list applied to everyone until the cache expires.
516
+
NOTE: **Important:** Avoid using Template Caching on any Template containing this conditional. If you cache this, whoever happens to load the page when it is first cached will have their ignore list applied to everyone until the cache is cleared.
Copy file name to clipboardExpand all lines: docs/comment/form.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ This is a **required** parameter if you are using comment previews indicating wh
74
74
75
75
You can hard code the comment for tag to display a comment form for a specific channel entry by its URL title.
76
76
77
-
NOTE: **Note:** This parameter takes precedence over any entry specified dynamically in the URL, so when using this parameter you will want to make sure it is clear to the user which entry the displayed comment form belong to.
77
+
NOTE: **Note:** This parameter takes precedence over any entry specified dynamically in the URL, so when using this parameter you will want to make sure it is clear to the user which entry the displayed comment form belongs to.
78
78
79
79
#### `channel=`
80
80
@@ -174,7 +174,7 @@ The following conditionals are available:
174
174
175
175
## Allowing Members to Edit Comments on the Front End
176
176
177
-
The available tags and variables allow you to write your own clientside code for implementing comment editing. The following is a simplified example using jQuery.
177
+
The available tags and variables allow you to write your own client-side code for implementing comment editing. The following is a simplified example using jQuery.
178
178
179
179
### Example Code
180
180
@@ -227,13 +227,13 @@ A request for an edit will return a response array. In the case of an error, an
227
227
228
228
### Editing Permissions
229
229
230
-
The {if editable} conditional in the Comment Entries tag outputs content when the viewing member has permission to edit the comment indicated while the {if can_moderate_comment} outputs content if they have permission to close the comment.
230
+
By using the [{if editable}](/comment/entries.html#if-editable) conditional in the Comment Entries tag, you can output a link, instructions or a form if the viewing member has permission to edit the comment, and by using the {if can_moderate_comment} you can display whatever is appropriate if the viewing member has permission to moderate (close) the comment.
231
231
232
-
For regular members, in order to edit comments they must be a logged in member, the author of the comment, and the editing time limit must not have expired.
232
+
For default regular members, in order to edit a comment, they must be logged in, the author of the comment, and the editing time limit must not have expired. If a member has a role with permission to edit the comments of any entry, that member will have edit permissions regardless of the editing time limit.
233
233
234
-
Comment moderators may close the comment. Superadmins will always have {editable} and {can_moderate_comment} permissions on any comment.
234
+
Comment moderators may close the comment. The edit time limit does not apply to moderators.
235
235
236
-
Lastly, if a member is in a group with permission to edit comments in any entry, they will have edit permissions. The edit time limit does not apply to moderators.
236
+
Superadmins will always have {editable} and {can_moderate_comment} permissions on any comment.
0 commit comments