function hook_comment_view

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 comment.api.php hook_comment_view($comment, $view_mode, $langcode)
cle7 comment.api.php hook_comment_view($comment, $view_mode, $langcode)
elmsmedia7 comment.api.php hook_comment_view($comment, $view_mode, $langcode)
icor7 comment.api.php hook_comment_view($comment, $view_mode, $langcode)
meedjum_blog7 comment.api.php hook_comment_view($comment, $view_mode, $langcode)
mooc7 comment.api.php hook_comment_view($comment, $view_mode, $langcode)

The comment is being viewed. This hook can be used to add additional data to the comment before theming.

Parameters

$comment: Passes in the comment the action is being performed on.

$view_mode: View mode, e.g. 'full', 'teaser'...

$langcode: The language code used for rendering.

See also

hook_entity_view()

Related topics

2 functions implement hook_comment_view()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

trigger_comment_view in modules/trigger/trigger.module
Implements hook_comment_view().
user_comment_view in modules/user/user.module
Implements hook_comment_view().
1 invocation of hook_comment_view()
comment_build_content in modules/comment/comment.module
Builds a structured array representing the comment's content.

File

modules/comment/comment.api.php, line 73
Hooks provided by the Comment module.

Code

function hook_comment_view($comment, $view_mode, $langcode) {
  // how old is the comment
  $comment->time_ago = time() - $comment->changed;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.