/labs

This is a blog by the staff at the web agency Earth People in Stockholm Sweden. Check out our work and get in contact with us here.

EP Social Widget now with shortcode

2012-05-15 09:50:23

Our very popular social widget plugin has been updated with shortcode support so that you with ease can display your social links in posts and pages. Here is a short how to.

[ep-social-widget facebook="https://facebook.com" gplus="https://plus.google.com" rss="1"]

Available networks are

  • facebook
  • gplus
  • twitter
  • flickr
  • youtube
  • rss

Just use the one you want to display in your post/page and give it a link. The RSS option only need a 1 as value if you want that displayed. Remove any network completely to remove it from the post/page.

Download it from the WordPress Plugin Directory.

/ Mattias Hedman

Base64-encoding media assets in WordPress

2012-05-14 15:02:45

I needed to serve some WordPress posts as web views to some mobile apps. But the app guys wanted the all the images inside the_content to be encoded into base64-strings, for offline caching. This was made into a tiny little plugin which you can download and use as you see fit.

When enabled, this plugin will encode all images sitewide on your website. This is generally a bad idea. Should you need help tweaking the plugin further, just drop me an email. Download the plugin here.

UPDATE: This plugin is now released at the WordPress Plugin Directory. Download the plugin here.

/ peder fjällström

Hashimage updated with async loading

2012-05-11 10:27:09

From the start we always felt that we needed to do something about the slow loading of the hashimage plugin. Today we have updated it with the option to use async loading, letting all the heavy work to be done after initial page load. See the settings page for this new option.

In this update we have also integrated support for pic.twitter.com and images in the lightbox are no longer cropper and cut, say hallo to the whole image scaled down.

As usual, you find this amazing plugin in the WordPress Plugin Directory and please leave a comment if you have any suggestions or just like the plugin.

The new latest version is 2.3.0.

/ Mattias Hedman

Hashimage plugin now with widget

2012-02-16 11:52:15

Today, our WordPress plugin EP Hashimage has been updated to version 2.2.0. The news is that we added the ability to display images in a widget.

You can download the latest version of the plugin over at wordpress.org

/ Mattias Hedman

Hashimage WordPress plugin updated

2012-01-23 09:54:50

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.

/ Mattias Hedman

EP Social Widget – Tiny social widget for wordpress

2012-01-10 13:29:17

When started, it is so much easier to continue. Today we have released our very tiny social wordpress widget. It is simple, this plugin will add and widget on your site in witch you can choose to display a RSS, Twitter, Facebook or Flickr icon, linked to you profiles or thoes sites and your sites RSS feed.

More information at the WordPress plugin directory.

Update Jan 13: Added Google Plus
Updated Jan 30: Added Youtube & rewriten CSS

/ Mattias Hedman

Our first released WP plugin – EP Comments Export

2012-01-05 10:46:17

WordPress is a system we have been using a lot , since years back. Today, for the first time, we release a plugin to the WordPress plugin directory.

The plugin, with the name EP Comments Export, lets you easily export all comments and comment meta data from a specific post, page or custom post type. The export will be saved as a .csv file for you to download. To download the .csv file, just click the new icon added in the all posts/page list.

Today you can only export comments. There are plans on making it possible to import an exported .csv file to a post.

You find more information and the plugin at wordpress.org plugin directory.

/ Mattias Hedman

Christmas gift to the Internet: Hundstallet WordPress plugin

2011-12-16 17:04:22

I recently fell in love with _all_ the homeless dogs on the Hundstallet website.
I’m sure everyone would. And seeing as dogs has been mans best friend for many years, i thought we’d better give something back.

When installed, this WordPress plugin will override your theme’s 404 page and instead display a random homeless dog + links back to Hundstallet and to your homepage.
Try it here! Download and contribute here! UPDATE! We have now released this plugin at the WordPress plugin directory, we recommend you to download it from there in the future, still, the git repository will be kept updated as well.

Since Hundstallet is a Swedish organisation, all copy is in Swedish.

(Hundstallet does not know about this plugin. If you are a representative for Hundstallet and like us to take this plugin down, please let us know.)

/ peder fjällström

WP e-Commerce on multisite with domain mapping

2011-09-30 10:04:37

Using WP e-Commerce on a WordPress multisite is easy. But getting it to work with Domain Mapping proved a little tricky.

WP e-Commerce adds a few options to the wp_options table, like “product_list_url”, “shopping_cart_url”, and a few others. These are full links containing the domain name from your multisite setup. If you want your customers to be able to update your basket and checkout, you must manually change these urls in mysql, to contain the full urls to the domain you have mapped.

/ peder fjällström

Fetching WordPress content from CodeIgniter

2011-08-25 19:32:19

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.

$this->load->spark('wp/0.0.4');
print_r($this->wp->get_post('blog', 1);
print_r($this->wp->get_installations());
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.

/ peder fjällström