Forum OpenACS Q&A: Re: Getting comments on ETP pages -

Collapse
Posted by Gilbert Price on
Okay, here's what I did:

*Make sure the "General Comments" package is loaded and mounted.

1.  I added etp::get_gc_link to the bottom of edit-this-page/templates/article-content.tcl right below etp::get_page_attributes

2.  I added:

<if @comments_link@ not nil>
@comments@
<p>
@comments_link@
</if>

to the /edit-this-page/templates/article-content.adp

3.  I modified the /edit-this-page/tcl/etp-gc.tcl by overwriting the current code and replacing with:

ad_proc -public get_gc_link { } { } {
        upvar pa pa
        upvar comments comments
        upvar comments_link comments_link
        set item_id $pa(item_id)
        set object_name $pa(title)
        set comments ""
        set comments_link ""

        append comments_link [general_comments_create_link -link_text "Add a comment" -object_name $object_name $item_id [ad_conn url]]
        append comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $item_id ]
}

4.  Renamed etp-gc.tcl to etp-gc-procs.tcl and restart the server

This works for me as evidenced at http://www.pcs-sc.com/papers/lamps/rh8install or http://www.pcs-sc.com/papers/hardline/2003-02-07f

Hope this helps...

PS. If this doesn't work for you, I can attach the changed pages in an email to you. Let me know...