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.

EP Social Widget – Tiny social widget for wordpress

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

Our first released WP plugin – EP Comments Export

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.

WordPress plugin for fetching hashtag images

Some time ago i made a quick and dirty site for displaying images from a certain Twitter hashtag. Some hours ago i was asked to tweak this into a WordPress plugin, and here we go. This is just tested on my environment, but should be alright on any WordPress 3+ installation on PHP5 with libcurl.

It currently works with twitpic, instagram, yfrog, plixi, flickr. Adding more services is quite easy and can be done on request. URL’s are being curled and cached for 10-12 minutes using the built-in WP_Cache.

The plugin, when enabled, exposes a template tag which you can add to your theme:

<?php
if(function_exists('hashimage')){
 echo '<ul>';
 echo hashimage('hashtag=unicorn&limit=5');
 echo '</ul>';
}
?>

I can’t be bothered add this to the official WordPress repo, but please download it (or fork it!):
https://github.com/EarthPeople/Hashimage-WP

Some notes:
– The Twitter API only returns the latest results when searching on hashtag, so the result set is limited due to this.
– CSS is up to you. Really. I can’t do CSS. It’s magic to me.

setting up a wp dev environment on a live site

developing a wordpress site on the domain it eventually will live on has plenty of advantages (and ok, a few obvious disadvantages not covered in this post…). no need to fiddle around in the db looking for hardcoded urls to the development domain name and when it’s time to launch – you don’t need to bother with db export/imports and stuff.

but – how to do this when there’s already an existing site live on this domain? actually it’s accomplished pretty easily.

make a folder on your live site, call it something like “dev”, put this into the index.php file within this folder:

if(isset($_GET["mode"])&&$_GET["mode"]=="dev"){
	setcookie("dev","true", time()+3600*24*7, "/");
	header("Location: /dev");
}else if(isset($_GET["mode"])&&$_GET["mode"]=="live"){
	setcookie("dev", "", time()-1000, "/");
	header("Location: /dev");
}
if(isset($_COOKIE["dev"])){
	echo "DEVELOPMENT MODE IN YOUR BROWSER: ON | SWITCH";
}else{
	echo "DEVELOPMENT MODE IN YOUR BROWSER: OFF | SWITCH";
}

when a user enters /dev on your live site and clicks ON, a cookie will be set. this cookie can then be checked for, and the server can make a decision wether to show the old site or the development site.

next upload wordpress the usual way to the docroot of the site, and install. make sure you don’t overwrite any existing files on the server when uploading.

lastly – let’s make that cookie work for us. open the file wp-blog-header.php, located in the docroot, and replace the contents with this:

if(isset($_COOKIE["dev"])){ # does the user have the dev cookie?
	if ( !isset($wp_did_header) ) {
		$wp_did_header = true;
		require_once( dirname(__FILE__) . '/wp-load.php' );
		wp();
		require_once( ABSPATH . WPINC . '/template-loader.php' );
	}
}else{
	header("Location: currentindex.htm"); # no? then show the current page
}

one word of warning though – do not run wordpress auto update while developing the site this way. doing so will remove the cookie-check in wp-blog-header.php and exposing your development site to the world. should you need to run the automatic update, remember to make the changes to wp-blog-header.php again.

when you’re ready to go live with your shiny new wordpress site – just remove the cookie check from wp-blog-header.php and let the world in. that’s it folks!