This is a simple administration utility module that adds the server name to various places that are useful to Drupal administrators who have sites on different servers.
The module uses Drupal hooks to add a short paragraph containing the server name (from PHP's php_uname('n') function) to these places:
- Status Report page at /admin/reports/status
- Modules list at /admin/build/modules
- Updates list at /admin/reports/updates
- Update notification emails
This addition makes it much easier to see which server the administrator needs to add or update modules on.
I have the module running on all my live and development Drupal sites, both Drupal 6 and Drupal 7. The module includes help text and HTML for the advanced_help module if it is installed.
Sandbox: http://drupal.org/sandbox/Fonant/1705236
Drupal core 6.x and 7.x versions are included.
git clone --recursive --branch 6.x-1.x http://git.drupal.org/sandbox/Fonant/1705236.git whichserver
git clone --recursive --branch 7.x-1.x http://git.drupal.org:sandbox/Fonant/1705236.git whichserver
Comments
Comment #1
drunken monkeyComment #2
drunken monkeyThanks for uploading this module on drupal.org!
It seems that Environment Indicator provides very similar functionality. Actually, it looks more practical as it gives you the indicator on every page, and across the whole page, and the color also helps to keep track of where you are. Does your module really add any benefits over that?
If you think having the internal server name instead of those custom ones is more useful, maybe you should just post a patch to the Environment Indicator module.
Also, the note doesn't appear on the Updates list for 7.x.
Why did you alter the theme registry instead of using
hook_help(), anyways?In
whichserver_mail_alter()you have an untranslated “Server” string.Other than that your code looks great, but as said, I doubt whether it will be useful enough to justify a whole new module.
Comment #3
drunken monkeyComment #4
fonant commentedThanks drunken monkey. The differences compared to Environment Indicator (which I've also used) are:
I'll have a look at possibly submitting patches for Drupal core's Update manager module. That seems to me to be a better place than the Environment Indicator module, which is intended for something quite different. The only thing is that my additions aren't needed for most people, so probably don't need to live in core either...
I used a theme override as that seemed to be a quick way to add to the updates table, but then found that this didn't work in Drupal 6, so resorted to hook_help() instead. Should have used hook_help() instead, I'll re-write that. I'll also add t() to the untranslated string, well spotted :)
Comment #5
fonant commentedI've modified the code as suggested by drunken monkey, so it uses hook_help() instead of modifying the themeing of the updates list, and to add the missing t().
Set back to "needs review" as I personally find this module provides useful functionality that isn't likely to be available elsewhere (it's not really relevant for core, and solves a different need to the environment indicator module).
Comment #6
bhosmer commentedI'd say this would be useful as a lighter-weight alternative to environment indicator. It may offer some duplicate functionality, but what if a user is developing for a site or browser that doesn't support javascript? Environment indicator uses js, but this module doesn't.
There is a /help folder in the 7.x-1.x branch that probably should be removed, and the help callbacks take me to /admin/reports/status for example instead of admin/reports/status, so a 404 error.
Comment #7
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.