• Publicity: Public Only All

general-comments-procs.tcl

Utility procs for general-comments

Location:
packages/general-comments/tcl/general-comments-procs.tcl
Created:
2000-10-12
Authors:
Phong Nguyen
Pascal Scheffers
CVS Identification:
$Id: general-comments-procs.tcl,v 1.25.2.7 2022/02/21 08:58:26 gustafn Exp $

Procedures in this file

Detailed information

general_comments::create_link (public, deprecated)

 general_comments::create_link object_id object_name return_url \
    link_text [ context_id ] [ category ]
Deprecated. Invoking this procedure generates a warning.

Generates an html link to add a comment to an object.

Parameters:
object_id - The object to comment on.
object_name - The name of the object.
return_url - A url for the user to return to after viewing a comment.
link_text - The text to display for the link.
context_id (optional)
category (optional) - A category to associate comment to.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_get_tcl_call_stack ad_get_tcl_call_stack (public) export_vars export_vars (public) general_comments_package_url general_comments_package_url (public) general_comments::create_link general_comments::create_link general_comments::create_link->ad_get_tcl_call_stack general_comments::create_link->export_vars general_comments::create_link->general_comments_package_url

Testcases:
No testcase defined.

general_comments::get_comments (public, deprecated)

 general_comments::get_comments object_id return_url
Deprecated. Invoking this procedure generates a warning.

Generates a line item list of comments for the object_id.

Parameters:
object_id - The object_id to retrieve the comments for.
return_url - A url for the user to return to after viewing a comment.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_get_tcl_call_stack ad_get_tcl_call_stack (public) db_foreach db_foreach (public) export_vars export_vars (public) general_comments_package_url general_comments_package_url (public) general_comments::get_comments general_comments::get_comments general_comments::get_comments->ad_get_tcl_call_stack general_comments::get_comments->db_foreach general_comments::get_comments->export_vars general_comments::get_comments->general_comments_package_url

Testcases:
No testcase defined.

general_comments_create_link (public)

 general_comments_create_link [ -object_name object_name ] \
    [ -link_text link_text ] [ -context_id context_id ] \
    [ -category category ] [ -link_attributes link_attributes ] \
    object_id [ return_url ]

Generates an html link to add a comment to an object.

Switches:
-object_name (optional)
The name of the object.
-link_text (defaults to "Add comment") (optional)
The text to display for the link.
-context_id (optional)
The context_id for the comment.
-category (optional)
A category to associate comment to.
-link_attributes (optional)
Some additional parameters for the link. Could be used to set the link title and other things like that. Ex. -link_attributes { title="My link title" }
Parameters:
object_id - The object to comment on.
return_url (optional) - A url for the user to return to after viewing a comment.

Partial Call Graph (max 5 caller/called nodes):
%3 test_general_comments_create_link general_comments_create_link (test general-comments) general_comments_create_link general_comments_create_link test_general_comments_create_link->general_comments_create_link acs_object_name acs_object_name (public) general_comments_create_link->acs_object_name export_vars export_vars (public) general_comments_create_link->export_vars general_comments_package_url general_comments_package_url (public) general_comments_create_link->general_comments_package_url Class ::xowiki::includelet::my-general-comments Class ::xowiki::includelet::my-general-comments (public) Class ::xowiki::includelet::my-general-comments->general_comments_create_link packages/download/www/one-archive.tcl packages/download/ www/one-archive.tcl packages/download/www/one-archive.tcl->general_comments_create_link packages/download/www/one-revision.tcl packages/download/ www/one-revision.tcl packages/download/www/one-revision.tcl->general_comments_create_link packages/faq/www/one-faq.tcl packages/faq/ www/one-faq.tcl packages/faq/www/one-faq.tcl->general_comments_create_link packages/file-storage/www/file.tcl packages/file-storage/ www/file.tcl packages/file-storage/www/file.tcl->general_comments_create_link

Testcases:
general_comments_create_link

general_comments_delete_messages (public)

 general_comments_delete_messages -package_id package_id

Deletes all comments belonging to specified package.

Switches:
-package_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_link_tests link_tests (test xowiki) general_comments_delete_messages general_comments_delete_messages test_link_tests->general_comments_delete_messages test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->general_comments_delete_messages content::item::delete content::item::delete (public) general_comments_delete_messages->content::item::delete db_list db_list (public) general_comments_delete_messages->db_list xowiki::before-uninstantiate xowiki::before-uninstantiate (public) xowiki::before-uninstantiate->general_comments_delete_messages

Testcases:
xowiki_test_cases, link_tests

