How to override node comment form template? I usually override a form template this way.

/**
 * Implementation of hook_theme().
 */
function MODULE_theme() {
  return array(
    'user_login' =&gt; array(
      'render element' =&gt; 'form',
      'template' =&gt; 'user_login',
      'path' =&gt; drupal_get_path('module', 'MODULE').'/templates',
    ),
  );
}


I create templates/user_login.tpl.php in my module folder; then, I can override the form.

I tried overriding a node comment form this way, but it didn't work: The node comment form didn't use my custom template file.

I have googled a lot, but I got nothing about overriding a node comment form template.

How can I force Drupal to use a template file for the node comment form?
In Drupal 7, and in the case of the user login form, your trick works because the form doesn't set the #theme property; in that case, Drupal will use the theme function whose machine name is equal to the form ID. (For the login for, that is user_login.)
That is not true for the comment form, for which its form build (comment_form()) sets the #theme property.

$form['#theme'] = array('comment_form__node_' . $node-&gt;type, 'comment_form');


There isn't a match between the machine name of the theme the form builder wants to use, and the comment-edit form ID; the latter is comment_node_CONTENT_TYPE_form, not comment_form__node_CONTENT_TYPE. If you were defining a comment_form theme function, that should work.

In Drupal 6, there is no #theme property for comment_form, which is the form ID of the comment edit form.