I can't show the coments and the number of its for the Anonymous rol.

linuxbcn - June 24, 2008 - 13:43
Project:Grid Inspired
Version:5.x-5.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:patch (code needs work)
Description

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?

Tnks in advanced!

#1

marquardt - June 24, 2008 - 21:57

A simple way to get the $links div (including any read more links) on the summary pages would be to modify node.tpl.php to output them; in the original version, this is apparently not foreseen. The attached patch does this, also wrapping the the $links div into the same class ("meta") as for full page views, but not showing any tags. One probably has to add more CSS to get the links line consistent with the typography in, e.g., the comment links.

I don't like this solution very much, though. I believe the original Wordpress theme had a link to the comments (and their number) on the upper right part of each individual post / teaser, where now the author name is displayed - plus a "Read more" link at the end of the teaser if necessary...

AttachmentSize
grid_inspired_274249_01.patch793 bytes

#2

marquardt - June 25, 2008 - 00:07

Ok, here's an alternative - the attached patch (again against the original node.tpl.php) places the number of comments into the upper right corner of each post, similar to the original WordPress theme.

There still isn't an explicit "Read more" link. However, implementing one following Earl Miles' excellent suggestions at www.angrydonuts.com is probably straightforward. Or you could make use of the Read More Tweak module, which really just is an implementation of Earl's ideas. There's even an unofficial version for D6 in the issue queue which mostly works fine for me; the only drawback is that this particular module hasn't seen much work recently.

What would be the best way forward? Relying on an external module, or writing a customization module dedicated to a single theme?

AttachmentSize
grid_inspired_274249_02.patch2.33 KB

#3

marquardt - June 25, 2008 - 00:07
Status:active» patch (code needs work)

#4

marquardt - June 25, 2008 - 00:43

Ooops - some CSS is also required. I've added a bit to grid_focus.css but forgot those changes in the previous patch. Here it is - both this and the patch from comment #2 are required for the "alternative" solution...

AttachmentSize
grid_inspired_274249_04.patch807 bytes

#5

linuxbcn - June 25, 2008 - 15:41
Title:I can't show the coments and the namber of its for the Anonymous rol.» I can't show the coments and the number of its for the Anonymous rol.

This non solution the issue. The theme don't show the coments for the anonymous user.

#6

marquardt - June 25, 2008 - 17:35

Strange.

I could only reproduce this behavior by unchecking the 'access comments' permission for anonymous users in Home -> Administer -> User management -> Permissions. I know it's a pain, but have you double / triple checked?

If you click on a link while being logged in, copy the URL from that particular comment to the clibboard, log out and and try to navigate to the URL of the comment - does that give you an error message? If that doesn't work, do you find any entries in the log files of your web server?

#7

linuxbcn - June 27, 2008 - 16:51

UPS! yes, the permisions for the anonymous users were correct. The problem is that existing comments were without Post, only to see it was possible admin.
Now is great!

 
 

Drupal is a registered trademark of Dries Buytaert.