migrate referent + profile edition
[platal.git] / plugins / pmwiki.platalSkin.php
CommitLineData
121cdae0 1<?php
2
3// set default author
4$Author = $_SESSION['forlife']."|".$_SESSION['prenom']." ".$_SESSION['nom'];
5
7383676c 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
121cdae0 12// set profiles to point to plat/al fiche
8ac323de 13Markup('[[~platal', '<[[~', '/\[\[~([^|\]]*)\|([^\]]*)\]\]/e',
14 'PreserveText("=", \'<a href="'.$globals->baseurl
e8599c21 15 .'/profile/$1" class="popup2">$2</a>\', "")');
121cdae0 16
c6280456 17// prevent restorelinks before block apply (otherwise [[Sécurité]] will give
18// .../S<span class='e9curit'>e9'>Sécurité</a>
19Markup('restorelinks','<%%',"//", '');
20
f64e3566 21## [[#anchor]] in standard XHTML
22Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e',
23 "Keep(\"<a id='$1'></a>\",'L')");
24
8ac323de 25Markup('tablebicol', '<block', '/\(:tablebicol ?([a-z_]+)?:\)/e', 'doBicol("$1")');
26Markup('pairrows', '_end', '/class=\'pair\_pmwiki\_([0-9]+)\'/e',
27 "($1 == 1)?'':('class=\"'.(($1 % 2 == 0)?'impair':'pair').'\"')");
28Markup('noclassth', '_end', '/<th class=\'[a-z_]+\'/', '<th');
121cdae0 29
8ac323de 30Markup('div', '<links', '/\(:div([^:]*):([^\)]*):\)/i', '<div$1>$2</div>');
121cdae0 31
32function doBicol($column=false)
33{
8ac323de 34 global $TableRowIndexMax, $TableRowAttrFmt, $TableCellAttrFmt;
35 $TableRowAttrFmt = "class='pair_pmwiki_\$TableRowCount'";
36 if ($column) {
37 $TableCellAttrFmt = "class='$column'";
38 }
121cdae0 39}
40
8ac323de 41?>