FabianoBN
l|¬¬"|l
Hello >
Go to put the Offiline Training in your page?
In www/engine/function
Open the life users.php
go to line 1190 press the ENTER
and put this:
Now, open the file general.php
go to line 294 press the ENTER
and put this:
Now, create the file offlinetraininglist.php in your folder www
and put this:
Now, in your folder www/layout (if is the layout TIBIACOM)
Open your rightside.php
and Change this line:
to:
but if it is the default layout of the Engine ZNote AAC, go to the folder layout/widgets
open the file serverinfo.php
and change the line:
to:
Any questions just ask! Thanks ^^
Demo: Offline Training
Go to put the Offiline Training in your page?
In www/engine/function
Open the life users.php
go to line 1190 press the ENTER
and put this:
PHP:
function training_count_online() {
return mysql_result(mysql_query("SELECT COUNT(`id`) from `players` WHERE `offlinetraining_skill` > 0;"), 0);
}
Now, open the file general.php
go to line 294 press the ENTER
and put this:
PHP:
function offtraining_list() {
$count = training_count_online();
$query = mysql_query("SELECT `name`, `level`, `vocation` FROM `players` WHERE `offlinetraining_skill`>'0' ORDER BY `name` DESC;");
for ($i = 0; $i < $count; $i++) {
$row = mysql_fetch_row($query);
$array[] = $row;
}
if (isset($array)) {
return $array;
} else {
return false;
}
}
Now, create the file offlinetraininglist.php in your folder www
and put this:
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
<h1>Who is Offline Training?</h1>
<?php
$array = offtraining_list();
if ($array) {
?>
<table id="onlinelistTable">
<tr class="yellow">
<td>Name:</td>
<td>Level:</td>
<td>Vocation:</td>
</tr>
<?php
foreach ($array as $value) {
echo '<tr>';
echo '<td><a href="characterprofile.php?name='. $value[0] .'">'. $value[0] .'</a></td>';
echo '<td>'. $value[1] .'</td>';
echo '<td>'. vocation_id_to_name($value[2]) .'</td>';
echo '</tr>';
}
?>
</table>
<?php
} else {
echo 'Nobody is Offline Training.';
}
?>
<?php include 'layout/overall/footer.php'; ?>
Now, in your folder www/layout (if is the layout TIBIACOM)
Open your rightside.php
and Change this line:
PHP:
<a href="onlinelist.php" id="online">Players online: <br><?php echo user_count_online();?></a>
to:
PHP:
<a href="onlinelist.php" id="online">Players online: <?php echo user_count_online();?></a><br><a href="offtraininglist.php" id="online">Off Training: <?php echo training_count_online();?></a>
but if it is the default layout of the Engine ZNote AAC, go to the folder layout/widgets
open the file serverinfo.php
and change the line:
PHP:
<li><a href="onlinelist.php">Players online: <?php echo user_count_online();?></a></li>
to:
PHP:
<li><a href="onlinelist.php">Players online: <?php echo user_count_online();?></a><br><a href="offtraininglist.php" id="online">Off Training: <?php echo training_count_online();?></a></li>
Any questions just ask! Thanks ^^
Demo: Offline Training
Last edited: