Index: openacs-4/packages/acs-core-docs/www/tutorial-comments.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-comments.html,v diff -u -r1.8 -r1.8.4.1 --- openacs-4/packages/acs-core-docs/www/tutorial-comments.html 17 Jul 2006 05:38:32 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/tutorial-comments.html 3 Feb 2008 12:07:41 -0000 1.8.4.1 @@ -1,13 +1,14 @@ -
You can track comments for any ACS Object. Here we'll track + +
You can track comments for any ACS Object. Here we'll track comments for notes. On the note-edit.tcl/adp pair, which is used to display individual notes, we want to put a link to add comments at the bottom of the screen. If there are any comments, we want to show them.
First, we need to generate a url for adding comments. In note-edit.tcl:
- set comment_add_url "[general_comments_package_url]comment-add?[export_vars { + set comment_add_url "[general_comments_package_url]comment-add?[export_vars { { object_id $note_id } { object_name $title } - { return_url "[ad_conn url]?[ad_conn query]"} - }]" + { return_url "[ad_conn url]?[ad_conn query]"} + }]"
This calls a global, public tcl function that the general_comments package registered, to get its url. You then embed in that url the id of the note and its title, and set the @@ -18,5 +19,5 @@ show the contents of the comments, instead of just the fact that there are comments. Then you pass the note id, which is also the acs_object id.
We put our two new variables in the note-edit.adp - page.
<a href="@comment_add_url@">Add a comment</a> + page.<a href="@comment_add_url@">Add a comment</a> @comments_html@