• 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
 
outfitter for 7.4(only outfits 128-142)
custom subpages(some of them are only for $config['TFSVersion'] = 'TFS_03'; if i remember correctly, u should check that)
and other features that u can see below

tested only on latest Znote AAC version from GitHub

.PSD for background included

layout (http://www.mediafire.com/file/r94a9eedtutsfat/layout.zip)

07a981b9986001e7b482d937892a01d4.jpg

[SPOIL

[/SPOILER]
do you have the psd file to make the words or title looks cool like where is says lobrary server info? or what font and size was used? thanks
edit: found it

Bronzetti Small Capitals​

 
Last edited:
it's Trajan Pro
thanks for you reply hey i have a question
in header.php get this function which makes appear the title of the file php in the website as shown here
Untitled.png
Lua:
        <!-- MAIN CONTENT -->
                <div class="center_box">
                    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
                    <div class="title"><span class="cufon" style="text-transform: uppercase;text-align: center;line-height: 43px;font-size: 16px;"><?php echo basename($_SERVER["SCRIPT_FILENAME"], '.php'); ?></span></div>
                    <div class="content_bg">
                        <div class="content">
                            <div class="rise-up-content" style="min-height: 565px;">
tried changing
Code:
  <div class="title"><span class="cufon" style="text-transform: uppercase;text-align: center;line-height: 43px;font-size: 16px;"><?php echo basename($_SERVER["SCRIPT_FILENAME"], '.php'); ?></span></div>
to this
Code:
  <div class="title"><span class="cufon" style="text-transform: uppercase;text-align: center;line-height: 43px;font-size: 16px;"></span></div>
that way i wont get that tittle of the php file name. because i want to add something like this
Code:
    <div class="center_box">
                    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
                 <div class="title"><span style="background-image: url(layout/widget_texts/facebook.png);"></span></div>
                 <div class="content_bg">
                        <div class="content">
in killers .php. it looks good Untitled.png if i remove the code entirely from header.php i can't see the same box in the others websites. in other websites where i have not modified it yet
like in here
Untitled.png
how to achieve this without screwing up the website in where i haven't added the new "manual tittle with png image'"?
can you help me? is there a way to check if the title has been declared in the main php file displayed or no?

if i don't remove the code from header.php and i add the code that i want to add in order to get the new title for example in killers.php it looks like this
Untitled.png
 
Last edited:
thanks for you reply hey i have a question
in header.php get this function which makes appear the title of the file php in the website as shown here
View attachment 84778
Lua:
        <!-- MAIN CONTENT -->
                <div class="center_box">
                    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
                    <div class="title"><span class="cufon" style="text-transform: uppercase;text-align: center;line-height: 43px;font-size: 16px;"><?php echo basename($_SERVER["SCRIPT_FILENAME"], '.php'); ?></span></div>
                    <div class="content_bg">
                        <div class="content">
                            <div class="rise-up-content" style="min-height: 565px;">
tried changing
Code:
  <div class="title"><span class="cufon" style="text-transform: uppercase;text-align: center;line-height: 43px;font-size: 16px;"><?php echo basename($_SERVER["SCRIPT_FILENAME"], '.php'); ?></span></div>
to this
Code:
  <div class="title"><span class="cufon" style="text-transform: uppercase;text-align: center;line-height: 43px;font-size: 16px;"></span></div>
that way i wont get that tittle of the php file name. because i want to add something like this
Code:
    <div class="center_box">
                    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
                 <div class="title"><span style="background-image: url(layout/widget_texts/facebook.png);"></span></div>
                 <div class="content_bg">
                        <div class="content">
in killers .php. it looks good View attachment 84784 if i remove the code entirely from header.php i can't see the same box in the others websites. in other websites where i have not modified it yet
like in here
View attachment 84779
how to achieve this without screwing up the website in where i haven't added the new "manual tittle with png image'"?
can you help me? is there a way to check if the title has been declared in the main php file displayed or no?

if i don't remove the code from header.php and i add the code that i want to add in order to get the new title for example in killers.php it looks like this
View attachment 84780
header.php:
Lua:
                <?php
                    if(!isset($subpage_title)){
                        $subpage_title = basename($_SERVER["SCRIPT_FILENAME"], '.php');
                    }
                ?>
                <style>
                    .subpage_title{
                        text-transform: capitalize;
                        text-align: center;
                        font-family: Georgia, serif;
                        font-size: 22px;
                        line-height: 43px;
                        background: -webkit-linear-gradient(#ffffff 30%, #717171 60%);
                        background-clip: text;
                        -webkit-background-clip: text;
                        -webkit-text-fill-color: transparent;
                        filter: drop-shadow(0 1px 1px #000);              
                    }
                </style>
                <!-- MAIN CONTENT -->
                <div class="center_box">
                    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
                    <div class="title"><span class="subpage_title"><?php echo $subpage_title; ?></span></div>
                    <div class="content_bg">
                        <div class="content">
                            <div class="rise-up-content" style="min-height: 565px;">
and in your desired subpage add
Code:
$subpage_title = 'Example Title';
before
Code:
include 'layout/overall/header.php';

above example is made to utilize css instead of images which is better and easier solution in my opinion but you can easily adapt it to use images if you want to.
 
header.php:
Lua:
                <?php
                    if(!isset($subpage_title)){
                        $subpage_title = basename($_SERVER["SCRIPT_FILENAME"], '.php');
                    }
                ?>
                <style>
                    .subpage_title{
                        text-transform: capitalize;
                        text-align: center;
                        font-family: Georgia, serif;
                        font-size: 22px;
                        line-height: 43px;
                        background: -webkit-linear-gradient(#ffffff 30%, #717171 60%);
                        background-clip: text;
                        -webkit-background-clip: text;
                        -webkit-text-fill-color: transparent;
                        filter: drop-shadow(0 1px 1px #000);             
                    }
                </style>
                <!-- MAIN CONTENT -->
                <div class="center_box">
                    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
                    <div class="title"><span class="subpage_title"><?php echo $subpage_title; ?></span></div>
                    <div class="content_bg">
                        <div class="content">
                            <div class="rise-up-content" style="min-height: 565px;">
and in your desired subpage add
Code:
$subpage_title = 'Example Title';
before
Code:
include 'layout/overall/header.php';

above example is made to utilize css instead of images which is better and easier solution in my opinion but you can easily adapt it to use images if you want to.
solved already posted the solution too AAC - [php] problem changing title top margin boxes, for all pages (https://otland.net/threads/php-problem-changing-title-top-margin-boxes-for-all-pages.289086/) thank yoi very much bro. latest question would you mind giving the psd files for the words? i try to get them as they comes in png but don't know the correct way or format. they see very different from each other as you can see facebook from character searchUntitled.png
 

Attachments

solved already posted the solution too AAC - [php] problem changing title top margin boxes, for all pages (https://otland.net/threads/php-problem-changing-title-top-margin-boxes-for-all-pages.289086/) thank yoi very much bro. latest question would you mind giving the psd files for the words? i try to get them as they comes in png but don't know the correct way or format. they see very different from each other as you can see facebook from character searchView attachment 84804
psd file is included in widget_texts folder
 
Back
Top