• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: V Appendixes > Comment Tags

Comment Tags

If you use Movable Type's comments feature, you'll want to be familiar with the template tags in Table B.7.

Table B.7. Cmment Tags
Tag NameTag TypeDescription
MTCommentAuthorVInserts the name of the author of the current comment.
MTCommentAuthorLinkVInserts the current comment's author's name marked up as a hyperlink. The author's Web site URL will first be used for the link, if available. If not, Movable Type will fall back to his or her email address, if that's available. If neither are present, just the author's name will be inserted. Attributes:

show_email: Setting this attribute to 0 will cause the author's email address not to be used.

show_url: Setting this attribute to 0 will cause the author's Web site URL not to be used.

spam_protect: If set to 1 and the author's email address is used to build the link, certain characters in the address will be masked in a way that should allow them to function and display properly in a browser, but hopefully makes it slightly less likely that the address will be harvested by spam spiders crawling the Web looking for email addresses to add to their lists.

MTCommentBodyVInserts the body of the current comment. Attributes:

convert_breaks: A Boolean attribute that accepts either 0 or 1 as its value; it controls whether line and paragraph breaks in the body text will be converted to HTML tags (1 = yes, 0 = no). This value overrides the Text Formatting for Comments setting specified on the Weblog Config > Preferences screen.

MTCommentDateVInserts the date the current comment was submitted. Attributes:

format: Controls how the date is written. (See “Formatting Dates” later in this appendix.)

language: Specifies in what language the date is to be written.

MTCommentEmailVInserts the email address of the author of the current comment. Attributes:

spam_protect: Same behavior as in the MTCommentAuthorLink tag.

MTCommentEntryXCThe content of this tag is evaluated in the context of the entry the current comment is attached to.
MTCommentEntryIDVInserts the numeric ID of the entry that the current comment is attached to. Attributes:

pad: Set to 1, the entry's ID will be zero-padded to six characters (for example, 123 would become 000123).

MTCommentIDVInserts the numeric ID of the current comment. Attributes:

pad: Set to 1, the comment's ID will be zero-padded to six characters (for example, 123 would become 000123).

MTCommentIPVInserts the IP address that the comment was originally submitted from.
MTCommentOrderNumberVInserts the numeric index of the current comment's place in the full list of comments attached to its entry, starting with 1 for the first comment and incrementing by one for each subsequent comment.
MTCommentPreviewAuthorVSame as MTCommentAuthor, but used in the Comment Preview template.
MTCommentPreviewAuthorLinkVSame as MTCommentAuthorLink, but used in the Comment Preview template.
MTCommentPreviewBodyVSame as MTCommentBody, but used in the Comment Preview template.
MTCommentPreviewDateVSame as MTCommentDate, but used in the Comment Preview template.
MTCommentPreviewEmailVSame as MTCommentEmail, but used in the Comment Preview template.
MTCommentPreviewIPVSame asMTCommentIP, but used in the Comment Preview template.
MTCommentPreviewIsStaticVInserts 1 if the current context uses static (inline) comments. It's used in the Comment Preview and Comment Error templates to populate the value of a hidden field because they might need to appear both in static and pop-up form for the same weblog:
<input type="hidden" name="static"
  value="<$MTCommentPreviewIsStatic$>">

MTCommentPreviewStateVThis tag has been deprecated and should not be used. Its original purpose was to provide information about the comment being posted through the comment preview page.
MTCommentPreviewURLVSame as MTCommentURL, but used in the Comment Preview template.
MTCommentsLCIterates over the comments attached to the current entry or to all entries in the current weblog, depending on the context. Attributes:

lastn: Include only the specified number of most recent comments. This attribute must be specified when the MTComments tag is used outside the context of a particular entry.

sort_order: Sort comments in the order specified—either ascend or descend.

MTCommentURLVInserts the Web site URL of the author of the current comment.
MTErrorMessageVInserts a message explaining what error occurred in the comment's submission. Only makes sense in the Comment Error template.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint