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

Loleslav menu does not appear

SYncSiX

New Member
Joined
Apr 21, 2020
Messages
4
Reaction score
0
Hello, I would like to ask the help of the experts to help me in this situation, I ended up downloading the Loleslav Template from the member @slawkens and when you enter the site, the menus do not appear and an error follows the image:

1604047313111.png

Error 1:
Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\templates\loleslav\menu\top_dynamic.php on line 10
Call Stack
# Time Memory Function Location
1 0.0032 455568 {main}( ) ...\index.php:0
2 13.4125 3519584 require( 'C:\Program Files\VertrigoServ\www\templates\loleslav\template.php' ) ...\index.php:361
3 14.0215 3524144 require_once( 'C:\Program Files\VertrigoServ\www\templates\loleslav\menu\top_dynamic.php' ) ...\template.php:36
Error 2:
Warning: Invalid argument supplied for foreach() in C:\Program Files\VertrigoServ\www\templates\loleslav\menu\top_dynamic.php on line 10
Call Stack
# Time Memory Function Location
1 0.0032 455568 {main}( ) ...\index.php:0
2 13.4125 3519584 require( 'C:\Program Files\VertrigoServ\www\templates\loleslav\template.php' ) ...\index.php:361
3 14.0215 3524144 require_once( 'C:\Program Files\VertrigoServ\www\templates\loleslav\menu\top_dynamic.php' ) ...\template.php:36

top_dynamic.php:
<?php
defined('MYAAC') or die('Direct access not allowed!');
?>
<div id="menu">
<ul class="container">
<?php
$menus = get_template_menus();
$i = 0;
foreach($menus[0] as $menu) {
if (strpos(trim($menu['link']), 'http') === 0) {
echo '<li' . ($i++ == 0 ? ' class="first"' : '') . '><a href="' . $menu['link'] . '" target="_blank">' . $menu['name'] . '</a></li>';
} else {
echo '<li' . ($i++ == 0 ? ' class="first"' : '') . '><a href="' . getLink($menu['link']) . '">' . $menu['name'] . '</a></li>';
}
}
?>
</ul>
</div>

