Last updated 19 April 2013. Created on 19 April 2013.
Edited by dagmar. Log in to edit this page.

PHPLighter is a re-implementation of codefilter using the library PHPLighter.

Installation instructions

  1. Copy the phplighter folder to your website's sites/all/modules or sites/ directory.
  2. Download the PHPLigther package from inside the module folder. You will have something like sites/all/modules/phplighter/PHPligther
    Instead of download a zip, you can just clone the entire repository:
    cd sites/all/modules/phplighter
      git clone git://
  3. Enable the phplighter.module on the Modules page.
  4. Go to Configuration > Text formats. For each format you wish to add Code Filter to:
    1. Click the "configure" link.
    2. Under "Enabled filters", check the Code Filter checkbox.
    3. Under "Filter processing order", rearrange the filtering chain to resolve any conflicts. For example, to prevent invalid XHTML in the form of <p><div class="phplighter"> make sure "Code filter" comes before the "Convert line breaks into HTML" filter.
    4. Click the "Save configuration" button.
  5. (optionally) Edit your theme to provide a div.phplighter style for blocks of code
  6. (optionally) You can configure which theme use for this module by adding a custom CSS directly your settings.php file, i.e:
       $conf['phplighter_theme'] = 'sites/all/themes/yourtheme/phplighter.css';

    or using one of the provided by the PHPLighter package:

       $conf['phplighter_theme'] = 'sites/all/modules/phplighter/PHPLighter/css/twilight.css';

Looking for support? Visit the forums, or join #drupal-support in IRC.