[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,942
Reaction score
1,406
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>
[HR][/HR]
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.");
?>
[HR][/HR]You can always show your appreciation by either like or add reputation points. :)

Sincerely,
Ninja
 
OP
Ninja

Ninja

Global Moderator
Staff member
Global Moderator
Joined
Apr 6, 2010
Messages
5,942
Reaction score
1,406
Location
Sweden
Of course it does, I wouldn't post something that doesn't work. :p

What happened to that "rep++" you mentioned? :eek:
 

Demnish

Tibian Hero
Joined
Sep 28, 2011
Messages
276
Reaction score
17
Location
Sweden
And where can I find this "outfitter.php"? Rep++ when you tell me. =)

- - - Updated - - -

Fixed it myself, Rep+ for the script!
 

JoSePh15_

Well-Known Member
Joined
Jan 28, 2010
Messages
1,768
Reaction score
56
why the fuck did you release this? it isn't even yours.. Averatec did it..
 
OP
Ninja

Ninja

Global Moderator
Staff member
Global Moderator
Joined
Apr 6, 2010
Messages
5,942
Reaction score
1,406
Location
Sweden
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?
 

JoSePh15_

Well-Known Member
Joined
Jan 28, 2010
Messages
1,768
Reaction score
56
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
 
OP
Ninja

Ninja

Global Moderator
Staff member
Global Moderator
Joined
Apr 6, 2010
Messages
5,942
Reaction score
1,406
Location
Sweden
Seriously what are you talking about? I haven't released anything?
 
OP
Ninja

Ninja

Global Moderator
Staff member
Global Moderator
Joined
Apr 6, 2010
Messages
5,942
Reaction score
1,406
Location
Sweden
Showing people how to get the outfitter.php working as it should?

Next time, read through the thread properly. <_<
 

Dylanaw

Godly Member
Joined
Feb 18, 2009
Messages
473
Reaction score
9
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.
 

averatec

Legendary OT User
Joined
Jun 1, 2007
Messages
2,217
Reaction score
141
Location
Poland
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
 

Dylanaw

Godly Member
Joined
Feb 18, 2009
Messages
473
Reaction score
9
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.
Top