general_comments_get_comments (public)

 general_comments_get_comments [ -print_content_p print_content_p ] \
    [ -print_attachments_p print_attachments_p ] \
    [ -print_user_info_p print_user_info_p ] \
    [ -context_id context_id ] \
    [ -my_comments_only_p my_comments_only_p ] object_id \
    [ return_url ]

Generates a line item list of comments for the object_id.

Switches:
-print_content_p (defaults to "0") (optional)
Pass in 1 to print out content of comments.
-print_attachments_p (defaults to "0") (optional)
Pass in 1 to print out attachments of comments, only works if print_content_p is 1.
-print_user_info_p (defaults to "1") (optional)
-context_id (optional)
Show only comments with given context_id
-my_comments_only_p (defaults to "0") (optional)
Parameters:
object_id - The object_id to retrieve the comments for.
return_url (optional) - A url for the user to return to after viewing a comment.

Partial Call Graph (max 5 caller/called nodes):
%3 test_general_comments_create_retrieve general_comments_create_retrieve (test general-comments) general_comments_get_comments general_comments_get_comments test_general_comments_create_retrieve->general_comments_get_comments acs_package_root_dir acs_package_root_dir (public) general_comments_get_comments->acs_package_root_dir ad_conn ad_conn (public) general_comments_get_comments->ad_conn db_driverkey db_driverkey (public) general_comments_get_comments->db_driverkey db_multirow db_multirow (public) general_comments_get_comments->db_multirow export_vars export_vars (public) general_comments_get_comments->export_vars Class ::xowiki::includelet::my-general-comments Class ::xowiki::includelet::my-general-comments (public) Class ::xowiki::includelet::my-general-comments->general_comments_get_comments packages/download/www/one-archive.tcl packages/download/ www/one-archive.tcl packages/download/www/one-archive.tcl->general_comments_get_comments packages/download/www/one-revision.tcl packages/download/ www/one-revision.tcl packages/download/www/one-revision.tcl->general_comments_get_comments packages/faq/www/one-faq.tcl packages/faq/ www/one-faq.tcl packages/faq/www/one-faq.tcl->general_comments_get_comments packages/file-storage/www/file.tcl packages/file-storage/ www/file.tcl packages/file-storage/www/file.tcl->general_comments_get_comments

Testcases:
general_comments_create_retrieve

general_comments_new (public)

 general_comments_new -object_id object_id -comment_id comment_id \
    -title title -comment_mime_type comment_mime_type \
    -context_id context_id [ -user_id user_id ] \
    [ -creation_ip creation_ip ] -is_live is_live -category category \
    -content content

Creates a comment and attaches it to a given object ID

Switches:
-object_id (required)
-comment_id (required)
-title (required)
-comment_mime_type (required)
-context_id (required)
-user_id (optional)
-creation_ip (optional)
-is_live (required)
-category (required)
-content (required)
Returns:
Error:

Partial Call Graph (max 5 caller/called nodes):
%3 test_general_comments_create_retrieve general_comments_create_retrieve (test general-comments) general_comments_new general_comments_new test_general_comments_create_retrieve->general_comments_new acs_object_type acs_object_type (public) general_comments_new->acs_object_type ad_convert_to_html ad_convert_to_html (public) general_comments_new->ad_convert_to_html callback callback (public) general_comments_new->callback content::item::get_latest_revision content::item::get_latest_revision (public) general_comments_new->content::item::get_latest_revision db_dml db_dml (public) general_comments_new->db_dml packages/general-comments/www/comment-add-3.tcl packages/general-comments/ www/comment-add-3.tcl packages/general-comments/www/comment-add-3.tcl->general_comments_new

Testcases:
general_comments_create_retrieve

general_comments_package_url (public)

 general_comments_package_url

Returns a URL pointing to the mounted general-comments package. Uses util_memoize for caching.

Partial Call Graph (max 5 caller/called nodes):
%3 test_general_comments_create_link general_comments_create_link (test general-comments) general_comments_package_url general_comments_package_url test_general_comments_create_link->general_comments_package_url site_node::get_package_url site_node::get_package_url (public) general_comments_package_url->site_node::get_package_url general_comments::create_link general_comments::create_link (public, deprecated) general_comments::create_link->general_comments_package_url general_comments::get_comments general_comments::get_comments (public, deprecated) general_comments::get_comments->general_comments_package_url general_comments_create_link general_comments_create_link (public) general_comments_create_link->general_comments_package_url general_comments_get_comments general_comments_get_comments (public) general_comments_get_comments->general_comments_package_url packages/general-comments/www/test.tcl packages/general-comments/ www/test.tcl packages/general-comments/www/test.tcl->general_comments_package_url

Testcases:
general_comments_create_link
[ show source ]