Needed changes for a changed core function
This commit is contained in:
parent
37094047a1
commit
4f5390c09e
|
@ -357,12 +357,12 @@ function appnet_create_entities($a, $b, $postdata) {
|
||||||
$start = $pos + 1;
|
$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);
|
$postdata["title"] = shortenmsg($postdata["title"], 90);
|
||||||
$max = 256 - strlen($postdata["title"]);
|
$max = 256 - strlen($postdata["title"]);
|
||||||
$text = shortenmsg($text, $max);
|
$text = shortenmsg($text, $max);
|
||||||
$text .= "\n[".$postdata["title"]."](".$postdata["url"].")";
|
$text .= "\n[".$postdata["title"]."](".$postdata["url"].")";
|
||||||
} elseif (isset($postdata["url"])) {
|
} elseif (isset($postdata["url"]) AND ($postdata["type"] != "photo")) {
|
||||||
$postdata["url"] = short_link($postdata["url"]);
|
$postdata["url"] = short_link($postdata["url"]);
|
||||||
$max = 240;
|
$max = 240;
|
||||||
$text = shortenmsg($text, $max);
|
$text = shortenmsg($text, $max);
|
||||||
|
@ -524,7 +524,7 @@ function appnet_send(&$a,&$b) {
|
||||||
"value" => $attached_data
|
"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://www.", "https://www."), array("", ""), $post["url"]);
|
||||||
$display_url = str_replace(array("http://", "https://"), array("", ""), $display_url);
|
$display_url = str_replace(array("http://", "https://"), array("", ""), $display_url);
|
||||||
|
|
||||||
|
|
|
@ -341,13 +341,13 @@ function buffer_send(&$a,&$b) {
|
||||||
// Seems like a bug to me
|
// Seems like a bug to me
|
||||||
// Buffer doesn't add links to Twitter and App.net (but pictures)
|
// Buffer doesn't add links to Twitter and App.net (but pictures)
|
||||||
//if ($includedlinks AND isset($post["url"]))
|
//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"];
|
$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["title"] = shortenmsg($post["title"], 90);
|
||||||
$post["text"] = shortenmsg($post["text"], $limit - (24 + strlen($post["title"])));
|
$post["text"] = shortenmsg($post["text"], $limit - (24 + strlen($post["title"])));
|
||||||
$post["text"] .= "\n[".$post["title"]."](".$post["url"].")";
|
$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"];
|
$post["text"] .= " ".$post["url"];
|
||||||
elseif ($profile->service == "google")
|
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
|
$post["text"] .= html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); // Send a special blank to identify the post through the "fromgplus" addon
|
||||||
|
|
|
@ -581,7 +581,7 @@ function statusnet_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
$image = "";
|
$image = "";
|
||||||
|
|
||||||
if (isset($msgarr["url"])) {
|
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo")) {
|
||||||
if ((strlen($msgarr["url"]) > 20) AND
|
if ((strlen($msgarr["url"]) > 20) AND
|
||||||
((strlen($msg." \n".$msgarr["url"]) > $max_char)))
|
((strlen($msg." \n".$msgarr["url"]) > $max_char)))
|
||||||
$msg .= " \n".short_link($msgarr["url"]);
|
$msg .= " \n".short_link($msgarr["url"]);
|
||||||
|
@ -738,7 +738,7 @@ function statusnet_prepare_body(&$a,&$b) {
|
||||||
$msgarr = plaintext($a, $item, $max_char, true, 7);
|
$msgarr = plaintext($a, $item, $max_char, true, 7);
|
||||||
$msg = $msgarr["text"];
|
$msg = $msgarr["text"];
|
||||||
|
|
||||||
if (isset($msgarr["url"]))
|
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo"))
|
||||||
$msg .= " ".$msgarr["url"];
|
$msg .= " ".$msgarr["url"];
|
||||||
|
|
||||||
if (isset($msgarr["image"]))
|
if (isset($msgarr["image"]))
|
||||||
|
|
|
@ -475,7 +475,7 @@ function twitter_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
$image = "";
|
$image = "";
|
||||||
|
|
||||||
if (isset($msgarr["url"]))
|
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo"))
|
||||||
$msg .= "\n".$msgarr["url"];
|
$msg .= "\n".$msgarr["url"];
|
||||||
elseif (isset($msgarr["image"]) AND ($msgarr["type"] != "video"))
|
elseif (isset($msgarr["image"]) AND ($msgarr["type"] != "video"))
|
||||||
$image = $msgarr["image"];
|
$image = $msgarr["image"];
|
||||||
|
@ -707,7 +707,7 @@ function twitter_prepare_body(&$a,&$b) {
|
||||||
$msgarr = plaintext($a, $item, $max_char, true, 8);
|
$msgarr = plaintext($a, $item, $max_char, true, 8);
|
||||||
$msg = $msgarr["text"];
|
$msg = $msgarr["text"];
|
||||||
|
|
||||||
if (isset($msgarr["url"]))
|
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo"))
|
||||||
$msg .= " ".$msgarr["url"];
|
$msg .= " ".$msgarr["url"];
|
||||||
|
|
||||||
if (isset($msgarr["image"]))
|
if (isset($msgarr["image"]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user