Make forum somewhat usable, display Libravatars.
[edumed.git] / edumed / templates / pybb / avatar.html
diff --git a/edumed/templates/pybb/avatar.html b/edumed/templates/pybb/avatar.html
new file mode 100755 (executable)
index 0000000..0358753
--- /dev/null
@@ -0,0 +1,8 @@
+{% load pybb_tags %}
+{% load libravatar_tags %}
+<div class="avatar">
+    {% pybb_get_profile user=user as user_profile %}
+    <a href="{{ user_profile.get_absolute_url }}">
+        <img src="{% libravatar user.email PYBB_AVATAR_WIDTH %}" alt="{{ user }} libravatar" width="{{ PYBB_AVATAR_WIDTH }}" height="{{ PYBB_AVATAR_HEIGHT }}" />
+    </a>
+</div>