mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-19 20:13:27 +02:00
* show user avatar (outfit) in forum posts
* show user position (group) in forum posts * replaced forum actions links (move, remove, edit, quote) with images * redirect directly to the thread on user login (on new reply) * fixed account login redirect with special chars (like '&' and '?')
This commit is contained in:
@@ -31,6 +31,6 @@
|
||||
// Automatic redirect
|
||||
setTimeout ("automaticRedirect()", 1000);
|
||||
function automaticRedirect() {
|
||||
window.location = "{{ redirect }}";
|
||||
window.location = "{{ redirect|raw }}";
|
||||
}
|
||||
</script>
|
75
system/templates/forum.show_thread.html.twig
Normal file
75
system/templates/forum.show_thread.html.twig
Normal file
@@ -0,0 +1,75 @@
|
||||
<a href="{{ getLink('forum') }}">Boards</a> >> <a href="{{ getLink('forum/board/' ~ section.id) }}">{{ section.name }}</a> >> <b>{{ thread_starter.post_topic }}</b>
|
||||
<br/><br/>
|
||||
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}"><img src="images/forum/post.gif" border="0" /></a><br/>
|
||||
<br/>
|
||||
Page: {{ links_to_pages|raw }}<br/>
|
||||
<table width="100%">
|
||||
<tr bgcolor="{{ config.lightborder }}" width="100%">
|
||||
<td colspan="2">
|
||||
<font size="4"><b>{{ thread_starter.post_topic }}</b></font>
|
||||
<font size="1"><br/>
|
||||
by {{ author_link|raw }}</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
<td width="200">
|
||||
<font color="white" size="1"><b>Author</b></font>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
{% set i = 0 %}
|
||||
{% for post in posts %}
|
||||
<tr bgcolor="{{ getStyle(i) }}">
|
||||
{% set i = i + 1 %}
|
||||
<td valign="top">{{ post.player_link|raw }}<br/>
|
||||
{% if post.outfit is defined %}
|
||||
<img style="margin-left:{% if post.player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ post.outfit }}" alt="player outfit"/>
|
||||
<br />
|
||||
{% endif %}
|
||||
<font size="1">
|
||||
{% if post.group is defined and post.group|lower != 'player' %}
|
||||
Position: {{ post.group }}<br />
|
||||
{% endif %}
|
||||
|
||||
Profession: {{ post.vocation }}<br />
|
||||
Level: {{ post.player.getLevel() }} <br />
|
||||
{% if post.guildRank is defined %}
|
||||
{{ guildRank }}<br />
|
||||
{% endif %}
|
||||
<br />Posts: {{ post.author_posts_count }}<br />
|
||||
</font>
|
||||
</td>
|
||||
<td valign="top">{{ post.content|raw }} </td></tr>
|
||||
<tr bgcolor="{{ getStyle(i) }}">
|
||||
<td>
|
||||
<font size="1">{{ post.date|date('d.m.y H:i:s') }}
|
||||
{% if post.edited_by is defined %}
|
||||
<br />Edited by {{ post.edited_by }}
|
||||
<br />on {{ post.edit_date|date('d.m.y H:i:s') }}
|
||||
{% endif %}
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
{% if is_moderator %}
|
||||
{% if post.first_post != post.id %}
|
||||
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Post" onclick="return confirm('Are you sure you want remove post of {{ post.player.getName() }}?')"><img src="images/del.png"/></a>
|
||||
{% else %}
|
||||
<a href="?subtopic=forum&action=move_thread&id={{ post.id }}"><img src="images/icons/arrow_right.gif"/></a>
|
||||
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Thread" target="_blank" onclick="return confirm('Are you sure you want remove thread > {{ post.post_topic}} <?')"><img src="images/del.png"/></a>
|
||||
{% endif %}
|
||||
{% if logged and (post.player.getAccount().getId() == account_logged.getId() or is_moderator) %}
|
||||
<a href="?subtopic=forum&action=edit_post&id={{ post.id }}" title="Edit Post" target="_blank">
|
||||
<img src="images/edit.png"/></a>
|
||||
{% endif %}
|
||||
{% if logged %}
|
||||
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}"e={{ post.id }}" title="Quote Post"><img src="images/icons/comment_add.png"/></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% set i = i + 1 %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
<br/>
|
||||
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}"><img src="images/forum/post.gif" border="0" /></a>
|
Reference in New Issue
Block a user