forked from friendica/friendica-addons
SN/T: since inclusion of the title 2xMax_Char is too short, increasing that
This commit is contained in:
parent
75dd08fa73
commit
26dec371bb
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue