]> git.mxchange.org Git - friendica-addons.git/blobdiff - fromgplus/fromgplus.php
fromgplus: Add keywords to imported posts
[friendica-addons.git] / fromgplus / fromgplus.php
index e0fdc705ffd856833013ad14ffd0cded4b6a18f8..d21ece2b4ad815b5622c9a817e4f10167d7fe088 100644 (file)
@@ -10,6 +10,7 @@
 define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
 
 require_once('mod/share.php');
+require_once('mod/parse_url.php');
 
 function fromgplus_install() {
        register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
@@ -323,6 +324,11 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
                                if ($quote != "")
                                        $pagedata["text"] = $quote;
 
+                               // Add Keywords to page link
+                               $data = parseurl_getsiteinfo_cached($pagedata["url"], true);
+                               if (isset($data["keywords"]))
+                                       $pagedata["keywords"] = $data["keywords"];
+
                                break;
 
                        case "photo":