CVS edit link for bartonfreelance
I've been using Drupal for many years now. I've made a lot of money using Drupal as my framework of choice. Drupal has saved my butt many times. I've always been an open source developer, piggy backing onto the work of others. However, I've never really been able to give back what I've taken.The reason I'd like a CVS account and why I'd like to contribute to the Drupal community is that I'd like to give back to the community. I've gained so much from the community and I haven't given anything back. This would be the first time I've open sourced any of the code that I've written.
I have 2 modules off the top of my head that I'd like to donate, and many others that I hope to write for Drupal 6 (and moving forward, Drupal 7).
One module adds hook_message_alter to Drupal 6. I've searched and searched and haven't found any module that actually allows me to alter the messages besides overriding the theme. Now, I've created a module that gives this ability along with some added helper functions.
The second module that I’ve written overrides how the css & js are aggregated. The reason I did this is because with anonymous users, the page is cached and when you have multiple servers running (2 web servers and 1 database server), the css points to a file that is created on one server, but not the other. This module fixes that by routing the css & js to a php script that generates the file if it doesn’t exist. This a little bit more plug and play than having to route things using apache. Most developers these days aren’t very good and a lot of them are designers. Hey, it’s the economy man.
I hope that you except this as a good motivation. It is to me. I have been using Drupal for years, but I’ve never given back to the community. This is my shot to at least get 2 good modules out there to help others in need. Thank you.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | messages_alter.zip | 1.75 KB | BartonDrupal |
| #6 | messages.zip | 1.67 KB | BartonDrupal |
| #1 | messages.zip | 1.58 KB | BartonDrupal |
Comments
Comment #1
BartonDrupal commentedComment #2
BartonDrupal commentedComment #3
avpadernoComment #4
dawehnerI think you can remove this part by using drupal_alter('message', &$adapter), or not?
Couldn't you use here theme('status_messages', $display);
I don't really like the name, why dont' you use messages_alter. The messages name could be also a alternative private messaging system or yet another notification system.
I like the module :)!
Comment #5
dawehnerUpdate status
Comment #6
BartonDrupal commentedI implemented drupal_alter, thanks. I forgot about that function. In addition, I added another theme function that can be overridden should someone want to use their own theme function.
Comment #7
BartonDrupal commentedComment #8
BartonDrupal commentedI just re-read you saying you didn't like the name of the module. I renamed the module "messages_alter."
Comment #9
dawehnerLooks fine.
Comment #10
avpadernoThe module should declare its dependency from PHP 5, as Drupal 6 works on PHP 4 too.
Why are there two theme functions, where the first calls the second one?
Comment #11
BartonDrupal commentedI'll add this:
And theme_messages_alter_alter isn't really a theme function. It's a function that is replacing another function. I'm using hook_theme_registry_alter and changing the function that is being used. Of course someone can override this function through basic theming but I don't really want them to because then that defeats the purpose of the module. So I've provided another theme that can be overridden should someone want to theme the status messages differently.
Comment #12
avpadernoUsing a single function doesn't alter the behavior of the module.
Comment #13
BartonDrupal commentedAre you wanting me to drop the theme_ prefix? I have it broken into 2 functions so I can keep my hook in there and still allow for developers to do this:
Since they can't do this anymore:
I'll document this so themers know how to do what this guy is doing here:
http://teddy.fr/blog/theming-almost-hidden
Comment #14
avpadernoI was just wondering about the need to have two functions. If I would have wanted you to change the code, I would not have approved your application.
Comment #17
avpaderno