Add your own networks

Today, our very populare social wordpress plugin EP Social Widget got even better. We have after requests from our users, we added an option page wich give you the ability to add any network you want to the plugin and your site.

You will find the new option page in the settings menu in WordPress admin under the name of “EP Social Widget”. To add a network, just type your network name and choose and icon to upload. When added you will see it in the list and you can delete it at any time by clicking the delete button far to the right. (It displays when you hower the table row)

Download the latest version (1.0.0) from the WordPress Plugin directory.

Hashimage WordPress plugin updated

During summer last year we published a dirty site for displaying images from a certain Twitter hashtag. In august the same year we got the question to make it a WordPress plugin. Said and done, we made a plugin a few hours later. Now, it’s updated with some new features and released at WordPress plugin directory.

The news in the code are:

  • Shortcode for easy use directly in your post or page content.
  • Timthumb resizing, so you don’t have to load large images every time.
  • Displaying clicked images in a lightbox with Slimbox 2.
  • Admin settings page for thumbnails and lightbox image sizes.

We hope you enjoy this plugin.

Fetching WordPress content from CodeIgniter

In a few recent projects we’ve used the excellent WordPress admin for content entry, but built the public facing stuff in CodeIgniter. Making these platforms talk to each other is fairly simple, and this is what we’ve learnt along the way.

– Do not, ever, initialize WordPress to fetch the data.
WordPress is quite the memory hog (compared to CI) and requesting WordPress content via feeds (using the JSON API plugin or such) heavily will bring your server down under load.

– Instead, always query the DB directly.
WordPress data structure is quite simple. But some of the WordPress functions are poorly written, so port them manually rather than just dumping them into CI.

As we’ve used this on a few sites already, it felt like we should wrap this into something generic and reusable. And with Sparks making its way into the CodeIgniter core, the time had come to learn how to wrap reusable CI stuff in sparks. So here we go. Version 0.0.4 of CodeIgniter-WP. There are only a few methods available at the moment, but hey – look at the version number. It will be better.

print_r($this->wp->get_post('blog', 1);
print_r($this->wp->wp_get_recent_posts('blog', array()));
print_r($this->wp->get_post('blog', 1));
print_r($this->wp->get_post_meta('blog', array('post_id' => 1, 'key' => '_edit_last', 'single' => false)));

Download the spark by following the instructions here.