[pmwiki-users] FoxSetPW target issue

Jim Beuerle jbeuerle at triad.rr.com
Mon May 25 23:12:23 CDT 2009


On Mon, May 25, 2009 at 10:31 PM, Jim Beuerle <jbeuerle at triad.rr.com> wrote:

>
>
> On Mon, May 25, 2009 at 6:46 AM, Jim Beuerle <jbeuerle at elon.edu> wrote:
>
>>
>>
>>
>>> > The problem comes when $fields['target'] is used in the FoxSetPW
>>> function. The {$$name2}
>>> >  and {$$name1} are not evaluated from the form. The final result is
>>> another page named
>>> >  Theadmin-Name2-Name1 with the correct EDIT id set.
>>>
>>> I assume FoxSetPW is called as  a Fox filter function.
>>> Fox processes any filter functions early, before variable substitutions.
>>> So in order to do field variable substitutions before, you nned to modify
>>> the filter function and add a line like this early in the function:
>>>
>>> FoxInputVarReplace($pagename, $fx);
>>>
>>> This assumes the filter function is using $pagename and $fx as variable
>>> names, otherwise change the names.
>>>
>>> The result would be that function FoxInputVarReplace is called twice,
>>> but that should do no harm.
>>>
>>> Hope this helps!
>>>
>>>  ~Hans
>>>
>>>
>> THANKS!  It worked great and now I understand a tiny bit more of the way
>> FOX works.
>>
>> Jim
>>
>
>
>
When using {$$(serialname ...)} in the target the page does NOT get created
correctly.

The problem is with the output of serialname markup in powertools.  The
output is $group.$name.  If the $group is removed from the output all works
great.

In other words change
$target= $grp.".".$name.sprintf("%0{$len}d",$n+1);

TO

$target= $name.sprintf("%0{$len}d",$n+1);

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090526/1bf26f54/attachment.html 


More information about the pmwiki-users mailing list