Syndicate content

drupal

Mark Jarrell's picture

Do It With Drupal Printable Schedule

Just in case anyone else wants a printer-friendly version before Tuesday's conference. Thank you PosteRazor for helping me split up this big image into multiple pages!

Yes, I've got the iPhone app, but I wanted a paper copy to have on the plane ride too. :)

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

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

Presentation Slides - Building University Websites with the Drupal Content Management System

Here are the slides from my Keynote presentation at the Tennessee Higher Education Information Technology Symposium at Fall Creek Falls on Monday, April 19th 2010. Also, here's the abstract for the presentation:

Mark Jarrell's picture

Adding an .htaccess Rule to Make Simpler Links to Drupal Files

In a site I was recently working on, I found myself hard-coding links to files stored within my Drupal site's "files" directory. If you've ever coded these links before, you know that they normally look something like:
/sites/[sitename]/files/[someotherdirectory]/image.jpg

This can be somewhat painful to add to the site, especially if you have any plans to ever change the domain name of your site. It would really be ideal if you could leave the domain name out of the equation and just write the link in the format:
/files/[someotherdirectory]/image.jpg

This is actually possible to do using the .htaccess file that appears in the root of your Drupal installation. Basically you just need to add a single line:
RewriteRule ^files/(.*)$ /sites/%{HTTP_HOST}/files/$1 [L]

After you implement this rule, you should be able to start writing simpler links to your "files" directory.

Happy coding!

Image of the rewrite rule and the alternate links. See PDF on DIWD Site.

Mark Jarrell's picture

Building a Firefox Search Add-on For Drupal.org

I was having trouble locating a good Firefox search add-on for searching drupal.org. A Google search or two reveals a couple of add-ons created by community members in the past couple of years that do searches of drupal.org via a Google search (using the "site:drupal.org" keyword). I know, however, that the searches on drupal.org recently received an overhaul (using Apache Solr) and now, searching on the actual drupal.org search is actually more efficient than a Google search in many cases. Especially if you know how to make quick use of the right sidebar of the search page which makes use of faceted search.

I knew it couldn't be that difficult to build a search plugin for Firefox, so I began searching the Mozilla site for instructions on that. If you're interested in doing this on your own, you can find out how to build what's called an "OpenSearch plugin" for Firefox at: Creating OpenSearch plugins for Firefox

If you'd like to download the add-on that I built and begin searching Drupal.org from Firefox, click on the screenshot below:

Drupal.org Search add-on 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:

Mark Jarrell's picture

Adding a Reset Button to Exposed Views Filters

I'm a big fan of using exposed filters in my administrative views that I build. One thing that had escaped me until today was that there isn't always a really easy way for my users to get back to square one. I need a reset button. Don't we all? I did some searching around and some experimenting. It turns out that you can do this really easily in a custom module just using a hook_form_alter(). You can see the result in the screenshot below. Easy reset button.