From: Jeff D. <da...@da...> - 2000-07-28 05:28:36
|
In message <Pin...@bo...>,Steve Wai nstead writes: > >Jeff, I'm adding things to PhpWikiBrainstorm and I'm wondering.. is it >easy to store the diffs instead of the whole pages? And would it be hard >to iterate through the diffs and reconstitute version 5 of a page that's >up to version 7? 10? 30? My guess is that you definitely don't want to apply 100 patches to go back 100 versions --- I'm sure that would take a while. Applying 10 patches is probably fine as long as they're reasonable size. Now that I've thought about it awhile I don't think you'd want to store exclusively diffs. I think small diffs should be stored as diffs. For bigger diffs (the storage gains are smaller compared the speed loss) and one might as well just store the whole page. Probably there should be some limit on the diff chain length as well. >I know we want to store all versions of a page for safety reasons, and I'm >wrangling with what the user interface should look like. I'm a bit embarrassed to admit it but I've continued hacking here off and on for the past week, and have gotten PhpWiki to a totally unrecognizable state. Now, in my home version I've: Redone the database interface comepletely. I've added support for multiple archived versions. The links table (MySQL) is now used for proper and quick backlinks searches. Of course it's object oriented. The schema are all changed. MySQL and DBM backends are both working. Then I started worrying about the user interface too. (What I've done so far is add a history page --- much like the info page, but more compact --- which lists versions, dates, authors, and has links to views and diffs of each version.) Writing all these pages and links was giving me template headaches so I started working on a new template scheme. First I tried PHPlib's templates --- which I think have some good ideas --- but wasn't happy. I'm pretty happy with what I've got now. Almost all of the HTML and I think all of the output text is in the templates now. The templates support conditional chunks of output and loops. So I'm not sure any of the original (meaning 1.1.7!) code remains in my version. As I said, I'm a bit embarrassed. I certainly don't want to take over your project. However, you're more than welcome to my code. Let me know your level of interest. I can either check it into the CVS, either in the jeffs_hacks branch, or some other new branch. Or I get a tar file to you. Note that tables are in the jeffs_hacks-branch of the CVS already. The syntax (copied from some Wiki --- I can't remember which at the moment is || column 1 text || column 2 text || column 3 text |{ left aligned text || centered text |} right aligned text Jeff Another interesting idea I've put into my home hacks is to do away with the admin page. Instead one can browse the Wiki in admin mode (through admin.php3 instead of index.php3). It's identical to normal mode, except there is a button on each page to lock/unlock it, (and you can edit locked pages). The admin page is replaced by a regular Wiki page. There are special tokens like %%WikiZip%% (analagous to %%Search%%) which produce a button which will get you a zip archive. (There's a %%Login%% button which will switch you to browsing through admin.php3, or you could do it by just manually entering the url.) |