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

Solved [PHP/JS - ZNOTE AAC] href issue

Michael Orsino

Premium User
Premium User
Support Team
Joined
Nov 15, 2007
Messages
854
Solutions
10
Reaction score
389
Location
Santiago, Chile (Australian)
Using ZNOTE AAC 1.5 for http://dominado.org
--
Links as in the example below are not working as intended:
Code:
..
$url = url("guildwar.php?warid=". $wars['id']);
echo '<tr class="special" onclick="javascript:window.location.href=\'' . $url . '\'">';
..

The result of clicking in one of these fields is:
Code:
http://_/guilds.php?name=Dominado

To see this issue first hand:
- Visit http://dominado.org
- Click the "Guilds" link
- Click any of the listed Guilds
(this issue is present in other areas too)

Any help is appreciated,
Thanks
 
That works thank you very much
Would the old (not working) line have worked with different web server configuration? If not, this should probably be fixed/pull requested on the Znote aac github.
I see what you are saying, kind of overkill to create a function just to assign a string to a variable and its not working as expected. :(
https://github.com/Znote/ZnoteAAC/b...6839a06a14e7/engine/function/general.php#L101
PHP:
function url($path = false) {
    $protocol = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
    $domain   = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : null);
    $folder   = dirname($_SERVER['SCRIPT_NAME']);
    return $protocol . $domain . ($folder == '/' ? '' : $folder) . '/' . $path;
}
 
Last edited:
Back
Top