If you run a hosted WordPress blog, you probably already know that you can blog a photo directly on flickr using the “BLOGTHIS” button. It does require some setup work. The major problem for me is that it publishes the blog post by default as uncategorized immediately. I’d rather save it as a draft for further editing. I have found a simple way of making a customizable (publish or draft) post from flickr.

It does require a simple edit to the WordPress PHP file called “xmlrpc.php”. If you are afraid of doing so yourself, you may want to get some expert help. Open the file xmlrpc.php in your text editor, find the following line in the mw_newPost function.

1
$post_title = $content_struct['title'];

Immediately below this line, add the following:

1
if (stristr($post_title, 'draft')) $publish = 0;

Save it and upload it to your WordPress blog to overwrite the original one (saving a backup is a good idea). When you use the “BLOGTHIS” button next time on flickr, simply put “draft” anywhere in the title field and the post will be saved as a draft instead of published immediately. If you want to publish it immediately, you just don’t put the word “draft” in the title. It is so simple, isn’t? 😉

Posted in: Miscellaneous on October 18th, 2007. Trackback URI
Keywords: , ,

Related Posts

Comments