diff --git a/appnet/appnet.php b/appnet/appnet.php index 9eb71713d..10deb96d0 100644 --- a/appnet/appnet.php +++ b/appnet/appnet.php @@ -357,12 +357,12 @@ function appnet_create_entities($a, $b, $postdata) { $start = $pos + 1; } - if (isset($postdata["url"]) AND isset($postdata["title"])) { + if (isset($postdata["url"]) AND isset($postdata["title"]) AND ($postdata["type"] != "photo")) { $postdata["title"] = shortenmsg($postdata["title"], 90); $max = 256 - strlen($postdata["title"]); $text = shortenmsg($text, $max); $text .= "\n[".$postdata["title"]."](".$postdata["url"].")"; - } elseif (isset($postdata["url"])) { + } elseif (isset($postdata["url"]) AND ($postdata["type"] != "photo")) { $postdata["url"] = short_link($postdata["url"]); $max = 240; $text = shortenmsg($text, $max); @@ -524,7 +524,7 @@ function appnet_send(&$a,&$b) { "value" => $attached_data ); - if (isset($post["url"]) AND !isset($post["title"])) { + if (isset($post["url"]) AND !isset($post["title"]) AND ($post["type"] != "photo")) { $display_url = str_replace(array("http://www.", "https://www."), array("", ""), $post["url"]); $display_url = str_replace(array("http://", "https://"), array("", ""), $display_url); diff --git a/buffer/buffer.php b/buffer/buffer.php index 90a797583..ebd3c37c1 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -341,13 +341,13 @@ function buffer_send(&$a,&$b) { // Seems like a bug to me // Buffer doesn't add links to Twitter and App.net (but pictures) //if ($includedlinks AND isset($post["url"])) - if (($profile->service == "twitter") AND isset($post["url"])) + if (($profile->service == "twitter") AND isset($post["url"]) AND ($post["type"] != "photo")) $post["text"] .= " ".$post["url"]; - elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"])) { + elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"]) AND ($post["type"] != "photo")) { $post["title"] = shortenmsg($post["title"], 90); $post["text"] = shortenmsg($post["text"], $limit - (24 + strlen($post["title"]))); $post["text"] .= "\n[".$post["title"]."](".$post["url"].")"; - } elseif (($profile->service == "appdotnet") AND isset($post["url"])) + } elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND ($post["type"] != "photo")) $post["text"] .= " ".$post["url"]; elseif ($profile->service == "google") $post["text"] .= html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); // Send a special blank to identify the post through the "fromgplus" addon diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index da6cb8af5..12c26e470 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -581,7 +581,7 @@ function statusnet_post_hook(&$a,&$b) { $image = ""; - if (isset($msgarr["url"])) { + if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo")) { if ((strlen($msgarr["url"]) > 20) AND ((strlen($msg." \n".$msgarr["url"]) > $max_char))) $msg .= " \n".short_link($msgarr["url"]); @@ -738,7 +738,7 @@ function statusnet_prepare_body(&$a,&$b) { $msgarr = plaintext($a, $item, $max_char, true, 7); $msg = $msgarr["text"]; - if (isset($msgarr["url"])) + if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo")) $msg .= " ".$msgarr["url"]; if (isset($msgarr["image"])) diff --git a/twitter/twitter.php b/twitter/twitter.php index 704f6193b..a6a27ea84 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -475,7 +475,7 @@ function twitter_post_hook(&$a,&$b) { $image = ""; - if (isset($msgarr["url"])) + if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo")) $msg .= "\n".$msgarr["url"]; elseif (isset($msgarr["image"]) AND ($msgarr["type"] != "video")) $image = $msgarr["image"]; @@ -707,7 +707,7 @@ function twitter_prepare_body(&$a,&$b) { $msgarr = plaintext($a, $item, $max_char, true, 8); $msg = $msgarr["text"]; - if (isset($msgarr["url"])) + if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo")) $msg .= " ".$msgarr["url"]; if (isset($msgarr["image"]))