[pmwiki-users] Pagename alternative conflicts? was Re: Wikipaths

Patrick R. Michaud pmichaud at pobox.com
Fri Sep 8 07:48:59 CDT 2006

On Fri, Sep 08, 2006 at 08:26:24AM -0400, Crisses wrote:
> On Sep 7, 2006, at 5:01 PM, Patrick R. Michaud wrote:
> I'm one of the people looking for this markup, and I had a somewhat  
> related question, and need to know if it presents a conflict with  
> anything existing or proposed.
> A page link such as:
> [[Group.PageName:Subtext]]
> creates Group.PageNameSubtext
> Is there a custom way to keep the colon in the URL/Page Name?  If so,  
> does it create a conflict with anything?  (in other words, allow  
> hyphen and colon in page titles...)

Hyphen is already allowed.  Colon can be a bit tricky, because of
things like


which might look like a url to some if "SomeGroup." isn't present.  
And of course, there are the potential conflicts with InterMap links.

Still, I can't think of anything currently in PmWiki that will 
specifically disallow the colon in pagenames, if one is willing to 
accept that there may be conflicts with url protocol prefixes and 
InterMap prefixes.  

There is the (small, shrinking) possibility that we would use 
{PageName:var} instead of {PageName$:var} for text fields, and this
would of course pose a conflict.

Anyway, to answer the question -- we'd need to adjust $NamePattern to
allow colons, and get MakePageName() to not strip colons in the
pagename.  So, in config.php:

    $NamePattern = '[[:upper:]\\d][\\w:]*(?:-[\\w:]+)*';
    $PageNameChars = '-:[:alnum:]';

There are still probably some other things that would have to
change to make this work, but the above is a pretty good start.

> I noted that MediaWiki uses colons, and in the case of something I'm  
> working on, the colon is preferred over a hyphen to separate terms on  
> the page.

I think that MediaWiki's use of the colon tends to be more like
PmWiki's wikigroups than a straightforward part of the pagename.
But I could be wrong about that.  :-)

> Examples:
> http://samplewiki.org/Group/OfMiceAndMen:SteinbeckJohn:OnTheSand
> http://samplewiki.org/Group/OfMiceAndMen:SteinbeckJohn:AWaterSnake
> http://samplewiki.org/Group/OfMiceAndMen:SteinbeckJohn:AtAboutTen
> http://samplewiki.org/Group/OfMiceAndMen:SteinbeckJohn:HerHairHung
> There's going to be some very long page titles in my future :)



More information about the pmwiki-users mailing list