From 7defb1768bff1c3da7ea63957cf8c7c928d379ab Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 27 Mar 2011 20:37:44 -0700 Subject: collapse posts by same author (but not you). --- mod/network.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'mod/network.php') diff --git a/mod/network.php b/mod/network.php index 08bc5af4c..21b818f9c 100644 --- a/mod/network.php +++ b/mod/network.php @@ -325,6 +325,7 @@ function network_content(&$a, $update = 0) { } + $comments = array(); foreach($r as $rr) { if(intval($rr['gravity']) == 6) { @@ -341,9 +342,11 @@ function network_content(&$a, $update = 0) { } $comments_collapsed = false; + $blowhard = 0; + $blowhard_count = 0; + foreach($r as $item) { - $comment = ''; $template = $tpl; $commentww = ''; @@ -354,6 +357,20 @@ function network_content(&$a, $update = 0) { continue; if($item['id'] == $item['parent']) { + if($blowhard == $item['cid'] && (! $item['self'])) { + $blowhard_count ++; + if($blowhard_count == 3) { + $o .= '' . ''; + } + } + $comments_seen = 0; $comments_collapsed = false; } @@ -369,7 +386,7 @@ function network_content(&$a, $update = 0) { } } if(($comments[$item['parent']] > 2) && ($comments_seen == ($comments[$item['parent']] - 1))) { - $o .= ''; + $o .= ''; } $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; -- cgit v1.2.3