You are here

README.txt in Fieldset helper 6

Same filename and directory in other branches
  1. 6.2 README.txt
  2. 7.2 README.txt
======================================================================

CONTENTS
--------

 * Overview
 * Requirements
 * Installation
 * Theming Information
 * Technical Information
 * More Information


OVERVIEW
--------

The 'Fieldset helper' module saves the state of a collapsible fieldset
in a browser cookie. Being able to save the state of a collapsible fieldset
improves the usability of a website's forms and documents because users
are able to better customize what information is being presented to them.

For site administrator on the 'Modules' page, this module will save the
state of all the collasible fieldsets and add 'expand all' and 'collapse all'
links to the top page. These two tweaks make it easier for administrators to
enable and disable their modules.


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

Optional modules

 - CCK fieldgroup - CCK's fieldset widget's collapsible state will also
   be stored by the 'Fieldset helper' module.


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

1. Copy/upload the fieldset_helper.module to the sites/all/modules directory
   of your Drupal installation.

2. Enable the fieldset_helper.module in Drupal (administer -> modules).

3. Set the 'administer fieldset state' and 'save fieldset state' user
   permissions for the 'Fieldset helper' module.


THEMING INFORMATION
-------------------

To be able to save the collapsible fieldset states the 'Fieldset helper' module
attempts to declare phptemplate_fieldset(), phptemplate_fieldgroup_fieldset(),
and phptemplate_system_modules() functions (in fieldset_helper.theme.inc)
that over-ride the existing theme functions.

If your theme or another module declares these theme functions, you can still
integrate the 'Fieldset helper' module's theme altering output functionality
by updating your code to call the fieldset_helper_alter_theme_system_modules($output)
and fieldset_helper_alter_theme_fieldset($element) functions.

Please review the API documention for more information.


TECHNICAL INFORMATION
---------------------

The cookie that stores the fieldset states expires at the end of each browser session.
(aka, the user closes their browser)

This is done for two reasons

1. Eventhough the cookie is storing a 'limited' amount of data, it can still be
   considered potentially large by most cookie usage standards.

2. An anonymous user can also save the state of any collapsible fieldset. In a
   shared computer environment any 'personalization' should always expire when the
   user closes the browser.


