View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010850 | mantisbt | feature | public | 2009-08-19 04:12 | 2011-08-18 06:11 |
Reporter | sdurkin | Assigned To | jreese | ||
Priority | low | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.0rc1 | ||||
Target Version | 1.2.5 | Fixed in Version | 1.2.5 | ||
Summary | 0010850: Gravatar code wrong | ||||
Description | In 1.2.0rc1, the code generated for Gravitars is ... <img This currently works, but as you can see from the gravatar spec ... it is incorrect. For better future-proofing, the code should be changed to something like ... (I hope my entered formatting is preserved). <img | ||||
Tags | patch | ||||
Attached Files | gravatar_url_2011-05-04.patch (989 bytes)
From 49b9da249dea883ceb2db83e4e579cda176400f0 Mon Sep 17 00:00:00 2001 From: Dominik Blunk <dominik@blunk.ch> Date: Tue, 5 Apr 2011 10:38:42 +0200 Subject: [PATCH] Modified gravatar url to meet gravatars updated specification http://en.gravatar.com/site/implement/images/ --- core/user_api.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/core/user_api.php b/core/user_api.php index 918bce9..dfad5ca 100644 --- a/core/user_api.php +++ b/core/user_api.php @@ -815,7 +815,7 @@ function user_get_avatar( $p_user_id, $p_size = 80 ) { $t_gravatar_domain = 'https://secure.gravatar.com/'; } - $t_avatar_url = $t_gravatar_domain . 'avatar/' . md5( $t_email ) . '&default=' . urlencode( $t_default_image ) . '&size=' . $t_size . '&rating=G'; + $t_avatar_url = $t_gravatar_domain . 'avatar/' . md5( $t_email ) . '?d=' . urlencode( $t_default_image ) . '&s=' . $t_size . '&r=G'; $t_result = array( $t_avatar_url, $t_size, -- 1.7.3.1.msysgit.0 | ||||
Also, it would be really good if administrators could turn on wavatar or monsterid defaults. Eg: |
|
Forget the wavatar thing. I just noticed you can set: |
|
I can see that the code snippets from the developer resources on the Gravatar website support the 1.2.0rc1 implementation, but I think that these developer resources are out of date. My suggested implementation in core/user_api.php would be ... function user_get_avatar( $p_user_id, $p_size = 80 ) {
} |
|
oops - there should be a ? after .jpg, not an & |
|
dominik, you added a patch without any comments |
|
Hi Atrol Yes the issue should be reopened (I cannot do this I get an error "access denied")... No the path is right, it's just the first & which should be an ? to mark the start of parameters... Sorry for the missing clarifications... Greetings Dominik |
|
Dominik, I am wondering because I found ?s (short form of size) and ?r (short form of rating) when looking at the link that David provided |
|
Hi Atrol You're right - there are two things to consider: a) the old patch did only fix the semantically wrong url: without patch: with patch: b) the new patch contains also the new short params: with new patch: |
|
Thanks Dominik, I removed the old patch. |
|
Fix committed to 1.2.x and master branches. |
|
Reminder sent to: jreese John, IMO your commit was not the right one. I think that Dominik's patch gravatar_url_2011-05-04.patch is OK. |
|
Well, only the first & needed to be changed to a ?, and their documentation says that both the short and long forms are acceptable, at which point I would prefer to use the lang forms to be more explicit. The patch I committed is therefore basically comparable to what Dominik submitted. |
|
I agree to use the long form Still confusing: I played with Firebug to test the size parameter. There is also another difference to the documentation So your patch is also OK concerning G and g |
|
MantisBT: master 0cb72b7c 2011-03-25 06:04 Details Diff |
Fix 0010850: Update Gravatar URL format to meet current standard Gravatar's official URL syntax for loading an image is different to the older mechanism MantisBT is still using. The official syntax is available at: http://en.gravatar.com/site/implement/images/ |
Affected Issues 0010850 |
|
mod - core/user_api.php | Diff File | ||
MantisBT: master-1.2.x cd33b412 2011-03-25 06:04 Details Diff |
Fix 0010850: Update Gravatar URL format to meet current standard Gravatar's official URL syntax for loading an image is different to the older mechanism MantisBT is still using. The official syntax is available at: http://en.gravatar.com/site/implement/images/ |
Affected Issues 0010850 |
|
mod - core/user_api.php | Diff File | ||
MantisBT: master-1.2.x 162c0d27 2011-04-05 14:13 Details Diff |
Fix 0010850: commit cd33b412 generates incorrect url |
Affected Issues 0010850 |
|
mod - core/user_api.php | Diff File | ||
MantisBT: master b01c7265 2011-04-05 14:13 Details Diff |
Fix 0010850: commit cd33b412 generates incorrect url |
Affected Issues 0010850 |
|
mod - core/user_api.php | Diff File |