ElkArte Community

Elk Development => Feature Discussion => Topic started by: Adrek on December 27, 2014, 08:38:30 am

Title: All users have the same gravatar image
Post by: Adrek on December 27, 2014, 08:38:30 am
I have small problem with gravatars on ElkArte 1.0.2.

As far as I know gravatar is image based on your email address, right? It means that it's very unlikely to have two users with the same avatar image. But somehow me and other user have the same image:
(http://i.imgur.com/BH0KSSN.png)

Here I guess will be the same issue, can someone choose avatar image as gravatar and check what image it will show?
Title: Re: All users have the same gravatar image
Post by: Spuds on December 27, 2014, 08:44:02 am
Just turned on my gravatar image here, so if you see what I really look like then its working :P
Title: Re: All users have the same gravatar image
Post by: Adrek on December 27, 2014, 08:45:38 am
hm.. do you have gravatar account?
Title: Re: All users have the same gravatar image
Post by: Spuds on December 27, 2014, 08:58:21 am
Yes I do

Just checked and that gravatar is associated with the email address that I use here.  The site settings here are "PG"

ETA: I hashed the email address you use here and sent it to Gravatar and got the default gravatar icon, which should indicate that it can't find a hash associated with that email.
Title: Re: All users have the same gravatar image
Post by: Adrek on December 27, 2014, 09:17:19 am
I think that I know what is going on.
ElkArte does not have default value for users who do not have gravatar account, here is screen from SMF mod:
(http://i.imgur.com/ysIqg0u.png)

You can choose there default style of gravatar, and it works for everyone even if user doesn't have gravatar account. Maybe this could be added in future updates?
Title: Re: All users have the same gravatar image
Post by: Spuds on December 27, 2014, 10:43:11 am
I don't know .... I mean if they don't have a Gravatar why are they selection that option, its not how that service is really intended to be used.

Why not instead just pick one from the server or upload one?

Looking at the docs,  you can specify a default image other than the one Gravatar returns with a ?d= parameter, but it also looks like its then two http calls for each image.  One to find out it does not exist, and then one to load a non default one instead, I guess that second one is on Gravatar back to your server.

The only thing I may see us doing is,  if the admin has enabled the default avatar option, then have Gravatar return that image instead of the default G image that it does now.
Title: Re: All users have the same gravatar image
Post by: emanuele on December 27, 2014, 11:00:16 am
In the d param you can also specify identicon, monsterid, wavatar, retro, mm and black, I think that's what phantom is referring to, that way instead of the "G" you get the "funny" stuff different for each email:

In the d param you can also specify identicon, monsterid, wavatar, retro, mm and black, I think that's what phantom is referring to, that way instead of the "G" you get the "funny" stuff different for each email:
phantomEmanuele
(http://www.gravatar.com/avatar/6e0012b98c706ef18fa11c91d09f1ace?s=125&r=pg&d=identicon)
(http://www.gravatar.com/avatar/edd02bbdb9ee6a2c3249a17c47be8af9?s=125&r=pg&d=identicon)
(http://www.gravatar.com/avatar/6e0012b98c706ef18fa11c91d09f1ace?s=125&r=pg&d=monsterid)
(http://www.gravatar.com/avatar/edd02bbdb9ee6a2c3249a17c47be8af9?s=125&r=pg&d=monsterid)
(http://www.gravatar.com/avatar/6e0012b98c706ef18fa11c91d09f1ace?s=125&r=pg&d=retro)
(http://www.gravatar.com/avatar/edd02bbdb9ee6a2c3249a17c47be8af9?s=125&r=pg&d=retro)
That's not a double call, just a different "default".

BTW, I think the url is wrong:
Code: [Select]
http://www.gravatar.com/avatar/6e0012b98c706ef18fa11c91d09f1aced=125&r=pg
it should be:
Code: [Select]
http://www.gravatar.com/avatar/6e0012b98c706ef18fa11c91d09f1ace?s=125&r=pg
Title: Re: All users have the same gravatar image
Post by: Spuds on December 27, 2014, 12:30:18 pm
Ah I see ...

Well I still think its silly, which only means I'm not going to make a PR for it, However others are free to do so and I'll gladly merge it in ;)

And indeed the size param looks a bit mangled there.
Title: Re: All users have the same gravatar image
Post by: Adrek on December 27, 2014, 12:49:48 pm
well, it was used as 'default avatar', but I forgot that Elk already has default avatar feature :)
Title: Re: All users have the same gravatar image
Post by: Mstcool on December 27, 2014, 04:47:25 pm
Quote from: Spuds – I don't know .... I mean if they don't have a Gravatar why are they selection that option, its not how that service is really intended to be used.

Why not instead just pick one from the server or upload one?

Looking at the docs,  you can specify a default image other than the one Gravatar returns with a ?d= parameter, but it also looks like its then two http calls for each image.  One to find out it does not exist, and then one to load a non default one instead, I guess that second one is on Gravatar back to your server.

The only thing I may see us doing is,  if the admin has enabled the default avatar option, then have Gravatar return that image instead of the default G image that it does now.



Wait, the default image is a letter G?  I always thought it is supposed to be a pic of a power on/off button LOL
Title: Re: All users have the same gravatar image
Post by: emanuele on December 27, 2014, 05:22:55 pm
Gravatar default avatar has always been the gravatar logo.
ElkArte default avatar... I think its: http://www.elkarte.net/community/avatars/Oxygen/invisible-user.png
Am I right? O:-)
Title: Re: All users have the same gravatar image
Post by: Adrek on December 27, 2014, 05:27:11 pm
Elkarte default is http://www.elkarte.net/community/themes/default/images/default_avatar.png :)
Title: Re: All users have the same gravatar image
Post by: emanuele on December 27, 2014, 05:48:34 pm
I couldn't find it in themes so I thought it was in avatars... xD