Hello, my name is Karim Ratib. I plan and build Drupal applications using the best modules from the community. I maintain or co-maintain many modules, including Views Bulk Operations and Sheetnode. I specialize in multilingual applications (especially Arabic), configuration management using Features, data modelling and processing using Views and Feeds, and integrating 3rd party libraries and services. I have good experience leading Drupal teams.

Overriding a theme function in a module

UPDATE: The comment by jtsnow resolves the general problem of overriding theme functions in a module using hook_theme_registry_alter(). Woohoo! But the specific problem described below to override the rendering of menu items remains.

I am trying to instruct the menu system to display each item's description underneath the item text, in a smaller font. I located the theme_menu_item() function in menu.inc that currently performs this task.

My distro wish list

"Install profile" is a really awful name, don'tcha think? I prefer "Drupal distro".

Here are some distros that I would love to work on:

The Automatic Resource Destructor pattern

Originally published at OpenCraft.

What happens if you need to open a file with fopen, but find that your function can exit at multiple points? It is tedious and error-prone to call fclose at each exit point. Alternatively, you could re-structure your code to only exit at the bottom, thereby calling fclose only once, but you would end up with many nested blocks that hamper readibility and are generally considered bad programming style.

A technique I like to use in those cases is the Automatic Resource Destructor.

The ultimate list-making device

The taxonomy system is one of the great contributions of Drupal to the technology of CMS: the ability to classify content with multiple vocabularies. Each vocabulary represents a dimension of concern in the content being managed. Further, a single taxonomy has a flexible structure: it can be linear, tree-like, even graph-like when multiple parents are chosen. Content can be restricted to be tagged with a single term, or multiple terms can be allowed. Finally, freetagging is supported.

Syndicate content