Forum OpenACS Development: Release of old Categorization code from ArsDigita

Dave Bauer, Michael Storey and others have expressed an interest in a
categorization service for OpenACS and the need for such a service is
widely acknowledged. Therefore I decided to release the Oracle based
categories service that I built while working for ArsDigita in early
2001. The packages are not yet integrate perfectly with OpenACS but I
wanted to announce them here so that interested developers can look at
them and we can decide how to best build a simple and yet powerful
enough categorization service for OpenACS that works with both Oracle
and PostgreSQL. What follows below are my notes from trying to get the
packages to work with OpenACS and instructions on how to download the
code.

I installed the categories package along with the two packages that it
depends on - generic-trees and navigation. The generic-trees package
is an Oracle PLSQL API built by Aram Kananov for managing tree
structures of objects. It makes use of functional indices and other
fancy stuff and I believe it's queries are quite well tuned (if not
I'm sure Aram would be happy to tune them for us 😊). The navigation
package is just a little API that I wrote up to allow the context bar
to work seamlessly when you navigate from say forums to the
categorization admin pages.

I was suprised that all three packages installed without glitches on
OACS head. However, it turned out I was cheering a little bit too
early. First issue I had to deal with was to remove all noquote
(@var_name;noquote@) instructions in the adp pages (wonder if we'll
get around to adding noquote for 4.7 by the way?). That was easy, but
that also means now some stuff will not be quoted as it should
be. Here are some of the issues I had to deal with in an attempt to get
categories to operate with the forums package (I didn't complete this
task, but see code in categories/www/doc/examples/forums):

- Added a manage categories link on the forum-view page (). The categories admin UI
seems to work quite ok

- Browsing widget on forum-view page. Not finished, had to execute "exec generic_tree.refresh_nested_ind(tree_id);"
  in sqlplus to get the query to work. Need to add a where clause to the message select query and should
  create a proper form with form builder.

- message-post page, see
  Since the categories package was based on adp includes for adding the categories select boxes
  to the form I had to write a new proc (ac_get_form_elements) to create elements for the form builder instead.
  The implementation is convoluted and doesn't seem to fit the form builder very well. Suggest categories doesn't
  work because of form builder issue. I had it working with a single category select box but with multiple ones it
  breaks. I could fix it but never got around to it. I would like some advice here on how to best use the form builder.

If you have a peek at the categorization service you can check these URLs on our dev server (no guarantee that they will
work). Login with email mailto:peter@collaboraid.biz and password 1. Please don't make any major changes on the server.

http://i18n.cph01.collaboraid.net/dotlrn/classes/business-administration/advanced-corporate-finance/advanced-corporate-finance-fall-2002-2003/forums/forum-view?forum_id=15848
http://i18n.cph01.collaboraid.net/categories/admin/tree-view?path%5fid=36&locale=&tree_id=21472&node_id=1
http://i18n.cph01.collaboraid.net/categories/admin/one-scope?show_object_type=forums_messages&context_id=15848&object_name=Advanced%20Corporate%20Finance%20Fall%202002%2f2003%20Forum
http://i18n.cph01.collaboraid.net/dotlrn/classes/business-administration/advanced-corporate-finance/advanced-corporate-finance-fall-2002-2003/forums/message-post?forum_id=15848

Download the categories package and its dependencies like this:

cvs -d :pserver:anonymous:@dotlrn.collaboraid.net:/cvsroot checkout categories
cvs -d :pserver:anonymous:@dotlrn.collaboraid.net:/cvsroot checkout navigation
cvs -d :pserver:anonymous:@dotlrn.collaboraid.net:/cvsroot checkout generic-trees

There is documentation at categories/www/doc. Note that these packages
only work in Oracle. I feel that we need a categories package in the
kernel of OACS but that we are best off writing such a package from
scratch rather than basing it on the code I am publishing here. I
think a lot can be learned from studying those packages though and I
am interested in staying involved in building a categorization service
for OpenACS.