Skip to content

Commit

Permalink
Add robohash style.
Browse files Browse the repository at this point in the history
  • Loading branch information
realdigger committed Apr 18, 2019
1 parent 841d281 commit a6de788
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
- if find . -name "*.php" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand All @@ -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)
![gravatar3 ru](https://cloud.githubusercontent.com/assets/1187218/26038567/80de4fa4-391c-11e7-99d2-da587a77648f.png)
3 changes: 2 additions & 1 deletion Sources/Mod-Gravatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
),
Expand Down Expand Up @@ -212,6 +213,6 @@ function addGravatarCopyright()
global $context;

if ($context['current_action'] == 'credits') {
$context['copyrights']['mods'][] = '<a href="http://mysmf.net/mods/gravatar-4-smf" target="_blank">Gravatar 4 SMF</a> &copy; 2010-2017, digger';
$context['copyrights']['mods'][] = '<a href="https://mysmf.net/mods/gravatar-4-smf" target="_blank">Gravatar 4 SMF</a> &copy; 2010-2019, digger';
}
}
3 changes: 2 additions & 1 deletion Themes/default/languages/Gravatar/Gravatar.english-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = '<br />If a member already have own gravatar at <a href="http://gravatar.com" target="_blank">gravatar.com</a>, 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.
Expand All @@ -49,4 +50,4 @@
<br />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.
<br />MUST be accessible via HTTP or HTTPS on the standard ports, 80 and 443, respectively.
<br />MUST have a recognizable image extension (jpg, jpeg, gif, png).
<br />MUST NOT include a querystring (if it does, it will be ignored).';
<br />MUST NOT include a querystring (if it does, it will be ignored).';
1 change: 1 addition & 0 deletions Themes/default/languages/Gravatar/Gravatar.english.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = '<br />If a member already have own gravatar at <a href="http://gravatar.com" target="_blank">gravatar.com</a>, 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = '<br />Если у пользователя есть свой граватар на <a href="http://gravatar.com" target="_blank">gravatar.com</a>, то будет использован он. Для пользователей, которые не установили себе аватар, будут сгенерированы уникальные изображения в заданном стиле. Размер граватаров будет соответствовать настройкам форума для внешних аватаров.
Expand Down
1 change: 1 addition & 0 deletions Themes/default/languages/Gravatar/Gravatar.russian.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = '<br />Если у пользователя есть свой граватар на <a href="http://gravatar.com" target="_blank">gravatar.com</a>, то будет использован он. Для пользователей, которые не установили себе аватар, будут сгенерированы уникальные изображения в заданном стиле. Размер граватаров будет соответствовать настройкам форума для внешних аватаров.
Expand Down
4 changes: 2 additions & 2 deletions package-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<id>digger:gravatar_for_smf</id>
<name>Gravatar 4 SMF</name>
<type>modification</type>
<version>1.4.1</version>
<version>1.4.2</version>

<install for="2.0 - 2.0.99">
<readme>README.md</readme>
Expand All @@ -22,4 +22,4 @@
<code>hooks.php</code>
</uninstall>

</package-info>
</package-info>

0 comments on commit a6de788

Please sign in to comment.