I have a problem in displaying comments. In the TCL I set the
variable comments_html
# Get comments
if {$general_comments} {
set comments_html [general_comments_get_comments -print_content_p
1 -print_attachments_p 1 $document_id]
}
In the ADP I call then:
<if @general_comments@ eq 1>
<HR NoShade Size=1>
<table border=0>
<tr>
<td>
<if @comments_html@ not nil>
<h4>@num_comments@ Comments</h4>
<blockquote>
@comments_html@
</blockquote>
</if>
<center><a href="@comment_add_url@">Add a
comment</a></center>
</td>
</tr>
</table>
</if>
But I don't see the comment. You can see a sample document here,
where one comment is approved:
http://193.81.242.28:8000/doc/6250
The Database for that example looks like the following:
unido=# select * from general_comments where object_id = 6250;
comment_id | object_id | category
------------+-----------+----------
6865 | 6250 |
6470 | 6250 |
(2 rows)
and the general_comments table
unido=# SELECT * from general_comments where object_id = 6250;
comment_id | object_id | category
------------+-----------+----------
6865 | 6250 |
6470 | 6250 |
(2 rows)
The general_objects table looks like (but I think I don't need that,
or?
unido=# SELECT * from general_objects;
object_id | on_which_table | on_what_id
-----------+----------------+------------
(0 rows)
Thanxs for suggestions!