lixo.org

Getting WordPress and Flickr Talking to Each Other

The WordPress installation process was really so painless and took so little I would actually expect something to go wrong. Ok, yeah, it did - there’s a change to make if you’re using PHP 5.

Then, I tried getting Flickr’s Blog This button to work, and lo and behold, it did… while posting HTML-encoded entities, thus generating posts that weren’t really too good to look at, unless you’re a webdesigner with a strange fetiche.

To correct this, all you need to do if you’re running WordPress 1.2.2 is to go to xmlrpc.php and change line 1287 from:
$post_content = format_to_post( $contentstruct[ 'description' ] );
To this:
$post_content = format_to_post( html_entity_decode( $contentstruct[ 'description' ] ) );
This tells the XML-RPC thingie to unencode the actual post content, and you’re done. Yay! :)

If anyone is aware of any problems that might cause, please let me know, but so far it works perfectly.