From 5a8cda632b4ba78e19d49b0c652f43940a18ea9e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 9 Jul 2013 22:48:34 -0700 Subject: remove double tags on search results, updates to install doco to get rid of Friendica name there and clarify Red requirements. --- include/conversation.php | 12 ------------ include/text.php | 31 ++++++++++++++++++------------- 2 files changed, 18 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/conversation.php b/include/conversation.php index 410143a7a..1023c068d 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -584,17 +584,6 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { $tags=array(); $hashtags = array(); $mentions = array(); - foreach(explode(',',$item['tag']) as $tag){ - $tag = trim($tag); - if ($tag!="") { - $t = bbcode($tag); - $tags[] = $t; - if($t[0] == '#') - $hashtags[] = $t; - elseif($t[0] == '@') - $mentions[] = $t; - } - } $sp = false; $profile_link = best_link_url($item,$sp); @@ -650,7 +639,6 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { $tmp_item = array( 'template' => $tpl, 'toplevel' => 'toplevel_item', - 'tags' => $tags, 'id' => (($preview) ? 'P0' : $item['item_id']), 'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, $profile_url), 'profile_url' => $profile_link, diff --git a/include/text.php b/include/text.php index db29697f9..2d29dff31 100755 --- a/include/text.php +++ b/include/text.php @@ -1023,19 +1023,24 @@ function prepare_body($item,$attach = false) { $s .= '
'; } - if(is_array($item['term']) && count($item['term'])) { - $tstr = ''; - foreach($item['term'] as $t) { - $t1 = format_term_for_display($t); - if($t1) { - if($tstr) - $tstr .= ' '; - $tstr .= $t1; - } - } - if($tstr) - $s .= '
' . $tstr . '
'; - } +// At some point in time, posttags were removed from the threaded conversation templates, but remained in the search_item template. +// Code to put them back was added into include/conversation.php and/or include/ItemObject.php but under new class names +// Then it was discovered that the following bits remained of the old code. +// Commented out, but we may decide to use this instead of the other version and put all the tag rendering in one place. In the other +// location it is more theme-able. +// if(is_array($item['term']) && count($item['term'])) { +// $tstr = ''; +// foreach($item['term'] as $t) { +// $t1 = format_term_for_display($t); +// if($t1) { +// if($tstr) +// $tstr .= ' '; +// $tstr .= $t1; +// } +// } +// if($tstr) +// $s .= '
' . $tstr . '
'; +// } $writeable = ((get_observer_hash() == $item['owner_xchan']) ? true : false); -- cgit v1.2.3