From: Lawrence A. <la...@us...> - 2002-10-14 21:14:58
|
Anyone (Jeff?) Is it possible to create a plugin-form which has an input box of type=3D"= file"? WikiPlugin.php line 203: $i->setAttr('type', 'text'); =20 looks promising, but its too late in the day for me to figure out how to = make=20 use of it. Help, anyone? Lawrence |
From: Jeff D. <da...@da...> - 2002-10-14 22:35:24
|
> Is it possible to create a plugin-form which has an input box of > type="file"? In spite of the dregs of code in WikiPlugin::makeForm which would hint otherwise, I don't think you can do it (without code changes). (The remnant code seems to be completely my fault, but at this point, I have no recollection of why it's there...) I'm not sure exactly about what kind of user interface you're thinking of, but I'm thinking it would be best if the FileUpload plugin produced the file upload form itself. (Rather than using <?plugin-form?> which really is supposed to produce a "link" to a plugin...) Sorry for the confusion... Jeff |
From: Joby W. <joby@u.washington.edu> - 2002-10-14 22:59:00
|
Jeff Dairiki wrote: >>Is it possible to create a plugin-form which has an input box of >>type="file"? > > > In spite of the dregs of code in WikiPlugin::makeForm which would hint > otherwise, I don't think you can do it (without code changes). (The > remnant code seems to be completely my fault, but at this point, I have > no recollection of why it's there...) > > I'm not sure exactly about what kind of user interface you're thinking of, > but I'm thinking it would be best if the FileUpload plugin produced the > file upload form itself. (Rather than using <?plugin-form?> which really > is supposed to produce a "link" to a plugin...) > > Sorry for the confusion... > Jeff > I concur. For my wiki I expanded WikiPlugin to be able to generate a textbox and/or a select box. It is not too hard to do... jbw |
From: Lawrence A. <la...@us...> - 2002-10-14 22:45:10
|
On Monday 14 Oct 2002 11:35 pm, Jeff Dairiki wrote: > > Is it possible to create a plugin-form which has an input box of > > type=3D"file"? > > In spite of the dregs of code in WikiPlugin::makeForm which would hint > otherwise, I don't think you can do it (without code changes). (The > remnant code seems to be completely my fault, but at this point, I have > no recollection of why it's there...) > Aha. I wondered if I was missing something. > I'm not sure exactly about what kind of user interface you're thinking = of, > but I'm thinking it would be best if the FileUpload plugin produced the > file upload form itself. =20 Last night, I had coded this. Then I decided I really ought to use the=20 plugin-form api since it was there. Good job I only commented out my ear= lier=20 code, rather than deleting it then! What I had in mind was: data posted to plugin : plugin uploads file plugin called as form (eg with ?show=3Dform or something like that): plu= gin=20 shows form, allowing file to be chosen for upload plugin called in any other way: plugin displays list of attachments on t= his=20 (or another specified) page. Lawrence |
From: Jeff D. <da...@da...> - 2002-10-14 22:54:08
|
> What I had in mind was: > > data posted to plugin : plugin uploads file > plugin called as form (eg with ?show=form or something like that): > plugin shows form, allowing file to be chosen for upload > plugin called in any other way: plugin displays list of attachments on > this (or another specified) page. How about: Normal invocation: plugin lists attachments, and also includes form to upload a new attachment (as well as delete current attachments...). |
From: Lawrence A. <la...@us...> - 2002-10-14 23:02:55
|
On Monday 14 Oct 2002 11:54 pm, Jeff Dairiki wrote: > > What I had in mind was: > > > > data posted to plugin : plugin uploads file > > plugin called as form (eg with ?show=3Dform or something like that): > > plugin shows form, allowing file to be chosen for upload > > plugin called in any other way: plugin displays list of attachments = on > > this (or another specified) page. > > How about: > > Normal invocation: plugin lists attachments, and also includes form > to upload a new attachment (as well as delete current attachments...). Hmmm... It would be good to be able to have a list of attachments withou= t a=20 form at the end. Perhaps we could have an option which supresses the for= m. As for deletion, my current intention is to keep all old revisions of a f= ile. =20 I guess "deleted" files could be hidden by default. I'll have to think a= bit=20 more, but too tired now ... (midnight). Off to bed. Lawrence |