[pmwiki-devel] underscores in group names

Patrick R. Michaud pmichaud at pobox.com
Tue Jan 2 11:12:29 CST 2007


On Sun, Dec 31, 2006 at 04:11:50PM -0600, Ben Stallings wrote:
> I see the discussion in Cookbook/AlternateNamingScheme about how to get 
> PmWiki to use underscores instead of spaces, but I'm more interested in 
> getting it to leave underscores alone... is this just a question of 
> adding '_' to $PageNameChars, or does that only affect page names and 
> not group names?  Would tampering with $PageNameChars have unfortunate 
> consequences for other scripts?

You should be able to simply add '_' to $PageNameChars.  It won't
have any unfortunate consequences for PmWiki's scripts (if it does,
that's a PmWiki bug :-) and recipes shouldn't depend on it either.

> While I'm at it... another problem I've been running into with this 
> approach is that table names are rarely capitalized in the CamelCaps 
> that PmWiki favors.  I've been circumventing this so far by using 
> strtolower() on all names before comparing them, but that's kind of 
> shooting from the hip.  Is there a better, more precise way I should 
> know about, like perhaps a PmWiki function that's designed for that very 
> purpose?

There's not really a PmWiki function for that purpose, so using
strtolower() is probably your best bet.

Pm



More information about the pmwiki-devel mailing list