Merge branch 'develop' into feature/settings

This commit is contained in:
slawkens
2023-07-08 19:16:22 +02:00
160 changed files with 2668 additions and 453 deletions

View File

@@ -25,7 +25,7 @@ To change a name of character select player and choose a new name.<br/>
<td class="LabelV" ><span>Character:</span></td>
<td style="width:90%;" >
<select name="player_id">
{% for player in account_logged.getPlayersList() %}
{% for player in account_logged.getPlayersList(false) %}
<option value="{{ player.getId() }}">{{ player.getName() }}</option>
{% endfor %}
</select>
@@ -74,4 +74,4 @@ To change a name of character select player and choose a new name.<br/>
</td>
</tr>
</table>
<script type="text/javascript" src="tools/check_name.js"></script>
<script type="text/javascript" src="tools/check_name.js"></script>

View File

@@ -96,6 +96,9 @@
</td>
</tr>
<tr><td></td><td><span id="password_error" class="FormFieldError">{% if errors.password is defined %}{{ errors.password }}{% endif %}</span></td></tr>
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORD') }}
<tr>
<td class="LabelV" style="width: 150px">
<span{% if errors.password is defined %} class="red"{% endif %}>Repeat password:</span>

View File

@@ -2,7 +2,7 @@ Please choose a name{% if config.character_samples|length > 1 %}, vocation{% end
{% if config.character_towns|length > 1 %}, town{% endif %}
and sex for your character. <br/>
In any case the name must not violate the naming conventions stated in the <a href="?subtopic=rules" target="_blank" >{{ config.lua.serverName }} Rules</a>, or your character might get deleted or name locked.
{% if account_logged.getPlayersList(false)|length >= config.characters_per_account %}
{% if account_logged.getPlayersList(true)|length >= config.characters_per_account %}
<b><span style="color: red"> You have maximum number of characters per account on your account. Delete one before you make new.</span></b>
{% endif %}
<br/><br/>

View File

@@ -170,7 +170,16 @@
{% for player in players %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}">
<td><a href="{{ getLink('characters/' ~ player.getName()|urlencode) }}">{{ player.getName() }}</a></td><td>{{ player.getLevel() }}</td><td>{{ player.getVocationName() }}</td><td>{{ config.towns[player.getTownId()] }}</td><td>{% if player.getLastLogin() > 0 %}{{ player.getLastLogin|date('d F Y (H:i)') }}{% else %}Never.{% endif %}</td><td>{% if player.isOnline() %}<span style="color: green">ONLINE</span>{% else %}<span style="color: red">Offline</span>{% endif %}</td><td>{% if player.isHidden() %}Hidden{% else %}Visible{% endif %}</td><td>[<a href="{{ getLink('account/character/comment/' ~ player.getName|urlencode) }}" >Edit</a>]</td>
<td>
<a href="{{ getLink('characters/' ~ player.getName()|urlencode) }}">{{ player.getName() }}</a>
</td>
<td>{{ player.getLevel() }}</td>
<td>{{ player.getVocationName() }}</td>
<td>{{ config.towns[player.getTownId()] }}</td>
<td>{% if player.getLastLogin() > 0 %}{{ player.getLastLogin|date('d F Y (H:i)') }}{% else %}Never.{% endif %}</td>
<td>{% if player.isOnline() %}<span style="color: green">ONLINE</span>{% else %}<span style="color: red">Offline</span>{% endif %}</td>
<td>{% if player.isHidden() %}Hidden{% else %}Visible{% endif %}</td>
<td>{% if not player.isDeleted() %}[<a href="{{ getLink('account/character/comment/' ~ player.getName|urlencode) }}" >Edit</a>]{% endif %}</td>
</tr>
{% endfor %}
</table>

View File

@@ -1,14 +1,14 @@
<div style="text-align: right;">
<a href="admin/?p=pages&action=edit&id={{ page.id }}" title="Edit in Admin Panel" target="_blank">
<a href="{{ constant('ADMIN_URL') }}?p=pages&action=edit&id={{ page.id }}" title="Edit in Admin Panel" target="_blank">
<img src="images/edit.png"/>Edit
</a>
<a id="delete" href="admin/?p=pages&action=delete&id={{ page.id }}" onclick="return confirm('Are you sure?');"
<a id="delete" href="{{ constant('ADMIN_URL') }}?p=pages&action=delete&id={{ page.id }}" onclick="return confirm('Are you sure?');"
title="Delete in Admin Panel" target="_blank">
<img src="images/del.png"/>Delete
</a>
<a href="admin/?p=pages&action=hide&id={{ page.id }}"
<a href="{{ constant('ADMIN_URL') }}?p=pages&action=hide&id={{ page.id }}"
title="{% if page.hidden != 1 %}Hide{% else %}Show{% endif %} in Admin Panel" target="_blank">
<img src="images/{% if page.hidden != 1 %}success{% else %}error{% endif %}.png"/>{% if page.hidden != 1 %}Hide{% else %}Show{% endif %}
</a>
<br/>
</div>
</div>

View File

@@ -11,7 +11,7 @@
<td>
{{ hook(constant('HOOK_CHARACTERS_BEFORE_INFORMATIONS')) }}
{% if canEdit %}
<a href="admin/?p=players&id={{ player.getId() }}" title="Edit in Admin Panel" target="_blank">
<a href="{{ constant('ADMIN_URL') }}?p=players&id={{ player.getId() }}" title="Edit in Admin Panel" target="_blank">
<img src="images/edit.png"/>Edit
</a>
{% endif %}
@@ -142,7 +142,7 @@
{% set rows = rows + 1 %}
<tr bgcolor="{{ getStyle(rows) }}">
<td valign="top">Comment:</td>
<td>{{ comment|raw }}</td>
<td style="word-break: break-all">{{ comment|raw }}</td>
</tr>
{% endif %}
@@ -237,11 +237,13 @@
</td>
<!-- EQUIPMENT_END -->
{% endif %}
{{ hook(constant('HOOK_CHARACTERS_AFTER_EQUIPMENT')) }}
</tr>
</table>
{{ hook(constant('HOOK_CHARACTERS_BEFORE_DEATHS')) }}
{% if deaths|length > 0 %}
<!-- DEATHS -->
<br/>
@@ -404,7 +406,8 @@
<tr>
<td>
<input type="hidden" name="name" value="{{ player.getName() }}"/>
<input type="image" name="View {{ player.getName() }}" alt="View {{ player.getName() }}" src="{{ template_path }}/images/global/buttons/sbutton_view.gif" border="0" width="120" height="18"/>
{% set button_name = "View" %}
{{ include('buttons.base.html.twig') }}
</td>
</tr>
</form>
@@ -418,7 +421,7 @@
{% endif %}
{{ hook(constant('HOOK_CHARACTERS_AFTER_CHARACTERS')) }}
{% if canEdit %}
<a href="admin/?p=players&id={{ player.getId() }}" title="Edit in Admin Panel" target="_blank">
<a href="{{ constant('ADMIN_URL') }}?p=players&id={{ player.getId() }}" title="Edit in Admin Panel" target="_blank">
<img src="images/edit.png"/>Edit
</a>
{% endif %}

View File

@@ -8,9 +8,9 @@
<meta name="description" content="myaac">
<meta name="generator" content="MyAAC">
<base href="{{ BASE_URL }}" />
<link rel="stylesheet" href="tools/css/messages.css">
<link rel="shortcut icon" href="images/error.ico">
<base href="{{ BASE_URL }}" />
<style>
body{

View File

@@ -54,7 +54,7 @@
</tr>
{% set i = 0 %}
{% for thread in threads %}
<tr bgcolor="{{ getStyle(i) }}"><td>{{ thread.name }}</td><td>{{ thread.post|raw }}</td></tr>
<tr bgcolor="{{ getStyle(i) }}"><td>{{ thread.name }}</td><td style="word-break: break-all">{{ thread.post|raw }}</td></tr>
{% set i = i + 1 %}
{% endfor %}
</table>
</table>

View File

@@ -40,7 +40,7 @@ Page: {{ links_to_pages|raw }}<br/>
<br />Posts: {{ post.author_posts_count }}<br />
</span>
</td>
<td valign="top">{{ post.content|raw }} </td></tr>
<td valign="top" style="word-break: break-all">{{ post.content|raw }} </td></tr>
<tr bgcolor="{{ getStyle(i) }}">
<td>
<span style="font-size: 10px">{{ post.date|date('d.m.y H:i:s') }}
@@ -58,6 +58,7 @@ Page: {{ links_to_pages|raw }}<br/>
<a href="?subtopic=forum&action=move_thread&id={{ post.id }}" title="Move Thread"><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 %}
{% 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>
@@ -65,7 +66,6 @@ Page: {{ links_to_pages|raw }}<br/>
{% if logged %}
<a href="?subtopic=forum&action=new_post&thread_id={{ thread_id }}&quote={{ post.id }}" title="Quote Post"><img src="images/icons/comment_add.png"/></a>
{% endif %}
{% endif %}
</td>
</tr>
{% set i = i + 1 %}

View File

@@ -44,7 +44,7 @@
<img src="{{ constant('GUILD_IMAGES_DIR') }}{{ guild.logo }}" width="64" height="64">
</td>
<td>
<td style="word-break: break-all">
<span{% if guild.description is not empty %} valign="top"{% endif %}>
<b>{{ guild.name }}</b>{% if isAdmin %}<a href="?subtopic=guilds&action=delete_by_admin&guild={{ guild.name }}"> - Delete this guild (for ADMIN only!)</a>{% endif %}
</span>

View File

@@ -47,10 +47,10 @@
<table style="width:100%;">
<tbody>
<tr>
<td>
<td style="word-break: break-all">
<div id="GuildInformationContainer">
{% if descriptions is not empty %}
{{ description }}
{% if description is not empty %}
{{ description|raw }}
<br>
<br>
{% endif %}

View File

@@ -12,7 +12,7 @@
{% for value in ['server_path'] %}
<div class="form-group mb-2">
<label for="vars_{{ value }}">{{ locale['step_config_' ~ value] }}</label>
<input class="form-control" type="text" name="vars[{{ value }}]" id="vars_{{ value }}"{% if session['var_' ~ value] is not null %} value="{{ session['var_' ~ value] }}"{% endif %}/>
<input class="form-control" type="{% if value == 'mail_admin' %}email{% else %}text{% endif %}" name="vars[{{ value }}]" id="vars_{{ value }}"{% if session['var_' ~ value] is not null %} value="{{ session['var_' ~ value] }}"{% endif %}/>
<small class="form-text text-muted">{{ locale['step_config_' ~ value ~ '_desc'] }}</small>
</div>
{% endfor %}

View File

@@ -4,10 +4,11 @@
<tbody>
<tr>
<td>
<input width="120" height="18" border="0" type="image" src="{{ template_path }}/images/global/buttons/sbutton_back.gif" alt="Back" name="Back" />
{% set button_name = 'Back' %}
{{ include('buttons.base.html.twig') }}
</td>
</tr>
</tbody>
</form>
</table>
</div>
</div>

View File

@@ -11,12 +11,12 @@
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | emoticons link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code',
resize: 'both',
image_advtab: true,
images_upload_url: '{{ constant('BASE_URL') }}admin/tools/upload_image.php',
images_upload_url: '{{ constant('ADMIN_URL') }}tools/upload_image.php',
images_upload_credentials: true,
// not really sure - do we need those 3 options below?
//relative_urls: false,
//remove_script_host: false,
//document_base_url: "{{ constant('BASE_URL') }}"
relative_urls: true,
document_base_url: "{{ constant('BASE_URL') }}",
setup: function (ed) {
ed.on('NodeChange', function (e) {
if (ed.getContent() !== lastContent) {