diff --git a/bridges/FourchanBridge.php b/bridges/FourchanBridge.php index 90a746b..3b6d105 100644 --- a/bridges/FourchanBridge.php +++ b/bridges/FourchanBridge.php @@ -45,10 +45,21 @@ class FourchanBridge extends BridgeAbstract{ if(!empty($element->find('span.subject', 0)->innertext )) { $item['subject'] = $element->find('span.subject', 0)->innertext; } - $item['title'] = (isset($item['subject']) ? $item['subject'].' - ' : '' ) . 'reply '.$item['id'].' | '.$item['author']; + $item['title'] = 'reply '.$item['id'].' | '.$item['author']; + if(isset($item['subject'])){ + $item['title'] = $item['subject'].' - '.$item['title']; + } - $item['content'] = (isset($item['image']) ? ''.$item['id'].'
' : '') . ''.$element->find('.postMessage', 0)->innertext.''; + $content = $element->find('.postMessage', 0)->innertext; + $content = str_replace('href="#p','href="'.$this->getURI().'#p',$content); + $item['content'] = ''.$content.''; + if(isset($item['image'])){ + $item['content'] = '' + .''.$item['id'].'' + .'
' + .$item['content']; + } $this->items[] = $item; } $this->items = array_reverse($this->items);