[dokuwiki] Re: To Change Word Separator From Underscore to Dot

  • From: "Joe Lapp" <joe.lapp@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 13 Sep 2005 19:34:10 -0500 (CDT)

> I'd like to change the format of the filename/url created when you
> create a page like "Compound Word" from "compound_word" to
> "compound.word".

I'm about to check in a way to use dashes instead of underscores.  Would that 
work for you?

What if you named a page [[red-spotted ant mimic]]?  Under your proposal this 
would become:
red-spotted.ant.mimic

DokuWiki currently makes this:
 red-spotted_ant_mimic

My new $conf['usedash'] variable would make this:
red-spotted-ant-mimic

If you still want to use the dot, change cleanID() in /inc/pageutils.php to 
include these lines:

    //remove specials
    $id = utf8_stripspecials($id,'.');
    //clean up
    $id = preg_replace('#\.+#','.',$id);

Instead of these lines:

    //remove specials
    $id = utf8_stripspecials($id,'_');
    //clean up
    $id = preg_replace('#_+#','_',$id);

I don't know if the dot has some other meaning such that making this change 
might break something.

~joe
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: