mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-01 19:59:21 +02:00
Rename team_* variables + add to deprecated
This commit is contained in:
parent
e7ef1679a0
commit
48ceada956
@ -17,19 +17,26 @@ $deprecatedConfig = [
|
||||
'visitors_counter_ttl',
|
||||
'views_counter',
|
||||
'outfit_images_url',
|
||||
'outfit_images_wrong_looktypes',
|
||||
'item_images_url',
|
||||
'account_country',
|
||||
'team_display_outfit',
|
||||
'team_display_status',
|
||||
'team_display_world',
|
||||
'team_display_lastlogin',
|
||||
'online_record',
|
||||
'online_vocations',
|
||||
'online_vocations_images',
|
||||
'online_skulls',
|
||||
'online_outfit',
|
||||
'online_afk',
|
||||
'team_display_outfit' => 'team_outfit',
|
||||
'team_display_status' => 'team_status',
|
||||
'team_display_world' => 'team_world',
|
||||
'team_display_lastlogin' => 'team_lastlogin',
|
||||
'multiworld',
|
||||
];
|
||||
|
||||
foreach ($deprecatedConfig as $value) {
|
||||
foreach ($deprecatedConfig as $key => $value) {
|
||||
config(
|
||||
[
|
||||
$value,
|
||||
(is_string($key) ? $key : $value),
|
||||
setting('core.'.$value)
|
||||
]
|
||||
);
|
||||
|
@ -23,7 +23,7 @@ if(!$groups->count())
|
||||
|
||||
$outfit_addons = false;
|
||||
$outfit = '';
|
||||
if($config['team_display_outfit']) {
|
||||
if(setting('core.team_outfit')) {
|
||||
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype';
|
||||
if($db->hasColumn('players', 'lookaddons')) {
|
||||
$outfit .= ', lookaddons';
|
||||
@ -56,12 +56,12 @@ foreach($groupList as $id => $group)
|
||||
$members[] = array(
|
||||
'group_name' => $group->getName(),
|
||||
'player' => $member,
|
||||
'outfit' => $config['team_display_outfit'] ? $config['outfit_images_url'] . '?id=' . $member->getLookType() . ($outfit_addons ? '&addons=' . $member->getLookAddons() : '') . '&head=' . $member->getLookHead() . '&body=' . $member->getLookBody() . '&legs=' . $member->getLookLegs() . '&feet=' . $member->getLookFeet() : null,
|
||||
'status' => $config['team_display_status'] ? $member->isOnline() : null,
|
||||
'outfit' => setting('core.team_outfit') ? setting('core.outfit_images_url') . '?id=' . $member->getLookType() . ($outfit_addons ? '&addons=' . $member->getLookAddons() : '') . '&head=' . $member->getLookHead() . '&body=' . $member->getLookBody() . '&legs=' . $member->getLookLegs() . '&feet=' . $member->getLookFeet() : null,
|
||||
'status' => setting('core.team_status') ? $member->isOnline() : null,
|
||||
'link' => getPlayerLink($member->getName()),
|
||||
'flag_image' => $config['account_country'] ? getFlagImage($member->getAccount()->getCountry()) : null,
|
||||
'world_name' => ($config['multiworld'] || $config['team_display_world']) ? getWorldName($member->getWorldId()) : null,
|
||||
'last_login' => $config['team_display_lastlogin'] ? $lastLogin : null
|
||||
'flag_image' => setting('core.account_country') ? getFlagImage($member->getAccount()->getCountry()) : null,
|
||||
'world_name' => (setting('core.multiworld') || setting('core.team_world')) ? getWorldName($member->getWorldId()) : null,
|
||||
'last_login' => setting('core.team_lastlogin') ? $lastLogin : null
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -588,25 +588,25 @@ Sent by MyAAC,<br/>
|
||||
'options' => ['normal table', 'in boxes, grouped by group id'],
|
||||
'default' => 1,
|
||||
],
|
||||
'team_display_status' => [
|
||||
'team_status' => [
|
||||
'name' => 'Display Online Status',
|
||||
'type' => 'boolean',
|
||||
'desc' => '',
|
||||
'default' => true,
|
||||
],
|
||||
'team_display_lastlogin' => [
|
||||
'team_lastlogin' => [
|
||||
'name' => 'Display Last Login',
|
||||
'type' => 'boolean',
|
||||
'desc' => '',
|
||||
'default' => true,
|
||||
],
|
||||
'team_display_world' => [
|
||||
'team_world' => [
|
||||
'name' => 'Display World',
|
||||
'type' => 'boolean',
|
||||
'desc' => '',
|
||||
'default' => false,
|
||||
],
|
||||
'team_display_outfit' => [
|
||||
'team_outfit' => [
|
||||
'name' => 'Display Outfit',
|
||||
'type' => 'boolean',
|
||||
'desc' => '',
|
||||
|
@ -25,7 +25,7 @@
|
||||
<b>Group</b>
|
||||
</td>
|
||||
|
||||
{% if config.team_display_outfit %}
|
||||
{% if setting('core.team_outfit') %}
|
||||
<td width="5%" class="white">
|
||||
<b>Outfit</b>
|
||||
</td>
|
||||
@ -35,19 +35,19 @@
|
||||
<b>Name</b>
|
||||
</td>
|
||||
|
||||
{% if config.team_display_status %}
|
||||
{% if setting('core.team_status') %}
|
||||
<td class="white">
|
||||
<b>Status</b>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if (config.multiworld or config.team_display_world) %}
|
||||
{% if (setting('core.multiworld') or setting('core.team_world')) %}
|
||||
<td class="white">
|
||||
<b>World</b>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if config.team_display_lastlogin %}
|
||||
{% if setting('core.team_lastlogin') %}
|
||||
<td class="white">
|
||||
<b>Last login</b>
|
||||
</td>
|
||||
@ -61,7 +61,7 @@
|
||||
<tr bgcolor="{{ getStyle(i) }}" style="height: 32px;">
|
||||
<td>{{ group.group_name|capitalize }}</td>
|
||||
|
||||
{% if config.team_display_outfit %}
|
||||
{% if setting('core.team_outfit') %}
|
||||
<td>
|
||||
<img style="position: absolute; margin-top: {% if member.player.looktype in config.outfit_images_wrong_looktypes %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||
</td>
|
||||
@ -74,7 +74,7 @@
|
||||
{{ member.link|raw }}
|
||||
</td>
|
||||
|
||||
{% if config.team_display_status %}
|
||||
{% if setting('core.team_status') %}
|
||||
<td>
|
||||
{% if member.status %}
|
||||
<span style="color: green"><b>Online</b></span>
|
||||
@ -84,13 +84,13 @@
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if (config.multiworld or config.team_display_world) %}
|
||||
{% if (setting('core.multiworld') or setting('core.team_world')) %}
|
||||
<td>
|
||||
<span><b>{{ member.world_name }}</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if config.team_display_lastlogin %}
|
||||
{% if setting('core.team_lastlogin') %}
|
||||
<td>
|
||||
<span>{{ member.last_login }}</span>
|
||||
</td>
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
{% if config.team_display_outfit %}
|
||||
{% if setting('core.team_outfit') %}
|
||||
<td width="5%" class="white">
|
||||
<b>Outfit</b>
|
||||
</td>
|
||||
@ -117,19 +117,19 @@
|
||||
<b>Name</b>
|
||||
</td>
|
||||
|
||||
{% if config.team_display_status %}
|
||||
{% if setting('core.team_status') %}
|
||||
<td class="white">
|
||||
<b>Status</b>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if (config.multiworld or config.team_display_world) %}
|
||||
{% if (setting('core.multiworld') or setting('core.team_world')) %}
|
||||
<td class="white">
|
||||
<b>World</b>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if config.team_display_lastlogin %}
|
||||
{% if setting('core.team_lastlogin') %}
|
||||
<td class="white">
|
||||
<b>Last login</b>
|
||||
</td>
|
||||
@ -139,7 +139,7 @@
|
||||
{% for member in group.members %}
|
||||
{% set i = i + 1 %}
|
||||
<tr bgcolor="{{ getStyle(i) }}" style="height: 32px;">
|
||||
{% if config.team_display_outfit %}
|
||||
{% if setting('core.team_outfit') %}
|
||||
<td>
|
||||
<img style="position: absolute; margin-top: {% if member.player.looktype in config.outfit_images_wrong_looktypes %}-16px;margin-left:-0px;{% else %} -45px; margin-left: -30px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||
</td>
|
||||
@ -152,7 +152,7 @@
|
||||
{{ member.link|raw }}
|
||||
</td>
|
||||
|
||||
{% if config.team_display_status %}
|
||||
{% if setting('core.team_status') %}
|
||||
<td>
|
||||
{% if member.status %}
|
||||
<span style="color: green"><b>Online</b></span>
|
||||
@ -162,13 +162,13 @@
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if (config.multiworld or config.team_display_world) %}
|
||||
{% if (setting('core.multiworld') or setting('core.team_world')) %}
|
||||
<td>
|
||||
<span><b>{{ member.world_name }}</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if config.team_display_lastlogin %}
|
||||
{% if setting('core.team_lastlogin') %}
|
||||
<td>
|
||||
<span>{{ member.last_login }}</span>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user