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:

http://drupal.org/node/112584

Hopefully you can make a fix using their solutions.

#1

Irous - January 17, 2008 - 05:54

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

theneemies - January 30, 2008 - 10:56
Assigned to:Anonymous» theneemies

#3

linuxbcn - February 5, 2008 - 19:10
Assigned to:theneemies» linuxbcn
Status:active» fixed

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>

AttachmentSize
comment.tpl_.php_.txt 693 bytes

#4

robertgarrigos - February 5, 2008 - 19:10
Status:fixed» needs review

check first if this fixes teh problem

#5

Irous - February 6, 2008 - 12:32

The date details are fixed, but posts are still all listed as posted by anonymous when they're not.

#6

linuxbcn - February 8, 2008 - 09:06

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>

AttachmentSize
comment.tpl_.php_.txt 735 bytes

#7

Irous - February 10, 2008 - 15:36

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

linuxbcn - February 11, 2008 - 08:44
Status:needs review» closed

Great!

I am working with them and this needed to fix these things.

#9

marquardt - May 28, 2008 - 23:49
Component:Miscellaneous» Code
Assigned to:linuxbcn» Anonymous
Status:closed» needs review

I've attached linuxbcn's modification of comment.tpl.php from #6 above as proper patch so that it can be reviewed and finally be put into the CVS by theneemies.

AttachmentSize
grid_inspired_210767_09.patch 1017 bytes

#10

linuxbcn - June 23, 2008 - 15:36
Title:Author and date details in comments not showing» Now not showing the coments (and number on coments) for anonymous users (with the rigth privileges)

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

marquardt - June 23, 2008 - 21:53
Title:Now not showing the coments (and number on coments) for anonymous users (with the rigth privileges)» Author and date details in comments not showing
Priority:critical» normal

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

linuxbcn - June 24, 2008 - 13:44

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!

 
 

Drupal is a registered trademark of Dries Buytaert.