comment.module

Version 1.520.2.14 (checked in on 2009/04/29 at 18:32:15 by drumm)

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_adminMenu callback; present an administrative comment listing.
comment_admin_overview
comment_admin_overview_submitExecute the chosen 'Update option' on the selected comments, such as publishing, unpublishing or deleting.
comment_admin_overview_validateWe can't execute any 'Update options' if no comments were selected.
comment_admin_settingsMenu callback; presents the comment settings page.
comment_blockImplementation of hook_block().
comment_confirm_delete
comment_confirm_delete_submit
comment_controls
comment_controls_submit
comment_deleteMenu callback; delete a comment.
comment_edit
comment_form
comment_form_add_preview
comment_form_alter
comment_form_box
comment_form_submit
comment_form_validate
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_invoke_commentInvoke a hook_comment() operation in all modules.
comment_linkImplementation of hook_link().
comment_links
comment_menuImplementation of hook_menu().
comment_multiple_delete_confirmList the selected comments and verify that the admin really wants to delete them.
comment_multiple_delete_confirm_submitPerform the actual comment deletion.
comment_nodeapiImplementation of hook_nodeapi().
comment_node_url
comment_num_all
comment_num_newget number of new comments for current user and specified node
comment_num_replies
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_replyThis function is responsible for generating a comment reply form. There are several cases that have to be handled, including:
comment_saveAccepts a submission of new or changed comment content.
comment_userImplementation of hook_user().
comment_validate
int2vancodeGenerate vancode.
theme_comment
theme_comment_admin_overview
theme_comment_blockReturns a formatted list of recent comments to be displayed in the comment block.
theme_comment_controls
theme_comment_flat_collapsed
theme_comment_flat_expanded
theme_comment_folded
theme_comment_post_forbidden
theme_comment_preview
theme_comment_thread_collapsed
theme_comment_thread_expanded
theme_comment_view
theme_comment_wrapperAllow themable wrapping of all comments.
vancode2intDecode vancode back to an integer.
_comment_delete_thread
_comment_form_submit
_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.