[pmwiki-users] new page created with Lambda name using newgroupbox

Petko Yotov 5ko at 5ko.fr
Mon May 11 10:47:59 CDT 2015

Instead of the code on line 108-109 of newgroupbox.php, it could use 
something like:

   $group = PPRA($MakePageNamePatterns, $requested_sanitized_name);

or possibly call MakePageName().

With the changes required for PHP 5.5 compatibility, the core $*Patterns 
arrays contain some Lambda function names to be evaluated. Recipes using 
these patterns directly (rather than calling core functions like 
MakePageName) could do it one element after another, and use 
preg_replace() for strings or preg_replace_callback() for function 

Or, use the helper function PPRA($array, $str) which does exactly that:



On 2015-05-10 22:46, Simon wrote:
> I've got an interesting problem where, when I create a new page, say 
> with
> the intended name of "NewTest" the name comes out as
> "Lambda2341ewLambda2341est/HomePage"
> The code I am using is
> (:newgroupbox value='new workspace (typically your name)' base=HomePage
> button=right size=32 focus=true \
>   template='Workspace.Template' save=true label='New workspace':)
>  (:toggle init=hide div='newWorkspace' lhide='hide add workspace box'
> lshow='add new workspace':)
> Has anyone else had this problem?
> Could it be because of the "/e" in the following
> # add markup (:newgroupbox:)
> Markup('newgroupbox', 'directives',
>   '/\\(:newgroupbox\\s*(.*?):\\)/ei',
>   "NewGroupBox(\$pagename, PSS('$1'))");

More information about the pmwiki-users mailing list