Forum OpenACS Q&A: OpenACS Wiki

Collapse
Posted by Jade Rubick on
I have started to do a little work on Hafeez Bana's Wiki code (ported to OpenACS 4 by Jamie Rasmussen).

Before I get too far into this, however, I wanted to make sure nobody else has done this.

It looks like it works pretty well, but I would need to add:

- access control via permissions

- change the data model to use objects.

- I need to look into the security aspects of it (I suspect it may be very insecure).

Basically, it was a quick port to OpenACS 4. It looks like it works well, however.

Has anybody else done this?

Collapse
2: Re: OpenACS Wiki (response to 1)
Posted by Don Baccus on
Roberto's mumbled about it ... but I don't think he's done any actual work.

Should content be in the content repository?  This would give automatic journalling of Wiki content, though given how people use Wiki's that could generate lots of revisions!  Still ... it seems journalling would be useful.

Collapse
3: Re: OpenACS Wiki (response to 1)
Posted by Dave Bauer on
There is an ETP based version also.

I have been working on it with code also by Hafeez Bana. I have been integrating the wikit formatting procs into it.

This should allow greater control over permissions and uses the CR for versioning.

Collapse
5: Re: OpenACS Wiki (response to 1)
Posted by Jade Rubick on
That's great, Dave. How far along is the ETP version?

It doesn't require any datamodel changes for ETP, does it?

Collapse
4: Re: OpenACS Wiki (response to 3)
Posted by Jeff Davis on
I always thought the whole point of a wiki was that is was
insecure.
http://c2.com/cgi/wiki?WikiErase
Collapse
7: Re: OpenACS Wiki (response to 1)
Posted by Jade Rubick on
Yes, the point is that it's insecure, but...

I see a lot more value in a Wiki that you can restrict to, say, registered users.

For example, on a corporate Intranet, make a Wiki that can only be edited by a department, but other people can look at.

Or for http://www.safe4all.org, we'll have a resource guide which is edited by volunteers.

I can also imagine it being good for collaborative documentation.

Since we keep all the versions, I think this is an improvement on the traditional Wiki. If you want a wide open Wiki, then just set permissions to be open to anyone.

Collapse
6: Re: OpenACS Wiki (response to 1)
Posted by Jeroen van Dongen on
I'm fairly new to OACS, and I was actually looking for an OACS wiki implementation. Not having found one, I was about to start one myself - both to actually get one and as a nice 'problem set' for getting the hang of OACS (a wiki is essentially a pretty simple thing - it's the OACS bit that takes it to an 'interesting' level of difficulty for me).

To remark on one of the other posts in this thread with respect to using the CR - I was thinking of this, but had indeed questions with respect to whether or not the CR is capable/meant to handle dozens of 'micro-versions' - which is indeed typical for a wiki. As CR seems to store each revision just as a full copy (correct ?) this would seem inefficient to me.

It's still a little unclear to me how you're supposed to get the actual content-body out of the CR once it is put in there - but perhaps it is possible to make a Wiki-contenttype that uses just two revisions in the CR for each topic:
- one that contains the 'live revision'
- one that contains an RCS version of the same thing (to put it simply: the *,v file)

When adding a new version, the ',v file'-version updated and  _replaced_ (not added). Then the new version is 'checked out' into the live revision.

That way you can have both 'micro revisions' without getting excessive amounts of revisions in the CR and as long as you define an API for dealing with Wiki-types (which you have to do anyway AFACT) it should not be a problem for others.

Only problem I see is that there is no such thing as an RCS-library around - there're just the command line tools, which will only work on files.

Anyway - I'd love to see some existing code - can someone point me to it?

Rgds,
Jeroen van Dongen

Collapse
8: Re: OpenACS Wiki (response to 2)
Posted by Roberto Mello on
Yes, I mumbled about it, and yes I haven't done any real work.

I thought about using wiki's efortless linking feature in my Cookbook application (on which I have done some real work, and yes, it uses the CR). But I'm having second thoughts.

I wanted recipe submitters to be able to easily link to other recipes by knowing just a "short name" (if you will) for the recipe, instead of having to memorize an id. But maybe that's not such a good idea.

