Wow. Thanks! It seems to be working perfectly with just this one change.
I'll keep testing. I'm very new to this code. Thanks again, iubito!
On 5/14/06, iubito <iubito(a)gmail.com> wrote:
Answer to Seun Osewa,
Use the GetLocalURL hook to change _ to - or what ever you want :
'GetLocalURL': modify local URLs as output into page links
$title: Title object of page
$url: string value as output (out parameter, can modify)
$query: query options passed to Title::getLocalURL()
For example, in an extension :
<?php
# Change URL, replace _ by -
$wgHooks['GetLocalURL'][] = 'underscoreToHyphen';
//wfRunHooks( 'GetLocalURL', array( &$this, &$url, $query ) );
function underscoreToHyphen($title, $url, $query) {
$url = str_replace("_", "-", $url);
#wfDebug('extension/underscoreToHyphen :
$title,$url='.$url.',$query='.$query."\n");
}
?>
--
Seun Osewa
http://www.nairaland.com [vast Nigerian forum]