[pmwiki-users] Attachlist and nice uploading
marc
gmane at auxbuss.com
Wed Jan 17 06:52:42 CST 2007
Kathryn Andersen said...
> One of my users has requested something that I know can't be done
> in standard PmWiki, and I don't think there are any (working non-alpha)
> plugins that can do this.
>
> A) Add a form to a normal wiki page, where they can type in the name of
> a file, click on a button, and directly upload a file, without having to
> go to another form on another page.
If there isn't a recipe already, this wouldn't be hard to do. I presume
that you want to retain PmWiki's usual upload locations.
action=postupload calls HandlePostUpload() - everything is in
conveniently in upload.php. So you need to mould these into shape.
I quickly tried the markup
(:input form "" post:)
(:input hidden action value=postupload:)
|| File to upload:||(:input file uploadfile :) ||
|| Name attachment as:||(:input text upname value='':)(:input submit
value=Upload :) ||
(:input end :)
which is close but no cigar :-( Note that it returns you to the
action=upload 'page', which might not be what you require, but indicates
a few things worth considering.
> B) the ability (with an enhanced attachlist?) to list all uploaded
> files that match a given pattern.
Something similar came up last week. The (:attachlist:) format is hard
coded in FmtUploadList() in upload.php. It would be good if this could
be configured in config.php. (The actionlog recipe does this nicely.)
It's easy to duplicate (:attachlist:) as say, (:attachlist2:) by copying
Markup('attachlist', 'directives'
and
function FmtUploadList($pagename, $args)
I suspect that quite a few of us to do this ;-)
> C) some way in the form in (A) to enforce that the destination file
> names start or end with a particular string. For example, to have
> the destination file start with "FooErrorLogs" and them just typing in
> to the form field "2007-01.txt" so that the final name would be
> "FooErrorLogs2007-01.txt".
Given (A) then (C) is simple.
--
Cheers,
Marc
More information about the pmwiki-users
mailing list