From 44dcbeaaa4fa58ba3bc8f535ae842089214e656f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 11 Aug 2015 19:22:14 -0700 Subject: forum widget --- include/widgets.php | 8 ++++---- view/pdl/mod_network.pdl | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/widgets.php b/include/widgets.php index fe3b47353..894a2fa3b 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1006,20 +1006,20 @@ function widget_forums($arr) { $perms_sql = item_permissions_sql(local_channel()) . item_normal(); - $r = q("select count(item_unseen) as unseen, owner_xchan, xchan.* from item left join xchan on owner_xchan = xchan_hash group by owner_xchan order by unseen desc limit item from xchan where xchan_pubforum = 1 and uid = %d $perms_sql group by owner_xchan $limit ", + $r = q("select sum(item_unseen) as unseen, owner_xchan, xchan.* from xchan left join item on owner_xchan = xchan_hash where xchan_pubforum = 1 and uid = %d $perms_sql group by owner_xchan $limit ", intval(local_channel()) ); if($r) { $o .= '
'; - $o .= '

' . t('Forums') . '

'; + $o .= '

' . t('Forums') . '

'; + $o .= ''; } return $o; diff --git a/view/pdl/mod_network.pdl b/view/pdl/mod_network.pdl index 7a39017e3..b8817fd99 100644 --- a/view/pdl/mod_network.pdl +++ b/view/pdl/mod_network.pdl @@ -2,6 +2,7 @@ [region=aside] [widget=collections][/widget] +[widget=forums][/widget] [widget=suggestions][/widget] [widget=savedsearch][/widget] [widget=filer][/widget] -- cgit v1.2.3