Forum OpenACS Development: new bboard package

Collapse
Posted by Ben Adida on
Hi all,

Okay, OpenForce is working on a new bboard package for dotLRN. We haven't begun the coding yet for this part. We have an aggressive schedule, but we'd like to share our immediate thoughts for rearchitecturing the system.

Functionality

We need at least similar functionality to what we had in v3 (sadly, some of it was lost in v4). This includes:
  • bboard forums either Q&A or threaded (and certainly a simple architecture for other presentation styles)
  • categorization of postings (optional system-wide, and optional per forum)
  • ability to restrict posting of new questions
  • ability to moderate
  • ability to manage existing threads (mostly for deapproving/ deleting threads).
  • emailing a post to a friend (nice new feature of v4)
  • editing your posts... although this should be optional per forum, as this is a hotly contested feature since it changes the historical trail of a thread.
  • incoming email submissions to bboard... another hotly contested feature, but certainly let's implement it as an optional thing.

Under the Hood

The biggest problem with the current v4 of bboard is the underlying architecture. We're proposing a far simpler, leaner, meaner architecture:
  • forums are objects scoped to packages
  • bboard postings are *not* objects, they're *not* CR items, they're *not* versioned. Thus, they're not permissioned individually, nor should they be. Only forums are permissioned.
  • use of sortkeys for message hierarchy
I'll stop there and see what people think :) I'll post more details as we spec them out, but these are the major lines of development. Nothing revolutionary except for the lean, mean, underlying bboard engine machine.
Collapse
Posted by Stephen . on
Here's some thoughts that come to mind if bboard messages are not acs_objects:
  • Will you still be recording creation_user, creation_ip, creation_date? And if you do provide a facility for editing, will there also be modifying_user, modified_date, modifying_ip? I'm thinking of situations of abuse, among other things, where spammers post to your bboard and you need to block IP's etc. (this is a large chuck of the data in acs_objects)
  • Will the feature that allows admins to get an overview of all objects created by e.g. a new user, have to special case for bboard postings?
  • How will the new categorisation/ratings package rate or categorise messages which have no object_id?
  • Will attachments be suported, and will you be able to take advantage of any code that supports attachments to general comments or tickets in a ticket tracker?
  • If a user edits a posting (assuming that feature is turned on), or a moderator makes some changes, will the original be lost because there is no versioning?
  • Will you be able to search the new bboard, and will it integrate with the site wide serach?
If the generic acs metadata system and services are too slow for bboards, then they will be too slow for calendar, too slow for tickets and too slow for cms. If that's the case then we have a serious problem.
Collapse
Posted by Barry Books on
In think if the posts are not objects you lose most (if not all) of the benifit of running OpenACS. The site I'm running has about 500,000 objects and growing. Right now I've got two performance problems cause by permission on objects.

1. Trying to get permissions on a large result set is a problem. I'm not sure this is completly a permission problem since putting plsql in any query returning a large (>100 rows) result set can be a problem. If a function takes 10 ms and you run it 100 times it adds up. I need to mess with the all_object_party_privilage_map and see how it works.

2. Updating the context_id on an object takes several seconds right now. I'm testing a fix for this right now.

I've found the object system to be invaluable on my project. It's great to be able to pass around a number and figure out what kind of object it is, what it's attributes are and what's related to it. The only problem is when you what to know who has access to it.

From what I've seen if there were no permission system the object model would have little impact on performance. With permission I started having problems around 250,000 objects. To be fair I've read the permssion system design goals and I think it's a spec problem more than an implementaion problem. The goal seems to have been return permission on a single object quickly and return a result set with permission checking at least as fast and the result set without permission checking. This means select * from acs_objects where permssion = 'read' will take a with if you have more than a few hundred objects.

I think two things need to be done.
1. Make the current permsission model as fast as possible.
2. Make the permission system optional on each object.

The first just requires fixing stuff as it shows up. The second I'm planing to implement by adding a check_perm flag to acs_objects and maintaining a table with object_id, context_id with a trigger. Then change the permsission views to use that table. Since I only need to permssion about 10% of my objects that's a big win. It would also help the bboard if you don't want permission checks on all posts.

Collapse
Posted by Don Baccus on
In think if the posts are not objects you lose most (if not all) of the benifit of running OpenACS
I couldn't say it better myself. This is a disastrous decision. Here we have someone working on a general ratings package, with bboard being the first target, and you're going to write a bboard with posts that will be invisible to it.

