Remember to check the outfitter.php path before writing it's not working properly.
I'm going to store my outfitter.php in the public folder. [public/outfitter.php]
Open
system/application/views/view_character.php
You can add this anywhere in the script.
I prefer under this.
Open
system/application/views/online_players.php
Replace this with your own script or compare with your own.
You can always show your appreciation by either like or add reputation points.
Sincerely,
Ninja
I'm going to store my outfitter.php in the public folder. [public/outfitter.php]
Open
system/application/views/view_character.php
PHP:
<tr><td width='30%'>Outfit</td><td><?php echo '<div style="position: relative; width: 32px; height: 32px;"><div style="background:transparent url(/public/outfitter.php?id='.$player->getLookType().'&addons='.$player->getLookAddons().'&head='.$player->getLookHead().'&body='.$player->getLookBody().'&legs='.$player->getLookLegs().'&feet='.$player->getLookFeet().'); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 0px; bottom: 0px;"></div></div>'; ?></td></tr>
PHP:
<tr><td width='30%'>Created</td><td><?php echo ago($created)." | ".UNIX_TimeStamp($created); ?></td></tr>
Open
system/application/views/online_players.php
Replace this with your own script or compare with your own.
PHP:
<?php
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
require("system/application/config/create_character.php");
if(count($players) > 0) {
echo "<table width='100%' cellspacing='1' cellpadding='3'>";
echo "<tr><td align=center><b>Outfit</b></td><td align=center><b>Name</b></td><td align=center><b>Level</b></td><td align=center><b>Vocation</b></td><td align=center><b>World</b></td></tr>";
$players = $SQL->query("SELECT `name`, `level`, `promotion`, `world_id`, `vocation`, `lookfeet`, `lookhead`, `looklegs`, `lookbody`, `looktype`, `lookaddons` FROM `players` WHERE `online`='1' ORDER BY `level` DESC;")->fetchAll();
foreach($players as $row) {
if(in_array(strtolower($row['name']), $config['restricted_names'])) continue;
echo "<tr><td><div style='position: relative; width: 64px; height: 32px;'><div style='background:transparent url(/public/outfitter.php?id=".$row['looktype']."&addons=".$row['lookaddons']."&head=".$row['lookhead']."&body=".$row['lookbody']."&legs=".$row['looklegs']."&feet=".$row['lookfeet']."); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 0px; bottom: 0px;'></div></div></td><td align=center><a href=\"../character/view/".$row['name']."\">".$row['name']."</a></td><td align=center>".$row['level']."</td><td align=center>".getVocationName($row['vocation'], $row['promotion'])."</td><td align=center>".$config['worlds'][$row['world_id']]."</td></tr>";
}
echo "</table>";
}
else
alert("There is no players online.");
?>
You can always show your appreciation by either like or add reputation points.
Sincerely,
Ninja