Image/Attachment Templates for WordPress

Ever since about WordPress v2.6 or so, images you uploaded and inserted into a WordPress post were created as attachments, a sub-post type that belongs to the post or page they are attached to. These attachment posts can be given their own template, and indeed they look for one when you visit the attachment’s permalink. The K2 theme ships with image and attachment templates (named image.php and attachment.php in the theme template hierachy) and displays the file along with some meta data and, if the image is a part of a gallery (or there is more than one attachment on the post), navigation aids to move from one attachment to the next. For many sites this is ideal, but if you want to just give people the file, and avoid having to create these attachment templates, then here’s a neat trick I cooked up on a recent project.
Continue reading ‘Image/Attachment Templates for WordPress’

Our Yellow House

Last week I had the extreme pleasure of joining Ryan Price of Drupal Easy on a new podcast he launched called Our Yellow House. This podcast takes an unstructured, conversational tone and attempts to really capture “two people talking”. We wandered around a bit, but in this episode we touched on the recent GPL/thesiswp debate, Chat Roulette and Freelancing. Give it a listen and let me know what you think.

The GPL talk also spilled over into the Drupal Easy podcast, and tackles the issue from the Drupal community’s point of view (and also mentions my appearance on Our Yellow House). Checking that out is also worth your time.

Continue reading ‘Our Yellow House’

You got GPL in my peanut butter

It has never been a more exciting time to be a developer. Numerous open platforms exist in which to ply your trade and make a good living doing it. A platform’s user base grows as it matures, and inevitably gives birth to a thriving developer ecosystem supporting that platform, selling services into it, and when the platform is any good that ecosystem will turn into a marketplace. There has been an explosion of these ecosystems as evidenced by the success of the Apple App Store, Facebook, Twitter, Sales Force and Google Apps. In the last few years, WordPress has come into its own and has generated its own cottage industry for themes, plugins, and other add-on services.

What makes WordPress unique is that the platform itself is open sourced under the GNU General Public License v2. This license imposes itself on derivative works by insisting that they in turn be licensed under the GPLv2 if and when they are distributed to others. Generally, this poses no issues, and everyone releasing plugins and themes on the WordPress.org Extensions db has chosen to release their code under the GPL.
Continue reading ‘You got GPL in my peanut butter’

New Plugin: Private Email Notifications

One of my clients runs a blog network for peace activists in the Middle East, where they discuss important news events and hold forth on issues such as Religious Faith, Tolerance and Cultural Identity. Their main blog is blocked by Iran, which they consider a badge of honor, and is routinely monitored by government officials to try to sniff out dissenters. To better protect the privacy of those who read and comment on their blogs, we have created this plugin: Private Email Notifications.
Continue reading ‘New Plugin: Private Email Notifications’

New Plugin: HTTPS Stats Fix

Today I had the pleasure of getting a new WordPress plugin cleaned up and released. This is a simple fix for users of the WordPress.com Stats plugin. WordPress.com links an external JavaScript to your site to count visitors and page views. Almost all of the Web Analytics do this. However, I found that when the WordPress site had HTTPS turned on for some of its pages, the WordPress.com Stats plugin did not change the link to be HTTPS (even though WordPress.com does support HTTPS). This plugin fixes this issue and helps you to avoid browser alerts warning users that the connection is only ‘partially encrypted’.

I plan on submitting a patch so that the original plugin just handles this out-of-the-box, but until its fixed, this plugin will fill the gap for you.

Download HTTPS Stats Fix Plugin