[Pmwiki-users] Getting rid of the group 'Main'

Patrick R. Michaud pmichaud
Tue Feb 17 19:22:45 CST 2004


On Wed, Feb 18, 2004 at 02:55:53AM +0100, Christian Ridderstr?m wrote:
> I'd like to get rid of all references to the group 'Main' --- guess I use 
> 'Site' for most purposes that are generic for the site, and 'LyX' for 
> things specific to what the site is about (i.e. LyX).

I've never liked the group name "Main" either, but I've never seen
an alternative that I thought was substantially better.  To me,
when PmWiki is first installed there needs to be a default group
(something other than PmWiki/) where pages get installed, and it needs
to have a fairly generic name.  For a new admin it's a lot nicer to start
with a few pages in place to point the way to get things started, and it's
good if new pages that are being created are being created somewhere 
other than the PmWiki group.

If you wanted to switch to a different default group (e.g., 'Site'), you'd 
probably need to do the following items:

  # change the default group
  $DefaultGroup = 'Site';  

  # change the location of the SearchWiki page
  XLSDV('en',array('Main/SearchWiki'=>'Site/SearchWiki'));

  # change the recent changes locations
  $RecentChanges = array(
    'Site.AllRecentChanges' => 
      '* $Group.$Tlink . . . $CurrentTime by $AuthorLink',
    '$Group.RecentChanges' =>
      '* $Group/$Tlink . . . $CurrentTime by $AuthorLink');

Upon looking at this I suppose that I really should change the
$RecentChanges array to use '$DefaultGroup.AllRecentChanges' instead
of 'Main.AllRecentChanges' (doing this would make this last part
unnecessary).  It'd be fairly tough to do something similar with
Main/SearchWiki at this point, although I might be able to get
away with putting the following in search.php (haven't tried this yet):

   XLSDV('en',array('Main/SearchWiki'=>'$DefaultGroup/SearchWiki'));

> I suspect that '$[Main/SearchWiki]' is related to this, but also that if I 
> simply do a "translation" somewhere of 'Main' into 'Site', I will not be 
> able to get for instance the search results into the group LyX.

I don't quite understand the part about not being able to get the search
results into the group LyX.

> And I'm not sure I like that there are so many 'Main'-pages that come with
> the distribution.

Well, it's only five.  :-)  Main.HomePage is the starting point.
Main.WikiSandbox is fairly innocuous, and is referenced several 
places from Main.HomePage and PmWiki.* pages.  Something like 
Main.SearchWiki has to exist *somewhere* for searches to be enabled,
and Main.SideBar provides a convenient default place for a sidebar.
Main.GroupAttributes just provides some first-level password protection
for the group.

I know that we need at least a default HomePage, a WikiSandbox, and a 
SearchWiki page, and that these should *not* go in the PmWiki group.  
So, I need a different group in which to put them.  Main is what I
reluctantly chose, being unable to find anything I liked better.
"Site" is a reasonable alternative but might be a bit confusing to
some.

Pm



More information about the pmwiki-users mailing list