Dupal micro case study: Implementing change in modules

I was digging around for a solution to supporessing the iCal link in the Events block. You know, that little icon that supposdly lets you automatcially add those events to your hCal capable calendar, but has never seemed to work for anyone I know? 😦

I looked online at Drupal.org, and found this interesting thread. What made it so interesting for me was that the thread offered several solutions for fixing this, and in doing so made a case for how to – and how not to – make changes in Drupal:

  • The first suggestion was to edit a couple of lines of the actual module. No! No! NO!….. What happens when you upgrade the module – or worse, the site? You gotta edit your module again! IT’s repeated everywhere on Drupal forums – don’t edit the module when you can override it somewhere else!
  • The second suggestion was to make a modification in the theme. I like that better – themes are independent of module revisions. For all I know, this is perfectly legitimate according to the Drupal Best Practice Gods.
  • However, the last suggestion was perfect for me. A) It’s much simpler than the theme override. B) It only requires editing the style.css file, which requires less expertise.  (I would recommend that over the event.css file, which could get replaced in a module upgrade).

However, I don’t know what are the underlying implications of removing the ical icon on the theme or css level – i.e. is the underlying code less “validatable” in the last example? From my (poor) understanding of how Drupal will produce the code, the page will still be created with the ical code info, but the icon just not displayed – so there’s a (tiny) amount of unecessary work that is being done on the page rendering side, which may be improved with the theme modification in the 2nd example…..

Technorati Tags:

Powered by ScribeFire.


%d bloggers like this: