[Znote AAC] TibiaCOM template

XZN

Legendary User
Joined
Dec 31, 2009
Messages
1,104
Best answers
0
Reaction score
185
Location
Sweden
Sub page not recognized.
The sub page you requested is not recognized.
What's the problem? I updated the sub.php and everything.

Solved by putting this into the sub.php:
PHP:
<?php
/* Znote AAC Sub System
- Used to create custom pages
- Place the contents of the page in /layout/sub/ folder.
: You don't need to include init, header or footer.
Its already taken care of, just write the contents you want.
Then add that page to the configuration below. Config syntax:
'PAGENAME' => array(
'file' => 'fileName.php',
'override' => false
),
................
There are 2 ways to view your page, by using sub.php file, or by overriding an existing default page.
1: yourwebiste.com/sub.php?page=PAGENAME
2: By having override => true, then it will load your sub file instead of the default znote aac file.
*/
$subpages = array(
// website.com/sub.php?page=blank
'blank' => array(
// layout/sub/blank.php
'file' => 'blank.php',
// false means don't run this file instead of the regular file at website.com/blank.php
'override' => false
),
'houses' => array(
'file' => 'houses.php',
'override' => false
),
'downloads' => array(
'file' => 'downloads.php',
'override' => false
),
'highscore' => array(
'file' => 'highscore.php',
'override' => false
),
'news' => array(
'file' => 'index.php',
'override' => false
),
'charactersearch' => array(
'file' => 'charactersearch.php',
'override' => false
),
'recover' => array(
'file' => 'recover.php',
'override' => false
),
'loggedin' => array(
'file' => 'loggedin.php',
'override' => false
),
);
?>
 

Darkstox

Been Blazing
Joined
Sep 26, 2008
Messages
38
Best answers
0
Reaction score
2
ok well i have newest version of znote, and im using this layout.
Most of it works good, but there is some bugs to it.
I'm particularly having trouble with my server info page.
I've add a spot for it on the layout via the leftside.php
Below is what i put there, idk if this is right but it takes me to the page as it should. I'm still learning php..
It's weird though, it takes my stages and displays them, but just x's for the rest of the info or blank..
See screen shot to see what Im talking about..

In leftside.php
Code:
                    <div id='submenu_serverinfo' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
                        <div class='LeftChain' style='background-image:url(layout/images/global/general/chain.gif);'></div>
                        <div id='ActiveSubmenuItemIcon_guilds' class='ActiveSubmenuItemIcon' style='background-image:url(layout/images/global/menu/icon-activesubmenu.gif);'></div>
                        <div id='ActiveSubmenuItemLabel_guilds' class='SubmenuitemLabel'><font color="red">Server Info</div>
                        <div class='RightChain' style='background-image:url(layout/images/global/general/chain.gif);'></div>
                    </div>
                </a>
and here is the serverinfo.php
Code:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>

<h1>Server Information</h1>
Here you will find all basic information about <?php echo '<b>'.$config['site_title'].'</b>'; ?>
<?php

