]> git.mxchange.org Git - friendica.git/blobdiff - mod/parse_url.php
Creating hashtags from keywords of a feed, when additional data should be fetched.
[friendica.git] / mod / parse_url.php
index c5f010ac117ad2fa7c1aea43a406639ba244c337..d314c6c67ff09190036ffb1753faeeb67f2e1329 100644 (file)
@@ -205,11 +205,23 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
                                case "dc.description":
                                        $siteinfo["text"] = $attr["content"];
                                        break;
+                               case "keywords":
+                                       $keywords = explode(",", $attr["content"]);
+                                       break;
+                               case "news_keywords":
+                                       $keywords = explode(",", $attr["content"]);
+                                       break;
                        }
                if ($siteinfo["type"] == "summary")
                        $siteinfo["type"] = "link";
        }
 
+       if (isset($keywords)) {
+               $siteinfo["keywords"] = array();
+               foreach ($keywords as $keyword)
+                       $siteinfo["keywords"][] = trim($keyword);
+       }
+
        //$list = $xpath->query("head/meta[@property]");
        $list = $xpath->query("//meta[@property]");
        foreach ($list as $node) {