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

[Modern AAC] Show outfit on website (online_players & view_character.php)

Status
Not open for further replies.

Ninja

Global Moderator
Staff member
Global Moderator
Joined
Apr 6, 2010
Messages
5,947
Solutions
34
Reaction score
1,584
Location
Sweden
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]

O
pen
system/application/views/view_character.php

You can add this anywhere in the script.
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>

I prefer under this.
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
 
Of course it does, I wouldn't post something that doesn't work. :p

What happened to that "rep++" you mentioned? :eek:
 
And where can I find this "outfitter.php"? Rep++ when you tell me. =)

- - - Updated - - -

Fixed it myself, Rep+ for the script!
 
why the fuck did you release this? it isn't even yours.. Averatec did it..
 
Why are you linking to my post?

It's a youtube link, retard much? Why would even averatec like my post if I released the mount version?
 
That's not your post, that's averatec's post.. :blink: Are you blind?

--Edited --
It's a youtube link? you're blind.. o.0
 
Seriously what are you talking about? I haven't released anything?
 
Stay ontopic guys..

@thread, i did everything u said, i checked the path also. My outfitter.php is inside my www/public
I also got a outfitter(map) located inside the public folder, inside of the outfitter(map) > outfits > outfit & template > = lots of pictures of outfits.
Could anyone help me?

- - - Updated - - -

Nevermind, i fixed it, i had to locate the folder "Outfit" into the public folder.
 
Stay ontopic guys..

@thread, i did everything u said, i checked the path also. My outfitter.php is inside my www/public
I also got a outfitter(map) located inside the public folder, inside of the outfitter(map) > outfits > outfit & template > = lots of pictures of outfits.
Could anyone help me?

- - - Updated - - -

Nevermind, i fixed it, i had to locate the folder "Outfit" into the public folder.

do u have php gd library?

- - - Updated - - -

I forgot to tell, that php gd library is needed
 
do u have php gd library?

- - - Updated - - -

I forgot to tell, that php gd library is needed

I fixed it.
There was a map called Outfitter and inside of it was a map called Outfit, i placed the map outfitter in my public folder. But i had to place the map Outfit in the public folder. So now it's working 100% thanks anyway. And thanks for the release =)
 
Status
Not open for further replies.
Back
Top