You are here

README.txt in Site Status Message 7

Same filename and directory in other branches
  1. 8 README.txt
CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Requirements
 * Installation
 * Configuration
 * Customisation
 * The Future


INTRODUCTION
------------

Current Maintainer: Gideon Cresswell (DrupalGideon)
<https://www.drupal.org/u/drupalgideon>

The Site Status Message is a simple module to display a site wide message to
your users at the top of each page. Use cases could be to inform of known
downtime in the future, to advertise a special offer on the site or some
important news that needs highlighting.

An optional link to a page with more information can be displayed after the
message.

It was completely inspired by the Drupal.org downtime message displayed October
2013 before the update of Drupal.org from Drupal 6 to Drupal 7.


REQUIREMENTS
------------

None.


INSTALLATION
------------

Install as usual, see
https://drupal.org/documentation/install/modules-themes/modules-7 for further
information.


CONFIGURATION
-------------

The module can be configured on the Site Status Message admin page
admin/config/system/site-status-message. The message to be displayed can be up
to 256 characters in length and the page with more information is an internal
path on the site.

The message can optionally be displayed on all the Admin pages of the site too.

If the message box is left blank, no message will be displayed.


CUSTOMISATION
-------------

The module ships with a template file that can be overridden in your own theme.

Copy the entire site-status-message.tpl.php into your theme directory to make
your own HTML changes.

Further customisation can be made by copying the preprocess function
site_status_message_preprocess_site_status_message() to your template.php and
rename to THEME_preprocess_site_status_message().

Two CSS selectors are provided which can be overridden in your own CSS. There
is the #site-status id and the .site-status-message class.


ADVANCED CUSTOMISATION
----------------------

The message is rendered in the "page_top" region on the page which is part of
the html.tpl.php template file. It is possible to move the message to another
region or block, e.g. inside page.tpl.php with code similar to below.

Inside your template.php file -

/**
 * Implements template_preprocess_html().
 */
function THEME_preprocess_html(&$variables) {
  if (isset($variables['page']['page_top']['site_status_message'])) {
    unset($variables['page']['page_top']['site_status_message']);
  }
}

Then inside the page.tpl.php you can call

<?php print render($page['page_top']['site_status_message']); ?>

to render the message.


MULTILINGUAL SUPPORT
--------------------

Requires the Variable module https://www.drupal.org/project/variable and
Internationalization module https://www.drupal.org/project/i18n

Added by SilviaT https://www.drupal.org/u/silviat


SUBMODULES
----------

The following submodules are currently included.

1) Site Status Message External Link

This module allows for external links to be used. Install this as usual and an
external link can be used for the more information page link.

Only valid external links can be used and the link will be checked every
cron run. If the link becomes invalid, the link is removed from the message.

Options are provided to allow the external link to open in the same browser
window or a new tab/window. There is also the option to add 'rel="nofollow"'
to the link which can prevent search engines from using the link to influence
results.

2) Site Status Message Scheduler

Requires Date Popup module (part of the Date module package)
https://www.drupal.org/project/date

3) Site Status Message Message Type

Allows for a the message to have a severity type and a different background
colour to be used depending on the severity. Out of the box, four types are
included: Information, Success, Warning and Danger.

These values can be altered via a hook implementation of
hook_site_status_message_message_types_alter().

Each message type adds a new css class which changes the background colour.


THE FUTURE
----------

In the future I would like to add these enhancements -

 * Show messages on specific site pages
 * Multiple messages which can be queued

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Requirements
  5. * Installation
  6. * Configuration
  7. * Customisation
  8. * The Future
  9. INTRODUCTION
  10. ------------
  11. Current Maintainer: Gideon Cresswell (DrupalGideon)
  12. The Site Status Message is a simple module to display a site wide message to
  13. your users at the top of each page. Use cases could be to inform of known
  14. downtime in the future, to advertise a special offer on the site or some
  15. important news that needs highlighting.
  16. An optional link to a page with more information can be displayed after the
  17. message.
  18. It was completely inspired by the Drupal.org downtime message displayed October
  19. 2013 before the update of Drupal.org from Drupal 6 to Drupal 7.
  20. REQUIREMENTS
  21. ------------
  22. None.
  23. INSTALLATION
  24. ------------
  25. Install as usual, see
  26. https://drupal.org/documentation/install/modules-themes/modules-7 for further
  27. information.
  28. CONFIGURATION
  29. -------------
  30. The module can be configured on the Site Status Message admin page
  31. admin/config/system/site-status-message. The message to be displayed can be up
  32. to 256 characters in length and the page with more information is an internal
  33. path on the site.
  34. The message can optionally be displayed on all the Admin pages of the site too.
  35. If the message box is left blank, no message will be displayed.
  36. CUSTOMISATION
  37. -------------
  38. The module ships with a template file that can be overridden in your own theme.
  39. Copy the entire site-status-message.tpl.php into your theme directory to make
  40. your own HTML changes.
  41. Further customisation can be made by copying the preprocess function
  42. site_status_message_preprocess_site_status_message() to your template.php and
  43. rename to THEME_preprocess_site_status_message().
  44. Two CSS selectors are provided which can be overridden in your own CSS. There
  45. is the #site-status id and the .site-status-message class.
  46. ADVANCED CUSTOMISATION
  47. ----------------------
  48. The message is rendered in the "page_top" region on the page which is part of
  49. the html.tpl.php template file. It is possible to move the message to another
  50. region or block, e.g. inside page.tpl.php with code similar to below.
  51. Inside your template.php file -
  52. /**
  53. * Implements template_preprocess_html().
  54. */
  55. function THEME_preprocess_html(&$variables) {
  56. if (isset($variables['page']['page_top']['site_status_message'])) {
  57. unset($variables['page']['page_top']['site_status_message']);
  58. }
  59. }
  60. Then inside the page.tpl.php you can call
  61. to render the message.
  62. MULTILINGUAL SUPPORT
  63. --------------------
  64. Requires the Variable module https://www.drupal.org/project/variable and
  65. Internationalization module https://www.drupal.org/project/i18n
  66. Added by SilviaT https://www.drupal.org/u/silviat
  67. SUBMODULES
  68. ----------
  69. The following submodules are currently included.
  70. 1) Site Status Message External Link
  71. This module allows for external links to be used. Install this as usual and an
  72. external link can be used for the more information page link.
  73. Only valid external links can be used and the link will be checked every
  74. cron run. If the link becomes invalid, the link is removed from the message.
  75. Options are provided to allow the external link to open in the same browser
  76. window or a new tab/window. There is also the option to add 'rel="nofollow"'
  77. to the link which can prevent search engines from using the link to influence
  78. results.
  79. 2) Site Status Message Scheduler
  80. Requires Date Popup module (part of the Date module package)
  81. https://www.drupal.org/project/date
  82. 3) Site Status Message Message Type
  83. Allows for a the message to have a severity type and a different background
  84. colour to be used depending on the severity. Out of the box, four types are
  85. included: Information, Success, Warning and Danger.
  86. These values can be altered via a hook implementation of
  87. hook_site_status_message_message_types_alter().
  88. Each message type adds a new css class which changes the background colour.
  89. THE FUTURE
  90. ----------
  91. In the future I would like to add these enhancements -
  92. * Show messages on specific site pages
  93. * Multiple messages which can be queued