Chapter Three LLC

modules

Making the web friendly again

Robert Wohleb

There are more than a few Drupal modules and 3rd party services on the internet for trying to manage the flood of spam that websites regularly receive. However, many family-friendly websites need to go beyond merely blocking crude ads. They need to also fight off the hordes of forum trolls and instigators.

A few services fill this role, such as the excellent WebPurify web-service (nominal yearly fee). We developed our WebPurify module for Drupal while working with PBS. Being one of THE family-oriented destinations on the Internet, they couldn’t let anything pass that wasn’t “COOKIE MONSTER APPROVED”.

Luckily for us, and Cookie Monster, WebPurify exposes a simple REST API, using the now common XML-over-HTTP paradigm. Their documentation lays out the request and response formats, and even provides a simple PHP example. Our module provides a nice wrapper around the intracies of using this REST interface, and even provides comment filtering right out of the box. The exposed API even lets other Drupal developers use WebPurify in their modules.

Textile Takeover (Segfault No More!)

Josh Koenig

Chapter Three is now maintaining Drupal’s Textile module.

As readers of this blog will know, we’re suspicious of faux-WYSIWYG editor interfaces here at Chapter Three. They tend to be misleading, create complex edge-cases, and they do little to promote HTML or general internet literacy. However, we’re also well aware that when you want to put in a section heading, not to mention a bulleted list, manual HTML can be cumbersome, error-prone, and a real barrier to entry.

One alternative solution for these cases that’s been growing in popularity is implementing a simple ASCII markup shorthand such as Markdown or Texy. One of the original pioneers of this space, included in 37signals’ Basecamp product, and a number of other “Web 2.0” properties, is Textile.

We’ve used Textile in a number of projects over the past year, and so it was something of a fearful shock when I deployed it recently on a server with PHP 5.2.2 and immediately got hit with the dreaded White Screen Of Death. It turns out that Drupal’s textile module runs off of a somewhat dated library and can cause apache segmentation faults — where the webserver die before sending any content, usually because of an infinite loop — under certain configurations.

After discovering that the original author/maintainer Jim Riggs has moved on to use Texy as his primary markup shorthand, and as such didn’t have the passion for maintaining Textile, we’ve taken the final step and assumed responsibility for the module going forward. The current 5.x-2.0 release requires you to download an up-to-date 2.0 library from ThresholdState, which is a little more work than having an included library, but on the upside it will not cause a WSOD.

My next revision to the module will be to add a better help section in the form of a block — mimicking basecamp’s best-practice — as I’ve done this by hand for a number of clients and found it much better-received than the default “filter help” behavior.

(Special thanks to dww and bdragon for their assistance getting a 2.0 release of the module sorted out!)

Syndicate content