[pmwiki-users] PData support for pagelisting images
pmwiki at ben-amotz.com
Thu Sep 7 16:44:43 CDT 2006
Patrick R. Michaud <pmichaud <at> pobox.com> writes:
> On Thu, Sep 07, 2006 at 05:52:54PM +0000, Pico wrote:
> > I haven't tested this, but does specifying a page name in an attach directive
> > work when uploads only uses group subdirectories (without additional page
> > subdirectories). For example, if uploads directory structure is:
> > /uploads
> > /PmWiki
> > /Test
> > somepic.jpg
> > Will "Attach:Test.SomePage/somepic.jpg" work, or would the link have to be
> > reduced to "Attach:Test/somepic.jpg"?
> Short answer: Attach:Test.SomePage/somepic.jpg will still work.
> Long answer:
> Attachments are always attached to *pages*, never to groups. The link
> Attach:Test/somepic.jpg does not mean "somepic.jpg in the Test group", it
> means "somepic.jpg" as attached to [[Test]]. If attachments are organized
> per-group, and there's a page in the current group named Test, or if there's
> no Test.Test or Test.HomePage, then "Attach:Test/somepic.jpg" will be
> somepic.jpg in the current group, not the Test group.
> With Attach: it's always best to use a full pagename if wanting to refer to
> the attachments of other pages.
So, does that have any significance for how we could (some day) deal with
"orphaned" attachments. If attachments are always "attached to pages," does
that mean that PmWiki already has some of the basic "plumbing" in place to use
certain changes to pages to trigger corresponding changes to attachments (that
is, to the files identified as attachments, e.g. somepic.jpg)? Initially I am
thinking about deletions and, specifically, using the deletion of a page to
trigger a "deletion" of the attachment (somepic.jpg). But I am also thinking
about some future unspecified archive function, where the archiving of a page
could trigger an "archive" of the corresponding attached file (somepic.jpg). In
either case, it is not (yet) clear what it would mean to "delete", let alone
"archive" an attachment, but my comments assume that we are talking about some
change to the underlying "attached" (somepic.jpg) file, whether by renaming,
relocating, or deletion.
Of course, it would also be necessary to test that the attachment at issue
(somepic.jpg) is not also attached to some other page that has not yet been
deleted or archived.
More information about the pmwiki-users