You are here

INSTALL.txt in HTML Purifier 7

Same filename and directory in other branches
  1. 5 INSTALL.txt
  2. 6.2 INSTALL.txt
  3. 6 INSTALL.txt
  4. 7.2 INSTALL.txt
PREREQUISITES: Make sure you check HTML Purifier and make sure that you
have fulfilled all of its requirements before running this.  Specifically,
you'll need the PHP extension ctype (in almost all PHP distributions),
and it's nice to have dom and iconv.

* Place the htmlpurifier folder in your drupal modules directory.

* Download HTML Purifier from http://htmlpurifier.org/ You will need
  4.0.0 or later.

* If you use the latest Dev versions of HTML Purifier module, there is
  working Drush Make support to download the latest HTML Purifier library.
  The next step isn't necessary if drush is used to download the module.

* There are two locations you can install the HTML Purifier library.

  1. Module directory installation. This means installing the library
     folder under the module directory, so that the file
     sites/<site>/modules/htmlpurifier/library/HTMLPurifier.auto.php
     exists.  The easiest way to do this is to extract the entire
     htmlpurifier-x.y.z folder, and then copy the
     htmlpurifier-x.y.z/library folder to your module.  This method is
     convenient and simple, but does not permit HTML Purifier to be shared
     with other modules and can make upgrading the Drupal module a little
     complicated.

  2. The preferred way is making use of the libraries API,
     http://drupal.org/project/libraries. This makes the library
     available to all sites or to a specific site in a multisite
     Drupal setup. You'll need to download the libraries API module
     and enable it before enabling the htmlpurifier module so that in
     the install phase it can find the library.

     Extract the htmlpurifier-x.y.z archive to
     sites/all/libraries/htmlpurifier or to
     sites/<site>/libraries/htmlpurifier for a specific site in a
     multisite Drupal setup.  You can get away with just placing
     the library folder, so that sites/<site>/libraries/htmlpurifier/library
     exists (see below).

     The final setup should be, when making the library and module
     available to all sites:

     sites/all/libraries/htmlpurifier/library
         HTMLPurifier
         HTMLPurifier.autoload.php
         HTMLPurifier.auto.php
         HTMLPurifier.func.php
         HTMLPurifier.includes.php
         HTMLPurifier.kses.php
         HTMLPurifier.path.php
         HTMLPurifier.php
         HTMLPurifier.safe-includes.php

     Now you can safely upgrade your htmlpurifier module without
     having to re-deploy the HTML Purifier library.

* Go to Administer > Modules and enable this module

* You can now create a new text format or add the HTML Purifier to an 
  existing text format. It is recommended that you place HTML Purifier as 
  the last filter in the text format. Reorder the filters if necessary.

WARNING: Due to HTML Purifier's caching mechanism, dynamic filters MUST NOT
be placed before HTML Purifier.

File

INSTALL.txt
View source
  1. PREREQUISITES: Make sure you check HTML Purifier and make sure that you
  2. have fulfilled all of its requirements before running this. Specifically,
  3. you'll need the PHP extension ctype (in almost all PHP distributions),
  4. and it's nice to have dom and iconv.
  5. * Place the htmlpurifier folder in your drupal modules directory.
  6. * Download HTML Purifier from http://htmlpurifier.org/ You will need
  7. 4.0.0 or later.
  8. * If you use the latest Dev versions of HTML Purifier module, there is
  9. working Drush Make support to download the latest HTML Purifier library.
  10. The next step isn't necessary if drush is used to download the module.
  11. * There are two locations you can install the HTML Purifier library.
  12. 1. Module directory installation. This means installing the library
  13. folder under the module directory, so that the file
  14. sites//modules/htmlpurifier/library/HTMLPurifier.auto.php
  15. exists. The easiest way to do this is to extract the entire
  16. htmlpurifier-x.y.z folder, and then copy the
  17. htmlpurifier-x.y.z/library folder to your module. This method is
  18. convenient and simple, but does not permit HTML Purifier to be shared
  19. with other modules and can make upgrading the Drupal module a little
  20. complicated.
  21. 2. The preferred way is making use of the libraries API,
  22. http://drupal.org/project/libraries. This makes the library
  23. available to all sites or to a specific site in a multisite
  24. Drupal setup. You'll need to download the libraries API module
  25. and enable it before enabling the htmlpurifier module so that in
  26. the install phase it can find the library.
  27. Extract the htmlpurifier-x.y.z archive to
  28. sites/all/libraries/htmlpurifier or to
  29. sites//libraries/htmlpurifier for a specific site in a
  30. multisite Drupal setup. You can get away with just placing
  31. the library folder, so that sites//libraries/htmlpurifier/library
  32. exists (see below).
  33. The final setup should be, when making the library and module
  34. available to all sites:
  35. sites/all/libraries/htmlpurifier/library
  36. HTMLPurifier
  37. HTMLPurifier.autoload.php
  38. HTMLPurifier.auto.php
  39. HTMLPurifier.func.php
  40. HTMLPurifier.includes.php
  41. HTMLPurifier.kses.php
  42. HTMLPurifier.path.php
  43. HTMLPurifier.php
  44. HTMLPurifier.safe-includes.php
  45. Now you can safely upgrade your htmlpurifier module without
  46. having to re-deploy the HTML Purifier library.
  47. * Go to Administer > Modules and enable this module
  48. * You can now create a new text format or add the HTML Purifier to an
  49. existing text format. It is recommended that you place HTML Purifier as
  50. the last filter in the text format. Reorder the filters if necessary.
  51. WARNING: Due to HTML Purifier's caching mechanism, dynamic filters MUST NOT
  52. be placed before HTML Purifier.