comments_form
The comments_form tag is a single tag which is used to display a comment form. Comments will be attached to present individual article as a default, or to the article set by the “id” attribute.
attributes
isize="25" (integer)
msgcols="25" (integer)
msgrows="5" (integer)
msgstyle="unset"
form="comment_form"
wraptag="unset"
class="comments_form"
genealogy
Version 4.0.4
Give visitors indication of Comments status
Comments for articles can be turned off or on at the author’s discretion for any article that is published; by using the following scheme in an article form, you can still have the on/off control over comments while still giving users indication of comment status.
<txp:if_comments_allowed>
<txp:comments_form />
<txp:else />
<p>Comments are turned off for this article.</p>
</txp:if_comments_allowed>
Other tags used: if_comments_allowed, else
Text area changes in preview
Using some conditional tags the size of the comment input text area can be changed in the preview.
<txp:if_comments_preview>
<txp:comments_preview form="comments" />
<p style="color:red;">This is just a preview of your comment!</p>
<txp:comments_form isize="30" msgcols="55" msgrows="5" />
<txp:else />
<txp:if_comments_allowed>
<txp:comments_form isize="30" msgcols="55" msgrows="15" />
</txp:else />
<p>Comments are turned off for this article.</p>
</txp:if_comments_allowed>
</txp:if_comments_preview>
Other tags used: comments_preview, if_comments_allowed, if_comments_preview, else
Display conditional comments and form
Tags
<txp:if_comments_allowed>
<txp:comments form="lineitem" break="li" wraptag="ul" breakclass="special" />
<txp:comments_form />
</txp:if_comments_allowed>
Form (lineitem) Type(comment)
<small><txp:comment_id /></small>
Styles could go this way
.special
{
display:list-item;
list-style-type:none;
}
What it does…
For the current article, returns a list of id numbers for comments and a comment input form, but only if comments are currently allowed.
Other tags used: comment_id, comments, if_comments_allowed