Detecting the iPad with PHP

By: Arshad

11 Apr 2010

Yeah that's right. You have another device to worry about next time you want launch that big hit of a website you've been brewing for month. It's the iPad.

The iPad might not be exactly ipod touch's big brother but it does come with a browser twice as large as the ipod/iphone. For developers it's another agent we must take care of. Why? Because it opens up new opportunities for developers and there's thousands of hungry app consumers waiting for your next tap tap revenge. It's crazy. As Jobs puts it : "...If you're a dev, that's a plum market to go after...".

Unique class for list items in drupal

By: Arshad

19 Mar 2010

I'll go directly to the code

This one goes in your template.php (under sites/all/themes/yourtheme/).

  1. function phptemplate_menu_item_link($link) {
  2. if (empty($link['localized_options'])) {
  3. $link['localized_options'] = array();
  4. }
  5. if (empty($link['localized_options']['attributes']['class'])) {
  6. $link['localized_options']['attributes']['class'] = 'menu-'. $link['mlid'];
  7. }
  8. else {
  9. $link['localized_options']['attributes']['class'] .= ' menu-'. $link['mlid'];
  10. }
  11. return l($link['title'], $link['href'], $link['localized_options']);
  12. }

About Me

Arshad Chummun Hello I'm Arshad. I'm a 21 years old Drupal Web Developer. This is a site i put up for some reasons i can't remember and this is where i write stuffs i need to remember.;)

In the Web world, i head the Drupal Mauritius User Group and the jQuery user Group Mauritius and i'm a campus representative for Mozilla Firefox. 

DrupalCon CPH 2010

Copenhagen August 23 -27

Drupalcon CPH 2010