Revision [15503]

This is an old revision of noncamelcasehack made by TormodHaugen on 2006-10-17 16:03:09.


A quick but simple non CamelCase hack


Some cool, smart and creative people like to avoid CamelCase. Come on, if you plan to use WikkaWiki for your homepage, or a blog or something - then it would be sooo uncool having CamelCase'd pages. Even more people would think that CamelCase'd usernames on the aforementioned websites (or in "normal" wikis, too) would be so 200? oh, wait. What year are we in again?


Ok. CamelCase isn't mandatory for pagenames, you'd just have to make the links inside double brackets ([[likethis]]) all the time. No need to change that, works like a charm.

WikiName is a different matter. For one, you are restricted from making them. That needs to be solved.


You need to edit the Wakka.class.php file located in the folder ./libs/ (relative to your installation directory).

Change the line (around 768):
    function IsWikiName($text) { return preg_match("/^[A-Z,ÄÖÜ][a-z,ßäöü]+[A-Z,0-9,ÄÖÜ][A-Z,a-z,0-9,ÄÖÜ,ßäöü]*$/", $text); }

to the more understanding (as in "It knows I don't want CamelCase!" ;) ):
    function IsWikiName($text) { return preg_match("/^[a-z][a-z,0-9]*$/i", $text); }

This allows usernames starting with a-z (lower or uppercase), and continuing with a-z (upper or lowercase) or numbers.
There are 6 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki