comment.module

Enables users to comment on published content.

When enabled, the Drupal comment module creates a discussion board for each Drupal node. Users can post comments to discuss a forum topic, weblog post, story, collaborative book page, etc.

File

modules/comment/comment.module

Functions

Name Description
comment_access Determines whether the current user has access to a particular comment.
comment_action_info Implements hook_action_info().
comment_block_configure Implements hook_block_configure().
comment_block_info Implements hook_block_info().
comment_block_save Implements hook_block_save().
comment_block_view Implements hook_block_view().
comment_build_content Builds a structured array representing the comment's content.
comment_count_unpublished Returns a menu title which includes the number of unapproved comments.
comment_delete Delete a comment and all its replies.
comment_delete_multiple Delete comments and all their replies.
comment_edit_page Page callback for comment editing.
comment_entity_info Implements hook_entity_info().
comment_field_extra_fields Implements hook_field_extra_fields().
comment_file_download_access Implements hook_file_download_access().
comment_form Generate the basic commenting form, for appending to a node or display on a separate page.
comment_forms Implements hook_forms().
comment_form_build_preview Build a preview from submitted form values.
comment_form_node_form_alter Implements hook_form_BASE_FORM_ID_alter().
comment_form_node_type_form_alter Implements hook_form_FORM_ID_alter().
comment_form_submit Process comment form submissions; prepare the comment, store it, and set a redirection target.
comment_form_submit_build_comment Updates the form state's comment entity by processing this submission's values.
comment_form_validate Validate comment form submissions.
comment_get_display_ordinal Get the display ordinal for a comment, starting from 0.
comment_get_display_page Return the page number for a comment.
comment_get_recent Find the most recent comments that are available to the current user.
comment_get_thread Retrieve comments for a thread.
comment_help Implements hook_help().
comment_links Helper function, build links for an individual comment.
comment_load Load the entire comment by cid.
comment_load_multiple Load comments from the database.
comment_menu Implements hook_menu().
comment_menu_alter Implements hook_menu_alter().
comment_new_page_count Calculate page number for first new comment.
comment_node_delete Implements hook_node_delete().
comment_node_insert Implements hook_node_insert().
comment_node_load Implements hook_node_load().
comment_node_page_additions Build the comment-related elements for node detail pages.
comment_node_prepare Implements hook_node_prepare().
comment_node_search_result Implements hook_node_search_result().
comment_node_type_delete Implements hook_node_type_delete().
comment_node_type_insert Implements hook_node_type_insert().
comment_node_type_load Menu loader callback for Field UI paths.
comment_node_type_update Implements hook_node_type_update().
comment_node_update_index Implements hook_node_update_index().
comment_node_view Implements hook_node_view().
comment_num_new Get number of new comments for current user and specified node.
comment_permalink Redirects comment links to the correct page depending on comment settings.
comment_permission Implements hook_permission().
comment_prepare_thread Loop over comment thread, noting indentation level.
comment_preview Generate a comment preview.
comment_publish_action Publishes a comment.
comment_ranking Implements hook_ranking().
comment_rdf_mapping Implements hook_rdf_mapping().
comment_save Accepts a submission of new or changed comment content.
comment_save_action Saves a comment.
comment_submit Prepare a comment for submission.
comment_theme Implements hook_theme().
comment_unpublish_action Unpublishes a comment.
comment_unpublish_by_keyword_action Unpublishes a comment if it contains certain keywords.
comment_unpublish_by_keyword_action_form Form builder; Prepare a form for blacklisted keywords.
comment_unpublish_by_keyword_action_submit Process comment_unpublish_by_keyword_action_form form submissions.
comment_update_index Implements hook_update_index().
comment_uri Implements callback_entity_info_uri().
comment_user_cancel Implements hook_user_cancel().
comment_user_delete Implements hook_user_delete().
comment_view Generate an array for rendering the given comment.
comment_view_multiple Construct a drupal_render() style array from an array of loaded comments.
int2vancode Generate vancode.
template_preprocess_comment Process variables for comment.tpl.php.
template_preprocess_comment_wrapper Process variables for comment-wrapper.tpl.php.
theme_comment_block Returns HTML for a list of recent comments to be displayed in the comment block.
theme_comment_post_forbidden Returns HTML for a "you can't post comments" notice.
vancode2int Decode vancode back to an integer.
_comment_body_field_create Creates a comment_body field instance for a given node type.
_comment_get_modes Return an array of viewing modes for comment listings.
_comment_per_page Return an array of "comments per page" settings from which the user can choose.
_comment_update_node_statistics Updates the comment statistics for a given node. This should be called any time a comment is added, deleted, or updated.

Constants

Name Description
COMMENT_ANONYMOUS_MAYNOT_CONTACT Anonymous posters cannot enter their contact information.
COMMENT_ANONYMOUS_MAY_CONTACT Anonymous posters may leave their contact information.
COMMENT_ANONYMOUS_MUST_CONTACT Anonymous posters are required to leave their contact information.
COMMENT_FORM_BELOW Comment form should be shown below post or list of comments.
COMMENT_FORM_SEPARATE_PAGE Comment form should be displayed on a separate page.
COMMENT_MODE_FLAT Comments are displayed in a flat list - expanded.
COMMENT_MODE_THREADED Comments are displayed as a threaded list - expanded.
COMMENT_NODE_CLOSED Comments for this node are closed.
COMMENT_NODE_HIDDEN Comments for this node are hidden.
COMMENT_NODE_OPEN Comments for this node are open.
COMMENT_NOT_PUBLISHED Comment is awaiting approval.
COMMENT_PUBLISHED Comment is published.

Classes

Name Description
CommentController Controller class for comments.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!comment!comment.module/7.x