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