You are here

function heartbeat_comments_load_more_link in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 modules/heartbeat_comments/heartbeat_comments.module \heartbeat_comments_load_more_link()

Create a more link within the current context.

Parameters

$uaid Integer:

$node_comment Boolean:

$nid Integer:

Return value

String Link to all the comments.

2 calls to heartbeat_comments_load_more_link()
phptemplate_heartbeat_comments in modules/heartbeat_example/heartbeat_example.module
Theme function for heartbeat comments
theme_heartbeat_comments in modules/heartbeat_comments/heartbeat_comments.module
Theme function for heartbeat comments

File

modules/heartbeat_comments/heartbeat_comments.module, line 673
heartbeat_comments.module Heartbeat comments can come with two possible

Code

function heartbeat_comments_load_more_link($uaid, $node_comment, $nid = 0) {
  $attributes = array();
  $load_more = variable_get('heartbeat_comments_load_more', 'page');
  if ($load_more == 'ajax') {
    $attributes['onclick'] = 'javascript: Drupal.heartbeat.comments.load(' . $uaid . ', ' . (int) $node_comment . ', ' . $nid . '); return false;';
  }
  $attributes['class'] = ' heartbeat-comment-more-' . $load_more;
  if ($node_comment && $nid) {
    return l(t('More »'), 'node/' . $nid, array(
      'html' => TRUE,
      'attributes' => $attributes,
    ));
  }
  else {
    return l(t('More »'), 'heartbeat/message/' . $uaid, array(
      'alias' => TRUE,
      'html' => TRUE,
      'attributes' => $attributes,
    ));
  }
}