Theme comment output: Remove $title and make Submitted by date the individual comment link
fluidicmethod - July 5, 2009 - 21:53
I think I can achieve these changes on the .module but is there a workaround that I can just put in my comment.tpl.php or theme folder in general.
I have disabled Subjects on comments because I just want the comment body itself. And I want the link of the comment applied to the Timestamp -- which is logically how it should be in the beginning.
Instead of
TITLE (default first words of body as a link)
Submitted by Xyz at Time
BODY (blah blah blah)Can we have
Submitted by Xyz at Time (Time becomes the link)
BODY (blah blah blah)
Here's a link to a snippet
Here's a link to a snippet that should help: http://drupal.org/node/498186
This will make a comment # link by default (which is probably the most common use).
You'll need to adjust it a bit if you want it to apply to the submitted date instead.
You can use it in the template.php of any theme, however just change the instances of "blueprint" to your theme's name. Refresh the theme registry after adding the code.
As a side note... I don't know if linking the time is the best plan. I've never seen it that way for comment links on any site, so I doubt the average user will make the connection. Most common I've seen either the comment title, comment #, or the word "link" or "permalink" will be familiar to users.
-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides