[pmwiki-users] convert pagenames when converting from pmwiki 1 or below
Patrick R. Michaud
pmichaud at pobox.com
Thu Mar 30 08:03:36 CST 2006
On Thu, Mar 30, 2006 at 09:52:42AM +1200, John Rankin wrote:
> I am upgrading a wiki from version 0.4.14 (!) to 2.1.
>
> Is there a way to tell the convert function that page names
> of the form Page_Name should be saved in the new wiki.d as
> PageName?
If you're using the compat1x.php script, it might be as "simple"
as
include_once('scripts/compat1x.php');
$WikiWordPattern = '[[:upper:]]\\w*(?:[[:upper:]][[:lower:]0-9_]|[[:lower:]0-9_][[:upper:]])\\w*';
$Compat1x["/$WikiWordPattern/e"] = "str_replace('_', '', '$0')";
which basically scans the text for any wikiwords (including inside
of [[...]] links) and removes any underscores it finds.
If this doesn't work, send me a few examples of things it's getting wrong
and I'll help tweak the pattern.
Pm
More information about the pmwiki-users
mailing list