facebook, statusnet and twitter: Now shared messages are clearly marked with the name of the original poster

twitter: When a post with a picture failes than the post is repeated without a picture
fromgplus: Under certain circumenstances "fromgplus" generates an empty post that is blocking the cron hook - so now messages are mirrored anymore.
This commit is contained in:
Michael Vogel 2013-07-28 20:40:37 +02:00
parent f424a9e974
commit 83f95acbbf
4 changed files with 33 additions and 25 deletions

View file

@ -491,10 +491,10 @@ function statusnet_shortenmsg($b, $max_char) {
$body = preg_replace( '/'.$recycle.'\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', "\n", $body);
// remove the share element
$body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
//$body = preg_replace("/\[share(.*?)\](.*?)\[\/share\]/ism","\n\n$2\n\n",$body);
// At first convert the text to html
$html = bbcode($body, false, false);
$html = bbcode($body, false, false, 2);
// Then convert it to plain text
//$msg = trim($b['title']." \n\n".html2plain($html, 0, true));