From 67f5fd0860069a8e7052b4e541395b9b810e68f9 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 3 Aug 2016 20:48:34 +0200 Subject: [PATCH] [MemoLinux] remove bridge: website supported by WordPress bridge --- bridges/MemoLinuxBridge.php | 58 ------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 bridges/MemoLinuxBridge.php diff --git a/bridges/MemoLinuxBridge.php b/bridges/MemoLinuxBridge.php deleted file mode 100644 index 443740d5..00000000 --- a/bridges/MemoLinuxBridge.php +++ /dev/null @@ -1,58 +0,0 @@ -maintainer = "qwertygc"; - $this->name = "MemoLinux"; - $this->uri = "http://memo-linux.com/"; - $this->description = "Returns the 10 newest posts from MemoLinux (full text)"; - $this->update = "2015-01-30"; - - } - - 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('div.entry-content', 0)->innertext; - $text = preg_replace('@]*?>.*?@si', '', $text); - $text = preg_replace('@]*?>.*?@si', '', $text); - $text = preg_replace("/file_get_html('http://memo-linux.com/feed/') or $this->returnError('Could not request MemoLinux.', 404); - $limit = 0; - - foreach($html->find('item') as $element) { - if($limit < 10) { - $item = new \Item(); - $item->title = StripCDATA($element->find('title', 0)->innertext); - $item->uri = StripCDATA($element->find('guid', 0)->plaintext); - $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext); - $item->content = ExtractContent($item->uri); - $this->items[] = $item; - $limit++; - } - } - } - - public function getName(){ - return 'MemoLinux'; - } - - public function getURI(){ - return 'http://memo-linux.com/feed/'; - } - - public function getCacheDuration(){ - return 3600*12; // 12 hours - } -}