[pmwiki-users] AddDeleteLine version 2.0beta2

Martin Fick mogulguy at yahoo.com
Sun Sep 24 12:23:35 CDT 2006


--- Nils Knappmeier <nk at knappi.org> wrote:
> I don't like the idea of just adding a hidden field
> in the form for three reasons:
> 
> 1) It seems to be an unclean way of doing things,
> overriding
> one field entry with another one. I don't know if
> it is standardized, that every browser sends the
> fields on the post-request in the exact
> order in which they occur in the HTML page. I don't
> know if PHP always takes the last value of the
> field. Seems to be something that might work, but
> may also fail.

I'm not sue if it is standard, but it works for me, no
need to modify the recipe.  It would be good to get
any reports about it not working though.

If you are worried about it, why not simply not
specify the n=target if someone doesn't specify one
(or provide a switch instead such as -notarget).  This
would ensure that they won't have a problem if they
try to specify it themselves in their form since there
would then be only one value.


> This was actually the reason, why I added the
> "target=" option in the first place.
>
> 2) This does not work it you use CleanUrls. At 
> least that's what I figure. I you look into the 
> target URLs of the e.g. the edit form on
> pmwiki.org, you'll see, that the pagename is also
> part of the target-Atribute of the <form element.
> 
> I'd like to be corrected, if I'm wrong, but this
> seems to be essential for $_POST-ing form data to a
> page. I can't say I fully understand why, but when
> I tried to ...

I guess it must be explicitly set somewhere in the
form even if reposting to the same page since it can
be hard to get the page from the URL?  That would make
sense?  But not an issue since in this case I AM
specifying it explicitly.
 
> Well, that's weird, it seems to work... Mhm, I 
> don't understand...
> It didn't work, when the target was set to
> $ScriptUrl...

Yes, I think this is what I am saying above.

> 3) In PmWiki it is common that a link to
> [[SomePage]] leads to
> CurrentGroup.SomePage. If a form allows you to 
> enter a page name (such as the (:newpagebox:) for
> example, than this should have the
> same behavior in my oppinion.

That would be nice a bonus, but not essential. :)
 
> Alright, it seems to work, so there is no urgent
> need to do anything 
> about it.

Right on.

-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list