5 this plugin introduces markup for footnotes, use it like:
8 some very scientific sentence {{this is a footnote explaination}}
11 this may be useful in some rare cases; usually one should create
12 a WikiLink to explain a more complex task on another page;
19 $ewiki_plugins["format_source"][] = "ewiki_format_source_footnotes";
23 function ewiki_format_source_footnotes (&$source) {
29 ($l = strpos($source, "{{", $l))
30 && ($r = strpos($source, "}}", $l))
35 #-- skip "{{...\n...}}"
36 if (strpos($source, "\n", $l) < $r) {
42 #-- extract "footnote"
43 $footnote = substr($source, $l, $r - $l);
45 #-- strip "{{footnote}}"
46 $source = substr($source, 0, $l - 2)
47 . "<a href=\"#fn$notenum\">·$notenum</a>"
48 . substr($source, $r +
2);
50 #-- add "footnote" to the end of the wiki page source
55 "<a name=\"fn$notenum\">·$notenum</a> ". $footnote . "\n<br />";