Change locale to fr_FR.UTF-8
[platal.git] / include / wiki / farmconfig.php
CommitLineData
121cdae0 1<?php if (!defined('PmWiki')) exit();
2
251b9351 3$EnablePathInfo = 1; # in fact works with apache rewrite, name is misleading
4$EnableGUIButtons = 1;
5$EnableUpload = 1;
887e363f 6$UploadMaxSize = 500000;
251b9351 7$LinkWikiWords = 0; # disable WikiWord links
8$EnableIMSCaching = 1; # allow browser caching
121cdae0 9
251b9351 10$ScriptUrl = '.'; #\
11$UploadUrlFmt = './uploads'; # } works thanks to the <base /> in skin
12$PubDirUrl = './wiki'; #/
915d4fae 13
251b9351 14$WorkDir = '../spool/wiki.d';
15$WikiDir = new PageStore('$FarmD/'.$WorkDir.'/$FullName');
2c799249 16$InterMapFiles[] = $globals->spoolroot.'/configs/pmwiki.intermap.txt';
121cdae0 17
251b9351 18$Skin = 'empty';
121cdae0 19
121cdae0 20@include_once("$FarmD/cookbook/e-protect.php");
3a824ce3 21include_once($FarmD.'/scripts/xlpage-utf-8.php');
121cdae0 22
251b9351 23// Theme-ing {{{
121cdae0 24
25## The following lines make additional editing buttons appear in the
26## edit page for subheadings, lists, tables, etc.
8ac323de 27$GUIButtons['h2'] = array(400, '\\n!! ', '\\n', '$[Heading]',
28 '$GUIButtonDirUrlFmt/h2.gif"$[Heading]"');
29$GUIButtons['h3'] = array(402, '\\n!!! ', '\\n', '$[Subheading]',
30 '$GUIButtonDirUrlFmt/h3.gif"$[Subheading]"');
31$GUIButtons['indent'] = array(500, '\\n->', '\\n', '$[Indented text]',
32 '$GUIButtonDirUrlFmt/indent.gif"$[Indented text]"');
33$GUIButtons['outdent'] = array(510, '\\n-<', '\\n', '$[Hanging indent]',
34 '$GUIButtonDirUrlFmt/outdent.gif"$[Hanging indent]"');
35$GUIButtons['ol'] = array(520, '\\n# ', '\\n', '$[Ordered list]',
36 '$GUIButtonDirUrlFmt/ol.gif"$[Ordered (numbered) list]"');
37$GUIButtons['ul'] = array(530, '\\n* ', '\\n', '$[Unordered list]',
38 '$GUIButtonDirUrlFmt/ul.gif"$[Unordered (bullet) list]"');
39$GUIButtons['hr'] = array(540, '\\n----\\n', '', '',
40 '$GUIButtonDirUrlFmt/hr.gif"$[Horizontal rule]"');
41$GUIButtons['table'] = array(600,
42 '||border=1 width=80%\\n||!Hdr ||!Hdr ||!Hdr ||\\n|| || || ||\\n|| || || ||\\n', '', '',
43 '$GUIButtonDirUrlFmt/table.gif"$[Table]"');
0df3edb9 44
5dbdcb8c 45// set default author
251b9351 46$Author = $_SESSION['forlife'].'|'.$_SESSION['prenom'].' '.$_SESSION['nom'];
5dbdcb8c 47
48$InputTags['e_form'] = array(
49 ':html' => "<form action='{\$PageUrl}?action=edit' method='post'><div><input
50 type='hidden' name='action' value='edit' /><input
51 type='hidden' name='n' value='{\$FullName}' /><input
52 type='hidden' name='basetime' value='\$EditBaseTime' /></div>");
53
54// set profiles to point to plat/al fiche
fb7e68a2 55Markup('[[~platal', '<[[~', '/\[\[~([^|\]]*)(?:\|([^\]]*))?\]\]/e',
56 'PreserveText("=", doPlatalLink("$1", "$2"), "")');
5dbdcb8c 57
a7de4ef7 58// prevent restorelinks before block apply (otherwise [[Sécurité]] will give
59// .../S<span class='e9curit'>e9'>Sécurité</a>
5dbdcb8c 60Markup('restorelinks','<%%',"//", '');
61
62## [[#anchor]] in standard XHTML
63Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e',
64 "Keep(\"<a id='$1'></a>\",'L')");
65
66Markup('tablebicol', '<block', '/\(:tablebicol ?([a-z_]+)?:\)/e', 'doBicol("$1")');
67Markup('pairrows', '_end', '/class=\'pair\_pmwiki\_([0-9]+)\'/e',
68 "($1 == 1)?'':('class=\"'.(($1 % 2 == 0)?'impair':'pair').'\"')");
69Markup('noclassth', '_end', '/<th class=\'[a-z_]+\'/', '<th');
70
71Markup('div', '<links', '/\(:div([^:]*):([^\)]*):\)/i', '<div$1>$2</div>');
72
73function doBicol($column=false)
74{
75 global $TableRowIndexMax, $TableRowAttrFmt, $TableCellAttrFmt;
76 $TableRowAttrFmt = "class='pair_pmwiki_\$TableRowCount'";
77 if ($column) {
78 $TableCellAttrFmt = "class='$column'";
79 }
80}
251b9351 81
fb7e68a2 82function doPlatalLink($link, $text)
83{
84 if (strlen(trim($text)) == 0) {
85 $res = XDB::query("SELECT u.nom, u.prenom, u.promo, q.profile_nick AS surnom
86 FROM auth_user_md5 AS u
87 INNER JOIN auth_user_quick AS q USING(user_id)
88 INNER JOIN aliases AS a ON u.user_id = a.id
89 WHERE a.alias = {?}", $link);
90 $row = $res->fetchOneAssoc();
91 $text = $row['prenom'] . ' ' . $row['nom'] . ' X' . $row['promo'];
92 if ($row['surnom']) {
0fb07071 93 $text .= ' (alias ' . $row['surnom'] . ')';
fb7e68a2 94 }
95 }
96 return '<a href="profile/' . $link . '" class="popup2">' . $text . '</a>';
97}
98
251b9351 99// }}}
4fc62bc4 100
ffdefc6a 101$AuthFunction = 'ReadPage';
4fc62bc4 102
ffdefc6a 103$HandleAuth['diff'] = 'edit';
104$HandleAuth['source'] = 'edit';
4fc62bc4 105
a7de4ef7 106// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
8ac323de 107?>