[pmwiki-users] upload box

dso dso at moosoft.com
Sun Feb 4 20:18:50 CST 2007


The Editor wrote:
> On 2/4/07, Simon <s-i-m-o-n at paradise.net.nz> wrote:
>> I think Daniel wants,
>> because I am looking for exactly the same thing and despite reading the friendly
>> documentation have not been able to find it,
>> hence we are posting this question,
>> some markup that can be placed in a page (cf new page box)
>> where a file can be uploaded,
>> yes - in the same manner as action=upload  but without having the whole upload page
>> experience.
>> (yes I have read and reread PmWiki/Uploads and PmWiki/UploadAdmin, PmWiki/SiteActions,
>> PmWiki/AvailableActions, PmWiki/DocumentationIndex, PmWiki/MarkupMasterIndex,
>> Cookbook/Input, Category/Uploads - does that establish our credentials?).
>>
>> So to be clear,
>> is there, or how would you recommend we achieve, the goal of being able to, say,
>>
>> (:uploadfile value="add photo to page":)
>>
>> in a page,
>> see for example http://www.pmwiki.org/wiki/Test/UploadSimpleForm
>> and I think that this is close to answering the question
>> if we understood what values the name=action hidden field could take,
>> and how to connect to processing of the form data.
>>
>> in addition after the upload it should return to the original page,
>> not to
>> http://www.pmwiki.org/wiki/Test/UploadSimpleForm?action=upload&uprname=014_10A.jpg&upresult=success
>>
>> Is this now 'out of the box' in PmWiki?
>>
>>
>> thanks
>>
>> Simon
>>
>> PS from http://www.pmwiki.org/wiki/Test/UploadForm
>>
>>
>> Tegan Dowling wrote:
>>> Daniel:
>>>
>>> 1) please don't top-post
>>>
>>> 2) it's still not clear to me what you want.  What skin are you using?
>>>
>>> Are you aware of/familiar with  "?action=upload" ?
>>>
>>> Do you just want to upload a file to the wiki, without having any link to it?
>>>
>>> You should still probably read http://pmwiki.org/wiki/PmWiki/Uploads,
>>> and maybe PmWiki.SitePageActions, which explains that when you've used
>>> your authentication system (whichever you configure) to establish that
>>> you have authority to upload, then the Site/PageActions will display
>>> an "attach" link that will display an uploading dialog box.  See
>>> http://pmwiki.org/wiki/Site/PageActions?action=source.
>>>
>>> How much of this do you already know?  Please be more expansive to
>>> help us identify the  point at which your needs differ from what's
>>> available OR at which your understanding is stalled.
> 
> 
> Still not sure exactly what your questions are...  This is the form you use...
> 
> (:input form method=post enctype=multipart/form-data :)
> (:input hidden name=n value={$FullName}:)
> (:input hidden name=action value=postupload:)
> File to upload: (:input file name='uploadfile':)
> Name of upload: (:input text name='upname':) (:input submit
> value="$[Upload]":)
> (:input end:)
> 
> If you want it to forward to another page I think you can also just
> set the action as a url in the form field.
> 
> ZAP can construct this kind of form automatically with many options,
> depending on what you want, but as it's not clear what you are looking
> for, I can't offer anything more specific.
> 
> Cheers,
> Dan
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users


This is my pageactions text using your form idea:

>>rframe font-size=90pct<<
(:if !authid:)
*[[{$FullName}?action=login|$[Login]]]
(:if authid:)
*[[{$FullName}?action=logout|$[Logout]]]
*[[Site]]
*%item rel=nofollow class=edit accesskey='$[ak_edit]'
%[[{$FullName}?action=edit | $[Edit] ]]
*%item rel=nofollow class=diff
accesskey='$[ak_history]'%[[{$FullName}?action=diff |$[History] ]]
(:ifend:)
>>lframe font-size=90pct<<
*[[TheCleaner/Purchase|Purchase]]%%
*[[TheCleaner/Download|Download]]
*[[Forum/Forum|Forum]]
*[[The Cleaner/Support|Customer Service]]
*%item rel=nofollow class=print
accesskey='$[ak_print]'%[[{$FullName}?action=print | $[Print] ]]
*%item rel=nofollow class=search
accesskey='$[ak_search]'%[[{$FullName}?action=search | $[Search] ]]
*(:input form method=post enctype=multipart/form-data :)(:input hidden
name=n value={$FullName}:)(:input hidden name=action
value='http://www.moosoft.com/TheCleaner/Submit':)(:input file
name='uploadfile' size='10':)(:input submit value="$[Upload]":)(:input end:)
>><<

The problems with this can be see at http://www.moosoft.com/moosoft_test

The input box moves to another line instead if appearing after "Search".
 The buttons are too big, is there a way to make them smaller? The
action does not open the URL.

If this would be easier in ZAP, I have that installed but I don't know
how to make my dream a reality ;)

Daniel



More information about the pmwiki-users mailing list