Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | Drupal-theme_0.comment.form.second.take.patch | 3.38 KB | Gábor Hojtsy |
#2 | Drupal-theme.comment.form.second.take.patch | 3.38 KB | Gábor Hojtsy |
Drupal-theme.comment.form.patch | 3.39 KB | Gábor Hojtsy | |
Comments
Comment #1
Gábor HojtsyTo 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).
Comment #2
Gábor HojtsyWell, 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.
Comment #3
Gábor HojtsyReplace patch to fix parse error introduced with my last patch :))
Comment #4
Dries CreditAttribution: Dries commentedI committed this patch to HEAD but:
Comment #5
(not verified) CreditAttribution: commentedComment #6
Borek-1 CreditAttribution: Borek-1 commentedI 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.
Comment #7
Heine CreditAttribution: Heine commentedYou 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.
Comment #8
(not verified) CreditAttribution: commented