mod_comment

Implements a basic commenting system, enabling commenting on resources.

The module has an admin comment overview, allowing the administrator to review the comments or delete them.

To enable commenting in your site, include _comments.tpl on your resource’s page template, passing an id parameter for the resource on which you want users to be able to comment.

Accepted Events

This module handles the following notifier callbacks:

  • observe_admin_menu: Contribute module entries to the admin menu tree.
  • observe_rsc_merge: Move all comments from one resource to another using m_comment:merge.
  • observe_search_query: Return the list of recent comments using m_comment:search.

Delegate callbacks:

  • event/2 with submit messages: newcomment.

Edit on GitHub

Observes

Notifications

observe_rsc_merge/2

Map to signal merging two resources. Move any information from the loser to the winner. The loser will be deleted.

Models

Models

comment

Model for comments attached to resources. It provides listing, moderation checks, counting, and retrieval of individual comments.

Controllers

Controllers

controller_admin_comments

Shows an admin screen with an overview of most recently created comments. The screen offers the option to moderate the comments or delete them entirely.

Dispatch rules

Dispatch rules

mod_comment dispatch rules

URL dispatch rules defined by mod_comment in apps/zotonic_mod_comment/priv/dispatch/dispatch.

Filters

Filters

gravatar_code

Calculate the gravatar code for an e-mail address:

Referred by