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

H. Fox haganfox at users.sourceforge.net
Fri Feb 3 15:19:06 CST 2006


On 2/3/06, Neil Herber <nospam at eton.ca> wrote:
> I did read the test page, but am not sure what the intent is.

Heaping helpings of author friendliness.  :-)

> To have
> the upload quick ref change based on scheme, I think.

I still think that's best.  When I suggested it, Pm wrote

  "I think that's too complex for what we're trying to solve.
  I'd prefer instructions that make sense regardless of the
  configuration, if that's at all possible."

So I've been pursuing that.  Unfortunately it's looking not-very-possible.

IMHO the complexity doesn't originate in the UploadQuickReference
page.  It's because attachments might be by-site, by-group, or
by-page.  That's not avoidable, nor maskable by trying to use a single
generic set of instructions.  The optimal advice does in fact change
when you change $UploadPrefixFmt.

>  I also don't
> understand the purpose of the "scratch area".

Very simple.  If you click on the delta in

   MyDog.jpg Δ

you see

  Attach:MyDog.jpg

in the scratch area, which you can copy and paste into your wiki page.

> Maybe I'm dense, but it strikes me that the place to have the
> instructions for the Attach: markup is on the Edit page, not at the
> bottom of the page where the user is doing the uploading. My (blurry)
> vision of the authoring process is:
>
> 1) Author starts to edit a page.
> 2) Author decides to include a nice sample file.
> 3) Author reads "Attach:" instructions *in the edit quick ref* at the
> bottom of the page or just clicks on the attachment GUI button.

How about
3b) Author (somehow) selects an attached file from a drop-down list. 
(Use AJAX?)

> 4) Author enters "Attach:mysample.txt"
> 5) Upon saving the page, the author sees the link with "delta" and clicks it
> 6) Author is presented with the upload form in all its glaringly obvious glory.

Here's what I've proposed:

1) Author starts to edit a page.
2) Author decides to link an existing or yet-to-be-uploaded file.
3) Author clicks the Attach wikiaction link, opening the
?action=upload page in a new window.[1]
4a) Author uploads the file, or
4b) Author clicks on the Δ next to the file name.
5) Copy to clipboard.
6) Return to edit page, paste from clipboard, and keep on editing.

The author never needs to type Attach:mysample.txt.

[1] The Light Skin automatically opens the ?action=upload page in a
new window if (and only if) you're editing.  It's done with

   if ($action == 'edit') {
     $UpNewWin = "target='_blank'";
   } else { $UpNewWin = ''; }

in the skin.php file.

> Now the question that arises is: "What about using an existing attachment?"

See above.  (Go to Attachments page, click Δ, copy to clipboard, edit...)

> Then what is needed is an (:attachlist:) display at the bottom of the
> edit page that shows them the names of the files they can attach.

I think the purposes of the ?action=upload page and edit page should
be kept separate rather than overloading the edit page.  We may need
to "agree to disagree" on that.

> But what if this is a per-page-attachment wiki and I am on a different page?
>
> If this an infrequent occurrence, then have a page that explains how
> to do it on this wiki.

It's there on the UploadQuickReference as
   "See also the Uploads documentation."
where "Uploads documentation" is a link to PmWiki.Uploads.

> If this a frequent occurrence, then consider changing to per-group-attachment.
>
> I am not suggesting that the upload quick ref can't be improved, I am
> saying that it has information that is displayed at the wrong point
> in the authoring sequence.

Fair enough.  Thanks for sharing your perspective on it.

Hagan


More information about the pmwiki-users mailing list