From a6de788972290739b313359c89f13edfe5815c39 Mon Sep 17 00:00:00 2001 From: digger Date: Thu, 18 Apr 2019 18:02:28 +0400 Subject: [PATCH] Add robohash style. --- .travis.yml | 5 +++-- README.md | 13 ++++++++++--- Sources/Mod-Gravatar.php | 3 ++- .../languages/Gravatar/Gravatar.english-utf8.php | 3 ++- .../default/languages/Gravatar/Gravatar.english.php | 1 + .../languages/Gravatar/Gravatar.russian-utf8.php | 1 + .../default/languages/Gravatar/Gravatar.russian.php | 1 + package-info.xml | 4 ++-- 8 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 399f2ac..2f37f34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: php php: - - 5.3 - 5.4 - 5.5 - 5.6 - 7.0 + - 7.1 + - 7.2 script: - - if find . -name "*.php" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi \ No newline at end of file + - if find . -name "*.php" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi diff --git a/README.md b/README.md index 9ac19a1..a9e0cf7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/realdigger/SMF-Gravatar.svg?branch=master)](https://travis-ci.org/realdigger/SMF-Gravatar) # Gravatar 4 SMF mod -* **Author:** digger [http://mysmf.net](http://mysmf.net) +* **Author:** digger [https://mysmf.net](https://mysmf.net) * **License:** The MIT License (MIT) https://opensource.org/licenses/MIT * **Compatible with:** SMF 2.0 * **Hooks only:** Yes @@ -14,10 +14,17 @@ Your Gravatar is an image that follows you from site to site appearing beside yo 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 http://gravatar.com , it will be used. For any member who don't have own Gravatar, unique image will be generated in a given style. +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 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. +![1](https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y) +![2](https://www.gravatar.com/avatar/00000000000000000000000000000000?d=identicon&f=y) +![3](https://www.gravatar.com/avatar/00000000000000000000000000000000?d=monsterid&f=y) +![4](https://www.gravatar.com/avatar/00000000000000000000000000000000?d=wavatar&f=y) +![5](https://www.gravatar.com/avatar/00000000000000000000000000000000?d=retro&f=y) +![6](https://www.gravatar.com/avatar/00000000000000000000000000000000?d=robohash&f=y) + ![gravatar1 en](https://cloud.githubusercontent.com/assets/1187218/26038566/80dcfca8-391c-11e7-9850-2d9c4657c775.png) ![gravatar2 en](https://cloud.githubusercontent.com/assets/1187218/26038570/80dfb696-391c-11e7-95ed-610197f321cd.png) @@ -41,4 +48,4 @@ Also you can force Gravatars to be used instead of regular avatars. ![gravatar2 ru](https://cloud.githubusercontent.com/assets/1187218/26038569/80defb3e-391c-11e7-82f7-088e966c67fe.png) -![gravatar3 ru](https://cloud.githubusercontent.com/assets/1187218/26038567/80de4fa4-391c-11e7-99d2-da587a77648f.png) \ No newline at end of file +![gravatar3 ru](https://cloud.githubusercontent.com/assets/1187218/26038567/80de4fa4-391c-11e7-99d2-da587a77648f.png) diff --git a/Sources/Mod-Gravatar.php b/Sources/Mod-Gravatar.php index a21549c..9b18726 100644 --- a/Sources/Mod-Gravatar.php +++ b/Sources/Mod-Gravatar.php @@ -101,6 +101,7 @@ function addGravatarAdminSettings($return_config = false) 'monsterid' => $txt['gravatar_style_monsterid'], 'retro' => $txt['gravatar_style_retro'], 'mm' => $txt['gravatar_style_mm'], + 'robohash' => $txt['gravatar_style_robohash'], 'blank' => $txt['gravatar_style_blank'], 'custom' => $txt['gravatar_style_custom'], ), @@ -212,6 +213,6 @@ function addGravatarCopyright() global $context; if ($context['current_action'] == 'credits') { - $context['copyrights']['mods'][] = 'Gravatar 4 SMF © 2010-2017, digger'; + $context['copyrights']['mods'][] = 'Gravatar 4 SMF © 2010-2019, digger'; } } diff --git a/Themes/default/languages/Gravatar/Gravatar.english-utf8.php b/Themes/default/languages/Gravatar/Gravatar.english-utf8.php index 48a5256..9652fdb 100644 --- a/Themes/default/languages/Gravatar/Gravatar.english-utf8.php +++ b/Themes/default/languages/Gravatar/Gravatar.english-utf8.php @@ -33,6 +33,7 @@ $txt['gravatar_style_monsterid'] = 'monsterid'; $txt['gravatar_style_retro'] = 'retro'; $txt['gravatar_style_mm'] = 'mistery man'; +$txt['gravatar_style_robohash'] = 'robot'; $txt['gravatar_style_blank'] = 'blank'; $txt['gravatar_style_custom'] = 'custom'; $txt['gravatar_style_help'] = '
If a member already have own gravatar at gravatar.com, it will be used. For members who have not set an avatar, unique images will be generated in a given style. Gravatar size will match the settings for the external forum avatars. @@ -49,4 +50,4 @@
MUST be publicly available (e.g. cannot be on an intranet, on a local development machine, behind HTTP Auth or some other firewall etc). Default images are passed through a security scan to avoid malicious content.
MUST be accessible via HTTP or HTTPS on the standard ports, 80 and 443, respectively.
MUST have a recognizable image extension (jpg, jpeg, gif, png). -
MUST NOT include a querystring (if it does, it will be ignored).'; \ No newline at end of file +
MUST NOT include a querystring (if it does, it will be ignored).'; diff --git a/Themes/default/languages/Gravatar/Gravatar.english.php b/Themes/default/languages/Gravatar/Gravatar.english.php index fa01a33..6810d3f 100644 --- a/Themes/default/languages/Gravatar/Gravatar.english.php +++ b/Themes/default/languages/Gravatar/Gravatar.english.php @@ -33,6 +33,7 @@ $txt['gravatar_style_monsterid'] = 'monsterid'; $txt['gravatar_style_retro'] = 'retro'; $txt['gravatar_style_mm'] = 'mistery man'; +$txt['gravatar_style_robohash'] = 'robot'; $txt['gravatar_style_blank'] = 'blank'; $txt['gravatar_style_custom'] = 'custom'; $txt['gravatar_style_help'] = '
If a member already have own gravatar at gravatar.com, it will be used. For members who have not set an avatar, unique images will be generated in a given style. Gravatar size will match the settings for the external forum avatars. diff --git a/Themes/default/languages/Gravatar/Gravatar.russian-utf8.php b/Themes/default/languages/Gravatar/Gravatar.russian-utf8.php index 0424561..fc9ab84 100644 --- a/Themes/default/languages/Gravatar/Gravatar.russian-utf8.php +++ b/Themes/default/languages/Gravatar/Gravatar.russian-utf8.php @@ -33,6 +33,7 @@ $txt['gravatar_style_monsterid'] = 'монстры'; $txt['gravatar_style_retro'] = 'ретро'; $txt['gravatar_style_mm'] = 'загадочный человек'; +$txt['gravatar_style_robohash'] = 'роботы'; $txt['gravatar_style_blank'] = 'пустой'; $txt['gravatar_style_custom'] = 'свой'; $txt['gravatar_style_help'] = '
Если у пользователя есть свой граватар на gravatar.com, то будет использован он. Для пользователей, которые не установили себе аватар, будут сгенерированы уникальные изображения в заданном стиле. Размер граватаров будет соответствовать настройкам форума для внешних аватаров. diff --git a/Themes/default/languages/Gravatar/Gravatar.russian.php b/Themes/default/languages/Gravatar/Gravatar.russian.php index 8efa043..9bcd97d 100644 --- a/Themes/default/languages/Gravatar/Gravatar.russian.php +++ b/Themes/default/languages/Gravatar/Gravatar.russian.php @@ -33,6 +33,7 @@ $txt['gravatar_style_monsterid'] = ''; $txt['gravatar_style_retro'] = ''; $txt['gravatar_style_mm'] = ' '; +$txt['gravatar_style_robohash'] = ''; $txt['gravatar_style_blank'] = ''; $txt['gravatar_style_custom'] = ''; $txt['gravatar_style_help'] = '
gravatar.com, . , , . . diff --git a/package-info.xml b/package-info.xml index 154ae3d..fbdcae3 100644 --- a/package-info.xml +++ b/package-info.xml @@ -5,7 +5,7 @@ digger:gravatar_for_smf Gravatar 4 SMF modification - 1.4.1 + 1.4.2 README.md @@ -22,4 +22,4 @@ hooks.php - \ No newline at end of file +