It would be consequent to enable comment_form() to be themed, since all the other parts of the module enable themeing (including the comment controls). The attached patch lets user themes customize the comment submission form.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Category: feature » task

To strengthen the point of this patch, it would enable theme authors to add the avatar to the comment form, or use customized formatting for input field (ie. span the whole available space).

Gábor Hojtsy’s picture

Well, the whole box display should be controled by the theme (like in the comment controls themeing), so here is an extended patch, which allows full comment form themeing.

Gábor Hojtsy’s picture

Replace patch to fix parse error introduced with my last patch :))

Dries’s picture

I committed this patch to HEAD but:

  1. I'm not sure how or why someone would like to theme the comment form.
  2. it would be nice if the comment module's theme functions would be Doxygen-ified like, for example, the forum module's theme functions. Just adding them to the group of themeable functions would be a great improvement already.
Anonymous’s picture

Borek-1’s picture

Version: » 4.7.2
Status: Closed (fixed) » Active

I don't see theme_comment_form neither in 4.7 nor in HEAD so I reopened this task. Support for comments theming is a weak point in Drupal's theming system.

Heine’s picture

Status: Active » Fixed

You can theme the comment form by it's form_id, just like any other form. The declaration to use is theme_comment_form($form) (eg. phptemplat_comment_form). The form is surrounded by a theme('box') call.

Anonymous’s picture

Status: Fixed » Closed (fixed)