Full ELMS Learning Network documentation
function theme_comment_block
×
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.module | theme_comment_block() |
cle7 comment.module | theme_comment_block() |
elmsmedia7 comment.module | theme_comment_block() |
icor7 comment.module | theme_comment_block() |
meedjum_blog7 comment.module | theme_comment_block() |
mooc7 comment.module | theme_comment_block() |
Returns HTML for a list of recent comments to be displayed in the comment block.
Related topics
1 theme call to theme_comment_block()
- comment_block_view in modules/
comment/ comment.module - Implements hook_block_view().
2 string references to the theme hook from theme_comment_block()
Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.
- comment_block_view in modules/
comment/ comment.module - Implements hook_block_view().
- comment_theme in modules/
comment/ comment.module - Implements hook_theme().
File
- modules/
comment/ comment.module, line 597 - Enables users to comment on published content.
Code
function theme_comment_block() {
$items = array();
$number = variable_get('comment_block_count', 10);
foreach (comment_get_recent($number) as $comment) {
$items[] = l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . ' <span>' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</span>';
}
if ($items) {
return theme('item_list', array('items' => $items));
}
else {
return t('No comments available.');
}
}