Installing ImageMagick and imagick via MacPorts

Installing ImageMagick with MacPorts couldn’t be easier:


sudo port install ImageMagick

But getting it to work with your PHP installation is a bit harder. If you’ve installed PHP via MacPorts with the pear variant you can install the imagick extension via pecl:


sudo pecl install imagick

The trick to getting it to stop complaining about the Wand-config path, is by passing it the proper prefix for ImageMagick. When prompted, hit 1, then enter in:

/opt/local

Now just add this to the end of your php.ini file, and reboot apache:


[imagemagick]
extension=imagick.so

Installing Sphinx on OS X for PHP

I’m starting to use sphinx in my work, and wanted to get a solid development environment set up for it on my local OS X server. Since I built my local server with Mac Ports, it was actually pretty easy to get that installed:

sudo port install sphinx

However, I had trouble setting up the PHP extension for the Sphinx API. I could have used the sphinxapi.php that ships with the sphinx source code, but having a compiled extension is faster, and I don’t have to add more files to my php project. Installing Sphinx via Mac Ports didn’t help either, because it doesn’t install libsphinxclient, which is required to build the PHP Extension. That was until I found some instructions from someone doing something similar for Ruby.

Continue reading

Screencast: Install Your Own WordPress Blog

A friend of mine, and fellow Florida Creative, Lawrence Salberg, created this video screencast showing you how to install your own WordPress blog. He does a good job explaining the difference between WordPress.com and the Self-Hosted software available at WordPress.org, and then gets into the nitty gritty of getting the software up and running quickly. Enjoy!

Video after the jump…
Continue reading

Managing Multiple Drupal Sites with SVN

You’re a smart and handsome developer and as such you utilize a source control solution in your work. Your work focuses on the excellent Drupal platform, and as such you have multiple Drupal sites that you manage for yourself as well as your clients. Storing each site in its own repository is good, but storing your commonly used modules in a central repository and pulling them into each site via svn:externals is better. This talk will show you how.
Continue reading

In The Loop

This morning I checked in the initial version of a new plugin: In The Loop. This one generated from a request I got from a user of another plugin of mine, K2 Hook Up. Since the K2 Hooks don’t extend into ‘The Loop’the part of the WordPress theme that loops over all the posts to display your blog entries, he still couldn’t fully liberate his theme from all of his modifications.

So in between bites of left-over turkey and pie, I coded up this solution over the long Thanksgiving weekend and released it this morning.

Continue reading

One plugin inspires another

You gotta love the GPL.

All of the code I release is done so under the GPLv3 license, including my WordPress plugins. Because of this, my K2 Hook Up plugin inspired a very similar plugin for the premium theme, Thesis. This is why I love open source. I’m free to copy and paste and tinker and hack. So when I’m fortunate to offer up my own code for others to use, its a great feeling to have it in turn inspire another’s tinkering.

But its an even better feeling to receive a very nice complement on your contributions:

I’m very grateful for your plugin, Eric! Seems like whenever I try to do admin panel stuff, it’s so complex, leading to surrender on my part. Your plugin was very well written — elegant in its simplicity, as they say — and helped me learn some stuff! – Rick Beckman

Its interactions like this that really do make it all worthwhile.

K2 Hook Up v1.0

I have just committed a major update to my K2 Hook Up plugin. As soon as I released my plugin—which allows smart people using the K2 theme to insert arbitrary HTML, CSS, or JavaScript code into any of the 7 custom template hooks that K2 provides—I got the same question: When will it support inserting PHP code?

I’m happy to report that its day has come, and that day is today.

Continue reading

Random Password script

I just added another shell script to the growing library of open source code available on xentek.net. This entry is nothing special, but may prove useful to you. The script can generate a string, between 3 and 32 characters long, that you can use when setting new passwords.

The passwords won’t be the most secure in the world (doesn’t include any Uppercase Letters) but does bookend a random md5 string with some special characters to increase the complexity. You can pass in a number between 1 – 32 to control how long of a password it generates for you.

Download the random password script it from the code library.

Automate Setting Up New SVN Repositories

If you follow best practices for Subversion, then you create the standard repository layout, with trunk, tags, and branches directories. In fact these are usually my first three commits of any new repository. I’ve completed these steps so many times in the last few months, that I can practically type it in my sleep. Tired of repeating myself, I started digging into shell scripting to automate this task and released the fruits of my labor here: SVN: New Repos.

Continue reading