Cookbook /
UpForm
Summary: Allow use of a Site.UploadForm page to format the upload form
Version: 2010-06-20
Prerequisites: pmwiki 2.2.17
Status: alpha
Maintainer: Peter Bowers
Categories: Uploads
Questions answered by this recipe
- How can I change the way the uploads form displays? I need a different header, footer, look, etc...
Description
Use a page (Site.UploadForm) to format the uploads form.
Installation
- Download upform.phpΔ and place it in the cookbook directory
- Include the following in your config.php:
if ($action == 'upload') include_once("$FarmD/cookbook/upform.php");
Assuming you want to use a given page as your upload form, create Site.UploadForm, probably using some variation of the following:
(:div id='wikiupload':) !! $[Attachments for] {$FullName}%h2% !!!$UploadResult %h3% (:input form action='{$PageUrl}' 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 attachment as:]||(:input text name=upname value="$UploadName":) (:input submit value=' $[Upload] ':) || (:include $[{$SiteGroup}/UploadQuickReference]:)
This form (as it appears above) is pretty identical to the standard form used in pmwiki uploads. Modify as needed...
Notes
If for some reason you need the page to be different you can set the variable $UpformPage
(default is Site.UploadForm
)
Release notes
- 2010-06-20 Initial release.
See also
Contributors
Comments
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.