aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-16 21:20:04 -0700
committerfriendica <info@friendica.com>2012-07-16 21:20:04 -0700
commitd3279a615726efb0147a14140a16d6b62f650f77 (patch)
tree50046572c16abcfed723f591ec26462eb80a8580
parentaeaccb03bac243f653f9a3132ee97ecc6bb52bff (diff)
downloadvolse-hubzilla-d3279a615726efb0147a14140a16d6b62f650f77.tar.gz
volse-hubzilla-d3279a615726efb0147a14140a16d6b62f650f77.tar.bz2
volse-hubzilla-d3279a615726efb0147a14140a16d6b62f650f77.zip
more search cleanup
-rw-r--r--include/conversation.php8
-rw-r--r--mod/network.php1
-rw-r--r--view/search_item.tpl8
3 files changed, 16 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 7beff3b03..ca7d9cc4c 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -406,11 +406,19 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$likebuttons = false;
$shareable = false;
+ $tags=array();
+ $terms = get_terms_oftype($item['term'],array(TERM_HASHTAG,TERM_MENTION,TERM_UNKNOWN));
+ if(count($terms))
+ foreach($terms as $tag)
+ $tags[] = format_term_for_display($tag);
+
+
$body = prepare_body($item,true);
//$tmp_item = replace_macros($tpl,array(
$tmp_item = array(
'template' => $tpl,
+ 'tags' => $tags,
'id' => (($preview) ? 'P0' : $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,
diff --git a/mod/network.php b/mod/network.php
index a1294cea5..79587a581 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -588,6 +588,7 @@ function network_content(&$a, $update = 0) {
intval($_SESSION['uid'])
);
+ $items = fetch_post_tags($items);
}
else {
diff --git a/view/search_item.tpl b/view/search_item.tpl
index 47f34685f..8089d306e 100644
--- a/view/search_item.tpl
+++ b/view/search_item.tpl
@@ -29,7 +29,13 @@
<div class="wall-item-content" id="wall-item-content-$item.id" >
<div class="wall-item-title" id="wall-item-title-$item.id">$item.title</div>
<div class="wall-item-title-end"></div>
- <div class="wall-item-body" id="wall-item-body-$item.id" >$item.body</div>
+ <div class="wall-item-body" id="wall-item-body-$item.id" >$item.body
+ <div class="body-tag">
+ {{ for $item.tags as $tag }}
+ <span class='tag'>$tag</span>
+ {{ endfor }}
+ </div>
+ </div>
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >