Forum OpenACS Development: Best way to extend tables?

Collapse
Posted by Matthew Dodwell on
All,

I'm looking for some advice on the best OACS way to add extra attributes to tables.

For example, I'm playing around with events. I want my event to have a URL (addition of text) and a link to a presenter (foreign key link to another table). Is there a good way to do this within the system, or is the best way the way I'm doing it now and just modify the code?

Thanks
Matthew

Collapse
Posted by Malte Sussdorff on
Change the events table to use dynamic types for enhancing the table. Though it is initially more work you are rewarded with gratitude by fellow users who can easily extend the table and by yourself as you can add additional attributes at a later stage.

Alternatively you could use Flexbase which is shipped with Project/Open.

Collapse
Posted by Michael Steigman on
There is a URL field for each activity (not the events, but the root activity) and you should be able to add a presenter and bio by default. Added flexibility would be great but the package should support your needs (if I understand them correctly) as is.
Collapse
Posted by Matthew Dodwell on
Thanks for the comments Malte and Micheal,

I'll look into the event attributes for the URL but I guess my question was wider in that I'm looking for a general way to extend the system and dynamic attribute or AMS look like the way to go. I would like to add this in and be able to give something back and also be able to easily accept any code revisions.

I spent yesterday evening digging around the AMS and dynamic attribute stuff. What is the difference and when should I use either / both? I've seen this thread
href="/forums/message-view?message_id=354796
so I guess this is a live question.....
Cheers
Matthew
Collapse
Posted by Frank Bergmann on
Hi Matthew,

As Malte said above, ]project-open[ now comes with the "DynField" (renamed "FlexBase") package. You can checkout the package using:

cvs -d :pserver:mailto:anonymous@berlin.dnsalias.com:/home/cvsroot checkout -r b3-0-0-patches intranet-dynfield

You may have to adapt the template ab bit, but apart from that there should be no dependency on the rest of ]project-open[.

The module is already in production use in several tenth of systems. We're using it internally to classify our customers.

You can also use DynField to add the dynamic fields of objects to a ad_form. Please check the code of /intranet-core/www/projects/index.tcl for an example. Also, there is an "advanced search" option, where you can use DynField fields for a search screen. Checkout the ]po[ source code of the page above for details (comments in the code).

Bests,
Frank

mailto:frank_dot_bergmann_at_project_dash_open_dot_com
http://www.project-open.com/