Displaying a gallery description using NextGen Gallery for WordPress

Been battling with the excellent NextGen gallery plugin for WordPress this afternoon.

I had created an Album, which is a container for mutiple Galleries. Simple enough. But then, once you had selected a Gallery, I wanted to display the Gallery description on the Gallery page above the thumbnails.

In the Manage gallery section you can type a description, but it didn’t seem there was any way to display that on the actual website.

So if you need to, open the file gallery.php which is inside the plugins directory, nextgen-gallery/view/gallery.php

Next, above the line
<div class="ngg-galleryoverview" id="ngg-gallery-<?php echo $gallery->ID ?>">
add this:
<h2><?php echo $gallery->title; ?></h2>
<p class="gallery-desc"><?php echo nl2br($gallery->description); ?></p>

This will give you an H2 with the Gallery Title, and then the description below it.

EasyPHP 3 and mod_rewrite gotchas

Just got a new server in the office so updated to the latest EasyPHP – version 3. However, all was not smooth:

  1. At first I kept getting a “permission denied” error – you’ll need to search the httpd.conf file for the <Directory /> container and get rid of Deny from all. (Or at least comment it out, anyway.)
  2. The mod-rewrite wouldn’t work. Two steps to fix this:
    1. Search httpd.conf for mod_rewrite and uncomment the LoadModule line.
    2. Search for AllowOverride. There should be two instances where you need to change None to All. (Source)

Now I can get back to work!

The Email Standards Project

Many years ago the Web Standards Project (or WASP) fought the fine fight to pressure browser manufacturers into complying with some sort of standard version of HTML. Prior to that we almost had to build separate sites for Netscape and Internet Explorer – it was horrible.

We have come so far with browsers, but unfortunately most email clients are, well, a long way behind. If you have ever tested an HTML email in a few different clients you’ll know the frustration.
Yesterday’s launch of the Email Standards Project hopes to remedy this situation. Some people love it, some hate it, but HTML email is here to stay. And if we could have the proper standards support in email clients then it’s probably fair to say that a lot of those opposed would change their mind.

We have a long way to go, but at least now we have a vehicle!

Using Radio Buttons to Combat Form Spam

There has been a lot of talk lately (and rightly so) about the disadvantages of using captcha to stop comment spam.

I’m not a big fan. They’re often hard to read even for someone with reasonably normal vision.

“Is that a zero or the letter O?”

“Upper case C or lower case c?”

Others have suggested some sort of simple logic question, like asking “What’s 1+1” and having the user enter a ‘2’ in a text box.

That might be better, but it also requires some thought.

So I noticed that on Slideshare they prefix a captcha device with the question, “Are you human?”

And it got me thinking, can bots deal with radio buttons? Can we ask a question like this?

[syntax,human_form.htm,html4strict]

Human Radio Buttons

I must admit I haven’t done any research, but I’m thinking:

  1. If a bot doesn’t understand radio buttons it will skip the question and fail
  2. If it does understand radio buttons, it will probably choose the first option and fail
  3. It’s an extremely simple question for a human to answer and should be completely accessible.

Point 2 is probably the most contentious. I’m making a big assumption there.

Has anyone else tried this? Can anyone spot any obvious disadvantages?