[pmwiki-users] ZAP magicbox bugs

The Editor editor at fast.st
Fri Oct 27 12:17:49 CDT 2006


Thanks Jiri, for checking to this...  Here are some answers:

On 10/27/06, Jiri Hladůvka / OBUTEX <admin at obutex.com> wrote:
> - if multilines entered, the 1st line is not rendered when the variable
> is displayed while if single line entered
> the variable is displayed OK (on my computer)

I cannot reproduce this bug on either my home machine, or the server.
Oops--I can if the first line is a blank.  A workaround is to insert
one space for the first line.  Let me know if this is an issue and I
*might* be able to track it down--but the special code replacements I
did for the magic boxes were the single most complex feature of the
whole zap recipe.

Ahhh!  Just found the problem.  In my source code I had:

(:zapdata:)\\
{$MagicBox}

The slashes where destroying the >><< markup.  When I removed them it
worked properly.  Great!  No sloshing around in the code on this one!

> - if the last line in multiline text is not followed by Enter keystroke
> then || || chars string are displayed at the end of the text
> (on my computer)
>
> I think it is related to the   "(" prefix of the page textvariable
> definition in the source.

I can't reproduce this at all--either location.  Can you get it to
work at the ZAP site?

> - (:div ... is not working,

This is a feature to prevent someone from actually entering a zap form
into a magic box and wreaking havoc on your site.

> - directives are disabled - it's not a bug but it's a pitty as a lot
> of PmWiki features are disabled ie (:if userlang ... etc.

But, there are work arounds.  Or, you can manually add the directives
to the data part of the page.  Or, (I think), you can put directives
in lock patterns surrounded by [= =] and they will be preserved.  Or,
easiest of all you can "unprotect" certain fields using the unprotect
feature which restores the directives to functionality. Eitherway
however, you must also hide the fields to store them in the old
field="value"; format or the closing smiley of the directive will
conflict with the closing smiley of the text var directive.

BTW, if you want to do some interesting things, try experimenting with
the [= =] wrapper on various data inputs.  You can do some interesting
stuff, with like page variables and things.  And don't forget the { }
field replacement things (recently documented).

Cheers,
Caveman


More information about the pmwiki-users mailing list