1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-01-17 22:28:22 +01:00

[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; $date = 0;
} }
// Build title from username and content // Build title from content
$title = $author; $title = strip_tags($post->find('.userContent', 0)->innertext);
if(strlen($title) > 24)
$title = substr($title, 0, strpos(wordwrap($title, 24), "\n")) . '...';
$title = $title . ' | ' . strip_tags($content);
if(strlen($title) > 64) if(strlen($title) > 64)
$title = substr($title, 0, strpos(wordwrap($title, 64), "\n")) . '...'; $title = substr($title, 0, strpos(wordwrap($title, 64), "\n")) . '...';