1
0
Fork 0
forked from blallo/rss-bridge

[TwitterBridgeExtended] Use heredoc syntax to build ->content

This commit is contained in:
logmanoriginal 2016-08-09 21:47:29 +02:00
parent 1a572f6639
commit 13d9b8d462

View file

@ -70,7 +70,16 @@ class TwitterBridgeExtended extends BridgeAbstract{
}
// get tweet text
$item->content = '<a href="https://twitter.com/'.$item->username.'"><img style="align:top;width:75px;" alt="'.$item->username.'" src="'.$item->avatar.'" /></a> '.$item->fullname.'<br/><blockquote>'.str_replace('href="/', 'href="https://twitter.com/', $tweet->find('p.js-tweet-text', 0)->innertext).'</blockquote>';
//$item->content = '<a href="https://twitter.com/'.$item->username.'"><img style="align:top;width:75px;" alt="'.$item->username.'" src="'.$item->avatar.'" /></a><p>'.$item->fullname.'</p><br/><blockquote>'.str_replace('href="/', 'href="https://twitter.com/', $tweet->find('p.js-tweet-text', 0)->innertext).'</blockquote>';
$cleanedTweet = str_replace('href="/', 'href="https://twitter.com/', $tweet->find('p.js-tweet-text', 0)->innertext);
$item->content = <<<EOD
<a href="https://twitter.com/{$item->username}"><img style="align:top;width:75px;" alt="{$item->username}" src="{$item->avatar}" /></a>
<p>{$item->fullname}</p><br/>
<blockquote>{$cleanedTweet}</blockquote>
EOD;
// generate the title
$item->title = $item->fullname . ' (@'. $item->username . ') | ' . $item->content_simple;
// put out