Forum OpenACS Q&A: Re: General Comments from Edit-This-Page Page

Collapse
Posted by Pavel Boghita on
I have found another way of doing this. It was initially posted by Joel Aufrecht for the notes packages (https://openacs.org/forums/message-view?message_id=82750), but can be easily modified for any package. This is the edit-this-page version:

for tcl:

set comment_add_url "[general_comments_package_url]comment-add?[export_vars {
{ object_id $pa(item_id }
{ object_name $pa(title) }
{ return_url "[ad_conn url]?[ad_conn query]"}
}]"

set comments_html [general_comments_get_comments -print_content_p 1 $pa(item_id)]

the adp should not stay the same whatever the package:

<a href="@comment_add_url@">Add a comment</a>
<p>@comments_html@

Collapse
Posted by Malte Sussdorff on
I assume the *right* way to include this would be to change the default ETP application with the code Paul gave and add a parameter to ETP for enabling / disabling General Comments. Obviously the .adp file would have to be changed to include an <if> tag depending on the status of the parameter. Any volunteers ?
I apologise for bloating this thread but I had to add  this for clarity:

{ object_id $pa(item_id)} note the closing paranthesis after item_id

the adp should 'now' (not 'not') stay the same... etc