diff --git a/bridges/PanacheDigitalGamesBridge.php b/bridges/PanacheDigitalGamesBridge.php new file mode 100644 index 00000000000..ba9640eff8a --- /dev/null +++ b/bridges/PanacheDigitalGamesBridge.php @@ -0,0 +1,45 @@ +find('.news-item') as $element) { + $item = array(); + + $title = $element->find('.news-item-texts-title', 0); + $link = $element->find('.news-item-texts a', 0); + $timestamp = $element->find('.news-item-texts-date', 0); + + $item['title'] = $title->plaintext; + $item['uri'] = self::URI . $link->href; + $item['timestamp'] = strtotime($timestamp->plaintext); + + $image_html = $element->find('.news-item-thumbnail-image', 0); + if ($image_html) { + $image_strings = explode('\'', $image_html); + /* Debug::log('S: ' . count($image_strings) . '||' . implode('_ _', $image_strings)); */ + if (count($image_strings) == 4) { + $item['content'] = ''; + } + } + + $this->items[] = $item; + } + } +}