Closed (won't fix)
Project:
Footnotes
Version:
5.x-2.1
Component:
Footnotes.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2009 at 00:17 UTC
Updated:
23 Jun 2009 at 08:12 UTC
I needed the footnote link appearing in the text body to be surrounded by brackets similar to Wikipedia reference links so came up with this patch. Although I don't like custom module patches this seemed the easiest method for my needs. Maybe this feature could be included as an option within the module. I offer this as a suggestion as I don't have the skills to create a proper patch.
HTH,
Doug
Module version: 5x-2.1
Purpose: to place brackets around footnote link in text body. Uses span to use present see_footnote css formatting.
Line: 367
Changes:
- return '<a class="see_footnote" id="' . $fn['ref_id'] . '" title="' . $fn['text_clean'] . '" href="#' . $fn['fn_id'] . '">' . $fn['value'] . '</a>';}
+ return '<span class="see_footnote">[</span><a class="see_footnote" id="' . $fn['ref_id'] . '" title="' . $fn['text_clean'] . '" href="#' . $fn['fn_id'] . '">' . $fn['value'] . '</a><span class="see_footnote">]</span>';}
Comments
Comment #1
wiredescape commented(A little more accurate...)
Lines: 367-369
Changes:
Comment #2
hingo commentedHi Doug
You're doing the right thing here, but better yet: You can do it without patching the module. You can add your own output style of the footnotes into the theme you are using. See the advice at http://drupal.org/node/11811
Basically, add a file template.php and add your functions there, only changing the name:
(And if you really do as that page tell you, you put the HTML into a separate template file footnote_link.tpl.php, but the above should already work.)