]> git.mxchange.org Git - friendica-addons.git/blobdiff - twitter/twitter.php
SN/T: since inclusion of the title 2xMax_Char is too short, increasing that
[friendica-addons.git] / twitter / twitter.php
index 006c16152934c3c77833705372e54b36775cea4f..8a072fa28bfdf2ed3b7c13ef8bd9f613de52a193 100755 (executable)
@@ -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);