function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $title = $this->lifestream->html_entity_decode($row->get_title()); if (lifestream_str_startswith($title, 'Comment on: ')) { if (!$this->get_option('show_comments')) { return; } $key = 'comment'; $title = substr($title, 12); } elseif (lifestream_str_startswith($title, 'Submitted: ')) { if (!$this->get_option('show_submissions')) { return; } $key = 'submit'; $title = substr($title, 11); } elseif (lifestream_str_startswith($title, 'Favorite: ')) { if (!$this->get_option('show_favorites')) { return; } $key = 'favorite'; $title = substr($title, 10); } else { return; } $data['title'] = $title; $data['key'] = $key; return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $data['track'] = $data['title']; $data['title'] = $data['description']; return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $author = $row->get_author(); $data['author'] = $this->clear_name($author->get_name()); return $data; }
function yield_many($row, $url, $key) { $events = array(); $string = '<a href="' . $this->get_public_url() . '">' . $this->get_option('username') . '</a> '; $description = $this->lifestream->html_entity_decode($row->get_description()); if (lifestream_str_startswith(strtolower($description), strtolower($string))) { $description = substr($description, strlen($string)); } if (lifestream_str_startswith(strtolower($description), 'unlocked')) { preg_match_all($this->achievement_regexp, str_replace('</li>', "</li>\n", $description), $matches, PREG_SET_ORDER); foreach ($matches as $match) { $data = parent::yield($row, $url, $key); $data['title'] = $match[1] . ' in ' . $match[3]; $data['link'] = $match[2]; $data['key'] = 'achievement'; unset($data['description']); $events[] = $data; } } elseif (preg_match($this->status_regexp, $description, $match)) { $data = parent::yield($row, $url, $key); $data['title'] = $match[1]; $data['link'] = $this->get_public_url(); $data['key'] = 'status'; unset($data['description']); $events[] = $data; } elseif (preg_match($this->played_regexp, $description, $match) || preg_match($this->played_alt_regexp, $description, $match)) { $data = parent::yield($row, $url, $key); $data['title'] = $match[2]; $data['link'] = $match[1]; $data['key'] = 'played'; unset($data['description']); $events[] = $data; } return $events; }
function yield($row, $url, $key) { $TAXONOMY_NS = 'http://purl.org/rss/1.0/modules/taxonomy/'; $RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; // <taxo:topics> // <rdf:Bag> // <rdf:li rdf:resource="http://pinboard.in/u:zeeg/t:mysql"/> // <rdf:li rdf:resource="http://pinboard.in/u:zeeg/t:optimization"/> // // <rdf:li rdf:resource="http://pinboard.in/u:zeeg/t:performance"/> // </rdf:Bag> // </taxo:topics> $data = parent::yield($row, $url, $key); $topics =& $row->get_item_tags($TAXONOMY_NS, 'topics'); $topics = $topics[0]['child'][$RDF_NS]['Bag'][0]['child'][$RDF_NS]['li']; $tags = array(); foreach ($topics as $t) { $t = $t['attribs'][$RDF_NS]['resource']; if (!empty($t)) { $tags[] = $row->sanitize(substr(strstr($t, '/t:'), 3), SIMPLEPIE_CONSTRUCT_TEXT); } } $data['tags'] = $tags; return $data; }
function yield($row, $url, $key) { if (lifestream_str_endswith($row->get_title(), 'QuickMix')) { return false; } return parent::yield($row, $url, $key); }
function yield($row, $url, $key) { //<gr:annotation><content type="html">Just testing some stuff in Lifestream</content> $data = parent::yield($row, $url, $key); $annotation =& $row->get_item_tags(self::NS, 'annotation'); $data['comment'] = $this->lifestream->html_entity_decode($annotation[0]['child']['http://www.w3.org/2005/Atom']['content'][0]['data']); return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $subject =& $row->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject'); $tags = explode(' ', $row->sanitize($subject[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); $data['tags'] = $tags; return $data; }
function yield($row, $url, $key) { //<gr:annotation><content type="html">Just testing some stuff in Lifestream</content> $data = parent::yield($row, $url, $key); $annotation =& $row->get_item_tags(self::NS, 'annotation'); $data['comment'] = $this->lifestream->html_entity_decode($annotation[0]['child']['http://www.w3.org/2005/Atom']['content'][0]['data']); $data['date'] = $row->data['attribs']['http://www.google.com/schemas/reader/atom/']['crawl-timestamp-msec'] / 1000; return $data; }
function yield($row, $url, $key) { //I don't know what this is for, would not fetch when running //if (!lifestream_str_startswith($row->get_link(), 'http://'.$this->get_option('username').'.jaiku.com/presence/')) return; $data = parent::yield($row, $url, $key); //preg_match('|<p>([^<]+)</p>|i', $row->get_title(), $matches); //$data['title'] = $matches[1]; $data['title'] = $row->get_title(); return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); if ($data['title'] == 'Your Queue is empty.') { return; } if ($key == 'queue') { $data['title'] = substr($data['title'], 5); } return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); // Comments have URL fragment identifiers while posts do not if ($this->get_option('hide_comments') && strpos($data['guid'], '#') !== false) { return false; } $data['title'] = $this->lifestream->html_entity_decode($row->get_title()); $data['description'] = $row->get_description(); return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $title = $row->get_title(); $on_part = ' on Yelp.com'; if (substr($title, strlen($title) - strlen($on_part)) == $on_part) { $title = substr($title, 0, strlen($title) - strlen($on_part)); } $data['title'] = $title; return $data; }
function yield($row, $url, $key) { if ($row->data['child']['http://www.w3.org/2005/Atom']['title']['data']) { return null; } else { $data = parent::yield($row, $url, $key); // echo '<pre>'; print_r($row->data['child']['http://www.w3.org/2005/Atom']); die; $data['title'] = $row->data['child']['http://www.w3.org/2005/Atom']['title'][0]['data']; $data['description'] = $row->data['child']['http://www.w3.org/2005/Atom']['id'][0]['data']; // echo '<pre>'; print_r($data); die; return $data; } }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $string = $this->get_option('username') . ': '; $description = $this->lifestream->html_entity_decode($row->get_description()); if (lifestream_str_startswith(strtolower($description), strtolower($string))) { $description = substr($description, strlen($string)); } if ($this->get_option('hide_replies') && lifestream_str_startswith($description, '@')) { return false; } $data['description'] = $description; return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); preg_match($this->image_match_regexp, $row->get_description(), $match); if (strip_tags($data['title']) == strip_tags($data['description'])) { $data['key'] = 'note'; } if ($match) { $data['thumbnail'] = $match[1]; $data['image'] = $match[1]; $data['key'] = 'image'; } return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $filters = explode(",", $this->get_option('filter')); foreach ($filters as $filter) { if (strtolower($filter) == strtolower(strip_tags($row->get_title()))) { return false; exit; } } $description = strip_tags(str_replace('<p><a href="http://www.backtype.com/' . strtolower($this->get_option('username')) . '">Read more comments by ' . strtolower($this->get_option('username')) . '</a></p>', '', $this->lifestream->html_entity_decode($row->get_description()))); $data['description'] = $description; return $data; }
function yield($row, $url, $key) { if (strpos($row->get_id(), "PushEvent") === false) { return null; } else { $data = parent::yield($row, $url, $key); $description = $this->lifestream->html_entity_decode($row->get_description()); $message = $this->parse_message($description); $data['title'] = $message; $repo = $this->parse_repo($row->get_title()); $data['branch'] = $repo[0]; $data['repository'] = $repo[1]; $data['group_key'] = $data['repository']; return $data; } }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $title = $row->get_title(); $chunk = sprintf('%s on', $this->get_option('username')); if (lifestream_str_startswith($title, $chunk)) { $title = substr($title, strlen($chunk)); } $data['title'] = $this->lifestream->html_entity_decode($title); $data['description'] = $this->lifestream->html_entity_decode($row->get_description()); // Submissions are automatically liked, so we'll omit the redundant "liked" entry for posts submitted by the owner if ($key == 'liked' && $this->parse_post_author($data['description']) == $this->get_option('username')) { return null; } else { return $data; } }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); /* * Removing the "Posted by" mention */ $data['description'] = preg_replace('#<p><strong>Posted by.+</p>#sU', '', $data['description']); /* * Extracting tags */ preg_match_all('#http://(www.)?diigo.com/user/[^\\/]+/([^"\' ]+)#', $data['description'], $matches); if (isset($matches[2]) && !empty($matches[2])) { $data['tags'] = array_map(array($row, 'sanitize'), $matches[2], array(SIMPLEPIE_CONSTRUCT_TEXT)); $data['description'] = preg_replace('#<p><strong>Tags:</strong>.+$#sU', '', $data['description']); } return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $type = $row->get_item_tags(self::NS_BRIGHTKITE, 'eventType'); $type = $type[0]['data']; $placelink = $row->get_item_tags(self::NS_BRIGHTKITE, 'placeLink'); $data['placelink'] = $placelink[0]['data']; $placename = $row->get_item_tags(self::NS_BRIGHTKITE, 'placeName'); $data['placename'] = $placename[0]['data']; $placeaddress = $row->get_item_tags(self::NS_BRIGHTKITE, 'placeAddress'); $data['placeaddress'] = $placeaddress[0]['data']; if ($enclosure = $row->get_enclosure()) { $data['thumbnail'] = $enclosure->get_thumbnail(); $data['image'] = $enclosure->get_medium(); } return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $string = $this->get_option('username') . ' '; $title = $data['title']; if (lifestream_str_startswith(strtolower($title), strtolower($string))) { $title = substr($title, strlen($string)); } $bits = explode(' ', $title); if ($bits[0] == 'shares') { if (preg_match($this->image_match_regexp, $data['description'], $match)) { $data['thumbnail'] = $match[1]; $data['key'] = 'photo'; } } else { $data['key'] = 'message'; } $data['title'] = implode(' ', array_slice($bits, 1)); return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); return $data; }