Closed (fixed)
Project:
User Badges
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Sep 2009 at 16:28 UTC
Updated:
25 Jan 2012 at 18:29 UTC
I've noticed the Badge image does not display for anonymous users and there is no permission option. Is this typical?
Comments
Comment #1
Richard Blackborder commentedThis is not usually the case. Are you using the private download setting in your Drupal installation? If so, that might be the reason. The dev version is compatible with private download, but not the 1.5 version.
Otherwise, I do not believe the problem is related to User Badges.
But if you give more info, I may be able to help.
Comment #2
rewted commentedThe File system is set to: Public - files are available using HTTP directly.
Badge is displayed only when logged in.
Comment #3
Richard Blackborder commentedTry going to the admin menu, under "performance" and clicking the "Clear Cached Data" button.
Comment #4
rewted commentedYeah, that was one of the first thing I tried before submitting the initial post. :)
Comment #5
Richard Blackborder commentedOn what page and at what location does the badge image not display?
Please tell me exactly what is not displaying.
Is it that the badge image is broken, or the badge is not displaying at all?
Is there anything else that is not displaying? Even if it's just a line or a title, it makes a difference.
Please give as much info as possible. I will try to help, but I need more information.
Comment #6
rewted commentedThe image (badge I set) isn't displaying for anonymous users, but I can see it once logged in.
- No, the image is not broken. Nothing is being displayed.
- Everything else seems to display.
- The line I use to produce the badge is:
print user_badges_for_uid($user->uid);- That line is in my comments.tpl.php
- Anonymous users have permission to view uploaded content.
Comment #7
Richard Blackborder commentedI think $user that you are retrieving is the current viewing user, not the comment's author.
Try this:
Alternatively, consider the Author Pane module, which integrates with this one.
Comment #8
rewted commentedOk that seems to work. I didn't really understand the README doc, perhaps you can update it with a little more detail under the "display badges" segment.
$user = current viewing user.
$comment = owner of comment
$node = What will this display?
Are there others?
Thanks for your time and assistance.
Comment #9
Richard Blackborder commentedDid you see this bit in the README file? I think it is pretty clear:
Comment #10
rewted commentedYes, of course. I just commented on it above.
May make sense to you, but for individuals that do not know PHP or familiar with Drupal may not understand.
Comment #11
Richard Blackborder commentedIn Drupal (and theming), $node is a PHP object that represents the node, and $comment represents the comment. They are not always both available in every template file, so check the comments at the top of the file to see what is available. You may have access to other uids (user ids), and in these cases you can replace $uid with that value.
Comment #13
tbrowninfinitymark commentedDoh - I answered my own question. My apologies.