[pmwiki-users] PmWiki namespaces

Petko Yotov 5ko at 5ko.fr
Sun Aug 30 16:56:56 CDT 2009

On Saturday 29 August 2009 14:25:29 Eemeli Aro wrote:
> Note also that I'm not asking whether namespaces *should* exist; their
> non-existance is a problem for me that I intend to solve. 

Namespaces do exist in PmWiki, only we call them WikiGroups. :-)

> I'm working on a new way of handling attachments in PmWiki that would
> make file meta information (filesize, mime type, copyright, etc.)
> accessible and to some extent editable from within PmWiki (with eg.
> {Attach:Site./pmwiki-powered.png$MimeType}).
> adding a custom PageStore for attachments

A while ago I was asking myself the same questions (great minds think alike). 
I didn't imagine a custom PageStore for attachments, but a dedicated 
wikigroup, or even more simply, a specially formatted *.RecentUploads page.

I was thinking, this could possibly be done in a special wikigroup, one page 
per file, with normal PageTextVariables containing the metadata (uploader, 
date, source, copyright, mime, filesize, pixels, seconds...). Then, use in a 
  {Attach:Site./pmwiki-powered.png$MimeType} would be equal to 
  {Attach.Site-pmwiki-powered-png$:MimeType} for a page in the Attach/ group

Or we can find another format, like
  [pmwiki-powered.png$MimeType] or a markup expression,
  {(attach Site./pmwiki-powered.png MimeType)}

A custom PageStore could have some advantages, like storing the metadata in 
page attributes.

Unfortunately, the logging/tagging will only work for files uploaded via 
PmWiki, not for those transferred via FTP/SSH. But we could have automatic 
attach-lists identifying those files which lack metadata.

> How should namespaces be identified? With Sisterly I use a prefix
> "WikiName:" that matches Attach: and Intermap links, as well as how at
> least MediaWiki handles namespaces, but is there a better way?

Namespaces in MediaWiki are a dozen pre-defined prefixes which are excluded 
from the default search. Category: is very much like ours, User: is like our 
Profiles, MediaWiki: contains interface translations like our XLPages, File: 
contains information about the uploaded files (one upload directory for the 
whole wiki). Also, in MediaWiki, always the full [[Namespace:Page_name]] link 
should be written, even if the current page is in the same namespace.

I see no advantages of MediaWiki namespaces over PmWiki WikiGroups. Except, as 
mentioned above, for the uploads -- for tracking who uploaded what and when.


More information about the pmwiki-users mailing list