Drupal Hook needed, hook_message_alter

As I have been working on the functional implementation for a new community Drupal site, I have been seeing the need to customize many of the core Drupal messages (the drupal_set_message function), as required by the needs of the site. A typical example would be when a contact message has been sent, the default message is 'The message has been sent.' An small change might be to 'Thank you, your message has been sent.' A more dynamic change would be 'Thank you Greg, your message has been sent'.

The first change could be accomplished using the locale module methodologies found in http://drupal.org/node/58030. But there are two short-comings to this method. First, even though all core modules use t() for the text to make it translation ready, many contributed modules do not. Second, the translation method only allows for string replacements, not dynamic insertions. Granted some of the messages place the user's name or other dynamic information into the message, but the basic idea is that you can only change what is given you, you can't add to it. The contact message is a perfect example, there is no way to add the user's name to the message.

That is why I am going to propose a new drupal hook, hook_message_alter($message_id = NULL, $message = NULL, $type = 'status'). This function would return the new $message. It would hook into the drupal_set_message function. All messages would invoke this hook, giving designers and developers the ability to customize those messages completely to suit their site.

Drupal 5.0 Out

Well, Drupal 5.0 is finally out, 8 months after the last major release, 4.7.

Acidfree Resource Usage

Over this weekend, I received a nasty-gram from the hosting company of my main Drupal website. I was hogging all the resources they said, and I must remove the offending application, Acidfree or I would be bumped up into their semi-dedicated 'solution' which costs 5 times as much as the shared hosting package. Though it comes with more disk space, transfer volume and RAM/CPU usage, my site does not max out the current specs, except for the RAM/CPU usages.

Drupal Revision Deletion Module

This is the support page for inquiries and comments concerning the Drupal Revision Deletion Module. All issues, bugs or feature requests should be submitted to the Issue tracker at Drupal.org.

How Skejo Runs

I have finally submitted my Skejo.com showcase entry at Drupal.org. The full text is also captured at How Skejo.com Works. Since Skejo.com is really my flagship, design/configuration site using Drupal, I made a long forum post there, highlighting what I have done, and what Drupal is able to do. Hopefully it inspires others to try bigger things, and it just might drive a little traffic to Skejo as well. :)

Here is the text from my post at Drupal.org.


At Skejo.com, the key idea is that rewarding people for their contributions, will stimulate more participation and better submissions. So we built a site that makes finding helpful articles fast, and submitting content easy, coupled with a rewards system that goes beyond what has been seem before.

Drupal, a Second Place Finish

The winner of the Packt Open Source Content Management System for 2006 has been announced, with Drupal coming in second place. Joomla!, was the overall winner. Even though Joomla has only been officially released for a year, compared to Drupal which has been out for 6 years, its user base has moved to Joomla from its predecessor, Mambo.

Syndicate Block Code

Attached is the code snippet that was used to create the extra symbols in the syndicate block. I used the base code from the original Syndicate block, created a new block with the same name and then added this code. I saw most of this on Drupal.org already (that is where I got the idea), but then I modified it a bit and added the Technorati link as well.

Current Projects

Here is the list of my current open-source, contract or other projects. Check my About page for more historical projects.

Skejo Studios is the current main project I am working on. Launching a new iOS studio, building a team, fleshing out ideas and of course coding a tremendous amount of time, doesn't leave much room for other things. Will try to keep iOS projects updated here, but check out the studio site for the latest upcoming and released projects.

www.doggoes.com still is growing and we have the next evolution in the works. We also have released the Dog Park Finder for the iPad and the free iPhone Dog Park finder version. Both will soon be updated to include dog friendly restaurants and post directly to the Drupal site new content.

Drupal Revision Deletion Module

I am finally written my first module for the Drupal community. Though I have written a few custom modules for Skejo.com, this is the first module that I can provide back to the community.

The Revision Deletion module has been released. Once I have my CVS account approved at drupal.org, I will be submitting it at large. For now it can be downloaded here.

Drupal and vbDrupal

Mostly, I am going to begin this little monologue by covering my increasing interests in Drupal and vbDrupal. I will mostly likely be cross-posting such thoughts on the Drupal and vbDrupal sections of Skejo.com, since that is my other knowledge warehouse. But only the more complete, article style thoughts will go there. Random thoughts that may eventually cumulate into articles will go here. I probably will boast of some of my more interesting exploits while design/constructing that site.

Syndicate content