From 9c89f83499aa36aab2fe53343d858f6113c3f456 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Mon, 11 Jun 2007 12:20:31 +0000 Subject: [PATCH] Add hooks for approving and deleting a comment --- include/functions_comments.inc.php | 6 ++++++ templates/carl_contest/entries.tpl | 1 + 2 files changed, 7 insertions(+) diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index e220566..04b3383 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -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; } diff --git a/templates/carl_contest/entries.tpl b/templates/carl_contest/entries.tpl index 299fa15..b88ab91 100644 --- a/templates/carl_contest/entries.tpl +++ b/templates/carl_contest/entries.tpl @@ -2,6 +2,7 @@ {serendipity_hookPlugin hook="entries_header" addData="$entry_id"} {foreach from=$entries item="dategroup"} {foreach from=$dategroup.entries item="entry"} +
{if $dategroup.is_sticky}

{$CONST.STICKY_POSTINGS}

-- 2.39.5