Mobypicture voor LifeStream WP plugin – Edit

Edit: Updated the code and added instructions in English in this post.

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!

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

This entry was posted in WordPress and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Posted Monday, March 9, 2009 at 09:17 | Permalink

    Goedemorgen,

    Goed stukje code!

    Mag ik je wijzen op de volgende WordPress plugin?
    http://wordpress.org/extend/plugins/wp-super-cache/

    Hiermee cached je webserver statische pagefiles zodat je server de extra load beter aankan als je site wordt geplugd door bijvoorbeeld Mobypicture of Digg.

    Succes!

    • Posted Monday, March 9, 2009 at 11:15 | Permalink

      Thanks Gertjan, plugin toegevoegd en lijkt vooralsnog prima te werken. De site laad nu merkbaar sneller bij collega’s.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

  • Tag Cumulus

  • Recent Posts

  • Categories