-
Notifications
You must be signed in to change notification settings - Fork 9
Using local and Gravatar userpics
Nick-smallworld edited this page Apr 28, 2011
·
4 revisions
This recipe shows how to display a userpic in MT if it exists, and if not, to fall back to gravatar.
Enables user icon pictures from the Gravatar service.
<mt:IfNonEmpty tag="CommenterUserpic"> <mt:CommenterUserpicAsset> <img src="<mt:AssetThumbnailURL width="32" height="32">" width="32" height="32" alt="<mt:CommentAuthor />" class="avatar" /> </mt:commenteruserpicasset> <mt:Else> <img src="<$MTGravatar rating="g" default="static-URL/images/default-userpic-36.jpg" size="32"$>" alt="<mt:CommentAuthor />" width="32" height="32" class="avatar" /> </mt:ifnonempty>