<HTML dir=ltr><HEAD><TITLE>Re: [pmwiki-users] Mediawiki to PmWiki migration - how to preserve old links</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText15528 dir=ltr>
<DIV dir=ltr><FONT face="Courier New" size=2>Patrick, all,</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>Feedback on your idea below ... it works great however could do with a slight enhancement I'm sure is easy for you guys.</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>How can I tweek the code extract below to capitalise each word in $title below before removing the underscore. This will allow me to support mixed case MediaWiki page names. Example URLs below:</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><A href="http://wiki.enginuity.org/index.php?title=Frequently_Asked_Questions" target=_blank><FONT face="Courier New" size=2>http://wiki.enginuity.org/index.php?title=Frequently_Asked_Questions</FONT></A><FONT face="Courier New" size=2> (already supported)</FONT></DIV>
<DIV dir=ltr><U><FONT face="Courier New" color=#0000ff size=2><A href="http://wiki.enginuity.org/index.php?title=Reading_and_Writing_to_ECU">http://wiki.enginuity.org/index.php?title=Reading_and_Writing_to_ECU</A></FONT></U><FONT face="Courier New" size=2> (note the case of 'and')</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2></FONT> </DIV>
<DIV dir=ltr><FONT face="Courier New" size=2>Patrick R. Michaud wrote:<BR>> I'd do it with a special-purpose php script.<BR>> <?php<BR>> $title = @$_REQUEST['title'];<BR>> $title = str_replace('_', '', $title);<BR>> header("Location: </FONT><A href="https://mail.ngms.eu.com:2000/exchweb/bin/redir.asp?URL=http://scoobypedia.co.uk/enginuity/index.php/Enginuity/$title" target=_blank><FONT face="Courier New" size=2>http://scoobypedia.co.uk/enginuity/index.php/Enginuity/$title</FONT></A><FONT face="Courier New" size=2>");</FONT></DIV></DIV>
<DIV dir=ltr>
<DIV dir=ltr>
<P><FONT face="Courier New" size=2>-Steve.</FONT></P></DIV></DIV></BODY></HTML>