Comparing revisions for FootnoteAction

Additions:
- Wikka 1.1.6.2 & 1.1.6.3
# @version 0.97
// the only change made to this function (from formatters/wakka.php) is in the processing of $things='closetags':
function FNprint (&$thisone, $method, $note_txt="", $base_url="") {
if (!isset($footnotes)) {
$out = "";
if ("addnote" == $method) {
// display a single footnote and add it to the page's list of footnotes
} else if ("list" == $method) {
// display the list of all the page's footnotes
if (isset($footnotes) && !empty($footnotes)) {
$out = "<fieldset class='footnotesbox'><legend> <strong>". FN_NOTES ." </strong></legend>";
foreach ($footnotes as $note_txt_raw) {
")/ms", "FNwakka2callback", $thisone->htmlspecialchars_ent($note_txt_raw));
$out .= ($note_txt . FNwakka2callback('closetags') . "<br />");
$out .= "</fieldset><br />";
} else if ("purge" == $method) {
// empty the footnotes array, so they are not displayed at the bottom of the page
// die silently if unknown method
$output = "";
if ( !isset($vars['note']) ) {
$output .= FNerror(sprintf(FN_ERROR_REQUEST_FORMAT, FN_ERROR_USAGE));
} else {
$output .= FNprint($this, "addnote", $vars['note']);
echo $output;
2. In ##handlers/page/show.php##, go to line 21 and replace the following code block:
Deletions:
- Wikka 1.1.6.2 to 1.1.6.5
# @version 0.98
// the only change made to this function (from formatters/wakka.php in version 1.1.6.3) is in the processing of $things='closetags':
function FNprint (&$thisone, $method, $note_txt='', $base_url='')
if (!isset($footnotes))
$out = '';
if ('addnote' == $method)
{ // display a single footnote and add it to the page's list of footnotes
else if ('list' == $method)
{ // display the list of all the page's footnotes
if (isset($footnotes) && !empty($footnotes))
$out = "<fieldset class='footnotesbox'><legend> <strong>". FN_NOTES .' </strong></legend>';
foreach ($footnotes as $note_txt_raw)
")/ms", "FNwakka2callback", $thisone->htmlspecialchars_ent($note_txt_raw) );
$out .= ($note_txt . FNwakka2callback('closetags') . '<br />');
$out .= '</fieldset><br />';
else if ('purge' == $method)
{ // empty the footnotes array, so they are not displayed at the bottom of the page
// do nothing silently if unknown $method
} // if !function_exists()
$output = '';
if (!isset($vars['note']))
$output .= FNerror(sprintf(FN_ERROR_REQUEST_FORMAT, FN_ERROR_USAGE));
}
else
$output .= FNprint($this, 'addnote', $vars['note']);
echo $output;
2a. [version 1.1.6.4 only] In ##handlers/page/show.php##, go to line 80 and replace the following code block:
echo '<div style="clear: both"></div>'."\n";
echo '</div>'."\n";
echo '<!--closing page content-->'."\n";
echo '<div style="clear: both"></div>'."\n";
if (function_exists('FNprint'))
echo (FNprint($this, 'list', '', $this->Href()));
echo '</div>'."\n";
echo '<!--closing page content-->'."\n";
2b. [versions 1.1.6.2 & 1.1.6.3 only] In ##handlers/page/show.php##, go to line 21 and replace the following code block:
2c. [version 1.2 only] In ##handlers/page/show.php##, replace the following code block:
%%(php)
<?php
echo '<div class="clear"></div></div>'."\n";
if ($raw == 1)
echo '<div class="wikisource">'.nl2br($this->htmlspecialchars_ent($this->page["body"], ENT_QUOTES)).'</div>';
else
echo $this->Format($this->page['body'], 'wakka', 'page');
with the following code block
%%(php)
<?php
echo '<div class="clear"></div></div>'."\n";
if ($raw == 1)
echo '<div class="wikisource">'.nl2br($this->htmlspecialchars_ent($this->page["body"], ENT_QUOTES)).'</div>';
else
echo $this->Format($this->page['body'], 'wakka', 'page');
// Footnote action
if (function_exists('FNprint'))
echo (FNprint($this, 'list', '', $this->Href()));
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki