Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

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
Users: +1 (View / Edit)
Categories: Uploads

Questions answered by this recipe

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

  • 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

  1. Download upform.phpΔ and place it in the cookbook directory
  2. 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

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

  • 2010-06-20 Initial release.

See also

Contributors

Comments

This space is for User-contributed commentary and notes. Please include your name and a date (eg 2007-05-19) along with your comment. Optional alternative: create a new page with a name like "ThisRecipe-Talk" (e.g. PmCalendar-Talk).

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.

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:42 AM