Skip to content

Commit 3953ffa

Browse files
ChristopherChristopher
authored andcommitted
monster avatars for Halloween
1 parent 8bbd87e commit 3953ffa

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

html-templates/subtemplates/people.tpl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{load_templates subtemplates/personName.tpl}
22

3+
{*
4+
Gravatar – 'default=' image options:
5+
mm (mystery-man), identicon, monsterid, wavatar, retro, blank
6+
see: http://en.gravatar.com/site/implement/images/
7+
*}
8+
39
{template avatar Person size=32 pixelRatio=2 urlOnly=false forceSquare=true imgCls=no}{strip}
410
{$pixels = $size * $pixelRatio}
511

612
{if $Person->PrimaryPhoto}
713
{$src = $Person->PrimaryPhoto->getThumbnailRequest($pixels, $pixels, null, $forceSquare)}
814
{else}
9-
{$src = cat("//www.gravatar.com/avatar/", md5(strtolower($Person->Email)), "?s=", $pixels, "&r=g&d=mm")}
15+
{$src = cat("//www.gravatar.com/avatar/", md5(strtolower($Person->Email)), "?s=", $pixels, "&r=g&default=monsterid")}
1016
{/if}
1117

1218
{if $urlOnly}
@@ -26,10 +32,10 @@
2632
{if $Person->PrimaryPhoto}
2733
{$src = $Person->PrimaryPhoto->getThumbnailRequest($pixels, $pixels)}
2834
{else}
29-
{$src = cat("//www.gravatar.com/avatar/", md5(strtolower($Person->Email)), "?s=", $pixels, "&r=g&d=mm")}
35+
{$src = cat("//www.gravatar.com/avatar/", md5(strtolower($Person->Email)), "?s=", $pixels, "&r=g&default=monsterid")}
3036
{/if}
3137
<img src="{$src}" class="avatar {if $imgCls}{$imgCls}{/if}" width="{$photoSize}" height="{$photoSize}" />
3238
{/if}
3339
<span class="name {$imgCls}">{personName $Person}</span>
3440
</a>
35-
{/strip}{/template}
41+
{/strip}{/template}

0 commit comments

Comments
 (0)