Why?

No permissions on posts, yes, makes sense.

Not having them in the CR ... and allowing editing ... Grrr. I don't see the CR, properly used, as being a problem. None of the performance problems I've seen with V4 bboard - including the one I didn't have time to solve - are CR-related. The current datamodel uses the CR and objects STUPIDLY, but that doesn't mean that making use of either is STUPID.

Why not just go back to ACS 3 if this is the approach you're going to take?

I don't see this making any sense at all. If something as basic as the bboard package can't use objects then we should just throw the entire toolkit into the trashcan.

Collapse
Posted by Don Baccus on
Trying to get permissions on a large result set is a problem. I'm not sure this is completly a permission problem since putting plsql in any query returning a large (>100 rows) result set can be a problem. If a function takes 10 ms and you run it 100 times it adds up. I need to mess with the all_object_party_privilage_map and see how it works.
As an aside ... yes, using the view is absolutely the right thing to do if you're working with a large resultset. Feedback as to how much that helps on your large object space would be very useful.

So far, every permissions performance problem that has raised its ugly head has been solvable (knock wood).

Collapse
Posted by Neophytos Demetriou on
Ben, not versioning bboard postings makes sense, but I think that postings should be objects. Don provided some reasoning for this but I would like to add that this is a requirement if we still want to have general solutions in OpenACS,  for example, the search package won't work out of the box with the new package if postings are not objects. As a final note I would beg you to consider implementing one forum per package. There was a relevant discussion about the bboard package exactly one year ago. Here's the link: https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0001aI&topic_id=OpenACS%204%2e0%20Design&topic=12
It would be great if a user could see threads that are "hot" (most
replied to) or have the most recent posts (whether they are initial
posts or replies) rather than just newest threads.

In other words a dimensional slider that slices index page
different ways.

Walter

Collapse
Posted by Ben Adida on
Quick reminder: none of this has been *decided* or *written* yet,
so there is no disaster. I wouldn't have started making a non-
object bboard without some serious discussions like this one.
The reason I was considering it is because the current bboard
massively abuses the object mechanisms. By proposing the
inverse extreme, I wanted to see what other developers thought.
And these are some darn good answers.

So, let's immediately correct one thing: postings will be objects.
Next question: should they be CR items? I lean towards no,
because I think versioning is overkill. Don and others: can you
give me more thoughts?

Thanks for this great feedback, and please keep it coming.

Collapse
Posted by Michael Feldstein on
Will the categorization feature be bboard-specific, or will it make
use of some sort of general-categories architecture? It can be
enormously useful in both eLearning and KM contexts to be able
to aggregate *all* content objects of a certain category (bboard
posts, FAQs, docs, etc.). If it's not outside of your scope, creating
some kind of a general mechanism for this piece would be the
right way to do it.

Also, somebody once told me that each post is assigned an
anchor tag in the 4.x bboard. It would be useful to have this
feature and to have it *accessible to the users.* Sometimes
(particularly in a long thread) you want to send somebody directly
to a specific post on the thread. The UI might be tricky on this, so
you may want to start by just including the anchor tags and then
thinking through how to make them acessible later.

Collapse
Posted by Stephen . on
Michael, an example of the anchor UI would be any Manilla/Radio Userland site, such as Scripting.com. Notice the little blue arrows beside the headings.
Collapse
Posted by David Geilhufe on
Ben asks if posts should be CR objects. Not being a coder I'll come at it from two user goals. First, posts (though more often threads) are valuable knowledge 'objects.' The opportunity to repurpose that content for display in other contexts within a site (articles, 1st drafts of documentation, etc.) suggests that making them content objects will enable some valuable innovation in the future.<br><br>
To me, the bigger problem is defining what the basic information architecture of an OACS application should be-- general principles that answer Ben's questions automatically. Then you look and see if those answers make sense in the context of the specific application (a bboard for .LRN for example). I'm not sure that there is a great handle on the IA side of things that would inform architecture and code. I would love to help to write this up in a way that is useful for application builders but am unsure of where to start.<br><br>
I
Collapse
Posted by Jun Yamog on
In my opinion each post must be an object but maybe it might not be a cr_item.  But then doesn't CR has some kind of a categorization?  Maybe putting each post in the CR might not be bad at all.  As stated above it would be great to get all items, post, files, faq, messages that is in a particular category.  Puting the posts and items on the CR would be one way of doing it.  Since cr_items already have a tree_sortkey why not make use of it?

