function fromgplus_fetch($a, $uid) {
$maxfetch = 20;
+ // Special blank to identify postings from the googleplus connector
+ $blank = html_entity_decode(" ", ENT_QUOTES, 'UTF-8');
+
$account = get_pconfig($uid,'fromgplus','account');
$key = get_config('fromgplus','key');
$lastdate = strtotime($item->published);
if ($item->access->description == "Public")
+
+ // Loop prevention - ignore postings from HootSuite
+ if ($item->provider->title == "HootSuite")
+ continue;
+
+ // Loop prevention through the special blank from the googleplus connector
+ if (strstr($item->object->content, $blank))
+ continue;
+
switch($item->object->objectType) {
case "note":
$post = fromgplus_html2bbcode($item->object->content);
else
$location = "";
- // Loop prevention - should be made better
- if ($item->provider->title != "HootSuite")
- fromgplus_post($a, $uid, "Google+", $post, $location);
+ fromgplus_post($a, $uid, "Google+", $post, $location);
//fromgplus_post($a, $uid, $item->provider->title, $post, $location);
break;
case "activity":
$post = fromgplus_html2bbcode($item->annotation)."\n";
- if (intval(get_config('system','new_share'))) {
+ 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.
else
$location = "";
- // Loop prevention - should be made better
- if ($item->provider->title != "HootSuite")
- fromgplus_post($a, $uid, "Google+", $post, $location);
+ fromgplus_post($a, $uid, "Google+", $post, $location);
//fromgplus_post($a, $uid, $item->provider->title, $post, $location);
break;
}