diff --git a/include/feed.php b/include/feed.php index 0be6a5781c..49ae8df5c5 100644 --- a/include/feed.php +++ b/include/feed.php @@ -1,5 +1,7 @@ query("category", $entry); + foreach ($categories AS $category) { + $hashtag = $category->nodeValue; + if ($tags != '') { + $tags .= ', '; + } + + $taglink = "#[url=" . System::baseUrl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url]"; + $tags .= $taglink; + } + $body = trim($xpath->evaluate('atom:content/text()', $entry)->item(0)->nodeValue); if ($body == "") { @@ -381,12 +395,17 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) { $item["object-type"] = ACTIVITY_OBJ_BOOKMARK; unset($item["attach"]); } else { + if ($contact["fetch_further_information"] == 3) { + if (!empty($tags)) { + $item["tag"] = $tags; + } else { + $item["tag"] = add_page_keywords($item["plink"], false, $preview, true, $contact["ffi_keyword_blacklist"]); + } + $item["body"] .= "\n".$item['tag']; + } if (!strstr($item["body"], '[url') && ($item['plink'] != '')) { $item["body"] .= "[hr][url]".$item['plink']."[/url]"; } - if ($contact["fetch_further_information"] == 3) { - $item["tag"] = add_page_keywords($item["plink"], false, $preview, true, $contact["ffi_keyword_blacklist"]); - } } if (!$simulate) {