You need an API key for "Simple API Access".
-You get it via https://code.google.com/apis/console/ and then "API Access".
+- You go to https://code.google.com/apis/console/
+- Then you go to "Services" and activate "Google+ API".
+- After that you go to "API Access".
+- At the bottom of the page you see "Simple API Access".
+
+The value after "API key:" is the key that you need.
case "activity":
$post = fromgplus_html2bbcode($item->annotation)."\n";
- $post .= fromgplus_html2bbcode("♲");
- //$post .= html2bbcode("♻");
- //$post .= fromgplus_html2bbcode("◌");
- $post .= " [url=".$item->object->actor->url."]".$item->object->actor->displayName."[/url] \n";
- /*$post .= "[share author='".$item->object->actor->displayName.
- "' profile='".$item->object->actor->url.
- "' avatar='".$item->object->actor->image->url.
- "' link='".$item->object->url."']\n";*/
+ if (intval(get_config('system','new_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."']";
- $post .= fromgplus_html2bbcode($item->object->content);
+ $post .= fromgplus_html2bbcode($item->object->content);
- if (is_array($item->object->attachments))
- $post .= "\n".trim(fromgplus_handleattachments($item));
+ if (is_array($item->object->attachments))
+ $post .= "\n".trim(fromgplus_handleattachments($item));
+
+ $post .= "[/share]";
+ } else {
+ $post .= fromgplus_html2bbcode("♲");
+ $post .= " [url=".$item->object->actor->url."]".$item->object->actor->displayName."[/url] \n";
+ $post .= fromgplus_html2bbcode($item->object->content);
- //$post .= "[/share]";
+ if (is_array($item->object->attachments))
+ $post .= "\n".trim(fromgplus_handleattachments($item));
+ }
if (isset($item->address))
$location = $item->address;
* @return boolean
*/
function privacy_image_cache_is_local_image($url) {
- if ($url[0] == '/') return true;
+ if ($url[0] == '/') return true;
+
if (strtolower(substr($url, 0, 5)) == "data:") return true;
+ // Check if the cached path would be longer than 255 characters - apache doesn't like it
+ if (is_dir($_SERVER["DOCUMENT_ROOT"]."/privacy_image_cache")) {
+ $cachedurl = get_app()->get_baseurl()."/privacy_image_cache/". privacy_image_cache_cachename($url);
+ if (strlen($url) > 255)
+ return true;
+ }
+
// links normalised - bug #431
- $baseurl = normalise_link(get_app()->get_baseurl());
+ $baseurl = normalise_link(get_app()->get_baseurl());
$url = normalise_link($url);
- return (substr($url, 0, strlen($baseurl)) == $baseurl);
+ return (substr($url, 0, strlen($baseurl)) == $baseurl);
}
/**