* moved some more pages to twig

* moved online, movies, google_analytics code, faq, experience_table, downloads to twig
* added new global variabl to twig (status)
* removed some unused page (custom.php)
* automatically append trailing slash at config.item_images_url
* moved downloads from clients.halfaway.net to tibia-clients.com
* show some more info on monster loot (currently only on TFS 0.3 and those that use item.id in monster files instead of item name)
* some more unimportant fixes
This commit is contained in:
slawkens
2017-10-04 17:49:54 +02:00
parent e94b9006e6
commit b6ccde075d
24 changed files with 327 additions and 351 deletions

View File

@@ -4,7 +4,7 @@
<td>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
{% if config.characters.outfit %}
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}"></div>
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}" alt="player outfit"/></div>
{% endif %}
<tr bgcolor="{{ config.vdarkborder }}">

View File

@@ -0,0 +1,10 @@
<br/><br/>
<center>
We're using official Tibia Client <strong>{{ config.client / 100 }}</strong><br/>
<p>Download Tibia client {{ config.client / 100 }} for windows <a href="{{ config.client_download }}">HERE</a>.</p>
<p>Download Tibia client {{ config.client / 100 }} for linux <a href="{{ config.client_download_linux }}">HERE</a>.</p>
<h2>IP Changer:</h2>
<a href="https://static.otland.net/ipchanger.exe" target="_blank">HERE</a>
</center>

View File

@@ -0,0 +1,26 @@
This is a list of the experience points that are required to advance to the various levels.
Remember you can also check the respective skill bar in your skill window of the client to check your progress towards the next level.<br/><br/>
<table bgcolor="{{ config.darkborder }}" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td class="white" colspan="5"><b>Experience Table</b></td>
</tr>
<tr>
{% for i in 0..config.experiencetable_columns-1 %}
<td>
<table border="0" cellpadding="2" cellspacing="1" width="100%">
<tr bgcolor="{{ config.lightborder }}">
<td><b>Level</b></td>
<td><b>Experience</b></td>
</tr>
{% for level in i * config.experiencetable_rows + 1..i * config.experiencetable_rows + (config.experiencetable_rows + 1) - 1 %}
<tr bgcolor="{{ config.lightborder }}">
<td>{{ level }}</td>
<td>{{ experience[level] }}</td>
</tr>
{% endfor %}
</table>
</td>
{% endfor %}
</tr>
</table>

View File

@@ -0,0 +1,41 @@
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td class="white">
<b>FAQ</b>
</td>
<td align="right">
<a href="#" onclick="toggleAll(); return false;">Toggle all</a>
</td>
</tr>
{% set i = 0 %}
{% for faq in faqs %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}">
<td colspan="2" style="cursor: pointer;" onclick="toggleVisibility('faq_{{ i }}'); return false;">
<b>{{ faq.question }}</b>
<div id="faq_{{ i }}" style="display: none;">{{ faq.answer }}</div>
</td>
</tr>
{% endfor %}
</table>
<script type="text/javascript">
var expanded = false;
function toggleVisibility(id)
{
var tmp = document.getElementById(id);
if(tmp)
tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
}
function toggleAll()
{
for(i = 1; i < {{ i + 1 }}; i++)
{
document.getElementById('faq_' + i).style.display = expanded ? 'none' : '';
}
expanded = !expanded;
}
</script>

View File

@@ -0,0 +1,9 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ config.google_analytics_id }}', 'auto');
ga('send', 'pageview');
</script>

View File

@@ -0,0 +1,7 @@
<div style="text-align: center;">
{% for movie in movies %}
<h2>{{ movie.title }}</h2>
Author: {{ movie.author }}<br/>
<iframe width="560" height="315" src="https://www.youtube.com/embed/{{ movie.youtube_id }}" frameborder="0" allowfullscreen></iframe><br/><br/>
{% endfor %}
</div>

View File

@@ -1,7 +1,7 @@
<div class="NewsHeadline">
<div class="NewsHeadlineBackground" style="background-image:url({{ template_path }}/images/news/newsheadline_background.gif)">
<img src="{{ template_path }}/images/news/icon_{{ icon }}.gif" class="NewsHeadlineIcon" />
<div class="NewsHeadlineDate">{{ date|date(news_date_format) }} - </div>
<div class="NewsHeadlineDate">{{ date|date(config.news_date_format) }} - </div>
<div class="NewsHeadlineText">{{ title }}</div>
{% if author is not empty %}
<div class="NewsHeadlineAuthor"><b>Author: </b><i>{{ author }}</i></div>

