From 628e133e96e568caffd192ecbcc5cf1d84247869 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Thu, 4 Aug 2016 12:41:22 +0200 Subject: [PATCH] [Tuxboard] remove bridge: website supported by WordPress bridge --- bridges/TuxboardBridge.php | 64 -------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 bridges/TuxboardBridge.php diff --git a/bridges/TuxboardBridge.php b/bridges/TuxboardBridge.php deleted file mode 100644 index 63a1ed4b..00000000 --- a/bridges/TuxboardBridge.php +++ /dev/null @@ -1,64 +0,0 @@ -maintainer = "superbaillot.net"; - $this->name = "Tuxboard"; - $this->uri = "http://www.tuxboard.com/"; - $this->description = "Tuxboard"; - $this->update = "2014-07-08"; - - } - - public function collectData(array $param){ - - function StripCDATA($string) { - $string = str_replace('', '', $string); - return $string; - } - - function ExtractContent($url) { - $html2 = $this->file_get_html($url); - $text = $html2->find('article#page', 0)->innertext; - $text = preg_replace('@]*?>.*?@si', '', $text); - return $text; - } - - $html = $this->file_get_html('http://www.tuxboard.com/feed/atom/') or $this->returnError('Could not request Tuxboard.', 404); - $limit = 0; - - foreach($html->find('entry') as $element) { - if($limit < 10) { - $item = new \Item(); - $item->title = StripCDATA($element->find('title', 0)->innertext); - $item->uri = $element->find('link', 0)->href; - $item->timestamp = strtotime($element->find('published', 0)->plaintext); - $item->content = ExtractContent($item->uri); - $this->items[] = $item; - $limit++; - } - } - - - - } - - public function getName(){ - return 'Tuxboard'; - } - - public function getURI(){ - return 'http://www.tuxboard.com'; - } - - public function getDescription(){ - return 'Tuxboard via rss-bridge'; - } - - public function getCacheDuration(){ - return 3600; // 1 hour - } -} -?>