twitter and statusnet: Now Newlines are transmitted.

wppost: The title is now shortened with a "..."
This commit is contained in:
Michael Vogel 2013-07-14 14:58:12 +02:00
parent ce014035e7
commit a00464cd98
3 changed files with 9 additions and 6 deletions

View file

@ -189,12 +189,15 @@ function wppost_send(&$a,&$b) {
// If no bookmark is found then take the first line
if ($wptitle == '') {
$title = html2plain(bbcode($b['body']), 0, true);
$title = html2plain(bbcode($b['body']), 0, true)."\n";
$pos = strpos($title, "\n");
if (($pos == 0) or ($pos > 60))
$pos = 60;
$trailer = "";
if (($pos == 0) or ($pos > 100)) {
$pos = 100;
$trailer = "...";
}
$wptitle = substr($title, 0, $pos);
$wptitle = substr($title, 0, $pos).$trailer;
}
}