• 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!

[Znote AAC] old school layout

Tried that.. Now I got other errors. Guess the Layout and me won't become friends anymore. np and thanks for your help. :)
View attachment 60752
Lua:
                                {
                                    $value .= '.'.substr($value2, -3, 3);
                                    $value2 = substr($value2, 0, strlen($value2)-3);
                                }

One more thing:

SQL:
ALTER TABLE `players` ADD `broadcasting` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `viewers` BIGINT( 255 ) NOT NULL DEFAULT '0';
 
Last edited:
One more thing:

SQL:
ALTER TABLE `players` ADD `broadcasting` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `viewers` BIGINT( 255 ) NOT NULL DEFAULT '0',
Error: ALTER TABLE players ADD broadcasting BIGINT( 255 ) NOT NULL DEFAULT '0', ADD viewers BIGINT( 255 ) NOT NULL DEFAULT '0',;
 
Error: ALTER TABLE players ADD broadcasting BIGINT( 255 ) NOT NULL DEFAULT '0', ADD viewers BIGINT( 255 ) NOT NULL DEFAULT '0';;

Sorry, try it again with ; at the end instead of ,

I've changed it in my previous post.
 
Warning: Undefined array key "order" in C:\xampp\htdocs\layout\sub\onlinelist.php on line 31

And also somehow the flags and outfits dissapeared on my website in the highscores / onlinelists, even tho they were working previously. God.

1627646303283.png
onlinelist.php

1627646443263.png
Outfits gone on highscores.

1627646458092.png
Flag gone, previously working
 
Last edited:
Sorry, try it again with ; at the end instead of ,

I've changed it in my previous post.
It works. Thanks!
But now the footer.php, just copied your main layout one in, is broken.
Warning: Undefined variable $value in ~htdocs\layout\overall\footer.php on line 123
Bild_2021-07-30_175411.png
 
Last edited:
If you're having issues using latest Znote acc and the newsticker is not showing any changelogs.
Make sure to add
Lua:
 $changelogCache->useMemory(false);

So it looks like this:
Lua:
$changelogCache = new Cache('engine/cache/changelog');
                        $changelogCache->useMemory(false);
                        $changelogs = $changelogCache->load();
 
flags
Warning: Undefined array key "order" in C:\xampp\htdocs\layout\sub\onlinelist.php on line 31

And also somehow the flags and outfits dissapeared on my website in the highscores / onlinelists, even tho they were working previously. God.

View attachment 60753
onlinelist.php

View attachment 60754
Outfits gone on highscores.

View attachment 60755
Flag gone, previously working
What you did to fix flags error? I'm having the same problem, flags are not being displayed although, I have installed flags folder inside www.
I've searched inside the files and it's written that they should be placed there
PHP:
echo '<img src="/flags' . $account_data['flag'] . '.png">';
 
@Jpstafe

PHP:
<?php
require_once 'engine/init.php';
error_reporting(E_ALL ^ E_NOTICE);
?>

    <?php
    $record = mysql_select_single('SELECT * FROM `server_record` ORDER BY `record` DESC LIMIT 1;');
    ?>
    <table cellpadding="4">
        <tr>
            <th>
                Server Status
            </th>
        </tr>
        <tr>
            <td>
                Currently <strong><?php echo user_count_online(); ?></strong> players are online on <strong><?php echo $config['site_title']; ?></strong>. The record holds a total of <strong><?php echo $record['record'] ?> players</strong> on <?php echo date("M j Y", $record['timestamp']) ?>
            </td>
        </tr>
    </table>
<?php
function online_list_hemrenus($order) {
    if($order == 'name') { $orderby = 'name'; }
    elseif($order == 'lvl') { $orderby = 'level'; }
    elseif($order == 'voc') { $orderby = 'vocation'; }
    else { $orderby = 'name'; }
        
    if (config('TFSVersion') == 'TFS_10') return mysql_select_multi("SELECT `o`.`player_id` AS `id`, `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players_online` as `o` INNER JOIN `players` as `p` ON `o`.`player_id` = `p`.`id` LEFT JOIN `guild_membership` gm ON `o`.`player_id` = `gm`.`player_id` LEFT JOIN `guilds` g ON `gm`.`guild_id` = `g`.`id`");
    else return mysql_select_multi("SELECT `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players` p LEFT JOIN `guild_ranks` gr ON `gr`.`id` = `p`.`rank_id` LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id` WHERE `p`.`online` = '1' ORDER BY `p`.`".$orderby."` DESC;");
}
$array = online_list_hemrenus(htmlspecialchars($_GET['order']));
if ($array) {
    ?>

    <table class="stripped" cellpadding="4">
        <tr>
                <?php
                if ($config['country_flags'])
                {
                    echo '<th width="2%">Flag</th>';
                    
                } ?>
            <th><strong><a style="color: #fff;" href="onlinelist.php?order=name">Name</a></strong></td>
            <th width="10%"><strong><a style="color: #fff;" href="onlinelist.php?order=lvl">Level</a></strong></th>
            <th width="20%"><strong><a style="color: #fff;" href="onlinelist.php?order=voc">Vocation</a></strong></th>
        </tr>
            <?php
            foreach ($array as $value) {
                echo '<tr>';
            $url = url("characterprofile.php?name=". $value['name']);
                
                if ($config['country_flags'])
                {
                                        $flag = user_znote_account_data(user_character_account_id($value['name']), 'flag');
                    echo '<td><center><img src="http://flag.znote.eu/' . $flag['flag'] . '.png"></center></td>';
                    
                }
                
            echo '';
            echo '<td><strong><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></strong></td>';
            echo '<td>'. $value['level'] .'</td>';
            echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>';
            echo '</tr>';
            }
            ?>
    </table>

    <?php
} else {
    echo '<table cellpadding="4"><tr><th>Players Online</th></tr><tr><td>Nobody is online.</td></tr></table>';
}
?>

    <form type="submit" action="characterprofile.php" method="get">
    
    <table>
        <tr><th >Search Character</th></tr>
        <tr><td>
            <table style="width: auto;margin: 0;">
            
                
                <tr>
                    <td><strong>Name:</strong></td><td><input size="29" type="text" name="name" class="search"></td>
                    <td>
                    <input type="Submit" value="" class="hover" style="background: url(layout/tibia_img/sbutton_submit.gif); width:120px;height:18px;border: 0 none;" border="0"></td>
                </tr>
                

            </table>
        </td></tr>
    </table>
    
    </form>
 
@Jpstafe

PHP:
<?php
require_once 'engine/init.php';
error_reporting(E_ALL ^ E_NOTICE);
?>

    <?php
    $record = mysql_select_single('SELECT * FROM `server_record` ORDER BY `record` DESC LIMIT 1;');
    ?>
    <table cellpadding="4">
        <tr>
            <th>
                Server Status
            </th>
        </tr>
        <tr>
            <td>
                Currently <strong><?php echo user_count_online(); ?></strong> players are online on <strong><?php echo $config['site_title']; ?></strong>. The record holds a total of <strong><?php echo $record['record'] ?> players</strong> on <?php echo date("M j Y", $record['timestamp']) ?>
            </td>
        </tr>
    </table>
<?php
function online_list_hemrenus($order) {
    if($order == 'name') { $orderby = 'name'; }
    elseif($order == 'lvl') { $orderby = 'level'; }
    elseif($order == 'voc') { $orderby = 'vocation'; }
    else { $orderby = 'name'; }
      
    if (config('TFSVersion') == 'TFS_10') return mysql_select_multi("SELECT `o`.`player_id` AS `id`, `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players_online` as `o` INNER JOIN `players` as `p` ON `o`.`player_id` = `p`.`id` LEFT JOIN `guild_membership` gm ON `o`.`player_id` = `gm`.`player_id` LEFT JOIN `guilds` g ON `gm`.`guild_id` = `g`.`id`");
    else return mysql_select_multi("SELECT `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players` p LEFT JOIN `guild_ranks` gr ON `gr`.`id` = `p`.`rank_id` LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id` WHERE `p`.`online` = '1' ORDER BY `p`.`".$orderby."` DESC;");
}
$array = online_list_hemrenus(htmlspecialchars($_GET['order']));
if ($array) {
    ?>

    <table class="stripped" cellpadding="4">
        <tr>
                <?php
                if ($config['country_flags'])
                {
                    echo '<th width="2%">Flag</th>';
                  
                } ?>
            <th><strong><a style="color: #fff;" href="onlinelist.php?order=name">Name</a></strong></td>
            <th width="10%"><strong><a style="color: #fff;" href="onlinelist.php?order=lvl">Level</a></strong></th>
            <th width="20%"><strong><a style="color: #fff;" href="onlinelist.php?order=voc">Vocation</a></strong></th>
        </tr>
            <?php
            foreach ($array as $value) {
                echo '<tr>';
            $url = url("characterprofile.php?name=". $value['name']);
              
                if ($config['country_flags'])
                {
                                        $flag = user_znote_account_data(user_character_account_id($value['name']), 'flag');
                    echo '<td><center><img src="http://flag.znote.eu/' . $flag['flag'] . '.png"></center></td>';
                  
                }
              
            echo '';
            echo '<td><strong><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></strong></td>';
            echo '<td>'. $value['level'] .'</td>';
            echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>';
            echo '</tr>';
            }
            ?>
    </table>

    <?php
} else {
    echo '<table cellpadding="4"><tr><th>Players Online</th></tr><tr><td>Nobody is online.</td></tr></table>';
}
?>

    <form type="submit" action="characterprofile.php" method="get">
  
    <table>
        <tr><th >Search Character</th></tr>
        <tr><td>
            <table style="width: auto;margin: 0;">
          
              
                <tr>
                    <td><strong>Name:</strong></td><td><input size="29" type="text" name="name" class="search"></td>
                    <td>
                    <input type="Submit" value="" class="hover" style="background: url(layout/tibia_img/sbutton_submit.gif); width:120px;height:18px;border: 0 none;" border="0"></td>
                </tr>
              

            </table>
        </td></tr>
    </table>
  
    </form>
I've replaced my /sub/onlinelist.php by yours and did this in config.lua
i know it was nccesary just to change this <img src="Index of / (http://flag.znote.eu/)
Lua:
    // Use country flags
    $config['country_flags'] = array(
        'enabled' => true,
        'highscores' => true,
        'onlinelist' => true,
        'characterprofile' => true,
        // 'server' => 'http://127.0.0.1/flags'
        //'server' => 'flags'
        'server' => 'http://flag.znote.eu/'
        //'server' => 'http://flag.znote.eu'
    );
flags still do not appear in website
im using this GitHub - Znote/ZnoteAAC: Developement repository for the Znote AAC project. A website portal to represent and manage your Open Tibia server. (https://github.com/Znote/ZnoteAAC), i downloaded the master branch that it's being used with this layout
can somebody help me via anydesk?
 
Last edited:
changed the db and the gallery stopped working anybody knows how to fix it? i've been trying to solve this for days. my folders location are okey
 
Back
Top