[Home]WikiPatches/ExtraContentOnHomePage

UseModWiki | WikiPatches | RecentChanges | Preferences

This patch includes raw html defined in $ExtraTopHomePage? an $ExtraBottomHomePage? on $HomePage. On http://larpwiki.de we use it for some buttons and simmilar stuff.

This patch is made with diff -c as suggested on WikiPatches/Where.

--TilmannHolst, 2004-05-29


*** wiki.pl	2004-05-25 19:03:11.000000000 +0200
--- larpwiki-extra-content-on-homepage.pl	2004-05-25 19:15:49.000000000 +0200
***************
*** 26,31 ****
--- 26,33 ----
  #    59 Temple Place, Suite 330
  #    Boston, MA 02111-1307 USA
  
+ # applied patch: extra-content-on-homepage
+ 
  package UseModWiki;
  use strict;
  local $| = 1;  # Do not buffer output (localized for mod_perl)
***************
*** 63,68 ****
--- 65,72 ----
    $q $Now $UserID $TimeZoneOffset $ScriptName $BrowseCode $OtherCode
    $AnchoredLinkPattern @HeadingNumbers $TableOfContents $QuotedFullUrl
    $ConfigError $UploadPattern );
+ # added by patch extra-content-on-homepage
+ use vars qw( $ExtraTopHomePage $ExtraBottomHomePage );
  
  # == Configuration =====================================================
  $DataDir     = "/tmp/mywikidb"; # Main wiki directory
***************
*** 568,576 ****
--- 572,588 ----
                                $revision, $newText);
      $fullHtml .= "<hr class=wikilinediff>\n";
    }
+   # added by patch extra-content-on-homepage
+   if ($id eq $HomePage && $ExtraTopHomePage) {
+     $fullHtml .= "<div class=\"extra\">$ExtraTopHomePage</div>\n";
+   }
    $fullHtml .= '<div class=wikitext>';
    $fullHtml .= &WikiToHTML($Text{'text'});
    $fullHtml .= '</div>';
+   # added by patch extra-content-on-homepage
+   if ($id eq $HomePage && $ExtraBottomHomePage) {
+     $fullHtml .= "<div class=\"extra\">$ExtraBottomHomePage</div>\n";
+   }
    if (!&GetParam('embed', $EmbedWiki)) {
      $fullHtml .= "<hr class=wikilinefooter>\n";
    }

WikiPatches

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 26, 2007 11:21 am by MarkusLude (diff)
Search: