[email protected] writes:
$MakePageNamePatterns = array(
"/'/" => '', # strip single-quotes
"/[^$PageNameChars\\s_]+/" => '', # delete non-alnums
"/\\s+/" => '_' # convert spaces to underline
);
function AsSpacedAsIs($str) { return $str; }
$AsSpacedFunction = "AsSpacedAsIs";
$GroupPattern = '[\\w]*(?:-\\w+)*';
$NamePattern = '[\\w]*(?:-\\w+)*';
function RemoveUnderline($str) { return strtr($str, '_', ' '); }
$FmtPV['$Title'] = $FmtPV['$Titlespaced'] = '@$page["title"] ? $page["title"]
: RemoveUnderline($name)';
It's working perfectly until I got special french caracter (éèà, ect). Display i
s not OK and file name seams strange.
1. Before this code you need to include_once the scripts/xlpage-utr-8.php
file. This will initialize correctly $PageNameChars and other patterns for
the UTF-8 encoding.
2. Don't define here $GroupPattern and $NamePattern to contain only plain
letters and numbers. (Remove ot comment out these 2 lines.)
Petko
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users