[pmwiki-users] Cluster recipe

Kathryn Andersen kat_lists at katspace.homelinux.org
Tue Feb 13 20:24:31 CST 2007


On Wed, Feb 14, 2007 at 11:36:30AM +1100, The Editor wrote:
> On 2/14/07, Kathryn Andersen <kat_lists at katspace.homelinux.org> wrote:
> > On Tue, Feb 13, 2007 at 09:04:28AM -1000, Sivakatirswami wrote:
> > > Kathryn Andersen wrote:
> > > >I've uploaded a new version of the group-cluster recipe:
> > > >http://www.pmwiki.org/wiki/Cookbook/Cluster
> > > >
> In contrasting the two recipes, heres a few thoughts to consider...
> 
> First, it should be noted that Hg accepts either cleanurl like links
> or regular PmWiki type links.  So it's not a choice between either
> or...  And the function that converts links into cleanurls is easily
> turned on or off.  When off, there is no difference in this regard
> between the two recipes.

No.  As it stands, Hg *always* calls hgResolvePageName whether
$hgcleanurls are on or not.
It also breaks normal CleanUrls, if one wants to have something like
Kingdom-Animal-Canine/Dog
 
> If there is a preference Hg could be changed to leave it off by
> default. Actually, probably a good idea, as it would help new users
> understand what Hg is doing. To me having both options available seems
> a better approach as some definitely like the cleaner look.  And with
> it optional, it might save us from having to maintain two virtually
> identical recipes...

Would it be possible to just extract out the "urls" part of the Hg
recipe, and use it alongside Cluster?
 
> Another advantage to Hg is that it has a built in powerful group
> prefixing capability that can be used to great effect.  Basically you
> can define a subgroup and have all links automatically prefixed such
> that they are placed within that group.  For example, I plan to use
> this to allow member to create their own individual wiki spaces with
> normal group.name linking. It too can be turned on or off, and can be
> overwritten when turned on to provide normal linking.  So these are
> two big plusses to hg.

I don't really see that "group prefixing" is so wonderful; you can get
the same kind of thing with a page variable.
 
> On the other hand, looking at the Cluster code I noticed Kathryn added
> some rather complex sidebar stuff. Though there's no documentation on
> it, I'm wondering if you have changed how Cluster handles sidebars--or
> if it works as Hg?

What I've done is simpler from the user point of view; as with Hg, in
order to use the sidebar stuff, you need to edit your skin template.

A normal skin template would have something like this:

<!--wiki:{$Group}.SideBar {$SiteGroup}.SideBar-->

What Cluster does is give you an additional page-variable, so you can go

<!--wiki:{$SideBar} {$Group}.SideBar {$SiteGroup}.SideBar-->

instead.

The $SideBar page-variable will be set to the appropriate side-bar for
the current group, doing the search in the same kind of way that
GroupHeader or GroupFooter etc are searched for.

Also, Hg is incorrect in that it is looking for "Sidebar" instead of
"SideBar".

> Also, Cluster added a good Group Title idea which
> I will probably add to Hg when I get back from Melbourne.  :)

I got sick of these really long group names. 8-)
 
> Kathryn, were there any other functional changes you made in Cluster?
> I notice you made quite a few code changes, but theres no
> documentation on the cluster recipe page of any differences in how it
> works.

The searching is basically the same algorithm.  I completely rewrote the
page-variables stuff because, alas, you still seem to have misunderstood
how page-variables work, and the current version of Hg has broken them
again.  Also I made the variable names more verbose because I wanted to
be able to understand what it was doing when I come back to it in six
months time and have completely forgotten what I was thinking when I
wrote it...
I also changed the SDV variable names to comply with the conventions
used by other PmWiki recipes (that is, put them into CamelCase).

Additionally, I created the "-" link markup, which is a shortcut for
"child-group of the current group"; I found that very useful when I had
groups like the following:

Fiction-Stories-Crossover
Fiction-Stories-Crossover-Highlander

With the original Hg markup, to get a shortcut for the second group,
when linking from Fiction-Stories-Crossover, I had to go
[[^-Crossover-Highlander/]] but with the "-" markup, all I needed was to
go [[-Highlander/]] which is much easier.

> Also have you used the new group home page feature in the
> latest beta release of PmWiki yet?  Or do you even have group
> homepages capabilities in Cluster?
 
What do you mean "new" group home page feature?  Yes, the GroupTitle
uses "$Group.$DefaultName" in its list of pages to search for the
group-title, just as the GroupTitle recipe does; apart from that, 
since Cluster isn't changing the URLs, it doesn't need to worry about
group home pages.

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe



More information about the pmwiki-users mailing list