[pmwiki-users] Attach: Syntax and the Default Upload Quick Reference

H. Fox haganfox at users.sourceforge.net
Fri Feb 3 13:19:49 CST 2006


On 2/2/06, Neil Herber <nospam at eton.ca> wrote:
> At 2006-02-02  06:23 PM -0700, H. Fox is rumored to have said:
> >I still think the answer to the above question would change when
> >$UploadPrefixFmt changes. To be specific, they might look like
> >
[...even more snipped...]]
>
> Much snipped above.

See also http://www.pmwiki.org/wiki/Test/UploadsQuickReference

That page reflects my belief that there's no way around this:  What
authors need to know changes when $UploadPrefixFmt changes.  The
complexity is Just There.

> I am not sure that this is less confusing than the current state of
> affairs. ;-)

The current state of affairs is for the UploadQuickReference to
explain things that are painfully obvious.   Examples...

  3. Press "Upload" to upload the file.

and

  * Scroll down to view the list of files that have been uploaded...

That page would have been a decent first draft, but upon reflection it
provides information authors don't need.

More importantly, it *doesn't* provide information authors *are*
likely to need, that being the Attach: syntax.

It can be taken one step further by having the syntax ready for
copying-and-pasting.  Try this:

Add to upload.php

  if (@$_REQUEST['upname']) $FmtPV['$UploadScratchName'] =
      "'".htmlspecialchars($_REQUEST['upname'], ENT_QUOTES)."'";
  if (@$_REQUEST['uprname']) $FmtPV['$UploadScratchName'] =
      "'".htmlspecialchars($_REQUEST['uprname'], ENT_QUOTES)."'"; }

Add to the UploadQuickReference page:

    Scratch area: (:input text null "Attach:{$UploadScratchName}" size=30:)

With this, you can click on the delta and see in a text area:

    Attach:The_Author's_Selected_Image.jpg

How copy-and-paste friendly is that?. :-)  Not sure what to do about
spaces in filenames...

> I found the existing instructions on the upload page to be inadequate
> for my users. [...]
>
> To get around these shortcomings, I created an attachment list area
> at the bottom of all pages likely to attract attachments.

Your scheme does sound effective for your purposes.

> This is probably not a useable approach for most people, but it
> suggests to me that "tuning" the upload message might be best left as
> a local config item.

Shouldn't the default be as helpful as possible?

At minimum the hard-coding of the font, colors, etc. should be fixed.

Hagan




More information about the pmwiki-users mailing list