code into the ApplyRules() routine. This corrects a number of
subtle issues with the Crossbar module: especially, the Crossbar
module's erroneous handling of uploaded files. (Thanks, Ingo
Belka!)
* modules/crossbar.pl (CrossbarBeforeApplyRule): Corrected this
module's erroneous handling of uploaded files.
(RunMyRulesTocCrossbar): New function, offloading a Crossbar-
specific hack from "toc.pl" into this file. (This is still...
slightly hacky, but a bit better.)
* modules/toc.pl (TocRule): Allowed more than one table of contents
per page. Before, this module only recognized the first "<toc...>"
markup for a Wiki page: all subsequent "<toc...>" markup for that
page was studiously ignored. Correcting this improves integration
with the Crossbar module.
(RunMyRulesToc): Removed a Crossbar-specific hack.
(TocAfterApplyRule): Allowed more than one table of contents.
($TocIsApplyingAutomaticRules): New option, providing slightly
finer-grained control over Table of Contents handling.
replacement for the Sidebar module, for all Sidebar users
requiring a cleaner integration of that module with other modules
such as "toc.pl" and "footnotes.pl". This new module also improves
Sidebar customizability by permitting users to place the "Crossbar"
at any position in any page.
* modules/forms.pl (FormsRules): Generalized so as to support both
the Sidebar and Crossbar modules.
* modules/toc.pl (RunMyRulesToc): Generalized so as to support both
the Sidebar and Crossbar modules.
* t/crossbar.t: New test suite, testing the Crossbar module.
removing all previous module-specific hacks. However, as it is a
rewrite, it may still have issues. (Fortunately, time is the mother
of invention and bug fixes.)
* modules/toc.pl: Refactored. This is a complete rewrite
removing all previous module-specific hacks. As with "sidebar.pl",
it may still have issues. That said -- I'm relatively proud of it,
and confident that it (should) stand up under rigorous scrutinies,
utilization, and brutalization.
* modules/forms.pl (FormsRule): Slightly revised, so as to comply
with the "sidebar.pl" refactoring.
(TocRule): Use the new option; principally, this permits Wiki
administrators to prevent this module from converting
"<h1>...</h1>" tags "<h2>...</h2>" tags.
($TocHeaderText): New option.
(TocPageHtml): Introduced a Footnotes extension-specific hack, so
as to circumvent footnote indexing errors after generating the
table of contents.
PageHtml() to generate the HTML of the page without table of
contents, extracting the generated HTML headings, producing the
table of contents, and finish generating the real HTML of the
page.
headers.pl is loaded. Only support usemod markup headers if
usemod.pl is loaded.
(TocHeadings): Transform headers.pl headers into
usemod.pl headers so that the TOC can be generated correctly.
true, and therefore a table of contents has in fact been shown.
This solves the problem of <toc> only working before the first
heading (and requiring no headings in the sidebar).
bugs (such that the toc div will now come after the closing of the
portrait div instead of nested within.
(TocHeadings): Protected pos in order to make this sub usable in
TocRule without the pos remembering workaround.