[pmwiki-users] Problems with ZAPdata
The Editor
editor at fast.st
Wed Nov 1 15:13:33 CST 2006
On 11/1/06, Lothar Baier <lbb at gravitalis.de> wrote:
> Hi folks!
>
> I would like to use the Comments-Snippet for ZAP. People should be able
> to post
> comments without being logged in.So I created:
>
> (:zapform `Member`datapage="Snippets-Comments.+"`time`Comment`savedata` :)
>
> but that didn't work at all. And without the "" around the
> Snippets-Comments.+
> it produces a file like Snippets-Comments, which ist interpreted by
> PmWiki as a
> Group without a Page.
>
> What did I miss here?
Hi Lothar!
My apologies. I changed the TRY THE CODE: part of my site and got it
to work, but forgot to change the SEE THE CODE: snippet you cut and
pasted. The problem is a little bug with the field Comment. Because
the data is save in the text var directive format (:field: var:), when
the field is comment it gets confused with the comment directive
(:comment whatever:).
Pm has said he would try and fix it in a soon coming release.
In the mean time just use a different field name. I used Remark. Try
this snippet below and you should have instant commenting for users
who are not logged in. I just tested it and it works great!
For commenting on multiple pages (as in groupfooter, or even footer),
you can set the datapage to something like Comments-{$Name}.+ or even
Comments-{$Group}-{$Name}.+ . (Change the pagelist to match of course.
Anyway, this would give you instant site wide commenting. Works
great!
(:zapdata:)
(:messages:)
(:zapform `Member`datapage=Comments.+`time`Remark`savedata` :)
(:input text Member {$AuthId}:)\\
(:input hidden datapage "Comments.+":)
(:input hidden time "+|%B %d, %Y":)
(:input textarea Remark rows=7 cols=40:)\\
(:input hidden savedata "Member,Remark,time":)
(:input submit:)
(:zapend:)
(:pagelist group="Comments" fmt="#commentedit" -RecentChanges -GroupHeader:)
Here's the update pagelist template
[[#commentedit]]
(:table bgcolor=#ffffcc cellspacing=5px width=80%:)
(:cellnr:)Posted {=$:time} by {=$:Member}
(:cellnr:)Comments: {=$:Remark}
(:if expr equal {=$:Member} {$AuthId} or auth admin :)
(:cellnr align=right:)Click here to edit this comment: [[{=$FullName}|EDIT]]
(:if:)
(:tableend:)
[[#commenteditend]]
Feel free to modify this, of course, to your needs. And, let me know
if you have any further problems. Hope this helps!
Cheers,
Caveman
More information about the pmwiki-users
mailing list