mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 01:09: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
|
||||
* create account: create character
|
||||
* csrf token protection
|
||||
* team page - display outfits of the players (configurable)
|
||||
* guild wars support like in Gesior
|
||||
* Install: create admin account: e-mail + Nazwa postaci
|
||||
* move lostaccount.php to Twig
|
||||
|
@ -184,6 +184,7 @@ $config = array(
|
||||
'team_display_status' => true,
|
||||
'team_display_lastlogin' => true,
|
||||
'team_display_world' => false,
|
||||
'team_display_outfit' => true,
|
||||
|
||||
// bans page
|
||||
'bans_limit' => 50,
|
||||
|
@ -21,6 +21,16 @@ if(!$groups->count())
|
||||
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();
|
||||
$groupList = $groups->getGroups();
|
||||
foreach($groupList as $id => $group)
|
||||
@ -44,6 +54,8 @@ 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' => $member->isOnline(),
|
||||
'link' => getPlayerLink($member->getName()),
|
||||
'flag_image' => getFlagImage($member->getAccount()->getCountry()),
|
||||
|
@ -24,24 +24,28 @@
|
||||
<span><b>Group</b></span>
|
||||
</td>
|
||||
|
||||
{% if config.team_display_outfit %}
|
||||
<td width="5%"><span><b>Outfit</b></span></td>
|
||||
{% endif %}
|
||||
|
||||
<td width="40%">
|
||||
<span><b>Name</b></span>
|
||||
</td>
|
||||
|
||||
{% if config.team_display_status %}
|
||||
<td width="10%">
|
||||
<td>
|
||||
<span><b>Status</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if (config.multiworld or config.team_display_world) %}
|
||||
<td width="20%">
|
||||
<td>
|
||||
<span><b>World</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if config.team_display_lastlogin %}
|
||||
<td width="20%">
|
||||
<td>
|
||||
<span><b>Last login</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
@ -52,6 +56,12 @@
|
||||
<tr>
|
||||
<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>
|
||||
{% if config.account_country %}
|
||||
{{ member.flag_image|raw }}
|
||||
@ -90,31 +100,41 @@
|
||||
|
||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
||||
<tr>
|
||||
{% if config.team_display_outfit %}
|
||||
<td width="5%"><span><b>Outfit</b></span></td>
|
||||
{% endif %}
|
||||
|
||||
<td width="40%">
|
||||
<span><b>Name</b></span>
|
||||
</td>
|
||||
|
||||
{% if config.team_display_status %}
|
||||
<td width="20%">
|
||||
<td>
|
||||
<span><b>Status</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if (config.multiworld or config.team_display_world) %}
|
||||
<td width="20%">
|
||||
<td>
|
||||
<span><b>World</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if config.team_display_lastlogin %}
|
||||
<td width="20%">
|
||||
<td>
|
||||
<span><b>Last login</b></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
||||
{% 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>
|
||||
{% if config.account_country %}
|
||||
{{ member.flag_image|raw }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user