View File

@@ -0,0 +1,112 @@
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td class="white"><b>Server Status</b></td>
</tr>
{% if players|length == 0 %}
<tr bgcolor="{{ config.darkborder }}"><td>Currently no one is playing on {{ config.lua.serverName }}.</td></tr></table>
{% else %}
<tr bgcolor="{{ config.darkborder }}">
<td>
{% if not status.online %}
Server is offline.<br/>
{% else %}
{% if config.online_afk %}
{% set players_count = players|length %}
{% set afk = players_count - status.players %}
{% if afk < 0 %}
{% set players = players + afk|abs %}
{% set afk = 0 %}
{% endif %}
Currently there are <b>{{ status.players }}</b> active and <b>{{ afk }}</b> AFK players.<br/>
Total number of players: <b>{{ players_count }}</b>.<br/>
{% else %}
Currently {{ players|length }} players are online.<br/>
{% endif %}
{% endif %}
</td>
</tr>
</table>
{# vocation statistics #}
{% if config.online_vocations %}
<br/>
{% if config.online_vocations_images %}
<table width="200" cellspacing="1" cellpadding="0" border="0" align="center">
<tr bgcolor="{{ config.darkborder }}">
<td><img src="images/sorcerer.png" /></td>
<td><img src="images/druid.png" /></td>
<td><img src="images/paladin.png" /></td>
<td><img src="images/knight.png" /></td>
</tr>
<tr bgcolor="{{ config.vdarkborder }}">
<td class="white" style="text-align: center;"><strong>Sorcerers</strong></td>
<td class="white" style="text-align: center;"><strong>Druids</strong></td>
<td class="white" style="text-align: center;"><strong>Paladins</strong></td>
<td class="white" style="text-align: center;"><strong>Knights</strong></td>
</tr>
<tr bgcolor="{{ config.lightborder }}">
<td style="text-align: center;">{{ vocs[1] }}</td>
<td style="text-align: center;">{{ vocs[2] }}</td>
<td style="text-align: center;">{{ vocs[3] }}</td>
<td style="text-align: center;">{{ vocs[4] }}</td>
</tr>
</table>
<div style="text-align: center;">&nbsp;</div>
{% else %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td class="white" colspan="2"><b>Vocation statistics</b></td>
</tr>
{% for i in 1..config.vocations_amount %}
<tr bgcolor="{{ getStyle(i) }}">
<td width="25%">{{ config.vocations[i] }}</td>
<td width="75%">{{ vocs[i] }}</td>
</tr>
{% endfor %}
</table>
<br/>
{% endif %}
{% endif %}
{# show skulls #}
{% if config.online_skulls %}
<table width="100%" cellspacing="1">
<tr>
<td style="background: {{ config.darkborder }};" align="center">
<img src="images/white_skull.gif"/> - 1 - 6 Frags<br/>
<img src="images/red_skull.gif"/> - 6+ Frags or Red Skull<br/>
<img src="images/black_skull.gif"/> - 10+ Frags or Black Skull
</td>
</tr>
</table>
{% endif %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
{% if config.account_country %}
<td width="11px"><a href="?subtopic=online&order=country" class="white">#</A></td>
{% endif %}
{% if config.online_outfit %}
<td class="white"><b>Outfit</b></td>
{% endif %}
<td width="60%"><a href="?subtopic=online&order=name" class="white">Name</A></td>
<td width="20%"><a href="?subtopic=online&order=level" class="white">Level</A></td>
<td width="20%"><a href="?subtopic=online&order=vocation" class="white">Vocation</td>
</tr>
{% set i = 0 %}
{% for player in players %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}">
{% if config.account_country %}
<td>{{ player.country_image|raw }}</td>
{% endif %}
{% if config.online_outfit %}
<td width="5%"><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"/></td>
{% endif %}
<td>{{ player.name|raw }}{{ player.skull }}</td>
<td>{{ player.level }}</td>
<td>{{ player.vocation }}</td>
</tr>
{% endfor %}
</table>
{% endif %}