Footnotes-Talk

Summary: Talk page for Footnotes.
Maintainer: TonyColley
Users: +5 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

I would be tempted to have this recipe wrap the footnotes list in a div so that they can be styled as a block perhaps. ccox August 24, 2018, at 08:52 PM

Would somebody please review and test version 2? So far it works for me under PHP 5.5 and it also omits gratuitous blue lines when no footnotes are on the page. However, I made the changes without fully understanding what I was doing. A review by someone who knows more about PHP would be helpful. Feel free to correct any errors and upload. Or, if it works for you, note that below to reassure me and others who might want to use the recipe.

-- RandyB August 06, 2015, at 03:07 PM

Looks good to me. Only you shouldn't have the line 83 with stripslashes(). And on line 85, when an array is expanded inside double quotes, it is better to wrap it in curly braces {$m[1]}. And finally, I'm not sure why there are 3 Markup() calls, you only need the first Markup() call, as its pattern would also match the second and the third (unless I fail to see some reason for 3). Otherwise, good work! --Petko August 06, 2015, at 06:06 PM

Thanks. I've made the changes you suggested. -- RandyB August 06, 2015, at 08:17 PM

Does not work with the Confluence script : http://pmwiki.org/wiki/Test/Confluence Profiles.SH - 6 Aug 2007

Just an observation that embedding a link inside the Footnote text works normally in the Simple Footnote, but is not processed by the Extended Footnote and simply appears in full as text, complete with its double square brackets. Des October 07, 2007, at 05:30 PM

The code of the footnote script dosen't allow PmWiki to work with CSS pseudo selector: ":target". To highlight some text the text must be betwixt the opening and the closing tags of anchor. I change the lines:

     $r = "<sup><a  class='footnote' href='#fn$fnid'>$fncount</a></sup>".
          "<a name='fnr$fnid' id='fnr$fnid'></a>";
     $foottext = stripslashes( $foottext );
     $fntext .= "<p class='footnote'><a name='fn$fnid' id='fn$fnid'></a>";
     $fntext .= "<sup>$fncount</sup> $foottext <a href='#fnr$fnid'>&uArr;</a></p>";

to:

     $r = "<sup id='fnr$fnid'><a  class='footnote' href='#fn$fnid'>[$fncount]</a></sup>";
     $foottext = stripslashes( $foottext );
     $fntext .= "<p id='fn$fnid' class='footnote'>";
     $fntext .= "<sup>$fncount</sup> <a href='#fnr$fnid'>&uArr;</a> $foottext</p>";

'Tis working only with [^@^] markup. You can add this CSS style for pseudo selector target:

:target {
    -webkit-animation: highlight 6s 0.1s 1;
    -moz-animation: highlight 6s 0.1s 1;
	-ms-animation: highlight 6s 0.1s 1;
	-o-animation: highlight 6s 0.1s 1;
	animation: highlight 6s 0.1s 1;
}

@-webkit-keyframes highlight {
    0% { background-color: red; }
    100% { background-color: white; }
}
@-moz-keyframes highlight {
    0% { background-color: red; }
    100% { background-color: white; }
}
@-ms-keyframes highlight {
    0% { background-color: red; }
    100% { background-color: white; }
}
@-o-keyframes highlight {
    0% { background-color: red; }
    100% { background-color: white; }
}
@keyframes highlight {
    0% { background-color: red; }
    100% { background-color: white; }
}

Jl Alice - 16 May 2013

Talk page for the Footnotes recipe (users).