Forum OpenACS Q&A: Response to Breakthrough on bookmarks module

Collapse
Posted by Bob Fuller on
OK, I tried submitting this last night, but the bboard choked because it was too large (most likely). Therefore, I'll try it again, but in pieces. Here's the first one:

General Remarks

As I mentioned, I've made a breakthrough in the bookmarks module. To the best of my knowledge, the following files (at least) require adjustments in order to get the module to work:

  • doc/sql/bookmarks.sql
    (this file, with corrections applied, needs to be loaded into the data module)

  • /web/{server}/tcl/bookmarks-defs.tcl

  • in www/bookmarks:
    • create-folder-2.tcl
    • delete-bookmark-2.tcl
    • edit-bookmark-2.tcl
    • index.tcl
    • insert-one-2.tcl
    • insert-one.tcl
    • most-popular-public.tcl
    • toggle-open-close.tcl

Since this is only (so far) a partial fix, there are probably other files that need to be adjusted. However, I've got some of the major items handled, including the ability to add and delete bookmarks, create folders, edit bookmarks (which includes moving them from one folder to another), and open/close folders. I will probably be publishing a more complete fix as time permits...

Please note that some of the triggers and functions are no longer in the data model. As a workaround, I found it necessary, in some cases, to move the functionality supplied by some of the triggers and functions directly into the context of the pertinent Tcl code. The workaround(s) for the functions and triggers in question now reside mostly in edit-bookmark-2.tcl.

The bookmarks.sql file requires the following components:

  • Tables
    1. bm_urls
    2. bm_list
    3. bm_list_pkg (was originally a package in ACS)
  • Sequences
    1. bm_url_id_seq
    2. bm_bookmark_id_seq
  • Functions
    (Note that some functions/procedures are no longer in the data model!)
    1. inc_char_for_sort_key
    2. new_sort_key
    3. trig_bm_list_sort_key_i_tr
    4. trig_bm_list_sort_key_row_u_tr
  • Triggers
    (Likewise, note that some triggers are no longer in the data model!)
    1. bm_list_sort_key_i_tr
    2. bm_list_sort_key_row_u_tr