You are here

INSTALL.txt in HTML Purifier 6.2

Same filename and directory in other branches
  1. 5 INSTALL.txt
  2. 6 INSTALL.txt
  3. 7.2 INSTALL.txt
  4. 7 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.

* 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.  (Note that this is different from the
     module directory installation: you should preserve the *entire*
     htmlpurifier-x.y.z folder).

     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 > Site building > Modules and enable this module

* You can now create a new input format or add the HTML Purifier to an 
  existing input format. It is recommended that you place HTML Purifier as 
  the last filter in the input 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. * There are two locations you can install the HTML Purifier library.
  9. 1. Module directory installation. This means installing the library
  10. folder under the module directory, so that the file
  11. sites//modules/htmlpurifier/library/HTMLPurifier.auto.php
  12. exists. The easiest way to do this is to extract the entire
  13. htmlpurifier-x.y.z folder, and then copy the
  14. htmlpurifier-x.y.z/library folder to your module. This method is
  15. convenient and simple, but does not permit HTML Purifier to be shared
  16. with other modules and can make upgrading the Drupal module a little
  17. complicated.
  18. 2. The preferred way is making use of the libraries API,
  19. http://drupal.org/project/libraries. This makes the library
  20. available to all sites or to a specific site in a multisite
  21. Drupal setup. You'll need to download the libraries API module
  22. and enable it before enabling the htmlpurifier module so that in
  23. the install phase it can find the library.
  24. Extract the htmlpurifier-x.y.z archive to
  25. sites/all/libraries/htmlpurifier or to
  26. sites//libraries/htmlpurifier for a specific site in a
  27. multisite Drupal setup. (Note that this is different from the
  28. module directory installation: you should preserve the *entire*
  29. htmlpurifier-x.y.z folder).
  30. The final setup should be, when making the library and module
  31. available to all sites:
  32. sites/all/libraries/htmlpurifier/library
  33. HTMLPurifier
  34. HTMLPurifier.autoload.php
  35. HTMLPurifier.auto.php
  36. HTMLPurifier.func.php
  37. HTMLPurifier.includes.php
  38. HTMLPurifier.kses.php
  39. HTMLPurifier.path.php
  40. HTMLPurifier.php
  41. HTMLPurifier.safe-includes.php
  42. Now you can safely upgrade your htmlpurifier module without
  43. having to re-deploy the HTML Purifier library.
  44. * Go to Administer > Site building > Modules and enable this module
  45. * You can now create a new input format or add the HTML Purifier to an
  46. existing input format. It is recommended that you place HTML Purifier as
  47. the last filter in the input format. Reorder the filters if necessary.
  48. WARNING: Due to HTML Purifier's caching mechanism, dynamic filters MUST NOT
  49. be placed before HTML Purifier.