There are currently some display problems caused by using node.tpl.php for comments. Most specifically, the node title will link to a node/[nid] page, which isn't wanted for individual comments. Now that comment.module and nodecomment.module can be enabled on the same site, it's also troublesome that comments provided by comment.module have one set of markup while comments provided by nodecomment.module have different markup.

This patch essentially makes nodecomment.module emulate comment.module's markup for comments, which a few special cases such as showing taxonomy terms (which comments don't have to output obviously). When used with the default core markup (as in not Garland, which overrides comment.tpl.php), node comments and normal comments output identically. Note that this requires a new display style in Views for "Node comments flat", so that the theme('nodecomment') function is called instead of theme('node'), though it's perfectly acceptable to use a normal Node listing (or List or Table) view style for displaying comments, this just changes the default to use the nodecomment.tpl.php file.

CommentFileSizeAuthor
nodecomment_theming_revamp.patch12.37 KBquicksketch

Comments

quicksketch’s picture

This patch also fixes the long-standing issue for #161356: Add "New" marker on new comments, since the normal node.tpl.php file obviously doesn't include this styling.

merlinofchaos’s picture

Status: Needs review » Fixed

http://drupal.org/cvs?commit=223358 gives us a node-comment.tpl.php as well as node-comment-TYPE and we can still use node-TYPE.tpl.php just fine. This doesn't refactor the node template to look like the comment template, as this strikes me as mostly unnecessary.

http://drupal.org/cvs?commit=223368 contains the commit to add new markers.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.