• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Gesior 2012 0.4 does not show support list !

Daniel Kopeć

Member
Joined
Dec 8, 2018
Messages
125
Solutions
4
Reaction score
12
Location
Poland
Gesior 2012 for TFS 0.36 and 0.4 Tibia 8.6 does not show support list. (GOD, GM, Tutor, etc...)
How to Fix It?

Its my team.php file:

PHP:
<?php
if(!defined('INITIALIZED'))
    exit;

$list = $SQL->query('SELECT ' . $SQL->fieldName('name') . ', ' . $SQL->fieldName('online') . ', ' . $SQL->fieldName('group_id') . ', ' . $SQL->fieldName('world_id') . ' FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' IN (' . implode(',', $config['site']['groups_support']) . ') ORDER BY ' . $SQL->fieldName('group_id') . ' DESC');

$main_content .= '<center><h2>Support in game</h2></center>';
$main_content .= "<table border=0 cellspacing=1 cellpadding=4 width=100%>
    <tr bgcolor=\"".$config['site']['vdarkborder']."\">
    <td width=\"20%\"><font class=white><b>Group</b></font></td>
    <td width=\"45%\"><font class=white><b>Name</b></font></td>
    <td width=\"15%\"><font class=white><b>Status</b></font></td>
    <td width=\"20%\"><font class=white><b>World</b></font></td>";
foreach($list as $i => $supporter)
{
    if($supporter['online'] == 0)
        $player_list_status = '<font color="red">Offline</font>';
    else
        $player_list_status = '<font color="green">Online</font>';
    $bgcolor = (($i++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
    $main_content .= '<tr bgcolor="'.$bgcolor.'"><td>' . htmlspecialchars(Website::getGroupName($supporter['group_id'])) . '</td><td><a href="?subtopic=characters&name='.urlencode($supporter['name']).'">'.htmlspecialchars($supporter['name']).'</a></td><td>'.$player_list_status.'</td><td>'.htmlspecialchars($config['site']['worlds'][$supporter['world_id']]).'</td></tr>';
}

$main_content .= "</table>";
 
Solution
Code looks fine.

List of god/gm/tutor groups is configured there:

Maybe there is some MySQL error reported, but hidden.
Turn on SQL debuging (change to true):
Code looks fine.

List of god/gm/tutor groups is configured there:

Maybe there is some MySQL error reported, but hidden.
Turn on SQL debuging (change to true):
 
Solution
Code looks fine.

List of god/gm/tutor groups is configured there:

Maybe there is some MySQL error reported, but hidden.
Turn on SQL debuging (change to true):
Well, group ID 7 was missing in config :)
Thank you very much for your help :) REP +
 
Code looks fine.

List of god/gm/tutor groups is configured there:

Maybe there is some MySQL error reported, but hidden.
Turn on SQL debuging (change to true):
Mine are configured correctly in config.php, but no show name of group.

1658496833912.png

in support list dont show group name either:
1658496861201.png
 
Back
Top