I've been in desperate need of a module like this that can show Drupal messages more nicely; but the lack of a JS-less fallback is a big problem. I have to override the nicemessages_preprocess_page() function in my own theme so as to re-enable messages on the site, since they need to be visible to non-JS users as well.
My solution to this: instead of setting $vars['show_messages'] to FALSE (as is done in nicemessages_preprocess_page()), simply add a CSS instruction that hides the normal .messages
if JS is enabled, like so:
html.js .messages {
display: none;
}
Otherwise, I love the module! Thanks =)
Comments
Comment #1
jessepinho commentedPatch attached.
One shortcoming of this patch: It doesn't take into account whether users have turned off the popup messages setting, and hides the normal messages regardless. Not sure how best to handle this.
Comment #2
dqdPHP isn't able to check if Javascript is enabled on clientsides Browser. Well. Not on the first visit. On the second+ yes. Use AJAX to set a session var. If it is set on page 2, you have JS. If not, you don't. This could work on a front login page... but if you need it on the first page load, you can't have it. An ordinary experienced user who logs in to services like your Drupal site or Facebook or Youtube on a daily basis or even for his online banking or train ticket check should have JS enabled for the forms.
Otherwise ...
Comment #3
dqdsince we left rc1 state and the final 7 1.0 release is official we should roll issue into next dev