[pmwiki-devel] underscores in group names
Ben Stallings
Ben at InterdependentWeb.com
Sun Dec 31 16:11:50 CST 2006
Happy New Year, everybody! Hope you're not down with the stomach flu
like I have been for the past 3 days. At least I was able to get out of
the house today, but a party is out of the question. :-(
Marc brought up an interesting flaw in my DataQuery approach a few days
ago... it's a common practice to use underscores in the names of
database tables, for example `demo_table`. Part of the whole point of
DataQuery is to use table names as group names, but when you type, for
instance, [[demo_table.12]] PmWiki creates a link to DemoTable.12 instead.
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?
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?
Thanks, and best wishes for a year of health and creativity! --Ben
More information about the pmwiki-devel
mailing list