configure footnotes automatically when enabling it.

beginner - December 19, 2007 - 13:35
Project:Footnotes
Version:6.x-1.x-dev
Component:Footnotes.module
Category:feature request
Priority:minor
Assigned:Unassigned
Status:active
Description

This is a small (?) feature request that shouldn't need to be backported to D5.

When enabling the module on a site, I always have to perform the same 2 tasks to make it work:
1- change the weight, since footnotes should come early in the chain of filters (the default seems to be 10, and i have to set it at 0 instead).
2- add the required tags to the html filter so that the tags output by footnotes are not suppressed by the html filter.

In README.txt, you have:

Note: Typically you want the footnotes filter to be pretty early in the chain.

and:
Footnotes.module is designed such that it can be used together with Drupal's html filter,
and in particular you should have footnotes first and html filter later.

Footnotes outputs tags: <sup>, <a>, <div>, <ol>, <li>
You should add these tags to your input formats that use html filter. This can be done at
administer > input formats > configure > configure > HTML filter

Maybe we could make this part of the configuration more automatic....

Most will use footnotes with the Filtered HTML input format (but not all).

??

#1

hingo - December 19, 2007 - 15:26

Hi Beginner, plan on spending your christmas vacation coding Drupal ? :-)

Changing the default weight is a good idea. I guess there is no easy way to do it, other than poke with the value directly in the database? I'm all for this change if there is a nice way to do it (or even if it's not so nice, at least can be considered the "right way" to do it!)

The current version of Footnotes actually only outputs tags that pass the HTML filter. It seems I've been lazy in doing new releases (I guess I was waiting for D6 to release ... or just lazy :-) but if you download "5.x-1.x-dev" there is no need to change settings for HTML filter.

#2

beginner - December 20, 2007 - 02:29
Priority:normal» minor

I think div is not part of the default HTML filter.

I have been thinking about it. The 'right' way to do it might involve using hook_formalter() and do all kinds of checks to see which input format it is used in, together with which other filters (e.g. HTML filter).

But this is wayyy too complicated for such a minor useability enhancement.

Well... where I live, we don't get any Christmas vacations. But I do plan to do a lot of Drupal coding. Porting outline.module to D6 is a BIG task since its core functionality is covered, in a very different way, by the updated book.module.
All this to say that I won't be hacking on this particular feature right now...

#3

hingo - December 20, 2007 - 12:48

But version 5.x-1.x-dev shouldn't use DIV anymore. It outputs a DL list.

Are you sure you have the newest 5.x-1.x-dev? If you do, then I have something uncommitted... No, I think when I download the dev release it has the DL list code in it.

#4

beginner - December 20, 2007 - 13:13

As a very conscientious Drupal web site administrator, I was reading README.txt... which according to what you say needs updating... ;)
I hadn't actually checked the output.

This should make automatic configuration easier... But I still think there ought to be a div somewhere.

#5

hingo - December 20, 2007 - 20:47

Good point. I'll create a separate bug to correct the README.

There is no problem in surrounding the whole stuff with a DIV, but in practice the DL works as the container you originally used DIV for. All the same CSS can be applied, etc...

Note that the current output format may need to be completely reworked (something else than DL) because of problems with Mac OS: http://drupal.org/node/166628

 
 

Drupal is a registered trademark of Dries Buytaert.