template.php:
<?php
defined('MYAAC') or die('Direct access not allowed!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!-- Powered by UNNAMED Acc. Maker &copy;2009 - 2010 by Gesior. -->
<!-- Rewrote and rebuild for Altara.pl purposes (c)2009 - 2010. -->
<!-- Designed by DeGhost -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo template_place_holder('head_start'); ?>
<link rel="shortcut icon" href="<?PHP echo $template_path; ?>/images/others/favicon.ico" type="image/x-icon">
<link rel="icon" href="<?PHP echo $template_path; ?>/images/others/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="<?PHP echo $template_path; ?>/default.css" media="screen"/>
<!--link rel="stylesheet" type="text/css" href="<?PHP echo $template_path; ?>/basic.css" media="screen"/-->
<title><?PHP echo $title; ?></title>
<?PHP echo $layout_header; ?>
<style type="text/css">
@import "layout.css";
</style>
<?php echo template_place_holder('head_end'); ?>
</head>
<body class="home">
<?php echo template_place_holder('body_start'); ?>
<div id="bg1">
<div id="bg2">
<div id="header" class="container">
<div id="logo">
</div>
<div id="topmenu">
</div>
</div>
</div>
<?php
$menu_table_exist = tableExist(TABLE_PREFIX . 'menu');
if($menu_table_exist) {
require_once($template_path . '/menu/top_dynamic.php');
}
else {
require_once($template_path . '/menu/top.php');
}
?>
<div id="bar">
<div class="container">
<div id="login">
<?php
if ($logged) {
echo'<form method="post" action="' . getLink('account/logout') . '">
<fieldset><p>Hello.&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . getLink('account/manage') . '">Account Management</a>&nbsp;</p>
<input value="Logout" class="input-submit" type="submit" />
</fieldset>
</form>';
}else{
echo'<form method="post" action="' . getLink('account/manage') . '">
<fieldset> <span class="input-text"> <input name="account_login" value="" placeholder="Account" type="text" /> </span><span class="input-text"> <input name="password_login" value="" placeholder="Password" type="password" /> </span> <input value="Login" class="input-submit" type="submit" />
<p><a href="' . getLink('account/lost') . '">Lost Account?</a>&nbsp;</p>
</fieldset>
</form>';
}
?>
</div>
<div id="search">
<form method="post" action="<?php echo getLink('characters'); ?>">
<fieldset> <span class="input-text"> <input name="name" placeholder="Player name" type="text" /> </span><input value="Search" class="input-submit" type="submit" /></fieldset>
</form>
</div>
</div>
</div>
<div id="bg3">
<div id="bg4">
<div id="page" class="container">
<div id="content">
<div id="sidebar2">
<?php
if (PAGE == "news" && $twig->getLoader()->exists('description.html.twig')) {
echo '<div id="box2" class="box-style3">
' . $twig->render('description.html.twig') . '
</div>';
}
?>
<div id="box3" class="box-style3">
<h2 class="title"><?php echo $title; ?></h2>
<div class="main_content">
<?php echo tickers() . template_place_holder('center_top') . $content; ?>
</div>
</div>
</div>

<div id="sidebar3">
<div id="box4" class="box-style4">
<h2 class="title"><center>Status</center></h2>
<div class="entry">
<ul class="list1">
</ul>
<center>
<?php
if($status['online']){
echo 'Players On-Line:<br>
<a href="' . getLink('online') . '" title="Players Online"><b>'.$status['players'] . '/' . $status['playersMax'].'</b></a>
<br>Uptime:<br>
<b>'.$status['uptimeReadable'].'</b><br>';
}else{
echo '<font color="red">Server is Offline</font>';
}
?>
</center>
</div>
</div>

<div id="box5" class="box-style4">
<div class="entry">
<h2 class="title"><center>Best players</center></h2>
<center>
<?php
foreach(getTopPlayers(5) as $player)
{
echo '<li class="bg6"><a href="' . getPlayerLink($player['name'], false) . '" class="link2">' . $player['name'] . '</a><br>';
echo '<em class="style2">Level: <b>' . $player['level'] . '</b></em></li>';
}
?>
</center>
</div>
</div>
<?php
if($config['template_allow_change']):
?>
<div id="box6" class="box-style2">
<h2 class="title" style="text-align: center">Template</h2>
<div style="text-align: center;">
<?= template_form() ?>
</div>
</div>
<?php
endif;
?>
</div>
</div>

<div id="sidebar">
<?php
if($menu_table_exist) {
require_once($template_path . '/menu/main_dynamic.php');
}
else {
require_once($template_path . '/menu/main.php');
}
?>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
</div>
</div>

<div id="footer">
<p class="container"><?php echo template_footer(); ?><br/>Designed by <a href="http://cerberia.com">DeGhost</a> and <a href="http://blog.loleslav.pl/">Loleslav</a>.</p>
</div>
</div>
</div>
<?php echo template_place_holder('body_end'); ?>
</body>
</html>
 
Last edited:
OP
S

SYncSiX

New Member
Joined
Apr 21, 2020
Messages
4
Reaction score
0

slaw

Developer
Joined
Aug 27, 2007
Messages
3,268
Solutions
99
Reaction score
756
Location
Germany
GitHub
slawkens
OK but it seems you didn't install it thought Admin Panel (by uploading .zip file to the Plugins), because the Menus were no installed.

If you install it through Admin Panel, then the menus are installed.

I can't help you now because I don't have access to Linux.

You need to download loleslav-template and then execute "./make-plugin.sh" in your linux console, this will generate a ".zip" file that can be installed through Admin Panel. I can do that when I'm back home.
Post automatically merged:

weird the thread was gone for some hours so I couldn't answer
Post automatically merged:

Download this and install through Admin Panel -> Plugins.

 
Last edited:
Top