Recently I decided to take an ajax widget I made for a wedding website and turn it into a wordpress plugin. It turned out to be alot easier than I thought it would be!
The plugin goes something like this:
- The user must specify some information in the backend, specifically a username from which to grab photos.
- When the page loads, use a library called phpflickr to access the flickr API and grab some photos.
- Once we have the data, load in the thumbnails attached to each image, and link to the larger images.
- Then output everything on the page and include a simple yet robust pagination system for accessing new images.
Hooking the plugin up to prettyPhoto was a bit of a task…but wordpress makes ajaxifying widgets so easy now that it became my only real hang up in the entire process.
I’m currently in the process of cleaning up the code, commenting and registering it as an officially distributed wordpress plugin.
Here’s the end result: