<div dir="ltr">Compliments to you Petko, and PM for this work and progress.<div>This is a major effort, well done.</div><div><br></div><div>Simon</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On 21 September 2013 10:59, Petko Yotov <span dir="ltr"><<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I have committed to the Subversion repository the latest code with the new formats. There are many small changes on many lines so a diff is hardly usable.<br>
<br>
A few new functions were added:<br>
 PCCF() PmWiki Create Callback Function<br>
 PPRE() PmWiki preg_replace eval<br>
 PPRA() PmWiki preg_replace arrays<br>
 Markup_e() like Markup() but with replacement evaluated in a Callback<br>
<br>
We'll document these functions once we're sure they work like we want them to work. But the Markup_e() function should not change a lot in the future, so I'll give an example:<br>
<br>
if until now a recipe used:<br>
<br>
 Markup('id', 'direcives', '/p(a)tte(rn)/e', "ReplFunc('$1', '$2')");<br>
<br>
now it can alternatively use:<br>
<br>
 Markup_e('id', 'direcives', '/p(a)tte(rn)/', "ReplFunc(\$m[1], \$m[2])");<br>
<br>
so the changes are:<br>
 Markup_e() instead of Markup()<br>
 the pattern without the "e" modifier after the last /<br>
 the replacement with $m[0], $m[1], $m[2], $m[3] instead of '$0', '$1' etc.<br>
 (this last one is not automatic, we should be careful there)<br>
<br>
Note that the old interface with Markup() will not be removed so there is no urgency to migrate the recipes, except for hostings with PHP 5.5.<br>
<br>
If anyone would like to help, please get the latest code either via Subversion, or by downloading the file pmwiki-latest-svn.zip linked from this page: <a href="http://www.pmwiki.org/wiki/PmWiki/Subversion" target="_blank">http://www.pmwiki.org/wiki/<u></u>PmWiki/Subversion</a> .<br>


<br>
(maybe don't install it yet on production wikis, and always have backups of your last working version :-)<br>
<br>
This development pre-release should be tested and should work like 2.2.55 even over older installations, and in all versions of PHP > 4.1, with and without UTF-8 enabled, etc. - should be as good as the stable. Additionally, it should also work in PHP 5.5 without too many warnings about the deprecated feature (when we're done, there shouldn't be any warnings).<br>


<br>
There may be some bugs, for example if some chunk of text is missing, a variable scope may have been forgotten: just show us how to reproduce the bug, for example on the <a href="http://pmwiki.org" target="_blank">pmwiki.org</a> Test group, and we'll fix it.<br>


<br>
If you notice a problem or have questions or ideas for improvements, please tell us.<span class="HOEnZb"><font color="#888888"><br>
<br>
Petko</font></span><div class="im HOEnZb"><br>
<br>
Petko Yotov writes:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello. Patrick and I have started addressing the issue of a deprecated function in future versions of PHP.<br>
<br>
Partick found the time to look into the problem and suggested a solution which I couldn't see myself in the last 3-4 months. I have worked on it yesterday and today and the migration appears possible, without breaking existing recipes or dropping support for PHP 4!!<br>


<br>
At this moment, most of the core Markup() rules are rewritten to the new format, and we still need to decide how to deal with different replacement patterns like $ROSPatterns or $MakePageNamePatterns.<br>
<br>
The next PmWiki version should be mostly done and compatible with PHP 5.5.<br>
<br>
Our plan is to first remove the deprecated feature from the core program, and then advise recipe authors to use the new Markup definition format (which will be relatively easy).<br>
<br>
In a recipe, the old format will continue to work with the new PmWiki versions so an existing wiki with local customisation shouldn't break after a PmWiki upgrade. But if your hosting provider forces you to use PHP 5.5 or just disables the deprecated feature, you may have to upgrade both PmWiki and your recipes.<br>


</blockquote>
<br>
<br></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>____<br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a>
</div>