[TwitterBridgeExtended] Use heredoc syntax to build ->content
This commit is contained in:
parent
1a572f6639
commit
13d9b8d462
1 changed files with 10 additions and 1 deletions
|
@ -70,7 +70,16 @@ class TwitterBridgeExtended extends BridgeAbstract{
|
||||||
}
|
}
|
||||||
|
|
||||||
// get tweet text
|
// 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
|
// generate the title
|
||||||
$item->title = $item->fullname . ' (@'. $item->username . ') | ' . $item->content_simple;
|
$item->title = $item->fullname . ' (@'. $item->username . ') | ' . $item->content_simple;
|
||||||
// put out
|
// put out
|
||||||
|
|
Loading…
Reference in a new issue