Six Apart Code

<<

NAME

MT::App::Comments

SYNOPSIS

The application-level callbacks of the MT::App::Comments application are documented here.

CALLBACKS

CommentThrottleFilter

Called as soon as a new comment has been received. The callback must return a boolean value. If the return value is false, the incoming comment data will be discarded and the app will output an error page about throttling. A CommentThrottleFilter callback has the following signature:

    sub comment_throttle_filter($eh, $app, $entry)
    {
        ...
    }
$app is the MT::App::Comments object, whose interface is documented in MT::App::Comments, and $entry is the entry on which the comment is to be placed.

Note that no comment object is passed, because it has not yet been built. As such, this callback can be used to tell the application to exit early from a comment attempt, before much processing takes place.

When more than one CommentThrottleFilter is installed, the data is discarded unless all callbacks return true.

CommentFilter

Called once the comment object has been constructed, but before saving it. If any CommentFilter callback returns false, the comment will not be saved. The callback has the following signature:

    sub comment_filter($eh, $app, $comment)
    {
        ...
    }

<<

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.