We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit cdd43d8d authored by Zach Copley's avatar Zach Copley

Less intrusive insertion of Disqus notice count into notice lists

parent 0d5dadc8
......@@ -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;
$profile = Profile::staticGet('id', $noticeListItem->notice->profile_id);
if ($this->isAllowedRichEdit($profile)) {
// @todo Refactor individual notice display to have its own event hooks
$noticeUrl = $noticeListItem->notice->bestUrl();
$noticeUrl .= '#disqus_thread';
......@@ -207,13 +200,6 @@ ENDOFSCRIPT;
array('href' => $noticeUrl, 'class' => 'disqus_count'),
Event::handle('EndShowNoticeItem', array($noticeListItem));
return false;
} else {
return true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment