public function getLink() { if ($this->getType() == SourceItem::IMAGE_TYPE) { if ($this->_data['photo_service'] == 'twitpic') { return "http://twitpic.com/{$this->_data['photo_key']}"; } elseif ($this->_data['photo_service'] == 'phodroid') { return "http://phodroid.com/{$this->_data['photo_key']}"; } } $properties = new SourcesProperties(array(Stuffpress_Db_Properties::KEY => $this->_data['source_id'])); $username = $properties->getProperty('username'); $url = "http://twitter.com/{$username}/statuses/{$this->_data['twitter_id']}"; return $url; }
public function getLink() { if ($this->getType() == SourceItem::IMAGE_TYPE) { if ($this->_data['photo_service'] == 'twitpic') { return "http://twitpic.com/{$this->_data['photo_key']}"; } elseif ($this->_data['photo_service'] == 'phodroid') { return "http://phodroid.com/{$this->_data['photo_key']}"; } } $properties = new SourcesProperties(array(Stuffpress_Db_Properties::KEY => $this->_data['source_id'])); $username = $properties->getProperty('username'); if (($pos = strpos($username, '@')) == false) { $host = "http://identi.ca"; } else { $host = substr($username, $pos + 1); $username = substr($username, 0, $pos); } $url = "http://{$host}/{$username}/statuses/{$this->_data['status_id']}"; return $url; }