View Issue Details

IDProjectCategoryView StatusLast Update
0008378mantisbtotherpublic2007-10-24 02:27
Reporterjreese Assigned Togiallu  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Target Version1.1.0rc2Fixed in Version1.1.0rc2 
Summary0008378: Select custom avatar for default Gravatar image.
Description

Rather than using the obnoxious and ugly Gravatar default, Mantis should default to a subdued, friendly, and uninteresting image, so as to not distract users while reading the page.

This should be a configurable URL to the image location, so that other Mantis sites can easily choose their own custom default avatar. Perhaps $g_show_avatar_default = "%path%images/avatar.png"

Tagspatch
Attached Files
GenericAvatar.png (2,278 bytes)   
GenericAvatar.png (2,278 bytes)   
default_gravatar.png (4,758 bytes)   
default_gravatar.png (4,758 bytes)   
unknown_person.bmp (7,398 bytes)   
unknown_person.bmp (7,398 bytes)   
unknown_person.png (895 bytes)   
unknown_person.png (895 bytes)   
mantis_avatar_2007-10-05.patch (1,223 bytes)   
diff --git a/config_defaults_inc.php b/config_defaults_inc.php
index 4bc6f65..92b6a8a 100644
--- a/config_defaults_inc.php
+++ b/config_defaults_inc.php
@@ -528,6 +528,9 @@
 	# Only users above this threshold will have their avatar shown
 	$g_show_avatar_threshold = DEVELOPER;
 
+	# Default avatar for users without a gravatar account
+	$g_show_avatar_default = "%path%images/avatar.png";
+
 	############################
 	# Mantis JPGRAPH Addon
 	############################
diff --git a/core/user_api.php b/core/user_api.php
index 36d54b7..68e9ac3 100644
--- a/core/user_api.php
+++ b/core/user_api.php
@@ -636,7 +636,7 @@
 	# in this first implementation, only gravatar.com avatars are supported
 	function user_get_avatar( $p_user_id ) {
 		$t_email = strtolower( user_get_email( $p_user_id ) );
-		$t_default_image = "/images/gravatar_logo.gif";
+		$t_default_image = config_get( 'show_avatar_default' );
 		$t_size = 80;
 		$t_avatar_url = "http://www.gravatar.com/avatar.php?gravatar_id=" . md5( $t_email ) .
 				"&default=" . urlencode( $t_default_image ) .
diff --git a/images/avatar.png b/images/avatar.png
new file mode 100755
index 0000000..16d5b18
Binary files /dev/null and b/images/avatar.png differ
mantis_avatar_2007-10-05.patch (1,223 bytes)   
MantisAvatar.png (4,616 bytes)   
MantisAvatar.png (4,616 bytes)   
MantisAvatar.jpg (1,262 bytes)   
MantisAvatar.jpg (1,262 bytes)   

Activities

jreese

jreese

2007-09-20 13:23

reporter   ~0015678

Last edited: 2007-09-20 13:24

I have attached my first (quick) attempt at what I feel the default avatar should be (GenericAvatar.png). I am greatly open to suggestions as I lack creativity in the arts department, but I can handle myself well in any graphics app. Giallu has expressed his satisfaction with this first attempt as well.

DGtlRift

DGtlRift

2007-09-20 16:34

reporter   ~0015679

Based on images from issue 0007994 I added an alpha channel.

ryandesign

ryandesign

2007-09-21 13:40

reporter   ~0015687

Can't we just have no icon at all, for the (I assume) majority of users who have never heard of Gravatar nor set up an icon there? I was (am) certainly surprised and displeased when I found what amounts to a rather large nasty advertisement for some service I've never heard of next to everything I've written.

jreese

jreese

2007-09-21 14:21

reporter   ~0015688

@ryandesign, that's exactly why we want to have our own default avatar that gets used when someone doesn't have a Gravatar account. It makes it easier on the eyes, and is nowehere near as obnoxious, but still gives each person a 'presence' on the site, and gives them a spot to click on to go and sign up.

vboctor

vboctor

2007-09-24 04:21

manager   ~0015701

I've added an image that can be used for default avator. I'll add any others that I find that are appropriate.

jreese

jreese

2007-09-24 08:57

reporter   ~0015703

I've modified Victor's submission to have the person facing towards the content of the bugnote, which is less visually distracting, and to use PNG to cut down on image size (7,398 vs 895 bytes).

jreese

jreese

2007-10-05 09:15

reporter   ~0015812

I've attached the patch that would allow this feature. It is very simple (three lines added/changed). I still think this needs to be added to the 1.1.0 release, especially since it currently reports a non-existant location to gravatar when specifying the default image, leading to major load times while Gravatar tries to return a non-existant location, eventually returning a different image anyway.

giallu

giallu

2007-10-05 10:50

reporter   ~0015814

Ok John. I'm taking care of this (and yes, I think it's worth adding to the 1.1 branch)

vboctor

vboctor

2007-10-05 13:20

manager   ~0015817

OK, changed target version to 1.1.0rc2.

giallu

giallu

2007-10-07 04:51

reporter   ~0015825

What about using something from the Tango project?

http://tango.freedesktop.org/Image:Incognito.png

looks like a good candidate

jreese

jreese

2007-10-07 11:14

reporter   ~0015827

It looks nice, but it doesn't fit the Gravatar size (64x64 vs 80x80). Or does Gravatar automatically resize images to fit?

giallu

giallu

2007-10-07 17:20

reporter   ~0015829

I did not look hard enough, but Tango icons are usually produced in SVG, so we should be able to resize it nicely to 80x80

BTW, gravatar serves avatars in all (squared) sizes from 1x1 to 80x80.

jreese

jreese

2007-10-12 19:21

reporter   ~0015857

Giallu, I re-worked my production for lower contrast similar to the Tango icon. I attached both a PNG (I used PNGOUT to optimize the PNG to 4616 bytes from 5751) and a much smaller JPEG (1262 bytes). Hope you can get this put in soon.

giallu

giallu

2007-10-14 18:37

reporter   ~0015867

Fixed in BRANCH_1_1_0. I will merge this to HEAD later

Related Changesets

MantisBT: master-1.1.x 9fab30dc

2007-10-14 18:35

giallu


Details Diff
Fix 8378: Select custom avatar for default Gravatar image.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@4641 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0008378
mod - core/user_api.php Diff File
add - images/no_avatar.png Diff File
rm - images/gravatar_logo.gif Diff
mod - config_defaults_inc.php Diff File