[Home]WikiPatches/WikiFarms

UseModWiki | WikiPatches | RecentChanges | Preferences

This patch is intended to make life easier for a WikiFarmer, ie the administrator of a site with many wikis.

Basic plan is to invert the relationship between config and wiki.pl, so that the config file becomes a wrapper script clicked on by the enduser, that sets up values and then calls wiki.pl Changes will be made in a way so that wiki.pl can still run stand-alone.

Advantages on a single wiki site

Additional Advantages on a multi-wiki site


Questions & Comments Invited

Q: You still have to use a separate config file in datadir to have the different sites look different right? --ElMoro

Later Sorry my previous answer was a bit rushed. Your question is a very good one, but the more I tried to answer it the more I became interested in a major refactor to the whole config design, so please see my latest thoughts in WikiCodeSuggestions/Config


Initial Feasibility Test

  if (defined ($WikiCfg::DataDir) ) {
	$DataDir = $WikiCfg::DataDir # see comment below
  } else {
	$DataDir = "/tmp/xxx"  # direct call uses temp directory
  }

The commented line sets the local value of $DataDir to the value of the $DataDir variable in the calling module, WikiCfg?. The placement of the $ sign seems counter intuitive to me as a Perl newbie, but it works this way round and the more obvious (to me) WikiCfg?::$DataDir does not.

I created three instances of the WikiConfig? code all calling the main wiki.pl and to my amazement it worked as soon as I'd got dollars, colons, and semicolons in all the right places in my wrapper script! Even if I stopped here I think this is a useful patch. More code will be posted here when its ready. In the meantime if anyone has any advice I'm open to receive it

--RiVer


I've implemented a /WikiFarm locally. I have the wiki.pl file in a common place, along with the intermap. I've stripped down the config file to only the few things that individual wikis need to customize, and set all the rest in the wiki.pl (although I don't like having data in the program, I could easily have a global then custom configs called...)

I added a new file, stored in the same place as the intermap, called wikidirectory which uses a similar format as the intermap. Essentially Friendly_Name => Wiki URL.

Now to support all this, my Wiki page header is modified to look like this:

 Other Wikis: [ Choose... ]    Search/Goto: [          ]    (UserName)         <bitmap Image>

 PAGE TITLE

 Regular menu..........
 ---------------------------------------------------------------------------------------------

page text...

The [ Choose... ] indicates a dropdown box which lists all the wiki friendly names found in the directory. Picking one jumps to the other wiki.

The Search/Goto? was modified slightly. If the item in the search exactly matches a page name, it jumps immediately to that page, hence the Goto... The username shows who you are as a link to your home page if you're logged in.

I plan on adding a checkbox after the search/goto bar which allows you to search all wikis in the farm, but I haven't finished that yet.

Sorry, there's no code here.

-Jeff Hare



UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited April 9, 2009 5:28 pm by GunnarH (diff)
Search: