NAME
MT::Comment - Movable Type comment record
SYNOPSIS
use MT::Comment; my $comment = MT::Comment->new; $comment->blog_id($entry->blog_id); $comment->entry_id($entry->id); $comment->author('Foo'); $comment->text('This is a comment.'); $comment->save or die $comment->errstr;
DESCRIPTION
An MT::Comment object represents a comment in the Movable Type system. It contains all of the metadata about the comment (author name, email address, homepage URL, IP address, etc.), as well as the actual body of the comment.
USAGE
As a subclass of MT::Object, MT::Comment inherits all of the data-management and -storage methods from that class; thus you should look at the MT::Object documentation for details about creating a new object, loading an existing object, saving an object, etc.
DATA ACCESS METHODS
The MT::Comment object holds the following pieces of data. These fields can be accessed and set using the standard data access methods described in the MT::Object documentation.
- id
The numeric ID of the comment.
- blog_id
The numeric ID of the blog in which the comment is found.
- entry_id
The numeric ID of the entry on which the comment has been made.
- author
The name of the author of the comment.
- commenter_id
The author_id for the commenter; this will only be defined if the commenter is registered, which is only required if the blog config option allow_unreg_comments is false.
- ip
The IP address of the author of the comment.
- email
The email address of the author of the comment.
- url
The URL of the author of the comment.
- text
The body of the comment.
- visible
Returns a true value if the comment should be displayed. Comments can be hidden if comment registration is required and the commenter is pending approval.
- created_on
The timestamp denoting when the comment record was created, in the format
YYYYMMDDHHMMSS
. Note that the timestamp has already been adjusted for the selected timezone. - modified_on
The timestamp denoting when the comment record was last modified, in the format
YYYYMMDDHHMMSS
. Note that the timestamp has already been adjusted for the selected timezone.
DATA LOOKUP
In addition to numeric ID lookup, you can look up or sort records by any combination of the following fields. See the load documentation in MT::Object for more information.
- created_on
- entry_id
- blog_id
AUTHOR & COPYRIGHTS
Please see the MT manpage for author, copyright, and license information.