mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[RadioMelodieBridge] Fix article content (#3230)
- remove the social network share section ath the beginning and and the end of the article - removte the HTML formated article tilthe from the content - limite the author picture size to 60 px
This commit is contained in:
parent
b21806a0b3
commit
57e79e7f1b
1 changed files with 9 additions and 0 deletions
|
@ -26,6 +26,14 @@ class RadioMelodieBridge extends BridgeAbstract
|
|||
$article = str_get_html($article->save());
|
||||
$textDOM = $article->find('article', 0);
|
||||
|
||||
// Remove HTML code for the article title
|
||||
$textDOM->find('h1', 0)->outertext = '';
|
||||
|
||||
// Fix the CSS for the author
|
||||
$textDOM->find('div[class=author]', 0)->find('img', 0)
|
||||
->setAttribute('style', 'width: 60px; margin: 0 15px; display: inline-block; vertical-align: top;');
|
||||
|
||||
|
||||
// Initialise arrays
|
||||
$item = [];
|
||||
$audio = [];
|
||||
|
@ -76,6 +84,7 @@ class RadioMelodieBridge extends BridgeAbstract
|
|||
|
||||
// Remove the share article part
|
||||
$textDOM->find('div[class=share]', 0)->outertext = '';
|
||||
$textDOM->find('div[class=share]', 1)->outertext = '';
|
||||
|
||||
// Rewrite relative Links
|
||||
$textDOM = defaultLinkTo($textDOM, self::URI . '/');
|
||||
|
|
Loading…
Add table
Reference in a new issue