Syndicate content

how-to

Mark Jarrell's picture

Adding an Additional CCK Validation Function on a Field Using hook_form_alter

Although CCK automatically does some basic validation on your fields that you add to your Drupal content types, there are some cases where you'd like to do some additional validation for your site. One use case that I ran into recently was a basic text field that was being used to house hyperlinks for one of my websites. The text field had already been in place and working perfectly for months. Rather than do something drastic like replacing the field altogether with a field provided by the "Link" module, I decided to do a hook_form_alter to add in my own custom validation function.

Mark Jarrell's picture

Keep Your Drupal Modules Up To Date

An important part of keeping a Drupal site up and running smoothly is to keep your modules up-to-date. Although this is most important in relation to security releases for your modules, it's also important to upgrade to new versions of modules in order to take advantage of new features.  The new version of the Webform module (version 3.x), for example, includes integration with the Mollom SPAM-blocking service/module. If you have a site that's still running Webform 2.x, you aren't able to use Mollom's ability to protect your forms.

Mark Jarrell's picture

Changing the Length of User Sessions in Drupal

I was recently trying to figure out exactly how long my users' sessions were lasting on an existing Drupal site that I had built. Generally it seemed like users were remaining logged in for an extremely lengthy period of time. I did some research and finally discovered that this setting is actually configured in the default settings.php file that ships with Drupal. There's a line in the settings file that initially reads:

ini_set('session.cookie_lifetime',  2000000);

Mark Jarrell's picture

Programmatically Adding Pre-Built Option Lists to Drupal Webforms

I'm a huge fan of the Webform module (and building Drupal forms in general), and I just today noticed a feature I hadn't previously taken advantage of. This is the ability to programmatically add what are called "pre-built" option lists that can be used in your webforms.

Webform pre-built options list in action

Mark Jarrell's picture

Using FlashVideo for User-Contributed Video: A Drupal Tutorial

This video/tutorial was initially started as a presentation for the Denver Open Media Conference this weekend. Since we had a snowstorm on the day of my session, I decided to do this as a screencast here instead. My description of the session and the screencast appear below: