Mercurial > public > sg101
view gpp/templates/forums/display_post.html @ 265:1ba2c6bf6eb7
Closing #98. Animated GIFs were losing their transparency and animated properties when saved as avatars. Reworked the avatar save process to only run the avatar through PIL if it is too big. This preserves the original uploaded file if it is within the desired size settings. This may still mangle big animated gifs. If this becomes a problem, then maybe look into calling the PIL Image.resize() method directly. Moved the PIL image specific functions from bio.forms to a new module: core.image for better reusability in the future.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 24 Sep 2010 02:12:09 +0000 |
parents | fe900598f81c |
children | 8fd4984d5c3b |
line wrap: on
line source
{% load avatar_tags %} {% load forum_tags %} <tr class="forum-post {% cycle 'odd' 'even' %}" id="post-{{ post.id }}"> <td class="forum-post-author"> <a name="p{{ post.id }}"></a> <a href="{% url bio-view_profile username=post.user.username %}" title="View Profile for {{ post.user.username }}">{{ post.user.username }}</a><br /> <a href="{% url bio-view_profile username=post.user.username %}">{% avatar post.user %}</a> Joined: {{ post.user.date_joined|date:"M d, Y" }}<br /> Posts: {{ post.user_profile.forum_post_count }}<br /> {% if post.user_profile.location %} Location: {{ post.user_profile.location }}<br /> {% endif %} {% for bo in post.user_profile.badge_ownership %} <img src="{{ bo.badge.image.url }}" alt="{{ bo.badge_count_str }}" title="{{ bo.badge_count_str }}" /> {% endfor %} {% if user.is_authenticated %} <p> <a href="{% url messages-compose_to post.user.username %}"> <img src="{{ MEDIA_URL }}icons/note.png" alt="PM" title="Send Private Message to {{ post.user.username }}" /></a> {% if not post.user_profile.hide_email %}<a href="mailto:{{ post.user.email }}"> <img src="{{ MEDIA_URL }}icons/email.png" alt="Email" title="Send Email to {{ post.user.username}}" /></a>{% endif %} </p> {% endif %} </td> <td class="forum-post-body"> <div class="forum-post-info quiet{% if post.user_profile.is_stranger %} stranger{% endif %}"> {% if post.unread %}<img src="{{ MEDIA_URL }}icons/new.png" alt="New" title="New" />{% endif %} <a href="{{ post.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Link" title="Link to this post" /></a> Posted on {% forum_date post.creation_date user %} {% if can_moderate %}from IP: <a href="{% url forums-post_ip_info post.id %}">{{ post.user_ip }}</a>{% endif %} </div> <div class="forum-post-body"> {{ post.html|safe }} {% if post.user_profile.signature_html %} —{{ post.user_profile.signature_html|safe }} {% endif %} {% if post.has_been_edited %} <p class="small quiet">Last edited: {{ post.update_date|date:"M d, Y H:i:s" }}</p> {% endif %} </div> <div class="forum-post-info-tools"> {% if can_reply %} <a href="{% url forums-new_post topic_id=post.topic.id %}?quote={{ post.id }}"><img src="{{ MEDIA_URL }}icons/comment.png" alt="Reply with quote" title="Reply with quote" /></a> {% endif %} {% post_edit_button post user can_moderate MEDIA_URL %} <a href="#" class="post-flag" id="fp-{{ post.id }}" title="Flag this post as spam, abuse, or a violation of site rules."> <img src="{{ MEDIA_URL }}icons/flag_red.png" alt="Flag" /></a> {% if can_moderate %} <a href="#" class="post-delete" id="dp-{{ post.id }}" title="Delete this post"><img src="{{ MEDIA_URL }}icons/cross.png" alt="Delete post" /></a> {% if post.user != user and post.user_profile.is_stranger %} <br /> <span class="quiet">Stranger options:</span> <a href="{% url forums-stranger post.id %}" title="This stranger seems legitimate"> <img src="{{ MEDIA_URL }}icons/tick.png" alt="Acquaintance" /></a> <a href="{% url forums-spammer post.id %}" title="This is spam"> <img src="{{ MEDIA_URL }}icons/exclamation.png" alt="Spammer" /></a> {% endif %} {% endif %} </div> </td> </tr>