mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 18:59:21 +02:00
Merge pull request #70 from whiteblXK/master
Team page - display outfits of the players (configurable)
This commit is contained in:
commit
f9ea7af3ab
1
TODO
1
TODO
@ -12,7 +12,6 @@
|
|||||||
* migrations: option to downgrade the database
|
* migrations: option to downgrade the database
|
||||||
* create account: create character
|
* create account: create character
|
||||||
* csrf token protection
|
* csrf token protection
|
||||||
* team page - display outfits of the players (configurable)
|
|
||||||
* guild wars support like in Gesior
|
* guild wars support like in Gesior
|
||||||
* Install: create admin account: e-mail + Nazwa postaci
|
* Install: create admin account: e-mail + Nazwa postaci
|
||||||
* move lostaccount.php to Twig
|
* move lostaccount.php to Twig
|
||||||
|
@ -184,6 +184,7 @@ $config = array(
|
|||||||
'team_display_status' => true,
|
'team_display_status' => true,
|
||||||
'team_display_lastlogin' => true,
|
'team_display_lastlogin' => true,
|
||||||
'team_display_world' => false,
|
'team_display_world' => false,
|
||||||
|
'team_display_outfit' => true,
|
||||||
|
|
||||||
// bans page
|
// bans page
|
||||||
'bans_limit' => 50,
|
'bans_limit' => 50,
|
||||||
|
@ -21,6 +21,16 @@ if(!$groups->count())
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$outfit_addons = false;
|
||||||
|
$outfit = '';
|
||||||
|
if($config['team_display_outfit']) {
|
||||||
|
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype';
|
||||||
|
if($db->hasColumn('players', 'lookaddons')) {
|
||||||
|
$outfit .= ', lookaddons';
|
||||||
|
$outfit_addons = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$groupMember = array();
|
$groupMember = array();
|
||||||
$groupList = $groups->getGroups();
|
$groupList = $groups->getGroups();
|
||||||
foreach($groupList as $id => $group)
|
foreach($groupList as $id => $group)
|
||||||
@ -44,6 +54,8 @@ foreach($groupList as $id => $group)
|
|||||||
|
|
||||||
$members[] = array(
|
$members[] = array(
|
||||||
'group_name' => $group->getName(),
|
'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' => $member->isOnline(),
|
'status' => $member->isOnline(),
|
||||||
'link' => getPlayerLink($member->getName()),
|
'link' => getPlayerLink($member->getName()),
|
||||||
'flag_image' => getFlagImage($member->getAccount()->getCountry()),
|
'flag_image' => getFlagImage($member->getAccount()->getCountry()),
|
||||||
|
@ -24,24 +24,28 @@
|
|||||||
<span><b>Group</b></span>
|
<span><b>Group</b></span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
{% if config.team_display_outfit %}
|
||||||
|
<td width="5%"><span><b>Outfit</b></span></td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<td width="40%">
|
<td width="40%">
|
||||||
<span><b>Name</b></span>
|
<span><b>Name</b></span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{% if config.team_display_status %}
|
{% if config.team_display_status %}
|
||||||
<td width="10%">
|
<td>
|
||||||
<span><b>Status</b></span>
|
<span><b>Status</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if (config.multiworld or config.team_display_world) %}
|
{% if (config.multiworld or config.team_display_world) %}
|
||||||
<td width="20%">
|
<td>
|
||||||
<span><b>World</b></span>
|
<span><b>World</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if config.team_display_lastlogin %}
|
{% if config.team_display_lastlogin %}
|
||||||
<td width="20%">
|
<td>
|
||||||
<span><b>Last login</b></span>
|
<span><b>Last login</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -52,6 +56,12 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ group.group_name }}</td>
|
<td>{{ group.group_name }}</td>
|
||||||
|
|
||||||
|
{% if config.team_display_outfit %}
|
||||||
|
<td>
|
||||||
|
<img style="position:absolute;margin-top:{% if member.player.looktype in [75, 266, 302] %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{% if config.account_country %}
|
{% if config.account_country %}
|
||||||
{{ member.flag_image|raw }}
|
{{ member.flag_image|raw }}
|
||||||
@ -90,31 +100,41 @@
|
|||||||
|
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if config.team_display_outfit %}
|
||||||
|
<td width="5%"><span><b>Outfit</b></span></td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<td width="40%">
|
<td width="40%">
|
||||||
<span><b>Name</b></span>
|
<span><b>Name</b></span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{% if config.team_display_status %}
|
{% if config.team_display_status %}
|
||||||
<td width="20%">
|
<td>
|
||||||
<span><b>Status</b></span>
|
<span><b>Status</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if (config.multiworld or config.team_display_world) %}
|
{% if (config.multiworld or config.team_display_world) %}
|
||||||
<td width="20%">
|
<td>
|
||||||
<span><b>World</b></span>
|
<span><b>World</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if config.team_display_lastlogin %}
|
{% if config.team_display_lastlogin %}
|
||||||
<td width="20%">
|
<td>
|
||||||
<span><b>Last login</b></span>
|
<span><b>Last login</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% for member in group.members %}
|
{% for member in group.members %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if config.team_display_outfit %}
|
||||||
|
<td>
|
||||||
|
<img style="position:absolute;margin-top:{% if member.player.looktype in [75, 266, 302] %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ member.outfit }}" alt="player outfit"/>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{% if config.account_country %}
|
{% if config.account_country %}
|
||||||
{{ member.flag_image|raw }}
|
{{ member.flag_image|raw }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user