• 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.9 2024/04/24 10:40:51 antoniop Exp $

Procedures in this file

Detailed information

ad_page_contract_filter_proc_general_comments_safe (public)

 ad_page_contract_filter_proc_general_comments_safe name value_varname

Safety checks for content posted in a comment. These checks are package-specific, because content we may allow in other packages, e.g. via the AllowedTag parameter in acs-kernel, should not be allowed here.

Parameters:
name (required)
value_varname (required)

Testcases:
No testcase defined.

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 (required)
The object to comment on.
object_name (required)
The name of the object.
return_url (required)
A url for the user to return to after viewing a comment.
link_text (required)
The text to display for the link.
context_id (optional)
category (optional)
A category to associate comment to.
See Also:

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 (required)
The object_id to retrieve the comments for.
return_url (required)
A url for the user to return to after viewing a comment.
See Also:

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 (optional, defaults to "Add comment")
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 (required)
The object to comment on.
return_url (optional)
A url for the user to return to after viewing a comment.

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)

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 (optional, integer, defaults to "0")
Pass in 1 to print out content of comments.
-print_attachments_p (optional, integer, defaults to "0")
Pass in 1 to print out attachments of comments, only works if print_content_p is 1.
-print_user_info_p (optional, integer, defaults to "1")
-context_id (optional, integer, accept empty)
Show only comments with given context_id
-my_comments_only_p (optional, integer, defaults to "0")
Parameters:
object_id (required)
The object_id to retrieve the comments for.
return_url (optional)
A url for the user to return to after viewing a comment.

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:

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.

Testcases:
general_comments_create_link
[ show source ]