X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fromgplus%2Ffromgplus.php;h=933567ce7c07f5a9a788fd95292d25f8747076d4;hb=02e952d57d326c9ab4a324868feba7c5a472c64a;hp=e0725a46df22a295d529653db453358be85be6c3;hpb=9317b8c0aeccd0ef68271be1e20e5dd371c37e15;p=friendica-addons.git diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index e0725a46..933567ce 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -9,6 +9,8 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes +require_once('mod/share.php'); + function fromgplus_install() { register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings'); register_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post'); @@ -461,10 +463,17 @@ function fromgplus_fetch($a, $uid) { $post = fromgplus_html2bbcode($item->annotation)."\n"; if (!intval(get_config('system','old_share'))) { - $post .= "[share author='".str_replace("'", "'",$item->object->actor->displayName). - "' profile='".$item->object->actor->url. - "' avatar='".$item->object->actor->image->url. - "' link='".$item->object->url."']"; + + if (function_exists("share_header")) + $post .= share_header($item->object->actor->displayName, $item->object->actor->url, + $item->object->actor->image->url, "", + datetime_convert('UTC','UTC',$item->object->published),$item->object->url); + else + $post .= "[share author='".str_replace("'", "'",$item->object->actor->displayName). + "' profile='".$item->object->actor->url. + "' avatar='".$item->object->actor->image->url. + "' posted='".datetime_convert('UTC','UTC',$item->object->published). + "' link='".$item->object->url."']"; $post .= fromgplus_html2bbcode($item->object->content);