mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
* new configurable: highscores_length, how much highscores to display
* fixed characters twig template loading * fixed highscores links
This commit is contained in:
parent
f0adabf567
commit
005356ebb3
@ -185,6 +185,7 @@ $config = array(
|
||||
'highscores_outfit' => true, // show player outfit?
|
||||
'highscores_country_box' => false, // doesnt work yet! (not implemented)
|
||||
'highscores_groups_hidden' => 4, // this group id and higher won't be shown on the highscores
|
||||
'highscores_length' => 100, // how many records per page on highscores
|
||||
|
||||
// characters page
|
||||
'characters' => array( // what things to display on character view page (true/false in each option)
|
||||
|
@ -89,6 +89,8 @@ else {
|
||||
'/^forum\/thread\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_thread', 'id' => '$2'),
|
||||
'/^forum\/thread\/[0-9]+\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_thread', 'id' => '$2', 'page' => '$3'),
|
||||
'/^gifts\/history\/?$/' => array('subtopic' => 'gifts', 'action' => 'show_history'),
|
||||
'/^highscores\/[A-Za-z0-9-_]+\/[A-Za-z0-9-_]+\/[0-9]+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1', 'vocation' => '$2', 'page' => '$3'),
|
||||
'/^highscores\/[A-Za-z0-9-_]+\/[0-9]+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1', 'page' => '$2'),
|
||||
'/^highscores\/[A-Za-z0-9-_]+\/[A-Za-z0-9-_]+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1', 'vocation' => '$2'),
|
||||
'/^highscores\/[A-Za-z0-9-_\']+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1'),
|
||||
'/^polls\/[0-9]+\/?$/' => array('subtopic' => 'polls', 'id' => '$1')
|
||||
|
@ -109,7 +109,7 @@ if($config['highscores_outfit']) {
|
||||
}
|
||||
}
|
||||
|
||||
$offset = $_page * 100;
|
||||
$offset = $_page * $config['highscores_length'];
|
||||
if($skill <= POT::SKILL_LAST) { // skills
|
||||
if(fieldExist('skill_fist', 'players')) {// tfs 1.0
|
||||
$skill_ids = array(
|
||||
@ -186,7 +186,7 @@ foreach($skills as $player)
|
||||
$player['online'] = $query->rowCount() > 0;
|
||||
}
|
||||
|
||||
if(++$i <= 100)
|
||||
if(++$i <= $config['highscores_length'])
|
||||
{
|
||||
if($skill == POT::SKILL__MAGIC)
|
||||
$player['value'] = $player['maglevel'];
|
||||
@ -238,11 +238,11 @@ if(!$i)
|
||||
<?php
|
||||
//link to previous page if actual page is not first
|
||||
if($_page > 0)
|
||||
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($_page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>';
|
||||
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="' . getLink('highscores') . '/' . $list . (isset($vocation) ? '/' . $vocation : '') . '/' . ($_page - 1) . '" CLASS="size_xxs">Previous Page</A></TD></TR>';
|
||||
|
||||
//link to next page if any result will be on next page
|
||||
if($show_link_to_next_page)
|
||||
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($_page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>';
|
||||
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="' . getLink('highscores') . '/' . $list . (isset($vocation) ? '/' . $vocation : '') . '/' . ($_page + 1) . '" CLASS="size_xxs">Next Page</A></TD></TR>';
|
||||
|
||||
//end of page
|
||||
echo '</TABLE>
|
||||
@ -307,8 +307,8 @@ if($config['highscores_vocation_box'])
|
||||
</tr>
|
||||
<tr bgcolor="'.$config['lightborder'].'">
|
||||
<td>
|
||||
<a href="' . getLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" class="size_xs">[ALL]</A><BR>';
|
||||
for($i = 1; $i < count($config_vocations) / 2; $i++) {
|
||||
<a href="' . getLink('highscores') . '/' . $list . '" class="size_xs">[ALL]</A><BR>';
|
||||
for($i = 1; $i <= $config['vocations_amount']; $i++) {
|
||||
echo '<a href="' . getLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" class="size_xs">' . $config_vocations[$i] . '</a><br/>';
|
||||
}
|
||||
echo '
|
||||
|
@ -244,7 +244,9 @@
|
||||
<td width="20%" align="center">{{ frag.time|date("j M Y, H:i") }}</td>
|
||||
<td>{{ frag.description }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{{ hook(constant('HOOK_CHARACTERS_BEFORE_SIGNATURE')) }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user