UseModWiki | WikiPatches | RecentChanges | Preferences

A patch by Tarquin. It doesn't do much, but if you're trying to wrap the wiki output in DIVs for nice CSS layout, it's crucial. I had previously zipped round the whole script putting </div>s in. This fixes that (so in writing it I had to zip round the whole script removing <div>s... sigh)


Do this:

and add this function:

 sub GetUniversalFooter? {
  my( $FooterType? , $id, $goodRevision ) = @_; # only the first is always provided
  my( $FooterText? );
  for( $FooterType? )
      # SWITCH: $FooterType? determines what sort of footer. options:
      # later consider replacing the class of the HTML tempalte's footer DIV
      # for font sizes / colours etc according to type of footer
      /short/ && do {
        $FooterText? =
          &GetFormStart() . &GetGotoBar("") .
          &GetSearchForm() . $q->endform 
      /long/  && do {
        #pass values on like this: &GetFooterText($id, $goodRevision)
        $FooterText? = &GetFooterText($id, $goodRevision)
      /edit/  && do {
        $FooterText? =  
          &GetHistoryLink?($id, T('View other revisions')) . "
\n" . &GetGotoBar($id) . &GetEditToolsBar?() }; } $FooterTemplate? =~ s/%footer%/$FooterText?/; return $FooterTemplate?; }

The last two lines are for HTML template support (coming up). If you don't have that, do something like:

 $FooterText? .= $q->end_html;
 return $FooterText?;

You might want to add an <HR> too before the footer text, if you're not using CSS colour to mark boundaries.

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited April 23, 2007 1:59 pm by MarkusLude (diff)