Note: CamelCase will be made optional in the forthcoming 1.3 release. See Ticket:191 for further information


A quick but simple non CamelCase hack



Why?


See Also

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?

What?


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.

The "You are WikiName" thingey up above the content (or elsewhere, depending on styling and/or mods) isn't a link...

How?


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

Change the line (around 1215):
    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-z0-9]*$/i", $text); }


This allows usernames starting with a-z (lower or uppercase), and continuing with a-z (upper or lowercase) or numbers.

To make the "You are..." link a link, find in ./actions/header.php (relative to your wikka directory) near line 52:

            echo "You are ".$this->Format($this->GetUserName());


and change it to:

            echo "You are ".$this->Link($this->GetUserName());


This was something that bothered me in the first place, it might or might not be fixed in the next release (1.1.7).


CategoryUserContributions
There are 6 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki