You are here

function signature_forum_comment in Signatures for Forums 6

Same name and namespace in other branches
  1. 5.2 signature_forum.module \signature_forum_comment()
  2. 5 signature_forum.module \signature_forum_comment()

Implementation of hook_comment().

File

./signature_forum.module, line 470
Tweaks signatures in ways inspired by other traditional forum software:

Code

function signature_forum_comment(&$comment, $op) {
  if ($op == 'view') {
    $settings = variable_get('signature_forum_settings', signature_forum_defaults());
    if ($settings['signature_forum_auto_insert']) {
      $comment->comment .= signature_forum_get_signature($comment);
    }
  }
  elseif ($op == 'insert' || $op == 'update') {
    $delta = $comment['cid'];
    $status = $comment['signature_forum'];
    signature_forum_save_comment_status($delta, 'comment', $status);
  }
}