// Check if PATH is correct
if (file_exists($config['server_path'].'/config.lua')) {
    // Checks OS from config.php ($config['os'])
    if ($config['os'] == 'WINDOWS') {
        if (file_exists($config['server_path'].'/data/XML/stages.xml')) {
            $stages_path = simplexml_load_file($config['server_path'].'/data/XML/stages.xml');
        } else {
            echo 'Couldn\'t locate stages.xml';
        }
    } else {
        if (file_exists($config['server_path'].'/data/XML/stages.xml')) {
            $stages_path = simplexml_load_file($config['server_path'].'/data/XML/stages.xml');
        } else {
            echo 'Couldn\'t locate stages.xml';
        }
    }
   
    $lua_path = parse_ini_file($config['server_path'].'/config.lua');
    echo '<h2>Server rates</h2>';
    if ($stages_path->config['enabled'] != 0) {
        // Stages are beeing used
        echo "<table class='table table-striped table-hover'>
        <tbody><tr class='yellow'><td>Minium level</td><td>Maximun level</td><td>Multiplier</td></tr>";

        foreach ($stages_path->children()->stage as $stages) {

            if($stages['maxlevel'] === NULL) {
                echo '<tr><td><center>'.$stages['minlevel'].'</center></td><td><center>Infinite</center></td><td><center>x'.$stages['multiplier'].'</center></td></tr>';
            } else {
                echo '<tr><td><center>'.$stages['minlevel'].'</center></td><td><center>'.$stages['maxlevel'].'</center></td><td><center>x'.$stages['multiplier'].'</center></td></tr>';
            }
        }
        echo '</tbody></table>';
       
    } else {
        // Not using stages
        echo "<table class='table table-striped table-hover'>
        <tbody><tr class='yellow'><td>Experience rate</td></tr>
        <tr><td><center>x".$lua_path['rateExp']."</center></td></tr>
        </tbody></table>";
    }
    echo "<table class='table table-striped table-hover'>
        <tbody><tr class='yellow'><td>Skills rate</td><td>Magic rate</td><td>Loot rate</td></tr>
        <tr><td><center>x".$lua_path['rateSkill']."</center></td><td><center>x".$lua_path['rateMagic']."</center></td><td><center>x".$lua_path['rateLoot']."</center></td></tr>
        </tbody></table>";

    // General info
    $information = array(
        'World type'             => $lua_path['worldType'],
        'Protection level'       => $lua_path['protectionLevel'],
        'Kills to red skull'     => $lua_path['killsToRedSkull'],
        'Kills to black skull'   => $lua_path['killsToBlackSkull'],
        'Remove ammo'            => $lua_path['removeAmmoWhenUsingDistanceWeapon'],
        'Remove runes'               => $lua_path['removeChargesFromRunes'],
        'Time to decrease frags' => $lua_path['timeToDecreaseFrags'],
        'House rent period'      => $lua_path['houseRentPeriod'],
        'AFK Kickout minutes'    => $lua_path['kickIdlePlayerAfterMinutes'],
        'Location'               => $lua_path['location'],
        'Owner name'             => $lua_path['ownerName']
    );

    echo "<h2>Server general information</h2><ul>";
    foreach ($information as $key => $value) {
        echo "<li>".$key." - <b>".$value."</b></li>";
    }

    echo '</ul>';

} else {
    echo '<h1>Invliad PATH, please check your config file</h1>';
}

include 'layout/overall/footer.php'; ?>
 

Ahead

New Member
Joined
Dec 27, 2013
Messages
165
Best answers
0
Reaction score
2
I wonder where's the log out button:

 

Ahead

New Member
Joined
Dec 27, 2013
Messages
165
Best answers
0
Reaction score
2
That's account management xD.
 

pierroth

Mar Co.
Joined
Sep 11, 2008
Messages
343
Best answers
0
Reaction score
10
Location
Mexico - California
What's the problem? I updated the sub.php and everything.

Solved by putting this into the sub.php:
PHP:
<?php
/* Znote AAC Sub System
- Used to create custom pages
- Place the contents of the page in /layout/sub/ folder.
: You don't need to include init, header or footer.
Its already taken care of, just write the contents you want.
Then add that page to the configuration below. Config syntax:
'PAGENAME' => array(
'file' => 'fileName.php',
'override' => false
),
................
There are 2 ways to view your page, by using sub.php file, or by overriding an existing default page.
1: yourwebiste.com/sub.php?page=PAGENAME
2: By having override => true, then it will load your sub file instead of the default znote aac file.
*/
$subpages = array(
// website.com/sub.php?page=blank
'blank' => array(
// layout/sub/blank.php
'file' => 'blank.php',
// false means don't run this file instead of the regular file at website.com/blank.php
'override' => false
),
'houses' => array(
'file' => 'houses.php',
'override' => false
),
'downloads' => array(
'file' => 'downloads.php',
'override' => false
),
'highscore' => array(
'file' => 'highscore.php',
'override' => false
),
'news' => array(
'file' => 'index.php',
'override' => false
),
'charactersearch' => array(
'file' => 'charactersearch.php',
'override' => false
),
'recover' => array(
'file' => 'recover.php',
'override' => false
),
'loggedin' => array(
'file' => 'loggedin.php',
'override' => false
),
);
?>
It worked for a while, until I clicked logged out. Then the error came back... anyway to fix this?
 

