add a new compilation plugin named 'icon'
[platal.git] / plugins / pmwiki.config.php
1 <?php if (!defined('PmWiki')) exit();
2
3 $EnablePathInfo = 1; # in fact works with apache rewrite, name is misleading
4 $EnableGUIButtons = 1;
5 $EnableUpload = 1;
6 $LinkWikiWords = 0; # disable WikiWord links
7 $EnableIMSCaching = 1; # allow browser caching
8
9 $ScriptUrl = '.'; #\
10 $UploadUrlFmt = './uploads'; # } works thanks to the <base /> in skin
11 $PubDirUrl = './wiki'; #/
12
13 $WorkDir = '../spool/wiki.d';
14 $WikiDir = new PageStore('$FarmD/'.$WorkDir.'/$FullName');
15 $InterMapFiles[] = $globals->spoolroot.'plugins/pmwiki.intermap.txt';
16
17 $Skin = 'empty';
18
19 @include_once("$FarmD/cookbook/e-protect.php");
20
21 // Theme-ing {{{
22
23 ## The following lines make additional editing buttons appear in the
24 ## edit page for subheadings, lists, tables, etc.
25 $GUIButtons['h2'] = array(400, '\\n!! ', '\\n', '$[Heading]',
26 '$GUIButtonDirUrlFmt/h2.gif"$[Heading]"');
27 $GUIButtons['h3'] = array(402, '\\n!!! ', '\\n', '$[Subheading]',
28 '$GUIButtonDirUrlFmt/h3.gif"$[Subheading]"');
29 $GUIButtons['indent'] = array(500, '\\n->', '\\n', '$[Indented text]',
30 '$GUIButtonDirUrlFmt/indent.gif"$[Indented text]"');
31 $GUIButtons['outdent'] = array(510, '\\n-<', '\\n', '$[Hanging indent]',
32 '$GUIButtonDirUrlFmt/outdent.gif"$[Hanging indent]"');
33 $GUIButtons['ol'] = array(520, '\\n# ', '\\n', '$[Ordered list]',
34 '$GUIButtonDirUrlFmt/ol.gif"$[Ordered (numbered) list]"');
35 $GUIButtons['ul'] = array(530, '\\n* ', '\\n', '$[Unordered list]',
36 '$GUIButtonDirUrlFmt/ul.gif"$[Unordered (bullet) list]"');
37 $GUIButtons['hr'] = array(540, '\\n----\\n', '', '',
38 '$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"');
39 $GUIButtons['table'] = array(600,
40 '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '',
41 '$GUIButtonDirUrlFmt/table.gif"$[Table]"');
42
43 // set default author
44 $Author = $_SESSION['forlife'].'|'.$_SESSION['prenom'].' '.$_SESSION['nom'];
45
46 $InputTags['e_form'] = array(
47 ':html' => "<form action='{\$PageUrl}?action=edit' method='post'><div><input
48 type='hidden' name='action' value='edit' /><input
49 type='hidden' name='n' value='{\$FullName}' /><input
50 type='hidden' name='basetime' value='\$EditBaseTime' /></div>");
51
52 // set profiles to point to plat/al fiche
53 Markup('[[~platal', '<[[~', '/\[\[~([^|\]]*)\|([^\]]*)\]\]/e',
54 'PreserveText("=", \'<a href="profile/$1" class="popup2">$2</a>\', "")');
55
56 // prevent restorelinks before block apply (otherwise [[Sécurité]] will give
57 // .../S<span class='e9curit'>e9'>Sécurité</a>
58 Markup('restorelinks','<%%',"//", '');
59
60 ## [[#anchor]] in standard XHTML
61 Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e',
62 "Keep(\"<a id='$1'></a>\",'L')");
63
64 Markup('tablebicol', '<block', '/\(:tablebicol ?([a-z_]+)?:\)/e', 'doBicol("$1")');
65 Markup('pairrows', '_end', '/class=\'pair\_pmwiki\_([0-9]+)\'/e',
66 "($1 == 1)?'':('class=\"'.(($1 % 2 == 0)?'impair':'pair').'\"')");
67 Markup('noclassth', '_end', '/<th class=\'[a-z_]+\'/', '<th');
68
69 Markup('div', '<links', '/\(:div([^:]*):([^\)]*):\)/i', '<div$1>$2</div>');
70
71 function doBicol($column=false)
72 {
73 global $TableRowIndexMax, $TableRowAttrFmt, $TableCellAttrFmt;
74 $TableRowAttrFmt = "class='pair_pmwiki_\$TableRowCount'";
75 if ($column) {
76 $TableCellAttrFmt = "class='$column'";
77 }
78 }
79
80 // }}}
81
82 $AuthFunction = 'ReadPage';
83
84 $HandleAuth['diff'] = 'edit';
85 $HandleAuth['source'] = 'edit';
86
87 ?>