USAGE:
------

  The below code snippet can used to add a collapsible fieldset to a node or a block.

  The code snippet is based on 'Adding a collapsible fieldset to your nodes'
  (http://drupal.org/node/118343). Everything suggested in the above post should work
  as long as fieldset_helper.js script is loaded with the collapse.js script.

  Notes:

    - Make sure the assigned input filter's 'HTML filter' allows for the script tags.
      This is INSECURE and could expose your site to an XSS attack.
      Only trusted admin and developers should have permission add script tags to your content.

    - Another alternative is to call fieldset_helper_add_js() within your
      theme template preprocess function.

    - Also make sure your input filter does not use the 'Line break converter'.
      This will break your fieldset's formatting.


  Code Snippet:

    <!-- Check to see if namespaced objects exists for the required libraries before loading js files. -->
    <script type="text/javascript">
      if (!window.jQuery) {
        document.write('<'+'script type="text/javascript" src="/misc/jquery.js"></'+'script>');
      }
    </script>
    <script type="text/javascript">
      if (!window.Drupal) {
        document.write('<'+'script type="text/javascript" src="/misc/drupal.js"></'+'script>');
      }
    </script>
    <script type="text/javascript">
      if (!window.Drupal.toggleFieldset) {
        document.write('<'+'script type="text/javascript" src="/misc/collapse.js"></'+'script>');
      }
    </script>
    <script type="text/javascript">
      if (!window.Drupal.toggleFieldset){
        document.write('<'+'script type="text/javascript" src="/sites/all/modules/fieldset_helper/fieldset_helper.js"></'+'script>');
      }
    </script>

    <fieldset id="static-xhtml-fieldset-example" class="collapsible">
      <legend>Static XHTML collapsible fieldset example.</legend>
      <div>This is an example of a static XHTML fieldset that is collapsible.</div>
    </fieldset>

    <fieldset id="static-xhtml-fieldset-example-collapsed" class="collapsible collapsed">
      <legend>Static XHTML collapsed fieldset example</legend>
      <div>This is an example of a static XHTML fieldset that is collapsed.</div>
    </fieldset>


MORE INFORMATION
----------------

 - Homepage
	 http://thebigbluehouse.com

 - Download
   http://drupal.org/project/fieldset_helper

 - Documentation:
   http://drupal.bigbluedrop.com/api/file/contrib-jrockowitz/fieldset_helper/fieldset_helper.module/6

 - Changelog:
   http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/fieldset_helper/CHANGELOG.txt?view=markup&pathrev=DRUPAL-6--1

 - CVS tree:
	 http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/fieldset_helper/?pathrev=DRUPAL-6--1

 - Demo site:
   http://drupal.bigbluedrop.com/admin/settings/fieldset_helper/testL
 
 - Screencast
   http://www.screentoaster.com/watch/stUE1SRkBIR1pZSFpdW1xeU1FX/drupal_fieldset_helper_module

AUTHOR/MAINTAINER
-----------------

 - Jacob Rockowitz
   http://drupal.org/user/371407

File

README.txt
View source
  1. ======================================================================
  2. CONTENTS
  3. --------
  4. * Overview
  5. * Requirements
  6. * Installation
  7. * Theming Information
  8. * Technical Information
  9. * More Information
  10. OVERVIEW
  11. --------
  12. The 'Fieldset helper' module saves the state of a collapsible fieldset
  13. in a browser cookie. Being able to save the state of a collapsible fieldset
  14. improves the usability of a website's forms and documents because users
  15. are able to better customize what information is being presented to them.
  16. For site administrator on the 'Modules' page, this module will save the
  17. state of all the collasible fieldsets and add 'expand all' and 'collapse all'
  18. links to the top page. These two tweaks make it easier for administrators to
  19. enable and disable their modules.
  20. REQUIREMENTS
  21. ------------
  22. Optional modules
  23. - CCK fieldgroup - CCK's fieldset widget's collapsible state will also
  24. be stored by the 'Fieldset helper' module.
  25. INSTALLATION
  26. ------------
  27. 1. Copy/upload the fieldset_helper.module to the sites/all/modules directory
  28. of your Drupal installation.
  29. 2. Enable the fieldset_helper.module in Drupal (administer -> modules).
  30. 3. Set the 'administer fieldset state' and 'save fieldset state' user
  31. permissions for the 'Fieldset helper' module.
  32. THEMING INFORMATION
  33. -------------------
  34. To be able to save the collapsible fieldset states the 'Fieldset helper' module
  35. attempts to declare phptemplate_fieldset(), phptemplate_fieldgroup_fieldset(),
  36. and phptemplate_system_modules() functions (in fieldset_helper.theme.inc)
  37. that over-ride the existing theme functions.
  38. If your theme or another module declares these theme functions, you can still
  39. integrate the 'Fieldset helper' module's theme altering output functionality
  40. by updating your code to call the fieldset_helper_alter_theme_system_modules($output)
  41. and fieldset_helper_alter_theme_fieldset($element) functions.
  42. Please review the API documention for more information.
  43. TECHNICAL INFORMATION
  44. ---------------------
  45. The cookie that stores the fieldset states expires at the end of each browser session.
  46. (aka, the user closes their browser)
  47. This is done for two reasons
  48. 1. Eventhough the cookie is storing a 'limited' amount of data, it can still be
  49. considered potentially large by most cookie usage standards.
  50. 2. An anonymous user can also save the state of any collapsible fieldset. In a
  51. shared computer environment any 'personalization' should always expire when the
  52. user closes the browser.
  53. USAGE:
  54. ------
  55. The below code snippet can used to add a collapsible fieldset to a node or a block.
  56. The code snippet is based on 'Adding a collapsible fieldset to your nodes'
  57. (http://drupal.org/node/118343). Everything suggested in the above post should work
  58. as long as fieldset_helper.js script is loaded with the collapse.js script.
  59. Notes:
  60. - Make sure the assigned input filter's 'HTML filter' allows for the script tags.
  61. This is INSECURE and could expose your site to an XSS attack.
  62. Only trusted admin and developers should have permission add script tags to your content.
  63. - Another alternative is to call fieldset_helper_add_js() within your
  64. theme template preprocess function.
  65. - Also make sure your input filter does not use the 'Line break converter'.
  66. This will break your fieldset's formatting.
  67. Code Snippet:
  68. Static XHTML collapsible fieldset example.
  69. This is an example of a static XHTML fieldset that is collapsible.
  70. Static XHTML collapsed fieldset example
  71. This is an example of a static XHTML fieldset that is collapsed.
  72. MORE INFORMATION
  73. ----------------
  74. - Homepage
  75. http://thebigbluehouse.com
  76. - Download
  77. http://drupal.org/project/fieldset_helper
  78. - Documentation:
  79. http://drupal.bigbluedrop.com/api/file/contrib-jrockowitz/fieldset_helper/fieldset_helper.module/6
  80. - Changelog:
  81. http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/fieldset_helper/CHANGELOG.txt?view=markup&pathrev=DRUPAL-6--1
  82. - CVS tree:
  83. http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/fieldset_helper/?pathrev=DRUPAL-6--1
  84. - Demo site:
  85. http://drupal.bigbluedrop.com/admin/settings/fieldset_helper/testL
  86. - Screencast
  87. http://www.screentoaster.com/watch/stUE1SRkBIR1pZSFpdW1xeU1FX/drupal_fieldset_helper_module
  88. AUTHOR/MAINTAINER
  89. -----------------
  90. - Jacob Rockowitz
  91. http://drupal.org/user/371407