Add hooks for approving and deleting a comment

This commit is contained in:
Garvin Hicking 2007-06-11 12:20:31 +00:00
parent ec52b712c3
commit 4edcca9ce4
2 changed files with 7 additions and 0 deletions

View File

@ -441,6 +441,10 @@ function serendipity_deleteComment($id, $entry_id, $type='comments') {
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}comments SET parent_id = " . (int)$sql['parent_id'] . " WHERE parent_id = " . $id);
}
$addData = array('cid' => $id, 'entry_id' => $entry_id);
serendipity_plugin_api::hook_event('backend_deletecomment', $sql, $addData);
return true;
} else {
return false;
@ -523,6 +527,8 @@ function serendipity_approveComment($cid, $entry_id, $force = false) {
if ($serendipity['allowSubscriptions']) {
serendipity_mailSubscribers($entry_id, $rs['author'], $rs['email'], $rs['title'], $rs['authoremail'], $cid);
}
serendipity_plugin_api::hook_event('backend_approvecomment', $rs);
return true;
}

View File

@ -2,6 +2,7 @@
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
<div class="serendipity_Entry_Date">
{if $dategroup.is_sticky}
<h3 class="serendipity_date">{$CONST.STICKY_POSTINGS}</h3>