[FacebookBridge] Improve titles (#924)

A slightly improved version of #454 and #468 . Build titles from content rather than author + pre-content (which doesn't reflect anything useful).
This commit is contained in:
triatic 2018-11-16 14:33:54 +00:00 committed by LogMANOriginal
parent 599d438a0d
commit 3806895059

View file

@ -659,14 +659,8 @@ EOD;
$date = 0;
}
// Build title from username and content
$title = $author;
if(strlen($title) > 24)
$title = substr($title, 0, strpos(wordwrap($title, 24), "\n")) . '...';
$title = $title . ' | ' . strip_tags($content);
// Build title from content
$title = strip_tags($post->find('.userContent', 0)->innertext);
if(strlen($title) > 64)
$title = substr($title, 0, strpos(wordwrap($title, 64), "\n")) . '...';