mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Searching for tags has been enabled in all places. The tag detection has been improved for imports with missing line feeds.
This commit is contained in:
parent
b9afb38f4d
commit
5501dd0759
6 changed files with 112 additions and 51 deletions
|
@ -523,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)",
|
||||
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[] = "#<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$prefix = "#";
|
||||
} elseif ($tag["type"] == TERM_MENTION) {
|
||||
$mentions[] = "@<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$prefix = "@";
|
||||
}
|
||||
$tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
}
|
||||
|
||||
/*foreach(explode(',',$item['tag']) as $tag){
|
||||
$tag = trim($tag);
|
||||
if ($tag!="") {
|
||||
$t = bbcode($tag);
|
||||
|
@ -533,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue