I'd like to add new useful feature 'footnotes'. This feature allows users to add automatically numbered footnotes within a text.
This feature was inspired by footnotes module.

Please review this patch.

Usage:
[fn]footnote text[/fn]
or
[footnote]footnote text[/footnote]

Use example:

BBCode is an abbreviation for Bulletin Board Code, the lightweight markup language[fn]A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a simple text editor, and easy to read in its raw form.[/fn] used to format posts in many message boards. It is also called forum codes. The available tags are usually indicated by rectangular brackets surrounding a keyword, and they are parsed by the message board system before being translated into a markup language that web browsers[fn]A web browser is a software application that enables a user to display and interact with text, images, and other information typically located on a web page at a website on the World Wide Web or a local area network. [/fn] understand, usually HTML or XHTML.

Output HTML source:

    <p>BBCode is an abbreviation for Bulletin Board Code, the lightweight markup language<sup class="bb-see-footnote" title="A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a simple text editor, and easy to read in its raw form."><a href="#bb-footnote-1">1</a></sup> used to format posts in many message boards. It is also called forum codes. The available tags are usually indicated by rectangular brackets surrounding a keyword, and they are parsed by the message board system before being translated into a markup language that web browsers<sup class="bb-see-footnote" title="A web browser is a software application that enables a user to display and interact with text, images, and other information typically located on a web page at a website on the World Wide Web or a local area network. "><a href="#bb-footnote-2">2</a></sup> understand, usually HTML or XHTML.</p>
<div class="bb-footnotes">
  <ol>
    <li id="bb-footnote-1">A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a simple text editor, and easy to read in its raw form.</li>
    <li id="bb-footnote-2">A web browser is a software application that enables a user to display and interact with text, images, and other information typically located on a web page at a website on the World Wide Web or a local area network. </li>
  </ol>
</div>

Example of CSS:

div.bb-footnotes {
  margin-top: 4em;
  border-top: 1px solid black;
}
sup.bb-see-footnote {
  vertical-align: top;
  font-size: 0.7em;
  font-weight: bold;
  border-bottom: 2px solid orange;
}
CommentFileSizeAuthor
#1 footnote_ss.png8.56 KBTakafumi
bbcode_5_patch_9.txt1.15 KBTakafumi

Comments

Takafumi’s picture

StatusFileSize
new8.56 KB

Output result of example above.

naudefj’s picture

Looks nice, but I'm not so sure it belongs in this module. Any other opinions on this?

naudefj’s picture

Status: Needs review » Closed (won't fix)
Takafumi’s picture

Assigned: Unassigned » Takafumi
Status: Closed (won't fix) » Postponed

I think that the period of the review about this feature is not enough.

pcdonohue’s picture

Could be nice, but is the deciding question whether or not it's "standard" bbcode? I think I've seen some bbcode implementation out there that handle footnoting, but it's not a default tag.

You could just use the footnote module, but then you would have to mix bbcode-type [] tags with html-type tags, no? Is there a way to just use the footnotes modules, but allow bbcode style tags instead?

naudefj’s picture

Status: Postponed » Closed (won't fix)

We should be looking at ways to integrate with other modules (like footnotes), not integrating them into BBCode!