From c1221cc052c78550c214e7974407cc66992eadbe Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 29 Sep 2011 15:52:31 -0700 Subject: add display_item hook to 'search|new' message display --- include/conversation.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index ebe582f4c..6069afb03 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -220,7 +220,7 @@ function conversation(&$a, $items, $mode, $update) { $body = prepare_body($item,true); - $treads[$treadsid] .= replace_macros($tpl,array( + $tmp_item = replace_macros($tpl,array( '$id' => $item['item_id'], '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), '$profile_url' => $profile_link, @@ -251,6 +251,11 @@ function conversation(&$a, $items, $mode, $update) { '$wait' => t('Please wait'), )); + $arr = array('item' => $item, 'output' => $tmp_item); + call_hooks('display_item', $arr); + + $treads[$treadsid] .= $arr['output']; + } } -- cgit v1.2.3 From dfb3ee6e29b6943f86ec75af12db5a1422a7e1dd Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 30 Sep 2011 14:31:01 +0200 Subject: fix star icon viewing profile page as unlogged user --- include/conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index ebe582f4c..7859d301c 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -450,7 +450,7 @@ function conversation(&$a, $items, $mode, $update) { ); $star = false; - $starred = "unstarred"; + $isstarred = "unstarred"; if ($profile_owner == local_user() && $toplevelpost) { $isstarred = (($item['starred']) ? "starred" : "unstarred"); -- cgit v1.2.3 From 4d5580ab7781eea81dc4cb3d67b7376f49357bef Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 3 Oct 2011 09:38:58 +0200 Subject: fix typo --- include/conversation.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index 64ad5d0b1..10b34ebe6 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -142,8 +142,8 @@ function conversation(&$a, $items, $mode, $update) { // array with html for each thread (parent+comments) - $treads = array(); - $treadsid = -1; + $threads = array(); + $threadsid = -1; if(count($items)) { @@ -155,7 +155,7 @@ function conversation(&$a, $items, $mode, $update) { $tpl = get_markup_template('search_item.tpl'); foreach($items as $item) { - $treadsid++; + $threadsid++; $comment = ''; $owner_url = ''; @@ -254,7 +254,7 @@ function conversation(&$a, $items, $mode, $update) { $arr = array('item' => $item, 'output' => $tmp_item); call_hooks('display_item', $arr); - $treads[$treadsid] .= $arr['output']; + $threads[$threadsid] .= $arr['output']; } @@ -336,8 +336,8 @@ function conversation(&$a, $items, $mode, $update) { $comments_seen = 0; $comments_collapsed = false; - $treadsid++; - $treads[$treadsid] = ""; + $threadsid++; + $threads[$threadsid] = ""; } else { // prevent private email from leaking into public conversation @@ -351,7 +351,7 @@ function conversation(&$a, $items, $mode, $update) { if(($comments[$item['parent']] > 2) && ($comments_seen <= ($comments[$item['parent']] - 2)) && ($item['gravity'] == 6)) { if(! $comments_collapsed) { - $treads[$treadsid] .= '' . ''; + $threads[$threadsid] .= ''; } $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; @@ -564,7 +564,7 @@ function conversation(&$a, $items, $mode, $update) { $arr = array('item' => $item, 'output' => $tmp_item); call_hooks('display_item', $arr); - $treads[$treadsid] .= $arr['output']; + $threads[$threadsid] .= $arr['output']; } } } @@ -573,11 +573,11 @@ function conversation(&$a, $items, $mode, $update) { // if author collapsing is in force but didn't get closed, close it off now. /*if($blowhard_count >= 3) - $treads[$treadsid] .= '';*/ + $threads[$threadsid] .= '';*/ $page_template = get_markup_template("conversation.tpl"); $o .= replace_macros($page_template, array( - '$treads' => $treads, + '$threads' => $threads, '$dropping' => ($dropping?t('Delete Selected Items'):False), )); -- cgit v1.2.3