case 'facebook':
$send = ($b["extid"] != Protocol::FACEBOOK);
$limit = 0;
- $markup = false;
- $includedlinks = false;
- $htmlmode = 9;
- break;
-
- case 'google':
- $send = ($b["extid"] != Protocol::GPLUS);
- $limit = 0;
- $markup = true;
$includedlinks = false;
$htmlmode = 9;
break;
case 'twitter':
$send = ($b["extid"] != Protocol::TWITTER);
$limit = 280;
- $markup = false;
$includedlinks = true;
$htmlmode = 8;
break;
case 'linkedin':
$send = ($b["extid"] != Protocol::LINKEDIN);
$limit = 700;
- $markup = false;
$includedlinks = true;
$htmlmode = 2;
break;
$item = $b;
- // Markup for Google+
- if ($markup) {
- if ($item["title"] != "") {
- $item["title"] = "*" . $item["title"] . "*";
- }
-
- $item["body"] = preg_replace("(\[b\](.*?)\[\/b\])ism", '*$1*', $item["body"]);
- $item["body"] = preg_replace("(\[i\](.*?)\[\/i\])ism", '_$1_', $item["body"]);
- $item["body"] = preg_replace("(\[s\](.*?)\[\/s\])ism", '-$1-', $item["body"]);
- }
-
$post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode);
Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG);
// Buffer doesn't add links to Twitter (but pictures)
if (($profile->service == "twitter") && isset($post["url"]) && ($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
}
$message = [];