Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: digger on September 21, 2012, 05:41:50 PM

Title: Gravatar 4 SMF
Post by: digger on September 21, 2012, 05:41:50 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3456)

Gravatar 4 SMF
Languages: English, Russian, Spanish

History:
1.0 Initial release.
1.1 Add option for setup custom image added. Fixed "Undefined index: email_address" warning.
1.3 Add option for force Gravatars to be used instead of normal avatars.
1.4 Fix gravatar in the member profile summary.
1.4.1 HTTPS for gravatars is enabled for SMF version 2.0.14 and above.
1.4.2 Add support for robohash style.
1.4.3 Add Latin Spanish translation.

Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts on blogs and web forums, so why not on any site?
Gravatars are globally recognised avatars. Basically, you upload your avatar to the Gravatar site, and it will automatically appear on all blogs and forums that support Gravatar. Whenever you change your avatar, it will automatically change on all Gravatar-enabled sites. Gravatars associated with the users email addresses.

How this mod works:
If the "Enable gravatar" option is enabled, Gravatar will be used for all members who have not set an forum avatar. If a member have uploaded Gravatar at gravatar.com (http://gravatar.com), it will be used. For any member who don't have own Gravatar, unique image will be generated a themed image that is unique to member's email address.

You can use this mod for setup custom default avatar.
Also you can force Gravatars to be used instead of regular avatars.

(https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y) (https://www.gravatar.com/avatar/00000000000000000000000000000000?d=identicon&f=y) (https://www.gravatar.com/avatar/00000000000000000000000000000000?d=monsterid&f=y) (https://www.gravatar.com/avatar/00000000000000000000000000000000?d=wavatar&f=y) (https://www.gravatar.com/avatar/00000000000000000000000000000000?d=retro&f=y) (https://www.gravatar.com/avatar/00000000000000000000000000000000?d=robohash&f=y)

This mod is licensed under MIT License https://opensource.org/licenses/MIT (https://opensource.org/licenses/MIT)

GitHub repository: https://github.com/realdigger/SMF-Gravatar
                                                                                   

История:
1.0 Начальный релиз.
1.1 Добавлена возможность установки произвольного изображения по умолчанию. Исправлена ошибка "Undefined index: email_address".
1.3 Добавлена настройка для принудительной установки граватаров всем пользователям вместо аватаров.
1.4 Исправлено отображение граватара на странице профиля пользователя.
1.4.1 Для граватаров автоматически включается HTTPS, если установлена версия SMF 2.0.14 и выше.
1.4.2 Добавлена поддержка нового стиля с роботами.
1.4.3 Добавлен Испанский язык.

Ваш Граватар - это изображение, которое следует за вами от сайта к сайту и появляется рядом с вашим именем, когда вы делаете такие вещи, как оставляете комментарий или сообщение в блоге или на форуме. Аватары помогают идентифицировать свои сообщения в блогах и на форумах, так почему бы им не быть на каждом сайте?
Граватары - это глобально используемые аватары. Вы просто загружаете свой аватар на сайт Gravatar.com, и он будет автоматически появляться на всех блогах и форумах, которые поддерживают Граватары. Всякий раз, когда вы изменяете ваш Граватар, он автоматически изменяется на всех сайтах с поддержкой Граватаров. Граватары привязаны к пользователям посредством адресов электронной почты.

Как этот мод работает:
Если активирована опция "Включить граватары", Граватары будет использоваться для всех тех пользователей, кто не установил себе аватар на форуме. Если у пользователя есть загруженный на gravatar.com (http://gravatar.com) аватар, будет использоваться он. Для остальных пользователей, которые не имеют собственных Граватаров, будут сгенерированы уникальные изображения в соответствии с выбранным в настройках стилем.

Мод можно использовать для задания произвольного аватара по умолчанию.
Также, можно принудительно включить генерацию граватаров для всех пользователей, независимо от того, есть у них аватары или нет.

Этот мод распространяется под лицензией MIT https://opensource.org/licenses/MIT (https://opensource.org/licenses/MIT)   

GitHub репозиторий: https://github.com/realdigger/SMF-Gravatar
Title: Re: Gravatar 4 SMF
Post by: skoubah on September 22, 2012, 09:07:48 AM
Great mod.

Only complaint/request.

The gravatar should also show on the users profile page. Right now its only showing up i posts.
Title: Re: Gravatar 4 SMF
Post by: fiver on September 22, 2012, 10:07:33 AM
Any way for members to disable it? if they don't like the auto-generated Gravatar.
Title: Re: Gravatar 4 SMF
Post by: digger on September 22, 2012, 04:29:37 PM
Any way for members to disable it? if they don't like the auto-generated Gravatar.
If they don't like the auto-generated Gravatar don't use this mod. Or set the "mystic man" as default.
Title: Re: Gravatar 4 SMF
Post by: fiver on September 24, 2012, 09:09:41 AM
Many thanks for the reply.


I thought it will be nice for individuals to be able to disable it if they want to.


Anyway, error log:



.........../index.php?action=register2
8: Undefined index: email_address
File: /.........../Sources/Mod-Gravatar.php
Line: 120



Title: Re: Gravatar 4 SMF
Post by: phantomm on September 24, 2012, 09:21:57 AM
you know, there is another gravatar mod that has this ability (Simple Gravatar)
Title: Re: Gravatar 4 SMF
Post by: Gryzor on September 25, 2012, 04:47:14 AM
Hm, am I missing something? I went into an existing user's profile, a user who has set no avatar, and I can't find a way to create a gravatar... does this work only for new users?

Thanks - this is the only gravatar mod that allows for those random avatars, and it's nice!

[EDIT] Oh, it just needed a refresh and the profile appeared with the Gravatar in place. Cool!

Just one question - can you make it so that a size limit can be set? At the moment I see it's a 100x100px image, but this is a bit big for my liking...
Title: Re: Gravatar 4 SMF
Post by: Gryzor on September 25, 2012, 08:09:19 AM
Any way for members to disable it? if they don't like the auto-generated Gravatar.
If they don't like the auto-generated Gravatar don't use this mod. Or set the "mystic man" as default.

So, does this mean you'll implement no such option?

It's a shame, because there may be one or two who really don't want Gravatars, but the rest like it... And it's extra-nice for Guest accounts!
Title: Re: Gravatar 4 SMF
Post by: fiver on September 26, 2012, 11:26:31 PM


Just one question - can you make it so that a size limit can be set? At the moment I see it's a 100x100px image, but this is a bit big for my liking...


Admin > Forum > Attachments and Avatars > Avatar Settings



Maximum width (in pixels) of external avatar
(0 for no limit)


Maximum height (in pixels) of external avatar
(0 for no limit)


If the avatar is too large...
Title: Re: Gravatar 4 SMF
Post by: Gryzor on September 27, 2012, 02:15:09 AM
Ahhh nice, you learn something new every day...
Title: Re: Gravatar 4 SMF
Post by: bigdy on February 03, 2013, 11:14:09 PM
Enjoying the mod..  However I am looking for a way to setup a default, local, avatar for users who do not have one set.  Is this possible? 

A modification which does this, however, with the gravatar setting it does not work. 

http://www.simplemachines.org/community/index.php?topic=323936.0


Thanks!
Title: Re: Gravatar 4 SMF
Post by: Zargero on August 21, 2013, 03:46:13 PM
Is the creator still around?
Any way to edit files to force a change of default avatar so instead of Mystery man we could use our own image?

Or can we get a small update where it adds another selection to set your own like in the smf gravatar mod in 1.0?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.dansoftaustralia.net%2Fimages%2Fscreenshots%2Fsmfmods%2Fgravatar_admin.png&hash=2fe9e7357fdeffab05d05b2fc91c6427)
Title: Re: Gravatar 4 SMF
Post by: digger on August 29, 2013, 07:26:48 PM
Is the creator still around?
Any way to edit files to force a change of default avatar so instead of Mystery man we could use our own image?

Or can we get a small update where it adds another selection to set your own like in the smf gravatar mod in 1.0?
Mod updated.

Version 1.1
Option for setup custom image added. Fixed "Undefined index: email_address" warning.
Title: Re: Gravatar 4 SMF
Post by: SirLouen on September 11, 2016, 11:01:45 AM
I've installed the mod, but old users does not auto-update to their gravatar/default gravatar icon. Is there a way to solve this?
Title: Re: Gravatar 4 SMF
Post by: digger on September 11, 2016, 11:40:34 AM
I've installed the mod, but old users does not auto-update to their gravatar/default gravatar icon. Is there a way to solve this?
Gravatars will be shown in posts, not profiles.
Title: Re: Gravatar 4 SMF
Post by: SirLouen on September 11, 2016, 04:35:54 PM
I've installed the mod, but old users does not auto-update to their gravatar/default gravatar icon. Is there a way to solve this?
Gravatars will be shown in posts, not profiles.

Ok, no way to associate to profiles then?
Title: Re: Gravatar 4 SMF
Post by: ormuz on January 02, 2017, 01:07:40 PM
profile images need to be sync across different areas... for instance, user profiles, recent posts and so on. Any tutorial on how to do this?
Title: Re: Gravatar 4 SMF
Post by: bynw on January 26, 2017, 04:11:27 PM
I'd like to add my vote to have the gravatars show up in profile areas as well.
Title: Re: Gravatar 4 SMF
Post by: digger on April 18, 2019, 10:20:16 AM
Mod updated.

Version 1.4.2
Add robohash style.
(https://www.gravatar.com/avatar/00000000000000000000000000000000?d=robohash&f=y)
Title: Re: Gravatar 4 SMF
Post by: Rock Lee on April 19, 2019, 02:12:11 PM
I thought I had left the translation into Latin Spanish some time ago :o but I'll leave it now 8).


Regards!
Title: Re: Gravatar 4 SMF
Post by: digger on April 19, 2019, 02:42:08 PM
I thought I had left the translation into Latin Spanish some time ago :o but I'll leave it now 8).
Regards!
Thanks. Added to v1.4.3