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

AAC Znote Tibiacom Sup Page Problem.

Sp0tl3ss

Nestalia.org
Joined
Jul 19, 2014
Messages
279
Reaction score
12
Hello im using znoteAAC 1.5 With znotes tibiacom layout, and when i press login, latest news, highscore, lost account?, character and houses i will get dirrected to a blank page (all white) and ive tried to uppdate sup.php file but with no succses.

http://nestalia.org/sub.php?page=login <- Not working page


I got the website up so you can see for yourself:
www.nestalia.org
 
Solution
There are 2 sub.php files, one outside the layout folder ( /sub.php ) and one inside the layout folder ( /layout/sub.php ).
Make sure the outer sub.php looks like this:
PHP:
<?php require_once 'engine/init.php'; require_once 'layout/overall/header.php';
if ($config['allowSubPages']) {
    $page = (isset($_GET['page']) && !empty($_GET['page'])) ? getValue($_GET['page']) : '';
    if (isset($subpages[$page]['file'])) require_once 'layout/sub/'.$subpages[$page]['file'];
    else {
        if (isset($subpages)) echo '<h2>Sub page not recognized.</h2><p>The sub page you requested is not recognized.</p>';
    }
}
else echo '<h2>System disabled.</h2><p>The sub page system is disabled.</p>';
require_once 'layout/overall/footer.php'; ?>

And...
PHP:
<?php
switch ($_GET['page'])
{
    case 'blank':
        include 'layout/sub/blank.php';
    break;
  
    case 'houses':
        include 'layout/sub/houses.php';
    break;
  
    case 'news':
        include 'layout/sub/index.php';
    break;
  
    case 'login':
        include "layout/sub/". $_GET['page'] .".php";
    break;
  
    case 'recover':
        include "layout/sub/". $_GET['page'] .".php";
    break;
  
    case 'charactersearch':
        include "layout/sub/". $_GET['page'] .".php";
    break;
  
    case 'highscore':
        include "layout/sub/". $_GET['page'] .".php";
    break;
  
    case 'loggedin':
        include "layout/sub/". $_GET['page'] .".php";
    break;
  
    default:
        echo '<h2>Sub page not recognized.</h2><p>The sub page you requested is not recognized.</p>';
}
?>

-- From layout



from engine--
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
),
);
?>
 
Last edited by a moderator:
There are 2 sub.php files, one outside the layout folder ( /sub.php ) and one inside the layout folder ( /layout/sub.php ).
Make sure the outer sub.php looks like this:
PHP:
<?php require_once 'engine/init.php'; require_once 'layout/overall/header.php';
if ($config['allowSubPages']) {
    $page = (isset($_GET['page']) && !empty($_GET['page'])) ? getValue($_GET['page']) : '';
    if (isset($subpages[$page]['file'])) require_once 'layout/sub/'.$subpages[$page]['file'];
    else {
        if (isset($subpages)) echo '<h2>Sub page not recognized.</h2><p>The sub page you requested is not recognized.</p>';
    }
}
else echo '<h2>System disabled.</h2><p>The sub page system is disabled.</p>';
require_once 'layout/overall/footer.php'; ?>

And inside layout folder:
Replace layout/sub.php with this:
PHP:
<?php
$subpages = array(
    // website.com/sub.php?page=blank
    'index' => array(
        'file' => 'index.php',
        'override' => true
    ),
    'news' => array(
        'file' => 'index.php',
        'override' => false
    ),
    'houses' => array(
        'file' => 'houses.php',
        'override' => true
    ),
    '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
    )
);
?>
 
Last edited:
Solution
There are 2 sub.php files, one outside the layout folder ( /sub.php ) and one inside the layout folder ( /layout/sub.php ).
Make sure the outer sub.php looks like this:
PHP:
<?php require_once 'engine/init.php'; require_once 'layout/overall/header.php';
if ($config['allowSubPages']) {
    $page = (isset($_GET['page']) && !empty($_GET['page'])) ? getValue($_GET['page']) : '';
    if (isset($subpages[$page]['file'])) require_once 'layout/sub/'.$subpages[$page]['file'];
    else {
        if (isset($subpages)) echo '<h2>Sub page not recognized.</h2><p>The sub page you requested is not recognized.</p>';
    }
}
else echo '<h2>System disabled.</h2><p>The sub page system is disabled.</p>';
require_once 'layout/overall/footer.php'; ?>

And inside layout folder:
Replace layout/sub.php with this:
PHP:
<?php
$subpages = array(
    // website.com/sub.php?page=blank
    'index' => array(
        'file' => 'index.php',
        'override' => true
    ),
    'news' => array(
        'file' => 'index.php',
        'override' => false
    ),
    'houses' => array(
        'file' => 'houses.php',
        'override' => true
    ),
    'login' => array(
        'file' => 'login.php',
        'override' => true
    ),
    '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
    )
);
?>

This fixed the problem huge Thanks Znote!
 
@Znote hello all pages work now, but i cant login to the website ingame works fine, any ideas?
The loginpage is probably outdated, remove:
PHP:
    'login' => array(
        'file' => 'login.php',
        'override' => true
    ),
from layout/sub.php
 
The loginpage is probably outdated, remove:
PHP:
    'login' => array(
        'file' => 'login.php',
        'override' => true
    ),
from layout/sub.php
if i remove it i get
Sub page not recognized.
The sub page you requested is not recognized

:/
 
Ahh right, keep the login entry in sub.php, but set override => false instead.
The layout/sub/login.php is probably the login fields, and it posts to the regular login.php page, its not a replacement for the login.php page.
 
login works good now, still cant fetch houses.. try all method from every theard form otland and still not working.. all other features working good..

any ideas?
 
Back
Top