Post by Wormopolis on Mar 7, 2009 22:11:20 GMT -8
Browser tested: IE and FF
placement: board or global footer
Creates numbered links inline with long posts that link to footnote text at the bottom. Links can be styled with CSS (class footyLink).
insert [ footnote:N]text to appear as footnote[/footnote]
no space before footnote and [.
N is a unique number for that note.
Preview: wormocodes.proboards.com/index.cgi?board=codedb&action=display&thread=69
EDIT: updated preview link
UPDATES TO THIS CODE FOUND ON wormocodes.proboards.com
placement: board or global footer
Creates numbered links inline with long posts that link to footnote text at the bottom. Links can be styled with CSS (class footyLink).
insert [ footnote:N]text to appear as footnote[/footnote]
no space before footnote and [.
N is a unique number for that note.
<script type="text/javascript">
<!--
// footNotes v 1.0
// by Wormopolis - wormocodes.proboards.com
// Please keep header intact - do not repost
// no editing necessary, unless you know what you are doing
// - use style tag to modify footyLink
tds=document.getElementsByTagName('td');
for (f=0; f<tds.length; f++) {
if (tds[f].colSpan==3 && tds[f].vAlign=="top" && tds[f].firstChild && tds[f].firstChild.nodeName.match(/hr$/i)) {
if (tds[f].innerHTML.match(/\[footnote:(\d+?)\](.*?)\[\/footnote\]/i)) {
tds[f].appendChild(document.createElement('hr'));
}
while (tds[f].innerHTML.match(/\[footnote:(\d+?)\](.*?)\[\/footnote\]/i)) {
noteNum=RegExp.$1;
noteText=RegExp.$2;
newRef='<a class="footyLink" name="ref'+noteNum+'" href="#refback'+noteNum+'"><sup class="footyLink">'+noteNum+' </sup></a>';
tds[f].innerHTML=tds[f].innerHTML.replace(/\[footnote:(\d+?)\](.*?)\[\/footnote\]/i,newRef);
newRefBack=document.createElement('div');
newRefBack.innerHTML='<a class="footyLink" name="refback'+noteNum+'" href="#ref'+noteNum+'"><sup class="footyLink">'+noteNum+' </sup></a>';
tds[f].appendChild(newRefBack);
newNote=document.createTextNode(noteText);
newRefBack.appendChild(newNote);
tds[f].appendChild(document.createElement('br'));
}
}
}
// -->
</script>
Preview: wormocodes.proboards.com/index.cgi?board=codedb&action=display&thread=69
EDIT: updated preview link
UPDATES TO THIS CODE FOUND ON wormocodes.proboards.com