Author and date details in comments not showing
Irous - January 16, 2008 - 18:23
| Project: | Grid Inspired |
| Version: | 5.x-5.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Hi, great theme. However, the author and date details aren't showing up in the comments areas when using this theme. There have been similar issues in other themes with this, check out here:
Hopefully you can make a fix using their solutions.

#1
Sorry, I'm slightly incorrect with my original post, so I'm making a slight correction here.
The poster and date details in all comments (and forum posts) are showing, but they're all wrong. They have the same incorrect date value (all posts on my site are listed as from 1970!), and all are tagged as anonymous posters. I change the theme to another, and the details are all correct.
#2
#3
I have seen this bug in the same theme. He looked at the code and verified that the call to function poorly dated.
You hit the comment.tpl.php which I modified to work correctly.
To see if you serve!
<div class="comment<?php if ($comment->status == COMMENT_NOT_PUBLISHED) print ' comment-unpublished'; ?>">
<?php if ($new != '') { ?><span class="new"><?php print $new; ?></span><?php } ?>
<h3 class="title"><?php print $title; ?></h3>
<?php if ($picture) print $picture; ?>
<div class="content"><?php print $content; ?></div>
<div class="meta"> <span class="commenter"> <?php print (theme('username', $node)) ?> </span> <span class="date"> <?php print ( format_date($comment->timestamp, 'custom', 'd')) ?> <?php print (format_date($comment->timestamp, 'custom', 'M')) ?> <?php print (format_date($comment->timestamp, 'custom', 'Y')) ?> </span> <?php print $links; ?></div>
</div>
#4
check first if this fixes teh problem
#5
The date details are fixed, but posts are still all listed as posted by anonymous when they're not.
#6
I changed the code to correct this problem too. Test it!
<div class="comment<?php if ($comment->status == COMMENT_NOT_PUBLISHED) print ' comment-unpublished'; ?>">
<?php if ($new != '') { ?><span class="new"><?php print $new; ?></span><?php } ?>
<h3 class="title"><?php print $title; ?></h3>
<?php if ($picture) print $picture; ?>
<div class="content"><?php print $content; ?></div>
<div class="meta"> <span class="commenter"> <?php print t('!username', array('!username' => theme('username', $comment), )); ?> </span> <span class="date"> <?php print ( format_date($comment->timestamp, 'custom', 'd')) ?> <?php print (format_date($comment->timestamp, 'custom', 'M')) ?> <?php print (format_date($comment->timestamp, 'custom', 'Y')) ?> </span> <?php print $links; ?></div>
</div>
#7
Cool, works :) I'm gonna have to change it to show time (hours and minutes) though because it makes sense for the forum, but apart from that, it's working great now, thanks :)
#8
Great!
I am working with them and this needed to fix these things.
#9
I've attached linuxbcn's modification of
comment.tpl.phpfrom #6 above as proper patch so that it can be reviewed and finally be put into the CVS by theneemies.#10
I'm just testing the gloval performance in this theme for the project carrer.cat and i find another code bug.
When the users are a Anonymous the theme non show the coments and the number of coments at the Links div. I don't know how repair this bur. I find the cone from Garland and don't see the pice of code for this function.
The privileges for Anonimous Role are checked for acces to comments.
Any idea?
#11
Hmm.
@linuxbcn: I changed the title of this issue back to the original one - after all, the path you provided solves that original problem, and I believe it makes much sense if the solution for it can be found by searching for that problem. I hope you don't mind...
On the number of comments visible - I think the Drupal version of this theme just doesn't show the numbers of comments for any given post on summary pages; I also don't see them when being logged in (in my Drupal 6 version, that is - so there might be other bugs in that port, of course). Could post a feature request that this could be added?
Also part of the links is a "Read more" link when only the teasers are displayed; right now, one has to click on the posts title to see the full post. One could place the links at the end of each teaser, as in Garland. However, I believe the original theme for WordPress had the number of comments on the top right of each post, where the Drupal version now displays the (user) name of the author, and not necessarily a "Read more". So maybe it was left out on purpose...
If you want to have the links at the end of the teasers, move the printing of the $links variable out of the if ($page != 0) clause in node.tpl.php. I can post post a patch if you open another issue...
@theneemies - are you still following the issue queue for grid_inspired?
Hope this helps,
Christian.
#12
No problem for the title change, mor better.
I Put the feature request for this issue in this link http://drupal.org/node/274249
Yes, the link "leer más" is an petition of my client. A lot of people don't know the feature "click in the title" for read all node ;·(
Yes, I Know this great feature ($page != 0)
Tnk!