To get my cookbook where I want it to be, I need to pick up and finish general-ratings too (anyone knows where that's gone?).

-Roberto

Collapse
9: Re: OpenACS Wiki (response to 6)
Posted by Jade Rubick on
Jeroen,

I'm not totally sure whether it is important to get into the complexities of RCS diffing the changes. Sure, it would be nice, but it seems to me that disk space is fairly cheap, and if you had some way of deleting revisions after a year or so, then it wouldn't be really that bad. It's just text after all.

I haven't used the CR before, so I'm not sure how difficult it is to use.

Are there any docs for the content repository? I didn't see any from the table of contents in the docs section of the website.

Collapse
10: Re: OpenACS Wiki (response to 1)
Posted by Don Baccus on
You could allow for configuration options like "keep the last N revisions" or "keep revisions <= N days old" or "keep forever", etc.

I think ETP-based is the right approach, BTW, and the ETP is already doing CR stuff (though harumph poorly in some regards)

Dave's got a test instance up apparently ...

Collapse
11: Re: OpenACS Wiki (response to 9)
Posted by Jeroen van Dongen on
Jade,
I guess you're right as you say there's no real need to bring in the complexities of RCS - it's just that I'm familiar with that approach as it is used in TWiki (twiki.org; one of the more advanced wiki implementation) and it works very well.

In my (standard 4.6) installation there're docs for CR as well as for ETP (took me a while to realize it meant Edit This Page :). See also https://openacs.org/doc/acs-content-repository/

Had also a quick peek in the ETP docs and that looks very usefull indeed.

BTW - Is the code Dave has somehow available?

Collapse
12: Re: OpenACS Wiki (response to 1)
Posted by Jun Yamog on
Hi Jade,

One page on that doc that got me going in CR is this

https://openacs.org/doc/acs-content-repository/object-model.html

Thanks to DanW for pointing me to it, after that I was able to understand pretty much how CR works.

Collapse
13: Re: OpenACS Wiki (response to 10)
Posted by Jade Rubick on
Arguments in favor of extending Dave's ETP Wiki:
  • Already uses CR. To extend the current Wiki code, I'd have to learn a lot about the CR the hard way.
  • I like that it doesn't take HTML code. Seems like security is handled better.
  • I could learn about ETP and CR in an easier way.

Arguments in favor of extending the current Wiki code:

  • Has automatic link generation (critical for Wikis). I would have to add this to ETP Wiki.
  • Path of least resistance -- it's much easier for me to fix and extend this code, because it involves what I already know how to do (adding in permissions and templates and so on).
  • Right now, I think the interface is better and easier to use than ETP.
  • ETP is going to be rewritten, so I don't have to worry about rewriting anything sitting on top of it.
Honestly, the second approach seems like less work. I'm open to arguments for doing it with ETP, though.

I also haven't looked at Dave's code yet, so maybe I'll change my mind after I do.

Collapse
14: Re: OpenACS Wiki (response to 1)
Posted by hafeez bana on
Hi all,

Here are the comments I sent to davb when I ported wiki to ETP.

Current issues.
* URLs of the with / are not supported in wiki.
* etp::get_pa - modification is not clean. See comments in file.
* the interface doesn't flow. Maybe its because I am used to the old system
* I have no idea what subtopics, extlinks and symlinks are.
* the wiki templates are very rudimentary.

Pluses
* ETP design is very good. I have never worked with the openacs 4.x series and a port this far in
is a testament to the design
* permissioning. I always had granular permissions in mind for wiki. Now they come built in!
* versioning and content management - again very nice design of etp and the content system. So much code got delegated from the actual wiki app.

Personally it is VERY tempting to write things from scratch. (maybe its a psychological thing) and I do it quite frequently.

However with ETP Wiki I put my desire for a complete re-write on hold and was shocked by the time it took to port. The fundamentals of ETP are quite sound. I would not recomend another port. Especially since davb is handling the issues.

Some interesting things would be:

1) Wiki Input Widget - can be used in various parts of the site e.g bboard input, wiki syntax is way easier to learn, way easier to type and way easier to read even in raw wiki form.  I designed the original wiki to encourage better documentation at my previous office. I was pleasantly surprised.

2) Diffs rather then complete documents for various revisions - Both the original wiki and current ETP wiki store complete document revisions. They also display complete document revisions. It is HARD to tell what has changed, especially for large documents. There are two possibilities.

a) Store diffs in the cr.
b) DISPLAY diffs when browsing revisions. This allows the use of command line tools (maybe there is a tcl api for generating diffs).

I would go with b) - easier to integrate with existing tools, and doesnt bastardize the CR model.

3)Support for images and multimedia content - currently etp handles images by allowing you to place a link to an image. Upload of the image is your concern. A better design would step you through and collect this information for upload.

Regards,
Hafeez

Collapse
15: Re: OpenACS Wiki (response to 1)
Posted by Don Baccus on
Yes, I think option b - diff on output - is the way to go.

Glad you found ETP and the content repository easy to work with :)

Collapse
16: Re: OpenACS Wiki (response to 1)
Posted by Jade Rubick on
Jeroen asked this in another thread: "I wouldn't mind working on wiki (currently playing with dave's code) - on the wiki topic, what is is your [Jade] opinion? I saw in the wiki-thread that you were in doubt whether to adopt Dave's code or the extend some other wiki package?"

It seems to me that everyone who understand the toolkit better than I do recommends doing it with Dave's code (on ETP). I think it would be easier, however, to just go with Jamie's adapation of Hafeez's code.

I'm not sure how much work it will be to get Dave's code working like a Wiki should, but it may be pretty simple. He's already done most of the work. It does need automatic link generation, and work on the interface. Probably the biggest advantage to working on Dave's code is that he'll probably help you or I out with questions. 😊

I'm putting this on hold for a little while. I still need a Wiki pretty soon, but I may not be able to work on it for a week or two.

Collapse
17: Re: OpenACS Wiki (response to 1)
Posted by David Kuczek on
Hey Dave,

how can I use the Wiki formating procs?

Collapse
18: Re: OpenACS Wiki (response to 1)
Posted by Dave Bauer on
David,

Its half finished. The formatting works, but the linking to other pages using wiki-names does not. There is a way to register a callback tcl proc to generate the links and I haven't figured out how to make it work. Otherwise it is just the plain old tcl wiki code.

I can send you a copy if you would like.