[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:
parent
599d438a0d
commit
3806895059
1 changed files with 2 additions and 8 deletions
|
@ -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")) . '...';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue