function disable_messages_help in Disable Messages 7
Same name and namespace in other branches
- 8 disable_messages.module \disable_messages_help()
- 2.x disable_messages.module \disable_messages_help()
Implements hook_help().
File
- ./
disable_messages.module, line 11 - The disable_messages module file.
Code
function disable_messages_help($path, $arg) {
switch ($path) {
// Displaying help text on help page.
case 'admin/help#disable_messages':
$output = '';
$output = '<h3>' . t('About') . '</h3>';
$output .= t('Gives a site owner options to disable specific messages shown to end users.The core drupal message system as offered by drupal_set_message is an excellent way for modules to send out messages to the end users. However not all drupal site owners are keen to show all the messages sent out by drupal core and all modules to their users. This module gives site administrators a reasonably powerful way to filter out messages shown to the end users.');
$output .= '<h4>' . t('Features') . '</h4>';
$output .= '<ol>';
$output .= '<li>' . t('Filter out messages that match a full text string exactly.') . '</li>';
$output .= '<li>' . t('Filter out messages that match a regular expression.') . '</li>';
$output .= '<li>' . t('Permissions to specifically hide all messages of a given type from any role') . '.</li>';
$output .= '<li>' . t('Disable all filtering for specific users.') . '</li>';
$output .= '<li>' . t('Disable all filtering for specific paths.') . '</li>';
$output .= '<li>' . t('Apply filtering only for specific paths.') . '</li>';
$output .= '<li>' . t('Debug system to get messages in the HTML without showing it to the end users.') . '</li>';
$output .= '</ol>';
$output .= '<h4>' . t('Configuration') . '</h4>';
$output .= '<ol>';
$output .= '<li>' . t('Visit the configuration page at:') . '<strong>"' . t('Administration >> Configuration >> Development >> Disable Messages') . '"</strong></li>';
$output .= '<li>' . t('Add the specific messages you wish to filter out to the') . '<strong>"' . t('Messages to be disabled') . '"</strong>' . t('text area. These messages should be in the form of Regular Expressions, with one entered per line. You do not have to include the opening and closing forward slashes for each regular expression. The system will automatically add /^ and $/ at the beginning and end of the pattern to ensure that the match is always a full match instead of a partial match. This will help prevent unexpected filtering of messages. So if you want to filter out a specific message ensure that you add the full message including any punctuation and additional HTML if any. If you are familiar with wildcard searches using *, and not Regular Expressions, you can achieve the exact same thing by using .* as your wildcard character. For example, you could wildcard filter out any Article creation messages using the following Regular Expression: Article .* has been created.') . '</li>';
$output .= '<li>' . t('Next configure') . '<strong> "' . t('Page and User Level Filtering Options.') . '"</strong>' . t('By default, filtering is enabled for all users on all pages. Here you can specify the pages where filtering should be applied or excluded by setting the "Apply filters by page" radio and textarea and entering page paths, one per line. These standard visibility controls work just like the core Block system\'s. You may also turn filtering off for certain Drupal User ID\'s (uid). This can be useful to turn off filtering for the Admin user uid of 1. You can also turn off filtering for Anonymous users, whose uid is 0.') . '</li>';
$output .= '<li>' . t('If you are setting up the module for the first time, you should enable one or both of the checkboxes under "Debug options". These will output information about which messages are being excluded, and why. If you are on a development site, check both boxes and the debugging output will be printed at the bottom of each page.') . '</li>';
$output .= '<li>' . t('Hit "Save Configuration" to save the settings.') . '</li>';
$output .= '<li>' . t('Visit') . '<strong>"' . t('Administration >> People >> Permissions') . '"</strong>' . t('to set permissions. When the module is first enabled it will granted permissions to view all message types to each site rdle. Assign the "view <type> message" to rdles who should be able to see the given <type> of messages. Users who do not have the permissions to see a given type of messages will not be able to see any of the messages of the given type. Useful to hide warning and error messages from end users on a production site.') . '</li>';
return $output;
}
}