Comment Module Extension Hooks¶
Control Panel Hooks (mcp.comment.php)¶
delete_comment_additional¶
Allows additional processing after a comment is deleted.
$edata = $this->extensions->call('delete_comment_additional', $comment_ids); if ($this->extensions->end_script === TRUE) return;
update_comment_additional¶
Allows additional processing when a comment is updated, executed after the comment is updated.
$edata = $this->extensions->call('update_comment_additional', $comment_id, $data); if ($this->extensions->end_script === TRUE) return;
$comment_id¶
comment_id of the comment being modified
Frontend Comment Hooks (mod.comment.php)¶
comment_entries_comment_format¶
Do whatever you want to the comment variable
$comment = $this->extensions->call('comment_entries_comment_format', $row); if ($this->extensions->end_script === TRUE) return;
comment_entries_tagdata¶
Modify and play with the comment entries tagdata before everyone else
$tagdata = $this->extensions->call('comment_entries_tagdata', $tagdata, $row); if ($this->extensions->end_script === TRUE) return $tagdata;
$tagdata¶
The tag data
comment_form_end¶
Modify, add, etc. something to the comment form at end of processing
$res = $this->extensions->call('comment_form_end', $res); if ($this->extensions->end_script === TRUE) return $res;
comment_form_tagdata¶
Modify, add, replace anything in the Comment Form tag
$tagdata = $this->extensions->call('comment_form_tagdata', $tagdata); if ($this->extensions->end_script === TRUE) return;
comment_preview_comment_format¶
Play with the tagdata contents of the comment preview
$data = $this->extensions->call('comment_preview_comment_format', $query->row()); if ($this->extensions->end_script === TRUE) return;
comment_preview_tagdata¶
Play with the tagdata contents of the comment preview
$tagdata = $this->extensions->call('comment_preview_tagdata', $tagdata); if ($this->extensions->end_script === TRUE) return;
insert_comment_end¶
More emails, more processing, different redirect at the end of the comment inserting routine
$edata = $this->extensions->call('insert_comment_end', $data, $comment_moderate, $comment_id); if ($this->extensions->end_script === TRUE) return;
$data¶
Array of the data for the new comment
$comment_moderate¶
Whether the comment is going to be moderated
insert_comment_insert_array¶
Modify any of the soon to be inserted values for a new comment
$data = $this->extensions->call('insert_comment_insert_array', $data); if ($this->extensions->end_script === TRUE) return;
insert_comment_preferences_sql¶
Rewrite or add to the comment preference sql query - Could be handy for comment/weblog restrictions
$sql = $this->extensions->call('insert_comment_preferences_sql', $sql); if ($this->extensions->end_script === TRUE) return;
insert_comment_start¶
Allows complete rewrite of comment submission routine, or could be used to modify the POST data before processing
$edata = $this->extensions->call('insert_comment_start'); if ($this->extensions->end_script === TRUE) return;
| returns: | void |
|---|
Added in v1.4.0

User Contributed Notes
You must have an ExpressionEngine license and have attained a forum rank of "Lab Assistant" (100 posts) to contribute notes to the User Guide