]> git.mxchange.org Git - friendica-addons.git/commitdiff
SN/T: since inclusion of the title 2xMax_Char is too short, increasing that
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Fri, 6 Apr 2012 17:37:23 +0000 (19:37 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Fri, 6 Apr 2012 17:37:23 +0000 (19:37 +0200)
statusnet/statusnet.php
twitter/twitter.php

index 897c54152c158ea7bb4c6f46a1a0d0ca79a8d08a..13f3f7e2c1819af1eb0bba8f6cea89d0eb3dbd24 100755 (executable)
@@ -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);
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);