function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $data['thumbnail'] = str_replace('_m', '_t', $data['image']); $data['image'] = str_replace('_m', '', $data['image']); return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); preg_match($this->image_match_regexp, $row->get_description(), $match); $data['thumbnail'] = $match[1]; return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); preg_match($this->image_match_regexp, $row->get_description(), $match); $data['thumbnail'] = $match[1]; $data['image'] = str_replace('.preview.', '', $match[1]); return $data; }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $data['image'] = str_replace('_m', '', $data['image']); /*$enclosure = $row->get_enclosure(); $data['player_url'] = $enclosure->get_link();*/ return $data; }
function render_item($event, $item) { if ($event->key == 'image') { return Lifestream_PhotoFeed::render_item($event, $item); } elseif ($event->key == 'note') { return Lifestream_TumblrFeed::parse_users($this->parse_urls(htmlspecialchars($item['title']))) . ' [' . $this->lifestream->get_anchor_html($this->get_option('username') . htmlspecialchars($item['link'])) . ']'; } else { return parent::render_item($event, $item); } }
function render_item($event, $item) { if ($event->key == 'photo') { return Lifestream_PhotoFeed::render_item($event, $item); } elseif ($event->key == 'checkin') { return $this->lifestream->get_anchor_html(htmlspecialchars($item['placename']), $item['placelink']); } else { return $this->parse_urls(htmlspecialchars($item['text'])); } }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); if (lifestream_str_startswith(strtolower($data['title']), 'talk:')) { return; } // we dont need huge descriptions stored in the db, its bloat unset($data['description']); return $data; }
function save_options() { # We need to get their user id from the URL if (preg_match('/\\/([0-9]+)(?:-.+)?$/i', $this->get_option('url'), $match)) { $this->update_option('user_id', $match[1]); } else { throw new Lifestream_Error("Invalid profile URL."); } parent::save_options(); }
function yield($row, $url, $key) { $data = parent::yield($row, $url, $key); $description = $data['description']; $title = strip_tags($description); $img = strip_tags($description, '<img>'); $src = str_replace($title, '', $img); $large = preg_replace('/.*src=([\'"])((?:(?!\\1).)*)\\1.*/si', '$2', $src); $small = str_replace('large', 'med_rect', $large); $data['thumbnail'] = $small; $data['image'] = $large; return $data; }