[pmwiki-devel] Composing a variable name

The Editor editor at fast.st
Fri Mar 23 17:14:41 CDT 2007

On 3/23/07, Benoit Dutilleul <benoit.dutilleul at googlemail.com> wrote:
> Hello Caveman,
> First of all, thanks for all the work you've put for this new release. It
> enables amazing things :)

Thanks!  I've been quite pleased with it also.  Especially when used
in combination with Hg.  Very powerful possibilities...

> I've got a question & a comment. Let me start with the question : when a new
> member uploads its picture, I want the picture to be named
> {$AuthId}_filename (in order to manage different file types). I'm trying to
> "compose" the right variable without success. Can you help ? You have below
> the script I'm using :
> (:zapform upload key=UploadPhoto:)
> File: (:input file uploadfile:)
> (:input hidden upname value="{$AuthId}_{uploadfile}":)
> (:zap upload="" UploadPhoto:)
> (:input submit value="Upload" UploadPhoto:)
> (:zapend:)

I don't see any thing wrong right off...  What is it doing?  Any error
messages or anything?  I guess the extension is include in the
uploadfile pagename...

Thinking about it a bit more, the uploadfile field probably does not
contain a file name, it actually contains a file.  So this means ZAP
cannot take the name directly from it. Someone else on PmWiki may be
able to suggest a way to extract the name from it (that I could use in
the recipe), but normal ZAP field replacements won't work...  Not sure
what to suggest on this one...

> My comment is the following : users moving to this new ZAP version should
> also update the zapform "name" statement into "key". That would be useful on
> your change blog.

Down at the bottom in the upgrade section (where it tells how to ease
the upgrade) it lists this point specifically.  Thanks for pointing it
out. That was not really need as an upgrade, but I thought it just
might makes things easier for people to conceptualize how the ZAP
inputs works.

> I will update ASAP the simple chat module tutorial I put on pmwiki. I had a
> person contacting me to because he had a problem (there's a zapdata entry in
> the script). By the way, do you have an idea about when the chat extension
> will be available ?

Probably some time still.  I'm finally getting around to doing my own
site (at last).  Finally sense ZAP is about done, and has all the
capabilities I think I will need. So, the focus is shifting from
development to implementation.  And my next project is going to be the
Shopping Cart module--as I'll need that soon.  Having said that, it
might just be a could hours work here or there when I get some
inspiration.  I just need to work out the tweaks for the AJAX.  It's
possible I could crunch it out next week.

> Thanks a lot and have a great week-end,

Will try!


More information about the pmwiki-devel mailing list