15858ed77d4d05d0ca50e94493e062cb1f78fc3f
[platal.git] / plugins / pmwiki.config.php
1 <?php if (!defined('PmWiki')) exit();
2
3 $ScriptUrl = $globals->baseurl;
4 $UploadUrlFmt = $ScriptUrl."/uploads";
5 $WorkDir = '../spool/wiki.d';
6 $WikiDir = new PageStore('$FarmD/'.$WorkDir.'/$FullName');
7 $PubDirUrl = $globals->baseurl.'/wiki';
8 $InterMapFiles[] = $globals->spoolroot.'plugins/pmwiki.intermap.txt';
9
10 # Authorize group name to start with a number (for promo groups)
11 $GroupPattern = '[[:upper:]0-9][\\w]*(?:-\\w+)*';
12
13 $EnablePathInfo = 1;
14
15 $Skin = 'empty';
16
17 XLSDV('en', array('EnterAttributes' =>
18 "Entre ici les différents droit pour la page. Les champs laissés en blanc ne seront pas modifiés.
19 Pour enlever une restriction ou une autorisation entre <strong>clear</strong>.
20 Les différentes restrictions possibles sont :
21 <ul>
22 <li><strong>public:</strong> (pour tout le monde)</li>
23 <li><strong>logged:</strong> (pour ceux qui ont rentré leur mot de passe ou qui ont un cookie permanent)</li>
24 <li><strong>identified:</strong> (exige une identification par mot de passe)</li>
25 <li><strong>has_perms:</strong> (pour les administrateurs de la page)</li>
26 </ul>
27 Le <strong>:</strong> à la fin de chaque mot clef est important. Tu peux également combiner plusieurs mots clefs avec <strong>and:</strong>
28 ou des espaces (qui remplace le <em>ou</em> logique)<br/>"));
29
30 include_once($globals->spoolroot."/plugins/pmwiki.platalAuth.php");
31 @include_once("$FarmD/cookbook/e-protect.php");
32
33 $DefaultPasswords['read'] = 'has_perms: and: identified:';
34 $DefaultPasswords['edit'] = 'has_perms: and: identified:';
35 $DefaultPasswords['attr'] = 'has_perms: and: identified:';
36 $DefaultPasswords['admin'] = 'has_perms: and: identified:';
37 $DefaultPasswords['upload'] = 'has_perms: and: identified:';
38
39 $EnableGUIButtons = 1;
40 $EnableUpload = 1;
41 $LinkWikiWords = 0; # disable WikiWord links
42 $EnableIMSCaching = 1; # allow browser caching
43
44 ## The following lines make additional editing buttons appear in the
45 ## edit page for subheadings, lists, tables, etc.
46 $GUIButtons['h2'] = array(400, '\\n!! ', '\\n', '$[Heading]',
47 '$GUIButtonDirUrlFmt/h2.gif"$[Heading]"');
48 $GUIButtons['h3'] = array(402, '\\n!!! ', '\\n', '$[Subheading]',
49 '$GUIButtonDirUrlFmt/h3.gif"$[Subheading]"');
50 $GUIButtons['indent'] = array(500, '\\n->', '\\n', '$[Indented text]',
51 '$GUIButtonDirUrlFmt/indent.gif"$[Indented text]"');
52 $GUIButtons['outdent'] = array(510, '\\n-<', '\\n', '$[Hanging indent]',
53 '$GUIButtonDirUrlFmt/outdent.gif"$[Hanging indent]"');
54 $GUIButtons['ol'] = array(520, '\\n# ', '\\n', '$[Ordered list]',
55 '$GUIButtonDirUrlFmt/ol.gif"$[Ordered (numbered) list]"');
56 $GUIButtons['ul'] = array(530, '\\n* ', '\\n', '$[Unordered list]',
57 '$GUIButtonDirUrlFmt/ul.gif"$[Unordered (bullet) list]"');
58 $GUIButtons['hr'] = array(540, '\\n----\\n', '', '',
59 '$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"');
60 $GUIButtons['table'] = array(600,
61 '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '',
62 '$GUIButtonDirUrlFmt/table.gif"$[Table]"');
63
64 // set default author
65 $Author = $_SESSION['forlife']."|".$_SESSION['prenom']." ".$_SESSION['nom'];
66
67 $InputTags['e_form'] = array(
68 ':html' => "<form action='{\$PageUrl}?action=edit' method='post'><div><input
69 type='hidden' name='action' value='edit' /><input
70 type='hidden' name='n' value='{\$FullName}' /><input
71 type='hidden' name='basetime' value='\$EditBaseTime' /></div>");
72
73 // set profiles to point to plat/al fiche
74 Markup('[[~platal', '<[[~', '/\[\[~([^|\]]*)\|([^\]]*)\]\]/e',
75 'PreserveText("=", \'<a href="profile/$1" class="popup2">$2</a>\', "")');
76
77 // prevent restorelinks before block apply (otherwise [[Sécurité]] will give
78 // .../S<span class='e9curit'>e9'>Sécurité</a>
79 Markup('restorelinks','<%%',"//", '');
80
81 ## [[#anchor]] in standard XHTML
82 Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e',
83 "Keep(\"<a id='$1'></a>\",'L')");
84
85 Markup('tablebicol', '<block', '/\(:tablebicol ?([a-z_]+)?:\)/e', 'doBicol("$1")');
86 Markup('pairrows', '_end', '/class=\'pair\_pmwiki\_([0-9]+)\'/e',
87 "($1 == 1)?'':('class=\"'.(($1 % 2 == 0)?'impair':'pair').'\"')");
88 Markup('noclassth', '_end', '/<th class=\'[a-z_]+\'/', '<th');
89
90 Markup('div', '<links', '/\(:div([^:]*):([^\)]*):\)/i', '<div$1>$2</div>');
91
92 function doBicol($column=false)
93 {
94 global $TableRowIndexMax, $TableRowAttrFmt, $TableCellAttrFmt;
95 $TableRowAttrFmt = "class='pair_pmwiki_\$TableRowCount'";
96 if ($column) {
97 $TableCellAttrFmt = "class='$column'";
98 }
99 }
100 ?>