mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Add outfit to highscores box in tibiacom template
This commit is contained in:
parent
64de46943b
commit
71b4f4a64a
@ -1,5 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$topPlayers = getTopPlayers(5);
|
||||||
|
foreach($topPlayers as &$player) {
|
||||||
|
$outfit_url = '';
|
||||||
|
if($config['online_outfit']) {
|
||||||
|
$outfit_url = $config['outfit_images_url'] . '?id=' . $player['looktype'] . (!empty
|
||||||
|
($player['lookaddons']) ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'];
|
||||||
|
|
||||||
|
$player['outfit'] = $outfit_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$twig->display('highscores.html.twig', array(
|
$twig->display('highscores.html.twig', array(
|
||||||
'topPlayers' => getTopPlayers(5)
|
'topPlayers' => $topPlayers
|
||||||
));
|
));
|
||||||
|
@ -45,9 +45,13 @@
|
|||||||
<div class="top_level" style="background:url({{ template_path }}/images/themeboxes/bg_top.png)" align=" ">
|
<div class="top_level" style="background:url({{ template_path }}/images/themeboxes/bg_top.png)" align=" ">
|
||||||
{% for player in topPlayers %}
|
{% for player in topPlayers %}
|
||||||
<div style="text-align:left"><a href="{{ getPlayerLink(player['name'], false) }} " class="topfont {% if player['online'] %}online{% else %}offline{% endif %}">
|
<div style="text-align:left"><a href="{{ getPlayerLink(player['name'], false) }} " class="topfont {% if player['online'] %}online{% else %}offline{% endif %}">
|
||||||
<span style="color: #CCC"> {{ player['rank'] }} - </span>{{ player['name'] }}
|
{% if config.online_outfit %}
|
||||||
|
<img style="position:absolute;margin-top:{% if player.looktype in [75, 266, 302] %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ player.outfit }}" alt="player outfit"/>
|
||||||
|
{% endif %}
|
||||||
|
<span style="color: #CCC; margin-left: 40px">{{ player['rank'] }} - </span>
|
||||||
|
{{ player['name'] }}
|
||||||
<br>
|
<br>
|
||||||
<small><span style="color: white"> Level: ({{ player['level'] }})</span></small>
|
<small><span style="color: white; margin-left: 50px">Level: ({{ player['level'] }})</span></small>
|
||||||
<br>
|
<br>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user