Using the Mollom PHP class on ordinary forms
Mollom is a highly effective spam filtering service that can protect almost any web form from spam with a sophisticated image and audio captcha. It's quite useful, in large because it's a centralized service that constantly monitors and learns from spam attacks, making it responsive even when spam bots change their tactics. It also provides an interesting set of results so that you can monitor the spam attacks (and defenses) employed on your website.
While the service is generally found on Drupal-based web sites–one of the principals of Mollom is Drupal's founder Dries Buytaert– it can be used on almost any other system, including Wordpress, Joomla and several others. It can even be used with generic PHP forms.
But while activating Mollom on other CMS systems is generally just a matter of installing a module or plug-in, getting it to work on a in straight PHP form is a little (but not much) more complicated. Here's how to make it work with regular PHP/HTML forms.
Formatting the Date Popup
Once in awhile, you'll work on a Drupal problem that takes forever to figure out, then find the answer hidden in plain sight. (Sitting right there. Laughing at you.) Oh look: Here's one now. I was using the date popup widget in a module form field and wanted the fancy calendar pop up, but just needed the month, day and year, not the time, etc.
Of course, I was too sophisticated and lazy to look it up, so I struggled with it for way too long. To save anyone else some time, here's how it's done: Explicitly set the date format in PHP syntax, then assign that within the element array. Couldn't. Be. Simpler. (Take a look at http://drupal.org/node/292667 It's right there in the comments in the sample code.):
// Provide a format using regular PHP format parts (see documentation on php.net). // If you're using a date_select, the format will control the order of the date parts in the selector, // rearrange them any way you like. Parts left out of the format will not be displayed to the user. $format = 'Y-m-d H:i'; $form['date2'] = array( '#type' => 'date_select', '#title' => 'select a date', '#default_value' => $date, '#date_format' => $format ... (etc)
Read that again: Parts left out of the format will not be displayed to the user.
So, basically, all you have to do is remember to set the format. In my case, the format would just read, 'm-d-Y'. That drops the time format field.
Drupal Modules for Newspapers
One of the things I like best about Drupal is that it offers a tremendous variety of modules that can take it from a relatively basic CMS to a heavyweight news publishing platform with just a few simple clicks of the mouse. I also like that there's a rather active communtity discussing and evaluating these modules, even keeping an archive of the best extensions to use in different news publishing situations.
Today provided a great example of these two traits working together. At the moment, I'm working on a fairly large magazine migration to Drupal, and was just thinking about how to achieve one of the publisher's requirements, when an email showed up saying that the Drupal Newspapers Group updated their list of recommended modules for newspapers. (The new list adds a few additional modules to the mix and removes a couple of others.)
While on its surface the list is just a set of modules, if you followed it closely, it would be an instruction manual for creating a newspaper web site. Download the modules found here and you have almost everything you need to put together your own CNN.com.
I do have a few gripes with the list: It's a little thin when it comes to multimedia and embedded content. I'm also a little bit skeptical of a few other modules. (For example, I don't recommend Search 404 for performance reasons, when you can install CustomError instead. Nik from Kineta Systems has a great post about this very topic. I think that IMCE is kind of a mess from a user interface perspective, too.)
Overall, however, it's a pretty clean list--definitely worth a look if you need to extend the functionality of core Drupal to a new publication site.
Ubercart is Ubercool
Having reviewed dozens of different shopping carts, installing at least three different systems, and even having written a complete shopping cart from scratch, I can tell you that hands down, shopping carts are the most challenging options for site engineers, managers and owners. Sure, in the grand scope of things, there are much harder things to install on a website. But just in terms of day-to-day complexity, ecommerce is the winner. From inventory control to SEO, to payment gateways and customer management, nothing else online offers as many details to manage day after day after day.
That's why the shopping cart you choose to install is so important. There are dozens of them out there, and it's amazing how functionally limited some of them are. Many have terrible user interfaces, others have gigantic learning curves. Some are easy to use, but forget about some critical detail--say, inventory control or payment gateway integration.
That's why I'm so excited that Drupal has Ubercart, a system that's awfully close to being perfect, and in my mind, the single best open-source option for anyone looking for ecommerce on their web site.
Three MR+A Sites Rated Most Valuable
Three websites created by Mark Royko + Associates were ranked among the top 20 sites providing public interest news in Chicago. The sites, Catalyst Chicago (8); District 299 (15); and the Chicago Reporter(16) received the ratings from the Community Media Workshop.














