Closed (fixed)
Project:
CSSTidy
Version:
6.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2010 at 21:38 UTC
Updated:
18 Oct 2010 at 23:20 UTC
How to disable the notification of CSSTidy compression to non-administrators? I don't want this shown to all users as it's not relevant to most. It shows even when not logged in. Refreshing the page can make it go away but sometimes comes back.
Comments
Comment #1
zarudnyi commentedSubscribe
Comment #2
canyonbreeze commentedI commented out the following line in csstidy.module to disable the message...
//drupal_set_message('Stylesheet compressed '.$ratio.' by CSSTidy', 'status');
This should be a configurable option rather than a code hack. Most end users of a site don't need this information.
Comment #3
zarudnyi commentedYes, thanks.
Comment #4
philbar commentedI'm not having this issue, but maybe I disabled Drupal messages through my Boost settings.
I believe that will only display the message for the first user of the site: the administrator.
Comment #5
philbar commentedComment #6
philbar commentedhttp://drupal.org/cvs?commit=360788
Comment #7
philbar commentedI believe this is fixed in Dev
Comment #8
zarudnyi commentedThank You!
Comment #10
Mac Clemmens commentedTwo suggestions:
1) Can you use the t() function to display the message?
2) Can you add a variable_get check that defaults to zero if unset. This would allow users two ways to mute the messages by running variable_set("csstidy_mute_messages", 1); or by editing their settings.php, all without needing to patch the module.
Comment #11
philbar commentedhttp://drupal.org/cvs?commit=368022
Comment #12
philbar commentedI'm going to change
csstidy_mute_messagestocsstidy_messagesand have it default toTRUEand if you don't want these messages you would set it toFALSE.Comment #13
philbar commentedThis is in the latest -dev and will be in CSSTidy 1.4
Comment #14
philbar commentedAfter adding
$csstidy_messages = FALSE;to my settings.php file, the messages still persist.This needs some more investigation.
Does anyone know if I'm using variable_get correctly?
Comment #15
philbar commentedhttp://drupal.org/cvs?commit=431514