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