comment.module

Version 1.617.2.10 (checked in on 2009/09/14 at 10:36:42 by goba)

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.

Constants

NameDescription
COMMENT_ANONYMOUS_MAYNOT_CONTACTAnonymous posters may not enter their contact information.
COMMENT_ANONYMOUS_MAY_CONTACTAnonymous posters may leave their contact information.
COMMENT_ANONYMOUS_MUST_CONTACTAnonymous posters must leave their contact information.
COMMENT_CONTROLS_ABOVEComment controls should be shown above the comment list.
COMMENT_CONTROLS_ABOVE_BELOWComment controls should be shown both above and below the comment list.
COMMENT_CONTROLS_BELOWComment controls should be shown below the comment list.
COMMENT_CONTROLS_HIDDENComment controls are hidden.
COMMENT_FORM_BELOWComment form should be shown below post or list of comments.
COMMENT_FORM_SEPARATE_PAGEComment form should be displayed on a separate page.
COMMENT_MODE_FLAT_COLLAPSEDComments are displayed in a flat list - collapsed.
COMMENT_MODE_FLAT_EXPANDEDComments are displayed in a flat list - expanded.
COMMENT_MODE_THREADED_COLLAPSEDComments are displayed as a threaded list - collapsed.
COMMENT_MODE_THREADED_EXPANDEDComments are displayed as a threaded list - expanded.
COMMENT_NODE_DISABLEDComments for this node are disabled.
COMMENT_NODE_READ_ONLYComments for this node are locked.
COMMENT_NODE_READ_WRITEComments are enabled on this node.
COMMENT_NOT_PUBLISHEDComment is awaiting approval.
COMMENT_ORDER_NEWEST_FIRSTComments are ordered by date - newest first.
COMMENT_ORDER_OLDEST_FIRSTComments are ordered by date - oldest first.
COMMENT_PREVIEW_OPTIONALComment preview is optional.
COMMENT_PREVIEW_REQUIREDComment preview is required.
COMMENT_PUBLISHEDComment is published.

Functions

NameDescription
comment_accessThis is *not* a hook_access() implementation. This function is called to determine whether the current user has access to a particular comment.
comment_action_infoImplementation of hook_action_info().
comment_blockImplementation of hook_block().
comment_controlsBuild a comment control form.
comment_controls_submitProcess comment_controls form submissions.
comment_formGenerate the basic commenting form, for appending to a node or display on a separate page.
comment_form_add_previewForm builder; Generate and validate a comment preview form.
comment_form_alterImplementation of hook_form_alter().
comment_form_boxTheme the comment form box.
comment_form_submitProcess comment form submissions; prepare the comment, store it, and set a redirection target.
comment_form_validateValidate comment form submissions.
comment_get_recentFind a number of recent comments. This is done in two steps. 1. Find the n (specified by $number) nodes that have the most recent comments. This is done by querying node_comment_statistics which has an index on last_comment_timestamp, and is thus a...
comment_helpImplementation of hook_help().
comment_hook_infoImplementation of hook_hook_info().
comment_invoke_commentInvoke a hook_comment() operation in all modules.
comment_linkImplementation of hook_link().
comment_linksBuild command links for a comment (e.g.\ edit, reply, delete) with respect to the current user's access permissions.
comment_menuImplementation of hook_menu().
comment_new_page_countCalculate page number for first new comment.
comment_nodeapiImplementation of hook_nodeapi().
comment_node_typeImplementation of hook_node_type().
comment_node_urlA simple helper function.
comment_num_allGet comment count for a node.
comment_num_newGet number of new comments for current user and specified node.
comment_num_repliesGet replies count for a comment.
comment_operationsComment operations. We offer different update operations depending on which comment administration page we're on.
comment_permImplementation of hook_perm().
comment_renderRenders comment(s).
comment_saveAccepts a submission of new or changed comment content.
comment_themeImplementation of hook_theme().
comment_unpublish_actionDrupal action to unpublish a comment.
comment_unpublish_by_keyword_actionImplementation of a configurable Drupal action. Unpublish a comment if it contains a certain string.
comment_unpublish_by_keyword_action_formForm builder; Prepare a form for blacklisted keywords.
comment_unpublish_by_keyword_action_submitProcess comment_unpublish_by_keyword_action_form form submissions.
comment_userImplementation of hook_user().
comment_validateValidate comment data.
int2vancodeGenerate vancode.
template_preprocess_commentProcess variables for comment.tpl.php.
template_preprocess_comment_foldedProcess variables for comment-folded.tpl.php.
template_preprocess_comment_wrapperProcess variables for comment-wrapper.tpl.php.
theme_comment_blockReturns a formatted list of recent comments to be displayed in the comment block.
theme_comment_controlsTheme comment controls box where the user can change the default display mode and display order of comments.
theme_comment_flat_collapsedTheme comment flat collapsed view.
theme_comment_flat_expandedTheme comment flat expanded view.
theme_comment_post_forbiddenTheme a "you can't post comments" notice.
theme_comment_submittedTheme a "Submitted by ..." notice.
theme_comment_thread_collapsedTheme comment thread collapsed view.
theme_comment_thread_expandedTheme comment thread expanded view.
theme_comment_viewTheme a single comment block.
vancode2intDecode vancode back to an integer.
_comment_form_submitPrepare a comment for submission.
_comment_get_display_settingReturn a current comment display setting
_comment_get_modesReturn an array of viewing modes for comment listings.
_comment_get_ordersReturn an array of viewing orders for comment listings.
_comment_loadLoad the entire comment by cid.
_comment_per_pageReturn an array of "comments per page" settings from which the user can choose.
_comment_update_node_statisticsUpdates the comment statistics for a given node. This should be called any time a comment is added, deleted, or updated.
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.