pierroth

Mar Co.
Joined
Sep 11, 2008
Messages
343
Best answers
0
Reaction score
10
Location
Mexico - California
@UP, fixed...

Put this code on ur layout/sub.php

Code:
<?php
/* Znote AAC Sub System
    -    Used to create custom pages
    -    Place the contents of the page in /layout/sub/ folder.
        : You don't need to include init, header or footer.
        Its already taken care of, just write the contents you want.

    Then add that page to the configuration below. Config syntax:
    'PAGENAME' => array(
        'file' => 'fileName.php',
        'override' => false
    ),
    ................
    There are 2 ways to view your page, by using sub.php file, or by overriding an existing default page.
    1: yourwebiste.com/sub.php?page=PAGENAME
    2: By having override => true, then it will load your sub file instead of the default znote aac file.

*/

$subpages = array(
    'houses' => array(
        'file' => 'houses.php',
        'override' => true
    ),
'downloads' => array(
'file' => 'downloads.php',
'override' => false
),
    'index' => array(
        'file' => 'index.php',
        'override' => true
    ),
'news' => array(
'file' => 'index.php',
'override' => false
),
    'login' => array(
        'file' => 'login.php',
        'override' => false
    ),
    'recover' => array(
        'file' => 'recover.php',
        'override' => true
    ),
    'charactersearch' => array(
        'file' => 'charactersearch.php',
        'override' => true
    ),
    'highscore' => array(
        'file' => 'highscore.php',
        'override' => true
    ),
    'loggedin' => array(
        'file' => 'loggedin.php',
        'override' => true
    ),
    'whoisonline' => array(
        'file' => 'whoisonline.php',
        'override' => true
    ),
    'map' => array(
        'file' => 'map.php',
        'override' => true
    ),
    'quests' => array(
        'file' => 'quests.php',
        'override' => true
    ),
    'experiencetable' => array(
        'file' => 'experiencetable.php',
        'override' => true
    ),
);
?>
 

louco7

New Member
Joined
Jul 21, 2010
Messages
16
Best answers
0
Reaction score
1
hi there, anyone can help me solving this error?
when i hit the button of login with the left button of mouse he give this error
Not Found
The requested URL /{$path}/index.php/account/ was not found on this server​

but if i make right click and open in new tab he work fine
some one know the problem??
 

guiismiti

Active Member
Joined
May 19, 2014
Messages
278
Best answers
1
Reaction score
40
I was having a problem with the Houses page, houses were not being displayed.
I fixed it in layout/sub.php

Instead of
Code:
    'houses' => array(
        'file' => 'houses.php',
        'override' => true
I am using
Code:
    'houses' => array(
        'file' => 'houses.php',
        'override' => false
I had it wrong because of @pierroth's post
 

monkeyy

Member
Joined
Aug 20, 2011
Messages
134
Best answers
0
Reaction score
5
I hope people are still active here !

Almost everything works except the important thing: the login button does not work :(

This is what I get:


Sub page not recognized.
The sub page you requested is not recognized.
 

Sp0tl3ss

Nestalia.org
Joined
Jul 19, 2014
Messages
273
Best answers
0
Reaction score
12
These Pages dosent work how can i fix them?
/sub.php?page=news
/sub.php?page=recover
/sub.php?page=charactersearch
/sub.php?page=highscore
/sub.php?page=houses
Any1 know how to fix these pages please let me know :)
 
Top