Granted that each post is not in the CR will the attach files (bboard v.4 feature) be in the CR?  Or will the attach file reside somewhere else.

Now that I have heard of making a forum a package I think its a sound idea.

I think I have given more questions than opinions, maybe the real problem lies to the fact that each package uses the OpenACS core differently.  A design guide I think must be made on how to make packages.  Since aDers also suffered from this problem wherein each package has a unique way of dealing with things we are also suffering from this too.  Maybe creating a design guide maybe will help us in our decisions, when to use objects, when to use CR, etc.  What do you guys think?

Collapse
Posted by Ben Adida on
some more thoughts and clarifications:

- not sure I read this correctly in the comment above by Jun, but each forum is *not* a package. A forum is scoped to a package. I was basically refering to the fact that current bboard v4 is not completely correctly package-scoped (half-scoped stuff is about as annoying as can be), which makes multi-instantiation of bboard difficult.

- categorization: I see, in theory, the use of a central categorization scheme. Often, however, the categories only make sense inside a particular forum. For example, inside the OpenACS 4.x forum, we might have the categories "design", "backwards compatibility", "sample code", "documentation". These categories are pretty specific to OpenACS 4.x and wouldn't apply to say, photography if we also had a discussion forum about that. Michael - and others - maybe you've already thought about / solved this problem?

- anchor tags: great idea. And not that hard to implement at all.

- CR and versioning: there's one good point here - if we allow editing of posts, we *must* allow versioning, and actually, we should technically allow users to view old versions of posts (otherwise the stream of discussion might make no sense and make someone look like a fool for responding to an issue that is no longer there). How do people feel about this editing issue? It seems to bring up far more problems than it solves....

Collapse
Posted by Don Baccus on
Regarding the CR ... I'm not sure.  Yes, if editing is allowed then versioning seems necessary.  The CR also now has some Tcl API hooks that makes loading of content concise and easy at the client package end, and of course has the user-configurable filesystem vs. database option for large content.  So ... if image or similar attachments are allowed I think I'd argue for the CR just to avoid duplication of effort.
<p>
I think it is also reasonable to argue that in the future the CR should be able to support versionable and non-versionable content.  For instance I don't see any reason why image attachments to comments need to be versionable ...
<p>The reason why folks argue against the use of the CR and sometimes objects is because of the perceived pain, misery and potential scalablity issues associated with them.
<p>I think we really need to give serious thought to making the CR, in particular, feel less like an overkill solution ...
Collapse
Posted by Michael Feldstein on

categorization: I see, in theory, the use of a central categorization scheme. Often, however, the categories only make sense inside a particular forum. For example, inside the OpenACS 4.x forum, we might have the categories "design", "backwards compatibility", "sample code", "documentation". These categories are pretty specific to OpenACS 4.x and wouldn't apply to say, photography if we also had a discussion forum about that. Michael - and others - maybe you've already thought about / solved this problem?

It's absolutely true that categories can need to be local rather than global sometimes. So you'd need some sort of scoping mechanism in your categories system and really, you'd need to be able to scope not only specific categories but entire taxonomies to do it right. It seems to me that this conversation has come up before under the guise of keywords, but I couldn't fully follow the technical ins and outs so I may be mistaken.

FWIW, though, even the examples you gave above may be better scoped globally--not across bboard instances, but across packages. It would be nice, for example, to have a portlet that shows all bboard posts, file-storage docs, and wimpypoint presentations relevant to "backwards compatibility" (particularly if those items in the portlet could be filtered or ranked by their aggregate user rating).

CR and versioning: there's one good point here - if we allow editing of posts, we *must* allow versioning, and actually, we should technically allow users to view old versions of posts (otherwise the stream of discussion might make no sense and make someone look like a fool for responding to an issue that is no longer there). How do people feel about this editing issue? It seems to bring up far more problems than it solves....

I'd want editing. Despite the post confirmation screen after clicking the "submit" button, people still pull the trigger to soon sometimes. You can say "too bad, you had your chance" but I would hesitate to take that position unless the performance penalty you'd pay for it is pretty significant.

