Go to the the location of the LifeStream plugin (../wp-content/plugins/lifestream) and locate the file ‘feeds.inc.php’, this is the file that needs to be edited – don’t forget to backup the original; you never know, you might need it
Open ‘ feeds.inc.php’ in your favorite editor and insert the following code (can be right after the ‘<?php’ at the top of the file):
class LifeStream_MobypictureFeed extends LifeStream_PhotoFeed
{
const ID = 'mobypicture';
const NAME = 'Mobypicture';
const URL = 'http://www.mobypicture.com/';
function __toString()
{
return $this->options['username'];
}
function get_options()
{
return array(
'username' => array('Username:', true, '', ''),
);
}
function get_public_url()
{
return 'http://www.mobypicture.com/user/'.$this->options['username'];
}
function get_url()
{
return 'http://www.mobypicture.com/rss/'.$this->options['username'].'/user.rss';
}
}
register_lifestream_feed('LifeStream_MobypictureFeed');
Secondly you need to add the Mobipicture icon (
) to the folder ‘.. /wp-content/plugins/lifestream/images/’. Make sure the image is saved as mobypicture.png.
There you go, you can now add Mobypicture in the LifeStream Feed settings! Check out mine…
]]>Edit: The founder and owner of Mobypicture, Mathys van Abbe, tweeted my code to all his followers on Twitter. This evening I will translate the post into English to support the international followers and users of Mobypicture.
Edit: Instructies uitgebreid met toevoegen Mobypicture icon aan LifeStream.
De afgelopen dagen ben ik de dienst en iPhone app Mobypicture gaan gebruiken. Mobypicture is een dienst waarmee je foto’s kunt uploaden naar een blog of sociale netwerksite. Met deze dienst kun je foto’s uploaden naar MobyPicture of naar diensten als Flickr, Hyves, Twitter, etc. Een uitgebreide review van versie 1.0 is te lezen op Iphoneclub.nl
Mijn Mobypicture configuratie laat mijn postings op deze blog en op Twitter zien. Ik wilde deze postings ook graag in mijn LifeStream opnemen, helaas ondersteunt deze WordPress plugin niet standaard Mobypicture. Het was gelukkig echter erg eenvouding om dit toe te voegen aan de LifeStream feeds.
Lees verder om de gebruikte code aan je eigen LifeStream toe te voegen.
Voeg onderstaande code toe aan het bestand ‘feeds.inc.php’:
!! Edit: Laatste versie van de code staat in deze post. / Final version of the code can be found here.
class LifeStream_MobypictureFeed extends LifeStream_PhotoFeed
{
const ID = 'mobypicture';
const NAME = 'Mobypicture';
const URL = 'http://www.mobypicture.com/';
}
function get_options()
{
return array(
'username' => array('Username:', true, '', ''),
);
}
function get_public_url()
{
return 'http://www.mobypicture.com/user/'.$this->options['username'];
}
function get_url()
{
return 'http://www.mobypicture.com/rss/'.$this->options['username'].'/user.rss';
}
function yield($row)
{
return array(
'guid' => $row->get_id(),
'date' => $row->get_date('U'),
'link' => html_entity_decode($row->get_link()),
'title' => html_entity_decode($row->get_title()),
'thumbnail' => html_entity_decode($row->get_link()).'_thumbnail.jpg',
);
}
register_lifestream_feed('LifeStream_MobypictureFeed');
Voeg vervolgens het icon van Mobypicture (
mobypicture.png) toe aan de folder: /wp-content/plugins/lifestream/images/
Op de LifeStream Feeds pagina staat nu Mobypicture tussen de beschikbare feeds. Er is nog een ding wat mij nog niet is gelukt en dat is dat er niet om een ‘Username’ wordt gevraagd maar om een ‘Feed URL’ . Dit is niet onoverkomenlijk, de URL is ‘http://www.mobypicture.com/rss/username/user.rss’
Klik hier voor het resultaat. Reacties en tips zijn welkom!
]]>