[Home]WikiPatches/CommonMinimumFooter

UseModWiki | WikiPatches | RecentChanges | Preferences

The original script shows/ends the webpages in two differents manners (at the bottom).

Rationale

Eventually, if someone wants to add some patches to apply to the bottom of the page (not as $Footernote), s/he must include it twice in FooterText? and CommonFooter? (not common). In fact, this already happens with $Footernote. (I've seen similar fix in UsemodKr?, too; GetMinimumFooter in throughout). There's other related patch: WikiPatches/UniversalFooter.

The pacth

sub GetFooterText { ...

  }
  $result .= $q->endform;
  - if ($FooterNote ne '') {
    - $result .= T($FooterNote);
  - }
  $result .= '</div>';
  $result .= &GetMinimumFooter();

sub GetCommonFooter {
...
 . &GetFormStart() . &GetGotoBar('')
          . &GetSearchForm() . $q->endform;
  - if ($FooterNote ne '') {
   - $html .= T($FooterNote);
  - }
  - $html .= '</div>' . $q->end_html;
  + $html .= '</div>';
  + $result .= &GetMinimumFooter;
  return $html;
...

sub GetMinimumFooter {
  - return $q->end_html;
  + my ($html);

  + if ($FooterNote ne '') {
    + $html .= T($FooterNote);
  + }
  + $html .= $q->end_html;
  return $html;
}
--JuanmaMP

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 17, 2009 3:17 pm by JuanmaMP (diff)
Search: