Creating a Drupal module: Part 1

This is my first post in a series of posts aimed at demonstrating some of the process I go through when developing Drupal 7 modules. I have been developing modules for around 6 months now so I would by no means consider myself a guru on the subject. The aim of this series is to provide a starting point for module development and address some pain points that I found when first starting out.

Continue reading


Javascript Date Compatibility

As you are probably well aware browser compatibility is a hurdle that every web developer must jump over; usually however it is confined to slight differences in interpreting styles. However this is not the only place where the top 4 browsers will interpret your code slightly different. One place that has caused me some grievance is the Date object in Javascript.

You can pass the Date object a time string to create a Date object for the date passed; however each browser ins’t consistent with which string it can use. I have done up a list which shows which date strings work in which browser.

Check it out!


CSS attribute selectors

An interesting and somewhat unused feature of CSS is that it allows you to target elements based on the attributes of those elements. You are probably familiar with the more common ones; likeĀ type when trying to select different forms of input elements, however you can actually target quite a few other attributes in this way, modern browsers will allow you to select any attribute name however it will only work in IE7 and IE8 if a !DOCTYPE is specified. You can also use operational selectors (not just equals) similar to jQuery. Continue reading