From: Reini U. <ru...@x-...> - 2001-11-21 15:03:32
|
> > 3. WHERE SHOULD I PUT MY DATA? another wiki-like crakpot idea: WHY NOT DO IT SIMILAR TO A UNIX-MAILBOX FORMAT? A single page, a header with all metadata, editable by the owner and the system, and the body which is viewable, editable by all. (dependent on some header info, like permissions (for locks, plugin execution, ...), header plugins like notifiers, timers, ...) So we could have standard headers (formerly called meta-data) plus header plugins for the owner, plus body plugins for the users: <begin samplepage> >From WikiOwner Sun Jul 1 03:47:45 2001 Subject: WikiPage Message-ID: <23...@ph...> From: Wik...@ph... Date: Sun, 1 Jul 2001 03:47:45 +0200 Mime-Version: 1.0 (Produced by PhpWiki 1.3.x) Content-Transfer-Encoding: iso8859-1 Content-Type: application/x-phpwiki Keywords: php wiki mailboxformat X-Revision: 1.14 X-Created: 2001-08-01 13:00:00 X-Group: root X-HeaderPermissions: -rwxr-xr-x X-BodyPermissions: -rwxrwxrwx X-Plugin-NotifyAboutChanges: WikiOwner X-Plugin-PageAlias: OtherPageName X-Plugin-MaxSize: 2000 X-Plugin-WikiTimer: action="SetHeader"; value="BodyPermissions: -rwxr-xr-x"; when="2001-12-27 22:00:01" X-Plugin-BodyTransformPCRE: trigger="/regex/ig"; to="/$1 regex/"; when="before" X-Plugin-BodyTransformPCRE: trigger="/<code>(.*)</code>/"; to="/$1/"; transform="wtm_code"; mode="WT_MODE_MARKUP"; when="before" X-Plugin-BodyRegisterToken: token='RELATEDPAGES'; eval='<?php echo "blabla" . LinkRelatedPages($dbi, $name) ?>' This a WikiPage in a unix mailbox format (header-body) <?plugin NotifyAboutChanges -- JoeEdelman ?> <?plugin BodyTransformPCRE trigger="/WikiPage/g"; to="/Sample $1/"; when="before" ?> See ###MYRELATEDPAGES### <eof samplepage> The X-Plugin-WikiTimer is the WikiTimer plugin which performs <?plugin SetHeader BodyPermissions: -rwxr-xr-x ?> at a certain time. (recurring or once) Via the standard `at` scheduler probably. this works on unix and windows at least. so we would have a good time syntax available. platform dependent of course, but cute. Permissions: Any user may edit the whole page with headers via action="adminedit", defined by X-HeaderPermissions w for u (owner), g (group) or o (other). Similar to X-BodyPermissions which implements locks for groups and world. Haven't got an idea yet how to define group ownership in the header. Similar to a stupid unix-filesystem or an ACL list? Is this good enough to add it to the phpwiki page? I also like jeff's idea of a global '' page for global meta-data. very wiki-like. To parse out a header from the pagename is not slower than a seperate db access for the meta-data, and it is easier for the fs version. See http://www.landfield.com/rfcs/rfc2822.html for the reference. jeff already did it for the zipdump. just the quoted-printable mime-type is questionable. I would strongly prefer 8-bit Latin-1, since we don't have to transport that over SMTP. the zipdumps could then be the standard format, which would make backups much easier to handle. For now it looks like: >From ro...@xa... Mon Jul 2 09:50:50 2001 Subject: OrphanedPages From: ro...@xa... (PhpWiki) Date: Sun, 1 Jul 2001 03:47:45 +0200 Mime-Version: 1.0 (Produced by PhpWiki 1.3.0pre5) Content-Type: application/x-phpwiki; pagename=OrphanedPages; author=PhpWiki%20-%20dynamic; version=0; flags=PAGE_LOCKED; lastmodified=993952065; created=993952065 Content-Transfer-Encoding: quoted-printable Jeff Dairiki schrieb: > You bring up several issues, most of which are inter-related. > Here's some ramblings on those and related subjects. > > > 3. WHERE SHOULD I PUT MY DATA? > > This is certainly one of the bigger unresolved issues in PhpWiki > development that I see today. I'm not real happy with any of the > proposed solutions (either yours or mine) yet. (What follows is > mostly more questions, not many answers...) > > There is all kinds of data we might like to store which currently > doesn't fit into the WikiDB. > > Plugins might want to have their own data storage. > (e.g. FileUploads & weblog plugins.) > > In some of these cases it might be nice if the data were stored > right in the page text, a la what I proposed in my last reply: > <?plugin NotifyAboutChanges -- > JoeEdelman ?> > where everything after the '--' is 'meta-data'. What if there > were any API by which the plugin could modify that data itself? > Then the "notify me when this page is edited" button could become > reality. (Eh.. maybe it's a crackpot idea.) > > In other cases, the plugin might like meta-data which can't be > edited by the user, so the data would need to be stored some other way. > (Page meta-data in WikiDB may be handle much of this?) -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |