[pmwiki-users] auto-upload using fox?

martin at kerz.org martin at kerz.org
Mon Mar 31 03:46:10 CDT 2008


Dear Hans,

that helped a lot, indeed. Thank you.

I have a problem, though:

(:input hidden var '{$$(wikiword {$$nachname} {$$vorname})}':)

does not perform the (:wikiword ... :) function at my installation.  
When I try to insert additional ":", the parser interprets the first  
":)" as the end of the input markup. What am I doing wrong here? Is  
there a documentation for nested function calls?

Again, thanks a lot.


Martin

Zitat von Hans <design5 at softflow.co.uk>:

> Monday, March 31, 2008, 8:37:22 AM, martin at kerz.org wrote:
>
>> p.s. I have two remaining question regarding fox. Can I somehow check
>> for special characters in form fields? I want to disallow them. And
>> finally. Can I somehow get a wikified version of {$$name} (e.g.
>> without spaces) for use in paths in the template file?
>
> Since you are German you may be interested to try automatic character
> conversion for page names, transforming zB äöü into ae, oe, ue etc.
> See
> http://pmwiki.org/wiki/Cookbook/ISO8859MakePageNamePatterns
>
> Then you won't need to disallow these characters, but new page names
> will be created not using them. If you make use of the (:title :)
> markup in your fox new page templates, the pages can keep the special
> characters in the title, but use the conversions in the names.
> same can be done for the file names.
>
> Fox creates already valid pagenames out of names which have special
> characters. Using the recipe to convert ISO 8859 character input to
> unaccented equivalents you avoid the creation of pagenames like
> %dcber%e4nderung.
>
> Also for special cases there is a markup expression wikiword, part of
> http://pmwiki.org/wiki/Cookbook/MarkupExprPlus
>
> {(wikiword 'Make a wiki word')}  =>  MakeAWikiWord
> This can also be used within Fox templates, using syntax
> {$$(wikiword 'Make a wiki word')}
> so it only is evaluated when the form is processed.
> But as I said, Fox does this already automatically for target page
> names, so you may  need to use the wikiword markup expression only
> for non pagenames.
>
> Here is an example of part of a Fox form to create a new coworker page
> and upload an image as well as content (some lines are split for this
> email:
>
> %red%(:foxmessages neumit list=check:)
> (:fox neumit template=Site.FoxTemplates#neumitarbeiter
>     target='{$$nachname} {$$vorname}' upload=1 foxgroup=Mitarbeiter   
> redirect=1:)
> (:foxcheck vorname msg='Bitte Vorname(n) eingeben! ':)
> (:foxcheck nachname msg='Bitte Nachname eingeben! ':)
> .....
> || Vorname:||(:input text vorname size=40:)
>      %red%(:foxmessages neumit vorname:) ||
> || Nachname:||(:input text nachname size=40:)
>      %red%(:foxmessages neumit nachname:) ||
> .....
> || Bild hochladen:||(:input file upfile size=70:)
>     (:input hidden var '{$$(wikiword {$$nachname} {$$vorname})}':)
>     (:input hidden upfile_name {$$var}.jpg':) ||
>
> The last shows the use of wikiword markuop expression for generating
> an automatic upload filename, which then can be references with a
> Attach:{$Name}.jpg in the GroupHeader,  or
> Attach:{$$var}.jpg syntax in the Fox template
>
> hope this helps!
>
>   ~Hans
>
>






More information about the pmwiki-users mailing list