Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#6802 closed enhancement (fixed)

Add Gravatar's Identicon, MonsterID, and Wavatar support

Reported by: viper007bond's profile Viper007Bond Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch needs-testing 2nd-opinion
Focuses: Cc:


We should support this parameter via the options page.

Attachments (5)

6802.patch (8.6 KB) - added by Viper007Bond 15 years ago.
6802.png (38.7 KB) - added by Viper007Bond 15 years ago.
Screenshot of the patched options page
6802.2.patch (8.6 KB) - added by Viper007Bond 15 years ago.
Use the current user's e-mail address for fun to display the example avatars
discussion_options_action_hook.diff (4.8 KB) - added by filosofo 15 years ago.
fix_forcedefault.patch (693 bytes) - added by ionfish 15 years ago.

Download all attachments as: .zip

Change History (18)

#1 @Otto42
15 years ago

+1, however I'd like to make it more generic than that.

There should be a textbox to specify the default gravatar parameter. It could either take a URL for a default, or take the 'identicon' string and such.

Perhaps some js selection to fill in that blank properly with the various gravatar built-in options or something.

Note that get_avatar($comment,80,'identicon') in the theme currently works perfectly.

15 years ago

#2 @Viper007Bond
15 years ago

Great minds think alike. I coded up a patch and then saw your comment, Otto, heh.

Anyway, take a look at my patch and let me know what you guys think. :)

15 years ago

Screenshot of the patched options page

15 years ago

Use the current user's e-mail address for fun to display the example avatars

#3 @Viper007Bond
15 years ago

  • Keywords has-patch needs-testing 2nd-opinion added; needs-patch removed

#4 @filosofo
15 years ago

I wish we would go the other way and remove the existing radio buttons. Gravatars are particular to a theme: if a theme designer hasn't made use of the function call, then the radio buttons do nothing. I don't think there is another core admin option quite so dependent on a particular theme's design.

Instead, I've attached a patch for an action hook on that settings page that would allow themes or plugins to add in an indefinite variety of geegaws.

#5 @Viper007Bond
15 years ago

Sorry, but I don't like your patch. Besides making it rather complex for a novice user to add Gravatars to their existing theme (right now, all you have to do is drop in the function), there is Gravatar support in the admin area. Those options need to be there.

I'm not saying my solution is the best out there (although it's the best I could come up with), but it's easy for the end user.

A simple "these options will do nothing if your theme lacks avatar support" message would get the job done IMO.

#6 @ryan
15 years ago

(In [7879]) Default avatar selector. Props Viper007Bond. see #6802

#7 @ryan
15 years ago

I hacked the patch a bit to move as much of the logic as I could into get_avatar() and to make everything filterable. I also removed custom avatars for now. Let's bring it back as an upload box.

#8 @Viper007Bond
15 years ago

Sounds good to me and nice trick with preg_replace(). That didn't even occur to me to add forceddefault via that. :D

#9 @ryan
15 years ago

(In [7886]) Add blank to default avatars. Rename default to Mystery Man. see #6802

#10 @ionfish
15 years ago

The forcedefault argument isn't being appended to the URL because it's looking for the wrong kind of quotes, so if the user has a Gravatar they won't be able to see the options properly, just their own avatar repeated several times. Patch to fix this is attached.

#11 @Viper007Bond
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#12 @Viper007Bond
15 years ago

ionfish: the <img> tag uses single quotes, so you patch isn't needed.

#13 @Viper007Bond
15 years ago

Post explaining how theme developers can add new default avatars to the options page:

Note: See TracTickets for help on using tickets.