CommentDrop

CommentDrop is a Liquid drop representing a comment. Each comment, whether it is a regular reply, a pingback or a trackback, will be encapsulated in a CommentDrop.

Methods

CommentDrop supports the following methods:

id
Returns the ID of the comment as a string.
type
Returns the type of the comment, as a word (reply, pingback or trackback).
author
Returns the name of the comment author, with a link to its website if one's given. Returns "Anonymous" if no name was given.
get_author
Returns the name of the comment author, html escaped.
get_email
Returns the e-mail of the comment author, html escaped. Please note that this should never be displayed publicly without the permission of the owner!
get_website
Returns the website of the comment author, html escaped.
get_date
Returns the date the comment was posted.
date
Returns the date the comment was posted. This is wrapped in an hAtom compatible microformat (according to the Microformat datetime-design-pattern).
For example: <abbr title="2007-12-31T13:02:03Z">December 31, 2007 at 13:02</abbr>
If you want to remove the dotted underline or small caps displayed in some browsers by default (Firefox, Opera, Konqueror…), use the CSS style rules border-bottom: none; font-variant: normal; letter-spacing: normal; on this <abbr>.
permalink
Returns a permalink to the comment.
text
Returns the text of the comment, as HTML.
get_text
Returns the original text of the comment, with the Textile.
entry
Returns the entry on which this comment was posted, as an EntryDrop.
by_admin?
Returns true if the comment was written by an administrator.
get_errors
Returns an array of errors that occurred during the validation of a newly written comment. These should be displayed above the comment form.
errors
Returns an array of errors that occurred during the validation of a newly written comment, in an unordered list with the ID "comment_errors".
For example:
<p id="comment_message">The following errors occurred:</p>
<ul id="comment_errors">
<li>Please enter a comment text.</li>
<li>Please enter a name.</li>
</ul>
page_revision: 1, last_edited: 1180271817|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.