Today I noticed that the Tabbed Sidebar widget that comes with the Arras theme does not display Gravatars correctly in its “Comments” tab. Gravatars of local registered users show up fine but any other come up as the default avatar.
It turns out that the fix is extremely simple. It involved editing the file arras-theme/library/widgets.php. Open the file in your favorite editor and fine the line:
echo get_avatar($comment->user_id, 36);
It is the only line in the file that calls get_avatar() so you can search for the name of the function. Once you have found the line, change it to the following:
echo get_avatar($comment, 36);
Save the file and from now on, the proper Gravatars will be displayed in the “Comments” tab of the widget.
VN:F [1.9.13_1145]
Rating: 5.0/5 (5 votes cast)
VN:F [1.9.13_1145]
Rating: +5 (from 5 votes)
Fix for displaying Gravatars in Arras's Tabbed Widget, 5.0 out of 5 based on 5 ratings 
Related Posts
-
How to Add Additional Tabs to the Arras’ Tabbed Sidebar Widget
01 March 2011 1:53 PM |
8 Comments
Recently, I had a visitor to my website ask a very interesting question after reading the post on the Tagged Post Widget – How can I add more tabs to [...]
-
Change the look of the Popularity tab in Arras’ Tabbed Widget
30 July 2010 1:45 PM |
39 Comments
After upgrading to WP 3.0 and Arras 1.4.3, I also re-arranged some of its layout – most notably, I stopped displaying the Featured posts in the Tabbed widget and replaced [...]
-
Tagged Posts Widget
06 October 2010 5:57 PM |
11 Comments
With the upgrade of my site to Arras 1.5.0.1, I started work on my own child theme (you can see the results on the main page). One of the things [...]
-
Use Arras’ Featured Display For Other Rankings
19 May 2011 2:52 PM |
4 Comments
While I was in the process of developing my own child theme based on the Arras theme, I wanted to modify the original to display different rankings and posts in [...]
-
Upgrading the site to WP 3.0
14 July 2010 9:32 AM |
No Comments
WordPress 3.0 has been out for some time now and it is supposed to offer a very large number of improvements over the old version.
I hesitated to upgrade right away [...]
super! thank you…
Many thanks for this tip!
Hi, I’m trying to use only gravatar icons on my website.
Well I put Wp-Gravatar plugin, and want to show Bigger gravatar on comments. Then I just deactivate wp-avatar, and configured gravatars only. The problem is that if I deactivate this, we can’t see gravatars on the Tabbed Sidebar.
How can I fix this? :S I don’t know the code.
here is an example
http://www.escuadronpikmin.com/2010/10/11/call-of-duty-black-ops-de-wii-tendra-su-propio-headset-exclusivo/
I configured a default avatar for my own.
Tronius,
Let me see if I understand your problem correctly: you are using the WP-Gravatar plugin instead of the built-in avatar capability, correct?
If that is the case, I think I know why you are not seeing avatars/gravatars in the Tabbed Sidebar:
The Tabbed Sidebar uses the WP function “get_avatar()”. As described in the WP documentation this function is pluggable (meaning, plugins can replace it) and there is also are get_avatar filter which the plugins can use. However, it doesn’t appear that WP-Gravatar is doing either one of those. Therefore, since you’ve disabled WP’s built-in avatar capability, the get_avatar() function does not return anything.
I think, that is why avatars are missing from the Tabbed Sidebar. Hope this helps.
Yes, it’s because of this, but I don’t know how to change this. I’m trying a lot, but I don’t know, I’m noob on this.
Thanks for the reply
Tronius,
Unfortunately, this appears to be a WP-Gravatar plugin problem. They should be handling the “get_avatar” filter better.
I am not very familiar with the WP-Gravatar plugin at all but here is what I would suggest:
Replace the line show in the original post here with the following:
if (function_exists("prologue_show_gravatar_post")) { echo prologue_show_gravatar_post($comment->user_id); } else { echo get_avatar($comment, 36); }Hope this helps a bit.
Not the perfect soslution, but no problem for now.
I’m just trying to put bigger avatar on commets posts, and a smaller ones on the tabbed sidebar.
If you know the solution…
Thank you for the reply
Sensational! I’ve been wondering about this for a while now, and this fix is just perfect! Thanks for going to the effort of figuring it out, and then sharing it with us all. Whoo hoo!!
Hi
I tried this just now and get message errors and the site is offline. Was this for a previous version and if so if there now a newer fix for this.
I did exactly what you said above but it didn’t work.
My avatar shows up in the sidebar but that of people who comment, whilst it shows in the post, does not show up in the tabbed sidebar.
My site is new and working on it so I’m hoing your site may be able to give me more idea/solutions
I am actually getting the same thing. Since the gravatars are loaded from gravatar.com. I tend to think that it might be a problem with their site as this worked perfectly just this morning.
I am actually getting “Gateway Timeout” errors which points to some network issue.
Hi Mitko
I only utilised the tabbed sidebar yesterday so I have no idea as to whether or not it was working.
Are you saying that in ‘theory’ the should automatically appear through gravater.com and I don’t have to do anything (if you theory is correct?)
Cheers
Paul
Actually I’m wondering if it could be some setting somewhere as well. Any ideas as to where I can find them and what they should be? I have found some under settings>discussion and I have shown avatar so not sure.
Yours are now showing up in the sidebar but mine are not and are still showing the defaulted one?
Dvotee,
You have to enable Gravatar avatars in your wordpress blog in the Settings -> Discussions section (under Avatars) but I assumed that you had already done that.
Once enabled, gravatars for users registered with Gravatar.com should start appearing automatacally, as long as the email address with which the comment was posted matches the email address used on the Gravatar.com website.
Yes I did have them enabled in settings>Discussions but still not working.
Guess it’s either a mismatch on email or something else but their gravatar shows in the actual reply just not in the tabbed sidebar.
Yes, I see the problem. Can you email me your arras-theme/library/widgets.php file? fulcrumusa at netscape dot net
OK Sure I’ll do that when Im back home and at my usual computer. Thanks