summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-09-30 16:51:19 -0700
committerZach Copley <zach@status.net>2010-09-30 16:51:19 -0700
commitcdd43d8da97e4188327c7f9f5fab29a20d1868c3 (patch)
tree893d35b9ded34562e95dd2fa7893504a22d9e2ac /plugins
parent0d5dadc81d8477dad885b52c89bf69cdd2ad0cc5 (diff)
Less intrusive insertion of Disqus notice count into notice lists
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Disqus/DisqusPlugin.php20
1 files changed, 3 insertions, 17 deletions
diff --git a/plugins/Disqus/DisqusPlugin.php b/plugins/Disqus/DisqusPlugin.php
index 10155c338..3024d81a6 100644
--- a/plugins/Disqus/DisqusPlugin.php
+++ b/plugins/Disqus/DisqusPlugin.php
@@ -176,29 +176,22 @@ ENDOFSCRIPT;
}
/**
- * Override the default Notice display to add Disqus comments link
+ * Tack on a Disqus comments link to the notice options stanza
* (the link displays the total number of comments for each notice)
*
* @param NoticeListItem $noticeListItem
*
- * @return boolean override
*/
- function onStartShowNoticeItem($noticeListItem)
+ function onEndShowNoticeInfo($noticeListItem)
{
// Don't enable commenting for remote notices
if (empty($noticeListItem->notice->is_local)) {
- return true;
+ return;
}
$profile = Profile::staticGet('id', $noticeListItem->notice->profile_id);
if ($this->isAllowedRichEdit($profile)) {
-
- // @todo Refactor individual notice display to have its own event hooks
-
- $noticeListItem->showNotice();
- $noticeListItem->showNoticeInfo();
-
$noticeUrl = $noticeListItem->notice->bestUrl();
$noticeUrl .= '#disqus_thread';
@@ -207,13 +200,6 @@ ENDOFSCRIPT;
array('href' => $noticeUrl, 'class' => 'disqus_count'),
_m('Comments')
);
-
- $noticeListItem->showNoticeOptions();
- Event::handle('EndShowNoticeItem', array($noticeListItem));
-
- return false;
- } else {
- return true;
}
}