2ac91cb0ce3ef53bfb7558f352db15ff622e7cd0
[platal.git] / plugins / pmwiki.platalSkin.php
1 <?php
2
3 // set default author
4 $Author = $_SESSION['forlife']."|".$_SESSION['prenom']." ".$_SESSION['nom'];
5
6 $InputTags['e_form'] = array(
7 ':html' => "<form action='{\$PageUrl}?action=edit' method='post'><div><input
8 type='hidden' name='action' value='edit' /><input
9 type='hidden' name='n' value='{\$FullName}' /><input
10 type='hidden' name='basetime' value='\$EditBaseTime' /></div>");
11
12 // set profiles to point to plat/al fiche
13 Markup('[[~platal', '<[[~', '/\[\[~([^|\]]*)\|([^\]]*)\]\]/e',
14 'PreserveText("=", \'<a href="'.$globals->baseurl
15 .'/fiche.php?user=$1" class="popup2">$2</a>\', "")');
16
17 // prevent restorelinks before block apply (otherwise [[Sécurité]] will give
18 // .../S<span class='e9curit'>e9'>Sécurité</a>
19 Markup('restorelinks','<%%',"//", '');
20
21 ## [[#anchor]] in standard XHTML
22 Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e',
23 "Keep(\"<a id='$1'></a>\",'L')");
24
25 Markup('tablebicol', '<block', '/\(:tablebicol ?([a-z_]+)?:\)/e', 'doBicol("$1")');
26 Markup('pairrows', '_end', '/class=\'pair\_pmwiki\_([0-9]+)\'/e',
27 "($1 == 1)?'':('class=\"'.(($1 % 2 == 0)?'impair':'pair').'\"')");
28 Markup('noclassth', '_end', '/<th class=\'[a-z_]+\'/', '<th');
29
30 Markup('div', '<links', '/\(:div([^:]*):([^\)]*):\)/i', '<div$1>$2</div>');
31
32 function doBicol($column=false)
33 {
34 global $TableRowIndexMax, $TableRowAttrFmt, $TableCellAttrFmt;
35 $TableRowAttrFmt = "class='pair_pmwiki_\$TableRowCount'";
36 if ($column) {
37 $TableCellAttrFmt = "class='$column'";
38 }
39 }
40
41 ?>