From: Tobias Diekershoff Date: Fri, 6 Apr 2012 17:37:23 +0000 (+0200) Subject: SN/T: since inclusion of the title 2xMax_Char is too short, increasing that X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=26dec371bbb7d0b141610fdd9f8b061ad1d290fd;p=friendica-addons.git SN/T: since inclusion of the title 2xMax_Char is too short, increasing that --- diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 897c5415..13f3f7e2 100755 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -435,9 +435,9 @@ function statusnet_post_hook(&$a,&$b) { // shorten all the links in a 200000 character long essay. if (! $b['title']=='') { $tmp = $b['title'] . ' : '. $b['body']; - $tmp = substr($tmp, 0, 2*$max_char); + $tmp = substr($tmp, 0, 4*$max_char); } else { - $tmp = substr($b['body'], 0, 2*$max_char); + $tmp = substr($b['body'], 0, 3*$max_char); } // if [url=bla][img]blub.png[/img][/url] get blub.png $tmp = preg_replace( '/\[url\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\]\[img\](\\w+.*?)\\[\\/img\]\\[\\/url\]/i', '$2', $tmp); diff --git a/twitter/twitter.php b/twitter/twitter.php index 006c1615..8a072fa2 100755 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -301,9 +301,9 @@ function twitter_post_hook(&$a,&$b) { // shorten all the links in a 200000 character long essay. if (! $b['title']=='') { $tmp = $b['title'] . ' : '. $b['body']; - $tmp = substr($tmp, 0, 2*$max_char); + $tmp = substr($tmp, 0, 4*$max_char); } else { - $tmp = substr($b['body'], 0, 2*$max_char); + $tmp = substr($b['body'], 0, 3*$max_char); } // if [url=bla][img]blub.png[/img][/url] get blub.png $tmp = preg_replace( '/\[url\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\]\[img\](\\w+.*?)\\[\\/img\]\\[\\/url\]/i', '$2', $tmp);