• 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] Guilcera Layout

@Peonso You can now override default pages with the sub system with the latest commit.
https://github.com/Znote/ZnoteAAC/blob/master/layout/sub.php

Make sure the file in /layout/sub/ is identical to the file you want to override, and set override to true.

Etc:
PHP:
'downloads' => array(
'file' => 'downloads.php',
'override' => true
),
By having override => true, when you enter website.com/downloads.php, it will automatically load /layout/sub/downloads.php instead.
 
I downloaded the new REV ...
I get this error
Sub page not recognized.
The sub page you requested is not recognized.

in pages:
"who is online"
"character search" or "characters"
"map"
"experience"
how I can fix it?
and I have erros in page "houses"
my tfs is 1.0
 
I downloaded the new REV ...
I get this error
Sub page not recognized.
The sub page you requested is not recognized.

in pages:
"who is online"
"character search" or "characters"
"map"
"experience"
how I can fix it?
and I have erros in page "houses"
my tfs is 1.0

You will need to change www/layout/sub.php page for this one https://github.com/Znote/ZnoteAAC/blob/master/layout/sub.php and add all the pages that are at www/layout/sub folder.
 
aff bro, I don't done it
see my sub

<?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
),
'characters' => array(
'file' => 'charactersearch.php',
'override' => false
),
'players online' => array(
'file' => 'whoisonline.php',
'override' => false
),
'map' => array(
'file' => 'map.php',
'override' => false
),
'experience' => array(
'file' => 'experiencetable.php',
'override' => false
),
);
?>


... dont work like this /\
 
same changing 'override' => false
for 'override' => true
don't work
 
It should work, what error you got? Set it all 'true', but it can't be the problem.
this is not the problem
The sub page you requested is not recognized.

what I do to instal the pages?
tell me a way very easy to understand C:
newbie in sites
 
this is not the problem
The sub page you requested is not recognized.

what I do to instal the pages?
tell me a way very easy to understand C:
newbie in sites

There is a www/sub.php and a www/layout/sub.php (the last one should be changed), you changed the right one? Because the file you posted is right, and is the only change needed.
 
<?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'; ?>

is in hotdocs/sub.php

where I need change?
 
<?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'; ?>

is in hotdocs/sub.php

where I need change?

Nothing. Your hotdocs/layout/sub.php should be like this, and it should work.
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
    ),
    'index' => array(
        'file' => 'index.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
    ),
    '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
    ),
);
?>

Are you sure you added the page to hotdocs/layout/sub.php and the link is correct?
 
Last edited:
Nothing. Your hotdocs/layout/sub.php should be like this, and it should work.
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
    ),
    'index' => array(
        'file' => 'index.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
    ),
    '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
    ),
);
?>

Are you sure you added the page to hotdocs/layout/sub.php and the link is correct?



its works Thanks bro
now i get error in who is online
string(61) "SELECT * FROM `server_record` ORDER BY `record` DESC LIMIT 1;"
(query - SQL error)
Type: select_multi (select multiple rows from database)

Table 'global.server_record' doesn't exist
 
ah, not need anymore...
i find the soluction
CREATE TABLE `server_record` (
`record` int(11) NOT NULL,
`timestamp` bigint(20) NOT NULL,
UNIQUE KEY `record` (`record`,`timestamp`)
)
 
now I get one error, when i try login in site...
or create account
he don't login
 
now I get one error, when i try login in site...
or create account
he don't login
Dude, you need to give me all the information you have, I won't discover things if you don't say them to me, that way it's hard to help ;/ What page you are accessing, what error you got? How would you login if you can't create accounts? Take a screenshoot if possible.
 
I delete from layout/sub.php
this
'login' => array(
'file' => 'login.php',
'override' => true
),

and now works without problems, bro, I'm sorry for bothering you ...
 
Back
Top