| 1 |
****************************
|
| 2 |
GeSHi Filter (Drupal Module)
|
| 3 |
****************************
|
| 4 |
|
| 5 |
|
| 6 |
DESCRIPTION
|
| 7 |
-----------
|
| 8 |
The GeShi Filter is a Drupal module for syntax highlighting of pieces of
|
| 9 |
source code. It implements a filter that formats and highlights the syntax of
|
| 10 |
source code between for example <code>...</code>.
|
| 11 |
|
| 12 |
|
| 13 |
DEPENDENCY
|
| 14 |
----------
|
| 15 |
This module requires the third-party library: GeShi (Generic Syntax
|
| 16 |
Highlighter, written by Nigel McNie) which can be found at
|
| 17 |
http://qbnz.com/highlighter
|
| 18 |
See installation procedure below for more information.
|
| 19 |
|
| 20 |
|
| 21 |
INSTALLATION
|
| 22 |
------------
|
| 23 |
1. Extract the GeSHi Filter module tarball and place the entire geshifilter
|
| 24 |
directory into your Drupal setup (e.g. in sites/all/modules).
|
| 25 |
|
| 26 |
2. Download the GeSHi library (version 1.0.x) from http://qbnz.com/highlighter
|
| 27 |
and place the entire extracted 'geshi' folder (which contains geshi.php)
|
| 28 |
in the geshifilter directory (e.g. as /sites/all/modules/geshifilter/geshi)
|
| 29 |
|
| 30 |
3. Enable this module as any other Drupal module by navigating to
|
| 31 |
administer > site building > modules
|
| 32 |
|
| 33 |
|
| 34 |
CONFIGURATION
|
| 35 |
-------------
|
| 36 |
1. The general GeSHi Filter settings can be found by navigating to:
|
| 37 |
administer > site configuration > geshifilter
|
| 38 |
2. Further configuration instructions can be found by following the
|
| 39 |
"more help..." link at the top of that general settings page, which leads
|
| 40 |
to www.example.com/?q=admin/help/geshifilter .
|
| 41 |
|
| 42 |
|
| 43 |
USAGE
|
| 44 |
-----
|
| 45 |
The basic usage (with the default settings) is:
|
| 46 |
<code language="java">
|
| 47 |
for (int i; i<10; ++i) {
|
| 48 |
dothisdothat(i);
|
| 49 |
}
|
| 50 |
</code>
|
| 51 |
When language tags are enabled (like "<java>" for Java) you can also do
|
| 52 |
<java>
|
| 53 |
for (int i; i<10; ++i) {
|
| 54 |
dothisdothat(i);
|
| 55 |
}
|
| 56 |
</java>
|
| 57 |
More options and tricks can be found in the filter tips of the input format at
|
| 58 |
www.example.com/?q=filter/tips .
|
| 59 |
|
| 60 |
|
| 61 |
AUTHORS
|
| 62 |
-------
|
| 63 |
Original module by:
|
| 64 |
Vincent Filby <vfilby at gmail dot com>
|
| 65 |
|
| 66 |
Drupal.org hosted version for Drupal 4.7:
|
| 67 |
Vincent Filby <vfilby at gmail dot com>
|
| 68 |
Michael Hutchinson (http://compsoc.dur.ac.uk/~mjh/contact)
|
| 69 |
Damien Pitard <dpdev00 at gmail dot com>
|
| 70 |
|
| 71 |
Port to Drupal 5:
|
| 72 |
rötzi (http://drupal.org/user/73064)
|
| 73 |
Stefaan Lippens (http://drupal.org/user/41478)
|