force 'base href=...../~x......' once for good.
[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',
7da8ef90 14 'PreserveText("=", \'<a href="profile/$1" class="popup2">$2</a>\', "")');
121cdae0 15
c6280456 16// prevent restorelinks before block apply (otherwise [[Sécurité]] will give
17// .../S<span class='e9curit'>e9'>Sécurité</a>
18Markup('restorelinks','<%%',"//", '');
19
f64e3566 20## [[#anchor]] in standard XHTML
21Markup('[[#','<[[','/(?>\\[\\[#([A-Za-z][-.:\\w]*))\\]\\]/e',
22 "Keep(\"<a id='$1'></a>\",'L')");
23
8ac323de 24Markup('tablebicol', '<block', '/\(:tablebicol ?([a-z_]+)?:\)/e', 'doBicol("$1")');
25Markup('pairrows', '_end', '/class=\'pair\_pmwiki\_([0-9]+)\'/e',
26 "($1 == 1)?'':('class=\"'.(($1 % 2 == 0)?'impair':'pair').'\"')");
27Markup('noclassth', '_end', '/<th class=\'[a-z_]+\'/', '<th');
121cdae0 28
8ac323de 29Markup('div', '<links', '/\(:div([^:]*):([^\)]*):\)/i', '<div$1>$2</div>');
121cdae0 30
31function doBicol($column=false)
32{
8ac323de 33 global $TableRowIndexMax, $TableRowAttrFmt, $TableCellAttrFmt;
34 $TableRowAttrFmt = "class='pair_pmwiki_\$TableRowCount'";
35 if ($column) {
36 $TableCellAttrFmt = "class='$column'";
37 }
121cdae0 38}
39
8ac323de 40?>