From: Steve W. <sw...@pa...> - 2001-09-18 16:44:00
|
On Tue, 18 Sep 2001, Jeff Dairiki wrote: > > In this case it might be better to just go ahead and create a user table, > > since we will have one anyhow, no matter what. User auth is coming and > > storing users and pages in the same table will cause problems. > > That is the kind of answer I was looking for, but how, exactly, is it > going to cause problems? Oh, just that I imagine later on we will want (or admins will want) more flexible, accessible access to user info. If you want to generate a list of all users who accessed the wiki in the last ten days, how would you write a SQL query to do that if all the user info is in page metadata? Just an example. > To clarify, again, my proposal: > In the new API, arbitrary key/value meta-data can be attached to any > page. > > The way you (the PHP programmer) does this is via an interface like: > $page = $dbi->getPage('JeffDairiki'); > $page->set('is_homepage', 1); > $page->set('password', 'gobbledygook'); > > .... > if ($page->get('is_homepage')) { > $passwd = $page->get('password'); > ... > } > I like this idea... having hashes for whatever one might want is always useful! > I'm also, of course, trying to avoid implementing yet another database > interface (with mechanisms for backing up and restoring, etc...) quite understandable... > I suppose my diff code could still use a little cleaning up --- and > could > certainly use docs --- but it's basically ready to go. Cool. > On the subject: I want to add the ability to generate word-level diffs, > a la emacs' ediff mode. This would be particularly useful for wikis, > where a "line" can be a whole paragraph --- if only one word has been > changed, often it's very hard to spot. I think this is a fairly > straightforward enhancement: compute the diff normally (by lines), then > foreach block of changed lines, split the blocks into words and compute > a diff by words. And I'd still like to redo the diff output to look like sdiff, or what you get from cvsweb.cgi... very readable... ~swain --- http://www.panix.com/~swain/ "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." -- Frank Zappa http://pgp.document_type.org:11371/pks/lookup?op=get&search=0xF7323BAC |