About Aditya Mooley

Author Archive | Aditya Mooley

[How to] Optgroups in select for Drupal CCK module

TweetMany times we have taxonomy terms with parent/child relation with requirement that only the child taxonomy should be selected while adding a new content. One such case is Category/Albums in a photo gallery where one must select an album while adding a photo but category plays an important role in grouping the albums. Most of [...]

Read full story · Comments { 0 }

[How To] Create content type with CCK fields from your custom module in Drupal

TweetIn the previous post, Sumit wrote about creating content type through custom module. Creating the content type this way allows you to distribute your custom content type easily without asking your users to create the content type manually before installing your module. But what if you have a complex content type created with lots of [...]

Read full story · Comments { 1 }

[Drupal] Replace default content title with custom field

TweetRecently I had a requirement of allowing the user to choose the date while creating a new content in Drupal site and that date should be treated as a content title. Using CCK and the Date module, it was easy to add a date field with nice looking jQuery datepicker to the new content type. [...]

Read full story · Comments { 2 }

Lambda functions and Closures in PHP 5.3

TweetPHP 5.3 has introduced a whole new range of cool features like Namespaces, late static binding, new error levels, to name a few. But the functionality that I found most handy for day to day programming is the Lambda functions and Closures that found their way in PHP through version 5.3 Lambda functions Lambda functions [...]

Read full story · Comments { 7 }