|
1 <?php |
|
2 // vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: |
|
3 /** |
|
4 * Parse structured wiki text and render into arbitrary formats such as XHTML. |
|
5 * This is the Text_Wiki extension for Mediawiki markup |
|
6 * |
|
7 * PHP versions 4 and 5 |
|
8 * |
|
9 * @category Text |
|
10 * @package Text_Wiki |
|
11 * @author Bertrand Gugger <bertrand@toggg.com> |
|
12 * @author Paul M. Jones <pmjones@php.net> |
|
13 * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 |
|
14 * @version CVS: $Id: Mediawiki.php,v 1.8 2006/02/25 09:59:34 toggg Exp $ |
|
15 * @link http://pear.php.net/package/Text_Wiki |
|
16 */ |
|
17 |
|
18 /** |
|
19 * "master" class for handling the management and convenience |
|
20 */ |
|
21 require_once(ENANO_ROOT.'/includes/wikiformat.php'); |
|
22 |
|
23 /** |
|
24 * Base Text_Wiki handler class extension for Mediawiki markup |
|
25 * |
|
26 * @category Text |
|
27 * @package Text_Wiki |
|
28 * @author Bertrand Gugger <bertrand@toggg.com> |
|
29 * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 |
|
30 * @version Release: @package_version@ |
|
31 * @link http://pear.php.net/package/Text_Wiki |
|
32 * @see Text_Wiki::Text_Wiki() |
|
33 */ |
|
34 class Text_Wiki_Mediawiki extends Text_Wiki { |
|
35 var $rules = array( |
|
36 'Prefilter', |
|
37 'Delimiter', |
|
38 'Code', |
|
39 // 'Plugin', |
|
40 // 'Function', |
|
41 // 'Html', |
|
42 'Raw', |
|
43 // 'Preformatted', |
|
44 // 'Include', |
|
45 // 'Embed', |
|
46 // 'Page', |
|
47 // 'Anchor', |
|
48 'Heading', |
|
49 'Toc', |
|
50 // 'Titlebar', |
|
51 'Horiz', |
|
52 'Break', |
|
53 'Blockquote', |
|
54 'List', |
|
55 'Deflist', |
|
56 // 'Table', |
|
57 // 'Box', |
|
58 // 'Image', // done by Wikilink but still possible to disable/configure |
|
59 // 'Phplookup', |
|
60 'Center', |
|
61 'Newline', |
|
62 'Paragraph', |
|
63 'Url', |
|
64 // 'Freelink', |
|
65 // 'Colortext', |
|
66 'Wikilink', |
|
67 // 'Strong', ** will be only fake inserted by Emphasis if needed for render |
|
68 'Bold', |
|
69 'Emphasis', |
|
70 'Italic', |
|
71 'Underline', |
|
72 'Tt', |
|
73 'Superscript', |
|
74 'Subscript', |
|
75 // 'Specialchar', |
|
76 'Revise', |
|
77 // 'Interwiki', // done by Wikilink but still possible to disable/configure |
|
78 'Tighten' |
|
79 ); |
|
80 |
|
81 /** |
|
82 * Constructor: just adds the path to Mediawiki rules |
|
83 * |
|
84 * @access public |
|
85 * @param array $rules The set of rules to load for this object. |
|
86 */ |
|
87 function Text_Wiki_Mediawiki($rules = null) { |
|
88 parent::Text_Wiki($rules); |
|
89 $this->addPath('parse', $this->fixPath(dirname(__FILE__)).'Parse/Mediawiki'); |
|
90 } |
|
91 } |
|
92 |
|
93 ?> |