[pmwiki-users] How to support case in-sensitive Wiki page names

John Rankin john.rankin at affinity.co.nz
Mon May 15 17:03:22 CDT 2006

On Monday, 15 May 2006 11:10 PM, Crisp, Steve [UK] <SCRISP at ngms.eu.com> wrote:
>> On 15 May 2006 01:36 John Rankin [mailto:john.rankin at affinity.co.nz]
>> wrote:
>> Something like this: change the last line of the function
>>   return "$group.$name";
>> This becomes:
>>   $altname = $name[0] . strtolower(substr($name, 1));
>>   return (PageExists("$group.$altname")) ?
>>          "$group.$altname" : "$group.$name";
>> Then your config.php needs to add the line
>> $MakePageNameFunction = 'AltMakePageName';
>> (assuming you called the local function AltMakePageName)
>> Hope this helps
>> John
>Hope this helps? Thank you John, this helps a lot - more 'findable' is
>what I was after especially as most offending page names are
>I have implemented this and it works great however, I had to do one
>other change to the new function.  I had to comment out the following
>    if (@$MakePageNameFunction)
>        return $MakePageNameFunction($basepage,$x);
>.... otherwise I got a 'content-length: 0' at the browser.  I think it
>was an infinite recursion.  Have I done this correctly?

Yes, that's correct -- you should also remove $MakePageNameFunction
from the global variable list just above. 
>So for completeness and a single point of reference, this is what makes
>PmWiki pages more 'findable':
>1. Copy the attached altmakepagename.php file to your cookbook
>2. Add the following to your local/config.php:
>       include_once('cookbook/altmakepagename.php');
>       $MakePageNameFunction = 'AltMakePageName';
>3. Check permissions on your new file et. al.
>Thanks again for your help John, couldn't have done this
>without you.
It's also thanks to Patrick for creating a hook on which to hang
this customisation, avoiding the need to change pmwiki itself. One 
of the main reasons I like pmwiki is that it's "engineered open".

John Rankin

More information about the pmwiki-users mailing list