From: Garrett B. <bau...@ho...> - 2005-07-03 04:04:59
|
Well, no one deigned to reply to my earlier request for help, so I figured it out on my own. The answer is in "stdlib.php" in the wiki's "lib" directory and in "themeinfo.php" in the desired theme(s) in your "themes" directory. 1. In themeinfo.php, make sure "AutosplitWikiWords" is set to "True" (minus quotes). 2. In stdlib.php, do a search for "function split_pagename" (minus quotes). In version 1.3.10, which is what I'm using, this function starts on line 764 (assuming you don't have Word Wrap enabled). 3. Add the following two lines after the other three regular expressions. // Obliterate underscores in your wiki titles and links. $RE[] = '/(.)[_](.)/'; Now, whenever you have a page with an underscore in its name - such as "Foo_Bar" - it will be displayed as a space instead - "Foo Bar" - which makes your URLs a lot cleaner than having that stupid "%20" space escape code in them. Moreover, the underscores will also be converted to spaces in your displayed WikiLinks. Note also that this doesn't care in the least what comes before and after the underscore. A link or title encoded as "Spell_-_Really_Magic_Missiles" will be displayed as "Spell - Really Magic Missiles" despite the fact that the hyphen "-" isn't a capital letter. This makes it more versatile. Garrett Baumgartner |