public function __construct($config) { $config['link'] = 'http://pinboard.in/u:' . $config['username'] . '/'; $config['url'] = sprintf('http://feeds.pinboard.in/rss/secret:%s/u:%s/', $config['secret'], $config['username']); parent::__construct($config); $this->setItemTemplate('<li><a href="{{{link}}}">{{{title}}}</a></li>' . "\n"); }
public function __construct($config) { $config['link'] = 'http://delicious.com/' . $config['username'] . '/'; $config['url'] = sprintf('http://feeds.delicious.com/v2/rss/%s?count=%s', $config['username'], $config['total']); parent::__construct($config); $this->setItemTemplate('<li class="link"><a href="{{{link}}}">{{{title}}}</a>{{{tags}}}</li>' . "\n"); }
public function __construct($config) { $config['link'] = 'http://del.icio.us/' . $config['username'] . '/'; $config['url'] = sprintf('http://feeds.delicious.com/v2/rss/%s?count=%s', $config['username'], $config['total']); parent::__construct($config); $this->setItemTemplate('<li><a href="{%link%}">{%title%}</a></li>' . "\n"); }
public function __construct($config) { $config['link'] = 'http://www.facebook.com/' . $config['username'] . '/'; $config['url'] = sprintf('http://www.facebook.com/feeds/status.php?id=%d&viewer=%d&key=%s&format=rss20', $config['id'], $config['id'], $config['key']); parent::__construct($config); $this->setItemTemplate('<li><a href="{{{link}}}">{{{title}}}</a> {{{date}}}</li>' . "\n"); }
public function __construct($config) { $config['link'] = 'http://www.instapaper.com/'; $config['url'] = sprintf('http://www.instapaper.com/archive/rss/%s/%s', $config['userid'], $config['token']); parent::__construct($config); $this->setItemTemplate('<li><a href="{{{link}}}">{{{title}}}</a></li>' . "\n"); }
public function __construct() { parent::__construct("https://i-share.carli.illinois.edu/newbooks/newbooks.cgi?library=WHEdb&list=all&day=7&op=and&text=&lang=English&submit=RSS"); $nitems = count($this->xml->channel->item); for ($i = 0; $i < $nitems; ++$i) { $tidy_desc = \str_replace(array('<B>', '</B>', '<description>', '</description>'), '', $this->xml->channel->item[$i]->description->asXML()); $matches = array(); if (\preg_match('@<img border="0" src="(.*)" vspace="3" border="0" align="right"/>@', $tidy_desc, $matches)) { if (\util\Utility::isValidImage($matches[1])) { $imgurl = $matches[1]; } else { $imgurl = ""; } $tidy_desc = str_replace($matches[0], '', $tidy_desc); } else { $imgurl = ""; } $fieldstr = \explode('<BR/>', $tidy_desc); $this->xml->channel->item[$i]->description = \implode("\n", $fieldstr); $fields = array(); foreach ($fieldstr as $f) { //separate field name and field value $matches = array(); if (\preg_match("/^([-a-zA-Z_ ]*[a-zA-Z]{4}): /", $f, $matches)) { $fname = \strtolower(str_replace(' ', '_', \trim($matches[1]))); $fvalue = \trim(str_replace($matches[0], '', $f)); $fields[$fname] = $fvalue; $this->xml->channel->item[$i]->addChild($fname, $fvalue); } } $cn_data = \cn\processor\Factory::make($fields)->data(); foreach ($cn_data as $name => $value) { $name = \htmlspecialchars($name); $value = \htmlspecialchars($value); $this->xml->channel->item[$i]->addChild($name, $value); } unset($this->xml->channel->item[$i]->description[0]); if (!\util\Utility::isValidImage($imgurl)) { $imgurl = ""; } $this->xml->channel->item[$i]->addChild('cover', $imgurl); } }
function __construct() { parent::__construct(); }
public function __construct($config) { parent::__construct($config); }