[pmwiki-users] Attach: Syntax and the Default Upload Quick Reference
H. Fox
haganfox at users.sourceforge.net
Thu Feb 2 19:23:27 CST 2006
On 2/2/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Thu, Feb 02, 2006 at 03:32:48PM -0700, H. Fox wrote:
> > On 2/1/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > On Sun, Jan 29, 2006 at 03:35:27PM -0700, H. Fox wrote:
> > > > That's a good point. What's needed appears to be
> > > >
> > > > (:if <$UploadPrefixFmt is ''>:)
> > > > One instruction (site-wide).
> > > > (:if <$UploadPrefixFmt is ''/$Group'>:)
> > > > Another instruction (by group).
> > > > (:if <$UploadPrefixFmt is ''/$FullName'>:)
> > > > Yet another instruction (by page).
> > > > (:if:)
> > >
> > > 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.
> >
> > It's possible, however the reference wouldn't be optimally helpful
> > using the "least common denominator", would it? I think accurate
> > Attach: syntax is important information to have there.
>
> The only syntax that differs from one configuration to the next
> is the Attach:file.ext syntax -- the others keep the same
> interpretation regardless of configuration.
Yes.
> Attach:Group.Name/file.ext -- file.ext as seen by Group.Name
> Attach:Name/file.ext -- file.ext as seen by either
> {$Group}.Name (if it exists)
> or Name.Name
>
> If attachments are site-wide, then the syntax really
> doesn't matter, since all attachments are available to all pages
> and all three forms point to the same attachment.
Yes, but you only need to know Attach:file.ext
In that case, that's all the QuickReference page needs to show.
Showing the unnecessary choices is decidedly author-unfriendly IMHO.
> If attachments are per-page, then saying "Attach:file.ext refers
> to file.ext associated with the current page" is sufficient.
Yes. Along with the other two.
> If attachments are per-group (PmWiki's default), I think it's still
> okay to talk about attachments being associated with the "current
> page", even though those attachments may be shared with other
> pages in the current group. But I can see both sides of the issue
> for this one.
>
> At the end, I'm not sure that it's important at the quick-reference
> level to get into a bunch of details about how the attachments
> are internally organized--that's really an issue for the admin.
Those details should be left out. I didn't mean to imply that they
should be included.
What's needed is the answer to:
"How do I create a link to this file in a wiki page?"
> Essentially an author just needs to know
>
> Attach:file.ext
> -- link to an attachment
> Attach:Name/file.ext
> Attach:Group.Name/file.ext
> -- link to an attachment from another group or page
>
> (Once we make the switch so that Name/file.ext tends to associate
> with another group instead of a page in the current group, I think
> 95% of the confusion that has existed will disappear.)
Probably so.
I may be getting confused...
I still think the answer to the above question would change when
$UploadPrefixFmt changes. To be specific, they might look like
By-site:
Refer to an attached file with
Attach:filename.ext
See also the Uploads documentation.
By-group:
Refer to an attached file in this WikiGroup ($Group) with
Attach:filename.ext
Refer to an attached file in a different WikiGroup with
Attach:GroupName.PageName/filename.ext
(The named page in doesn't need to exist in the other group.)
See also the Uploads documentation.
By-page:
Refer to a file attached to this page with
Attach:filename.ext
Refer to a file attached to another page in this WikiGroup ($Group) with
Attach:PageName/filename.ext
Refer to a file attached to a page in a different WikiGroup with
Attach:GroupName.PageName/filename.ext
See also the Uploads documentation.
Hagan
More information about the pmwiki-users
mailing list