Module Development Blogs

  • Drupal PCI compliance issues with user login form
    October 10, 2010 by

     Here's another quick one,

     We recently had a client report that they received a PCI violation because Drupal login forms do not feature the "autocomplete=off" attribute. This could be fixed with a custom template, or hacking core (!!!) but I whipped up this quick module to fix it instead, so that I wouldn't have to worry about issues integrating with client templates and could distribute the module out over our entire farm.

     

     function emunications_form_user_login_alter(&$form, &$form_state) { $form['#attributes']['autocomplete'] = 'off'; } function emunications_form_user_login_block_alter(&$form, &$form_state) { $form['#attributes']['autocomplete'] = 'off'; } drop the code into your own module (and of course, change the prefix to match) to use it.

  • I'll be speaking at OpenCa.mp this weekend
    August 10, 2010 by

     I'll be speaking at OpenCa.mp this weekend about module development, be sure to come down and check it out as it's sure to be an interesting presentation. I've crammed a lot into 40 minutes, so everyone should walk away with something new. The presentation will be archived and made available here and on the OpenCa.mp site, so check back if you miss the conference. 

    I spend some time reviewing the basic concepts surrounding module development in Drupal and then dive right in with an overview of a working module. I also spend time discussing some strategies for speeding up development of modules and some of the common pitfalls that you will face. 

    If you'd like to follow along with the presentation, you can find the source code for the simple module we cover here. It's a simple image carousel based on the jquery cycle plugin. We use a much more advanced version of it in production here at eMUNICATIONS. 

     Feel free to contact me with questions about the presentation or the code linked below.