X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=36ac57f17d5d938213723e03ba576d4ccf08d27b;hb=dbf51229d9014089eba0da41a55f23c507f7e2ea;hp=d5f87567b9d7b91c7cb4ae7a388d71a1b8ba9458;hpb=5c3bce30d65ad219030a84e57f3336cc69f21ead;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index d5f87567b9..36ac57f17d 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -369,7 +369,6 @@ function visible_activity($item) { if(!function_exists('conversation')) { function conversation(&$a, $items, $mode, $update, $preview = false) { - require_once('include/bbcode.php'); $ssl_state = ((local_user()) ? true : false); @@ -524,7 +523,26 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $tags=array(); $hashtags = array(); $mentions = array(); - foreach(explode(',',$item['tag']) as $tag){ + + $taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`", + intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION)); + + foreach($taglist as $tag) { + + if ($tag["url"] == "") + $tag["url"] = $searchpath.strtolower($tag["term"]); + + if ($tag["type"] == TERM_HASHTAG) { + $hashtags[] = "#".$tag["term"].""; + $prefix = "#"; + } elseif ($tag["type"] == TERM_MENTION) { + $mentions[] = "@".$tag["term"].""; + $prefix = "@"; + } + $tags[] = $prefix."".$tag["term"].""; + } + + /*foreach(explode(',',$item['tag']) as $tag){ $tag = trim($tag); if ($tag!="") { $t = bbcode($tag); @@ -534,7 +552,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { elseif($t[0] == '@') $mentions[] = $t; } - } + }*/ $sp = false; $profile_link = best_link_url($item,$sp); @@ -795,7 +813,7 @@ function item_photo_menu($item){ if(($cid) && (! $item['self'])) { $poke_link = $a->get_baseurl($ssl_state) . '/poke/?f=&c=' . $cid; $contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid; - $posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid; + $posts_link = $a->get_baseurl($ssl_state) . '/network/0?nets=all&cid=' . $cid; $clean_url = normalise_link($item['author-link']);