Collapse
Posted by Ben Adida on
- making CR less overkill: I agree completely. I was thinking that attachments to postings would definitely remain CR items, since there are fewer of them and they do greatly benefit from the file-storage vs. DB abstraction, but I was wondering about the text postings themselves....

- categories: so, getting to this global namespace requires building a taxonomy for your site, which is a big deal. I want to find a solution that doesn't impose too much on the user. Maybe a generic categorization scheme (as discussed in a different thread) that supports local or global taxonomies. That said, I obviously want to keep things simple for now, with an eye towards future enhancements.

- editing: the issue is not so much performance as it is usability: I don't know of many other bboard systems that allow editing. Not because it's hard, but because it completely breaks the flow of conversation. If you write a message on May 10th, and I respond on May 11th, and then you edit your message on May 12th, then whether you change the posting date to May 12th or leave it to May 10th, chances are my response makes no sense. However, if you simply allow someone to post a new correction on May 12th, then it all makes sense. That's the real issue, IMO.

Collapse
Posted by Michael Feldstein on

categories: so, getting to this global namespace requires building a taxonomy for your site, which is a big deal. I want to find a solution that doesn't impose too much on the user. Maybe a generic categorization scheme (as discussed in a different thread) that supports local or global taxonomies. That said, I obviously want to keep things simple for now, with an eye towards future enhancements.

I completely agree that setting categories in a single bboard should not require the creation of a site-wide taxonomy. However, it should allow integration with a site-wide taxonomy. From my limited understanding of service contracts, I'm thinking that you'd want to create a contract that enables a package (or package instance) to use a simple (i.e., instance-scoped) or complex (i.e, site-wide) category system. For the immediate purposes, you might want to just implement the local version for bboard as long as the plumbing is there to enable other hackers to do broader scoping when that itch is ready to be scratched.

- editing: the issue is not so much performance as it is usability: I don't know of many other bboard systems that allow editing. Not because it's hard, but because it completely breaks the flow of conversation. If you write a message on May 10th, and I respond on May 11th, and then you edit your message on May 12th, then whether you change the posting date to May 12th or leave it to May 10th, chances are my response makes no sense. However, if you simply allow someone to post a new correction on May 12th, then it all makes sense. That's the real issue, IMO.

I don't see usability as a huge issue as long as you allow readers to view previous versions, much the way you can view previous versions of a doc in file-storage. Alternatively (and somewhat more simply), you could only allow editing as long as the post being edited is the most recent one. You could make these admin configurable.

I admit that there's no perfect solution to the editing problem, but I'm not convinced that not providing editing capabilities is the best compromise.

Collapse
Posted by Yonatan Feldman on
i don't think users will want to dig into other pages to read older versions
of posts. it breaks the flow of reading the thread. i would much rather
someone post a correction a few messages down then having to navigate
a tree of messages and edited messages. i don't think it makes sense
from a user's point of view.
Collapse
Posted by Michael Feldstein on
OK, I'm beginning to be persuaded that editing may be too clunky
to be worthwhile (although I still like the idea of allowing editing
of the most recent post). What about the case where the
moderator feels compelled to excise certain elements of a post
but would prefer to leave as much of it up as possible (out of
deference to the person whose post is being edited)? Wouldn't it
be nice to be able to leave most of the post in with a note
explaining why a bit had to be removed? Or would you prefer that
the moderate delete the whole post? In this case, *not* allowing
the moderator to edit does more damage to the conversation
trail than allowing editing, since there's an all-or-nothing choice.
Collapse
Posted by Michael Feldstein on
A naive question:

Are versioning and the flexibility to store stuff in either the db or
the file system the only main benefits of using the CR in general,
or are there others as well?

Collapse
Posted by Jade Rubick on
On a moderated bboard, it might be nice to be able to edit posts
before approving them. That's what Yahoogroups do. However,
once the postings are made, then they are there for eternity.

Another argument against allowing someone to edit bboard
postings is the fact that there are email alerts on the postings.
Will you send out corrected postings? Or would you make the
corrected posting "stealthy"?

Collapse
Posted by Michael Feldstein on
OK, the email alert problem is the last straw for me. I change my
vote to "no editing of the post once it has been published to the
board."
Collapse
Posted by Don Baccus on
I think allowing admin editing - at least as an option - is desirable.  I'm basing this on my real-world experience co-moderating photo.net for a couple of years (talk about your basic thankless task).

But admin editing needn't drive versioning in the way user editing would.  If we disallow user editing, which seems to be the growing consensus, then we don't really need versioning.

