YAPB Importer Exporter Plugin

Post by Jon | Posted in Programming, Web-Development | Posted on July 8th, 2009

This site, The Home of Jon, is built on the most-excellent Wordpress blogging engine. I made the switch from CodeIgniter not very long ago, because it just made more sense for me to use a Content Management System, as opposed to working on my own custom rolled website. For my art site I used a plugin called “Yet Another PhotoBlog“, or YAPB for short. I seriously love this plugin – it does just what I need it to do. Plus it’s author Johannes Jarolim coded it very nicely.

I ran into one problem though using it when I was creating my art site. I had a bunch of pictures, and though Wordpress has an import function, it doesn’t support YAPB natively. That was a big problem for me – I could import all my posts, but then I’d have to go back and manually add pictures to each of my posts (around 100 of them). Um, I don’t think so.

So I set my mind to it – I was going to write myself a Wordpress plugin to make it much easier for me to be lazy! So it was written. So let it be done.

How I made it

What I basically did is rip out the exporting code (literally…like copy and paste) for Wordpress and added one extra field for the YAPB image. Then ripped out the importing code for Wordpress (literally, another copy and paste) and added functionality to read that extra field and save the image along with the post. Then wrapped up both of those in a nice little plugin.

So the importing/exporting works exactly as Wordpress does now in 2.7. The only difference is your images come along with the import/export.

This is the very first beta version of the plugin (my first plugin actually), so sorry if there isn’t any fancy image stuff. But it works! I used it for my own site.

Instructions for Use

The export function is just like Wordpress and is located under Tools -> Export YAPB. The import function is located the same place the other import functions are, Tools -> Import -> YAPB Importer. Use it exactly like you would use the default Wordpress importer.

(Disclaimer: Of course, in the interest of you-can’t-blame-me-ism, always backup your DB before doing significant changes like imports!)


Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • StumbleUpon

4 Responses to “YAPB Importer Exporter Plugin”

  1. Thanks for the praise ;-)

    Greets from Salzburg!

    Johannes

  2. Thank you for a great plugin that does exactly what it is suppose to do. I was creating a copy of my website, for testing purposes, on my computer using xampp and ran into a problem that the photos in YAPB did not import. Found your plugin and within a few seconds everything was up and running :-) .

    Kind regards,
    Richard

  3. Richard – excellent, glad to hear it! :D

  4. Jon, is this going up to the WP plugin repository anytime soon?

Leave a Reply