Add hooks for approving and deleting a comment
This commit is contained in:
@ -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);
|
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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -523,6 +527,8 @@ function serendipity_approveComment($cid, $entry_id, $force = false) {
|
|||||||
if ($serendipity['allowSubscriptions']) {
|
if ($serendipity['allowSubscriptions']) {
|
||||||
serendipity_mailSubscribers($entry_id, $rs['author'], $rs['email'], $rs['title'], $rs['authoremail'], $cid);
|
serendipity_mailSubscribers($entry_id, $rs['author'], $rs['email'], $rs['title'], $rs['authoremail'], $cid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
serendipity_plugin_api::hook_event('backend_approvecomment', $rs);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
|
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
|
||||||
{foreach from=$entries item="dategroup"}
|
{foreach from=$entries item="dategroup"}
|
||||||
{foreach from=$dategroup.entries item="entry"}
|
{foreach from=$dategroup.entries item="entry"}
|
||||||
|
|
||||||
<div class="serendipity_Entry_Date">
|
<div class="serendipity_Entry_Date">
|
||||||
{if $dategroup.is_sticky}
|
{if $dategroup.is_sticky}
|
||||||
<h3 class="serendipity_date">{$CONST.STICKY_POSTINGS}</h3>
|
<h3 class="serendipity_date">{$CONST.STICKY_POSTINGS}</h3>
|
||||||
|
Reference in New Issue
Block a user