Moblogging with WordPress 2.0

The default wp-mail.php file doesnt support attached images or files, at least in the v2.0 R133 version of WordPress I’m using now. It takes a bit of work, but it is possible!

I was just about to start hacking the default wp-mail.php file when I found the excellent Postie plugin at Economysizegeek which has all the features you’ll ever need. The only problem is that it needs to be patched before it will work with WordPress 2.0

First download Postie and uncompress it into your wp-contents\plugins\postie folder

Make two directories in your main wordpress directory wp-filez and wp-photos. Make sure these directories are writeable by your web server (chmod 777)

Login to WordPress as admin, go to the Plugins tab, and activate Postie.

Go to the Options tab and click on Configure Postie to configure the settings.

Set up a cron job to download mail at regular intervals, or check out the “Cronless Postie” plugin included in the package.

Now to get it to work with the latest version of WordPress, I had to fix two Postie files, wp-content\plugins\postie\config_form.php and wp-content\plugins\postie\postie-functions.php

In config_form.php I fixed up the tables, there seemed to be some extra td tags screwing up the layout.

In postie-functions.php I fixed BuildBooleanSelect and BuildTextArea functions to get the options screen to display properly. I also fixed the ValidatePoster function to work with WordPress2.0.

Download the patch and uncompress it, overwriting the two files in your wp-content\plugins\postie folder.

postie-patch-001.zip

Now try sending a mail with an attached image and it should appear on your blog as soon as you click the Run Postie button!

 

Tags: No tags

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.