$_REQUEST['profile_uid'] = $uid;
$_REQUEST['source'] = $source;
+ $_REQUEST['extid'] = NETWORK_GPLUS;
// $_REQUEST['verb']
// $_REQUEST['parent']
function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
require_once("include/Photo.php");
require_once("include/items.php");
+ require_once("include/network.php");
$post = "";
$quote = "";
switch($attachment->objectType) {
case "video":
$pagedata["type"] = "video";
- $pagedata["url"] = $attachment->url;
+ $pagedata["url"] = original_url($attachment->url);
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
break;
case "article":
$pagedata["type"] = "link";
- $pagedata["url"] = $attachment->url;
+ $pagedata["url"] = original_url($attachment->url);
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
break;
case "photo-album":
- $pagedata["url"] = $attachment->url;
+ $pagedata["url"] = original_url($attachment->url);
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
- $post .= "\n\n[bookmark=".$attachment->url."]".fromgplus_html2bbcode($attachment->displayName)."[/bookmark]\n";
+ $post .= "\n\n[bookmark=".$pagedata["url"]."]".$pagedata["title"]."[/bookmark]\n";
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
case "album":
$pagedata["type"] = "link";
- $pagedata["url"] = $attachment->url;
+ $pagedata["url"] = original_url($attachment->url);
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
$thumb = $attachment->thumbnails[0];
break;
case "audio":
- $pagedata["url"] = $attachment->url;
+ $pagedata["url"] = original_url($attachment->url);
$pagedata["title"] = fromgplus_html2bbcode($attachment->displayName);
$post .= "\n\n[bookmark=".$pagedata["url"]."]".$pagedata["title"]."[/bookmark]\n";
break;
$reversed = array_reverse($activities->items);
foreach($reversed as $item) {
+
if (strtotime($item->published) <= $initiallastdate)
continue;
if ($first_time)
continue;
- if ($item->access->description == "Public")
-
- // Loop prevention - ignore postings from HootSuite
- if ($item->provider->title == "HootSuite")
- continue;
+ if ($item->access->description == "Public") {
// Loop prevention through the special blank from the googleplus connector
- if (strstr($item->object->content, $blank))
+ //if (strstr($item->object->content, $blank))
+ if (strrpos($item->object->content, $blank) >= strlen($item->object->content) - 5)
continue;
switch($item->object->objectType) {
else
$location = "";
- fromgplus_post($a, $uid, "Google+", $post, $location);
- //fromgplus_post($a, $uid, $item->provider->title, $post, $location);
+ //fromgplus_post($a, $uid, "Google+", $post, $location);
+ fromgplus_post($a, $uid, $item->provider->title, $post, $location);
break;
else
$location = "";
- fromgplus_post($a, $uid, "Google+", $post, $location);
- //fromgplus_post($a, $uid, $item->provider->title, $post, $location);
+ //fromgplus_post($a, $uid, "Google+", $post, $location);
+ fromgplus_post($a, $uid, $item->provider->title, $post, $location);
break;
}
+ }
}
if ($lastdate != 0)
set_pconfig($uid,'fromgplus','lastdate', $lastdate);