From b3eb963a2bdff7735b32085f30c9a715d14482f0 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 12 Mar 2016 07:42:57 +0100 Subject: [PATCH] fromgplus: Add keywords to imported posts --- fromgplus/fromgplus.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index e0fdc705..d21ece2b 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -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":