UseModWiki | RecentChanges | Preferences

UseModD contains a number of patches each useable in itself, but all of which make up a useful variant.


This variant is designed to add some extra pretty (CSS, tables) and useablity features (menus, BLOG) to the base 1.0. Most of the code/ideas have come from [CWICK].

I have broken each mod up so that they can be used independantly as well and so that each can be considered for 1.1 with its own merits.

However given the lack of activity there is here in UseMod, I have decided to leave you all with the latest changes and then continue to update UseModD with direct edits to the master perl file. The patches listed below are the last updates I will send in. If you want more updates, improvements and fixes then you will need to take the whole set of changes available over at the UseModD site here http://www.timeistheanswer.com/cgi-bin/usemodd.pl DeadLink [UseModD @ Internet Archive]

--MarkButler 2004/02/02


  1. ConfigOnlyInstall - Allow for simple wiki.conf and css files changes to install.
  2. SpecialLinksOffTopBar - Allow special links to be linked in pages so they can be removed from the GotoBar.
  3. TextFormattingPatch - Add them to every edit page.
  4. PageHeadingOnPage - Site Title is at top and Page Heading/ID is at the top of the embedding page.
  5. PerlDiff mod - taken from here WikiPatches/PerlDiff
  6. MarksAccumulatedBugFixes - All the bug fixes I have verified in one patch.
  7. LoginRework - A mix and rework of: WikiPatches/RequireAUserName and WikiPatches/LoginLogoutPatch.
  8. TableFormatting - Adding center etc to cells and table attributes as well. Taken from here WikiPatches/TableSyntax
  9. SideMenu - This allows for menus to be added to the page.
  10. BlogUsingSubPages - This allows for blogs to be added/inserted into other pages.

Not Needed

  1. CSSOnlyStyling - (Not Needed) Remove incode formating like . "<hr class=wikilineheader>"
  2. ConformantCSS - (Not Possible) There are too many cases that would need to change.
  3. IndexAndPrinterOnBar - (Not Used) Created a better more general solution - SpecialLinksOffTopBar.

How To Mod

These mods will have a Unified Unix Diff Context description. This will help when using Unix Patch as you (and certainly I) will want to add all these patches. I am only doing each patch in turn so that any one may be of use to others.

For Windows get them from here: [UNXUtils]

They have been made like this:

REM Make the individual versions.
REM =============================
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.ConfigOnlyInstall.pl        > wikitemp.ConfigOnlyInstall.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.SpecialLinksOffTopBar.pl    > wikitemp.SpecialLinksOffTopBar.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.TextFormattingPatch.pl      > wikitemp.TextFormattingPatch.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.PageHeadingOnPage.pl        > wikitemp.PageHeadingOnPage.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.PerlDiff.pl                 > wikitemp.PerlDiff.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.MarksAccumulatedBugFixes.pl > wikitemp.MarksAccumulatedBugFixes.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.LoginRework.pl              > wikitemp.LoginRework.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.TableFormatting.pl          > wikitemp.TableFormatting.txt
diff -U 3 wiki.1.0.0.pl ..\cgi-bin\wikipatch.SideMenu.pl                 > wikitemp.SideMenu.txt

REM Build the full wiki from all the patchs.
REM ========================================
patch -u        -o wikitemp.1.0.1.pl wiki.1.0.0.pl    wikitemp.ConfigOnlyInstall.txt
patch -u -F 20 -o wikitemp.1.0.2.pl wikitemp.1.0.1.pl wikitemp.SpecialLinksOffTopBar.txt
patch -u -F 20 -o wikitemp.1.0.3.pl wikitemp.1.0.2.pl wikitemp.TextFormattingPatch.txt
patch -u -F 20 -o wikitemp.1.0.4.pl wikitemp.1.0.3.pl wikitemp.PageHeadingOnPage.txt
patch -u -F 20 -o wikitemp.1.0.5.pl wikitemp.1.0.4.pl wikitemp.PerlDiff.txt
patch -u -F 20 -o wikitemp.1.0.6.pl wikitemp.1.0.5.pl wikitemp.MarksAccumulatedBugFixes.txt
patch -u -F 20 -o wikitemp.1.0.7.pl wikitemp.1.0.6.pl wikitemp.LoginRework.txt
patch -u -F 20 -o wikitemp.1.0.8.pl wikitemp.1.0.7.pl wikitemp.TableFormatting.txt
patch -u -F 20 -o wikitemp.1.0.9.pl wikitemp.1.0.8.pl wikitemp.SideMenu.txt

REM Copy result back into place.
REM ============================
copy wikitemp.1.0.9.pl ..\cgi-bin\wiki.pl


This is an interesting set of changes--I wish you luck in implementing them. Have you considered making a UseModWiki variant based on your mods (when you have implemented all of them)? You might want to look at OddMuse for more mod ideas. I encourage people to distribute variant versions, so please feel free to do so. --CliffordAdams

Thanks for the support, but I believe that I will not be adding that much to be able to call it my own. And I would like to end up convincing you that they go in the generic code (grin). Any that do not I will be happy to leave here so that other can follow my footsteps. I found it quite hard to find cwick, which I think of as the pretty version of usemod, and I would like other to find it more easily. Also what happens when I am done and bored? I want others to carry on if they can/want. This will end up as an intranet development tool so no one else will get to see the final thing --MarkButler

Mark, this isnt strictly your job, but I cant find it elsewhere either. So I want to use, especially the side menu. But I don't know how to splice your mod code into my existing setup. Does it go in the cgi-bin as a separate script? Or does it fit in the wiki.pl script? Or does it go in config?

I have handled other perl customisation. So I know to copy an existing script before I experiment. And I have put bits in existing scripts, or deleted others. But I do feel the need for instruction on what to do with your chunks of code.

Ive had a look at cwick and I'm lusting for coloured boxes ...

Q: Hi Mark, do you have an example site running with your mods? --TilmannHolst

A: Hi Tilmann, I dont have a site with all these changes as they are here, however you can go here [UseModD] to get the latest code with all this mods and additional changes made since. --MarkButler

Hi Mark, I think that in the functon GetHeader you had return $result; two line too early - preventing non-full height sidebars from working. Also, GetFooterText adds an additional hr element at the end of the document (so it is always at the bottom even if full-height sidebars are on. Should add that I'm very pleased by the functionality you;ve brought together though. --GeorgeHarker?

That was old code and the code here now should be OK. However the other changes you have made will only make it into the full UseModD variant over at [UseModD]. Cheers. --MarkButler

There is a problem patching the accumulated bug fixes. This is the diff between a 'fixed' version, and the failed patch. Any reason to remove this feature ('special page' count)?

 --- wikitemp.1.0.6      2004-02-15 04:53:26.000000000 -0600
 +++ wikitemp.1.0.6.bad  2004-02-15 04:52:56.000000000 -0600
 @@ -3772,12 +3772,16 @@
    my $pagename;
    print "<h2>", Ts('%s pages found:', ($#_ + 1)), "</h2>\n";
 -  print '<div class=wikitext>';
 +    my $pagesSkipped = 0;
    foreach $pagename (@_) {
 +     if ($pagename =~ /(^\.|\/\.)/) { # Dont do special pages, OR special subpages are OK.
 +       $pagesSkipped++;
 +       next;
 +     }
      print ".... "  if ($pagename =~ m|/|);
      print &GetPageLink($pagename), "<br>\n";
 -  print '</div>';
 +  print "\n<h2>", Ts('%s special pages hidden:', $pagesSkipped), "</h2>";

See also UseModDescendant

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 18, 2017 9:23 pm by JuanmaMP (diff)