If we had the more lightweight CR fantasized above I'd argue for sticking posts in the CR anyway, since the current Tcl API does simplify handling large objects and in Oracle unfortunately posts must be CLOBs.  But straight content one knows will always be text is easy enough to stuff into CLOBs directly so making non-versionable posts be non-CR objects is fine.  I'll just consider it an editorial comment on the current state of the CR ...

Collapse
Posted by Ben Adida on
Don: totally agreed. Admin editing is important and will be implemented. However, as you mention, that certainly shouldn't drive versioning. So it's a win-win: editing in extreme cases (like you misspelled your CEO's name or something), but no versioning necessary for those extreme cases.
Collapse
Posted by Andrew Grumet on
One nice thing the arsdigita.com bboard provided was an ex-post-facto plaintext/html toggle (assuming html posts are allowed).  This for the case where you built up a nice HTML post then forgot to mark it as such.
Collapse
Posted by Michael Feldstein on
Speaking of HTML vs. text, I'd love to be able to choose to receive
my bboard alerts as HTML.
Collapse
Posted by Matthew Burke on
Also alerts should come with a listing of topics at the top so you don't have to scroll through the whole email to see what's in there.

And, how about automatically closing open tags in posts?

Collapse
Posted by John Mileham on
And a protection for the far more evil variation... getting rid of closing tags that the user didn't open in their post to prevent spoofing other users and other dangerous breaches of trust. But this isn't as easy as it sounds unless we force users to post their HTML in XHTML-compliant form and parse it in nsxml for cleanliness (this has some pretty painful ramifications, including no use of the ampersand w/o using &amp; encoding and the necessity of closing LIs, something I'm not usually that careful about in bboard posts). Otherwise somebody will have to do a some clever regexps to cover pseudo-correct HTML that will work in browsers but isn't actually correct enough to be caught by a naive parser. I 'spose you could also use HTML Tidy to do that... that would probably be a major security win for all uploaded HTML (have the server tidy it before checking it and storing it). Maybe somebody is interested in writing an AOLServer module that ties into HTML Tidy?
Collapse
Posted by Don Baccus on
There is already the tag-closer, and its used fairly consistently in the toolkit (at least I made one swing through months ago looking for places it should be used).  But I don't think it addresses the close-tag with no open-tag issue John raises.  Someone should look ... I wasn't thinking of that when I last looked at the proc.  I think Lars wrote it?  If so he'll know off the top of his head.

At Greenpeace we've discussed hooking tidy and OACS together, but not for form verification (good idea, though).  We were actually thinking about running tidy against every page we serve in developer support mode.  I think having tidy available as an AOLserver module would be fantastic if ... it ... is ... threadsafe!

Collapse
Posted by Gilbert Wong on
Ben, I've implemented most of what you are talked about in your original thread.
Functionality We need at least similar functionality to what we had in v3 (sadly, some of it was lost in v4). This includes:
  1. bboard forums either Q&A or threaded (and certainly a simple architecture for other presentation styles)
  2. categorization of postings (optional system-wide, and optional per forum)
  3. ability to restrict posting of new questions
  4. ability to moderate
  5. ability to manage existing threads (mostly for deapproving/ deleting threads).
  6. emailing a post to a friend (nice new feature of v4) editing your posts... although this should be optional per forum, as this is a hotly contested feature since it changes the historical trail of a thread.
  7. incoming email submissions to bboard... another hotly contested feature, but certainly let's implement it as an optional thing.
  1. I implemented a flat (UBB/Vbulletin) style bboard and threaded bboard. The data is always stored using the OpenACS 4 sortkeys. If you are in a threaded view, you can respond to sub-threads at any point and the system will know how to organize your threads. If you are in a flat view, you will automatically respond to the first message in that thread, though I also have a way for you to respond to any message in the thread. The user can switch between flat and threaded views at any time by clicking on a link.
  2. I have a site wide categorization system for the modules I created for my client. It seems to work ok. You can create a hierarchial categorization system. For the forums, we only use the top level categories, but there is no reason why we can't use sub categories. All forums tied to the same category will be grouped together in the forum index page. I also have a mechanism for the administrators to reorder the sorting of the groups. For our news and articles sections, we allow the authors to choose the full category hierarchy. The plan is to allow users to be able to filter out content at any level of the hierarchy. Selecting a top level category will select all items in the sub-categories.
  3. We have a "Close Thread" option which we've used a few times already. It prevents people from posting to that thread. We also have private forums, which are hidden from users who are not members of that forum. Private forum messages also do not show up in the searches unless you have read permissions on that forum :)
  4. You can assign moderators to each forum and they can only control forums which they are moderators. Closing, editing and deleting threads is the main role of the moderator.
  5. Not implemented.
  6. We allow editing of posts. I have a trigger which automatically captures changes to the message and records it in an audit table. I haven't implemented the posting history yet, but that's on the list of things to do. I want to let moderators and other users have the ability to see changes made. After editing a post, the system reports the date when you edited it and who edited it. This is useful when moderators edit a users post.
  7. Not implemented but would be very useful!
Under The Hood The biggest problem with the current v4 of bboard is the underlying architecture. We're proposing a far simpler, leaner, meaner architecture:
  1. forums are objects scoped to packages
  2. bboard postings are *not* objects, they're *not* CR items, they're *not* versioned. Thus, they're not permissioned individually, nor should they be. Only forums are permissioned.
  3. use of sortkeys for message hierarchy
I'll stop there and see what people think :) I'll post more details as we spec them out, but these are the major lines of development. Nothing revolutionary except for the lean, mean, underlying bboard engine machine.
  1. We still do this. It's scoped to the forums package.
  2. Both forums and messages are objects, but we don't use the CR. We grant permissions on the forums, not on the messages.
  3. Yup, did that :)
My take on editing is that it should be allowed, but you should keep a history of the edits. Any site that runs vBulletin will allow users to edit and DELETE messages. I am against users being able to delete messages, because you could lose good discussions that way. I wish my client's site was online so that you guys can see our sandbox site and play around with the admin functions, but the ISP they are using (friend of the client who runs that datacenter) is flaky. I am willing to send to send the code to you if you guys want to poke around it. I plan on releasing it in the next month or so (not sure if I want to do GPL or BSD). Be aware that it will have minimal documentation and some parts are not yet "clean". :)
Collapse
Posted by Peter Marklund on

As far as categorization is concerned I thought you should know that I helped develop quite a feature rich categorization service (any category tree could be scoped to whole site, an object type, or any acs object i.e. a bboard forum) about a year ago at aD in Munich. Even though you may not be able to use the source code directly (it's based on Oracle and aD may not want to release the source code - not my call) you might be able to derive some good ideas from it. You can find the documentation here. I think the requirements document is most useful to read.

Let me know if there are questions!

Collapse
Posted by Roger Williams on
I have been following this discussion and I would have weighed in on the side of allowing user editing. This is based on how many non-ACS-based boards I see where people do edit their posts (and it shows that the post has been edited).

But I was looking to make a change in our system, and I stumbled on the following in the instance parameters for the bboard application: UserPostsEditableP - Grants permission to edit posts to posting user. Required for attachments to work.

Now I run ACSTcl 4.2b (I am assuming that this parm is also in OACS 4.5), but why would we not just leave it as an (administrator-changeable) parameter?

In our system it defaults to t, but it would be trivial to have it default to false. My guess is that this approach has the broadest applicability.

Regards..

Collapse
Posted by Dave Bauer on
Here is a thread on a proposal for a system wide openacs 4 categorization package. https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0003xq&topic_id=12&topic=OpenACS%204%2e0%20Design
Collapse
Posted by Jun Yamog on
Hi Ben,

As mentioned by Neophytos it maybe better if the new bboard will be each forum is a package.  Unlike the current bboard v.4 which is many forums per packages.  As you have also mentioned its a little buggy.  I have posted some bug fixes in the SDM to fix some of the non-package awareness of the current bboard v.4.

I think posts should be editable and each package can be set if the edit function can be done by the admin or users.  I believe the toolkit is flexible enough.  As versioning in my opinion its something optional.

Collapse
Posted by Ben Adida on
Okay, I've taken a look at Gilbert's code, and I will be able to reuse some elements, which is a great thing! Thanks Gilbert.

Some points about the above comments:

- editing of messages without versioning? I'm strongly opposed to that. I can't see that ever being a good application. Total flexibility is not always good if you allow features that start to confuse users. If discussions start to get confused by unversioned message editing, the package will not be used as much as it could, because it won't be as useful in fostering useful, long-term-archived exchanges.

- Making each forum its own package. This assumes that little or no aggregation will be done across forums. That you won't ever ask "hmmm, what other crazy rants has Ben posted on OpenACS Evangelization now that i see how nutty he is being on OpenACS Design." Note that, in dotLRN, we are attempting to do cross-package aggregation. It's taken a *long* time to get anything right, and I'm not sure we've finalized that architecture just yet. I certainly don't think we should dabble in that for a core package like bboard. I'm still strongly in favor of multiple forums per package. If there are other arguments, let me know, but killing aggregation is, IMO, not an option.

My proposal for the first version, following the principle of simple design first, iteration later, is as follows:

- forums are objects, scoped to a particular package

- messages are objects, directly associated to a forum (as opposed to indirectly mapped to forums through a third table), not CR items.

- no categorization system yet. I think we need a lot more thought to create a general categorization mechanism. I don't want to create a bogus system to do a bad job of this right now. We can add this later, especially if we design a good, modular categorization scheme.

- two different views: threaded and flat

- revival of features from 3.x: can users create new threads? moderation.

- admins can edit messages in a permanent manner, no versioning. admins can delete whole threads or individual messages.

- ability to post in HTML/text, with toggling after the fact, as that is a display issue and not a content versioning issue.

Note that I wouldn't mind some help on the HTML tag closing stuff! Yes, we really should have a good way to do this once and for all.

Collapse
Posted by Don Baccus on
I'm fine with the above.  As far as closing tags and quoting HTML elements in plain text, have you checked out ad_html_text_convert in acs-tcl/tcl/text-html-procs.tcl?  I've used it elsewhere in the toolkit and it seems to work well enough.

Lars wrote it, ping him and I'm sure he can fill you in on any shortcomings.

And the ad_page_contract filter "html" scans for "bad tags" (as configured by a system param).

If you're using the form system, or my roughed-out ad_form, validate with ad_html_security_check, which is the function called by the ad_page_contract filter.

Collapse
Posted by Ben Adida on
Yep, I've used those procs, they are very nice. Will they suffice given the issues brought up by others (John)? Not so sure, but yes it's a good start.
Collapse
Posted by Lars Pind on
I didn't write the tag-closing proc, Jeff Davis did. His code is usually pretty solid, and I'm sure this is no exception.

I wrote the HTML to Text and vice versa procs. The HTML to text formatter actually does some simple HTML parsing and tries to do something semi-intelligent with things like bold, italic, LI, blockquote, etc.

The security check checks the HREF attribute on the A tag for things that starts with "javascript:", including the case where one or more of the letters are specified using &#...; notation.

I forgot a bunch of the details, but at least Aaron and I tried to be diligent.

/Lars

Collapse
39: spec document (response to 1)
Posted by Ben Adida on
I've posted the initial spec document for the Forums Package (the new Bboard) at the now-usual location:

http://dotlrn.openforce.net/doc/forums.adp.

This pretty much summarizes the stuff we talked about in this thread, and formalizes things a tad more. I've started writing this code and will import it in the CVS tree shortly. I'm focusing on functionality and page flow for now, not so much individual page UI.

This document is not done, I will be updating it as things move along, and I look forward to more comments and suggestions!

Collapse
40: CVS import of Forums (response to 1)
Posted by Ben Adida on
I've just imported forums into the OpenACS CVS tree (development branch). This version will *only* install on Oracle right now. Note also that the UI is very hackish and NOT MEANT to be final in any way. I've been focusing on core functionality and concise, simple page flow. I was not able to reuse as much of Gilbert's bboard as I wanted, but some concepts did make it in.

In order to get forums working, you'll need to install notifications and acs-mail-lite, too. I've just tested the install on Oracle and you should be able to install acs-mail-lite, notifications, and forums. You'll need to instantiate both notifications and forums to get forums working (at least if you want to do notifications).

All notifications are instantaneous right now.

I am always open to criticism about my code, etc.. so bring it on! Just do so with the understanding that I don't like to overdesign before I code. So you'll see some missing chunks that are going to appear over time, and some total hacks that are designated as such with a clear intention on my part to fix them.

Finally: I'm going to be hacking on this hard for the next few days. If you want to help, that's great, but if you start porting to PG slowly (for example), expect it not to matter in 3 days... However, if you have many hours to dedicate to this over the next couple of days, I'm happy to collaborate (UI for example?).