• 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 - Customize your Character_view

Kavvson

Gdy boli cie glowa wez
Joined
Jun 25, 2008
Messages
1,177
Reaction score
72
Location
Poland
Its emporia.vapus.net style. So all credits goes to the maker.

View_Character.php​

2rwatqr.jpg

Note this is only the Character Info part

Open \system\application\views and view_character.php replace all:

PHP:
<?php
require_once("system/application/config/create_character.php");
	if(in_array(strtolower($player->name), $config['restricted_names']))
		error("You are not authorized to view this character.");
	else {
	if($player->isDeleted()) alert("This character has been deleted.");
	if($player->isNameLocked()) alert("This character has been name locked.");

	try {
		$comment = nl2br(decodeString($player->getComment()));
	}
	catch (Exception $e) {
		$comment = "Could not load comment.";
	}
	
?>
<style type="text/css">
	#charview { width: 97%; height: 100%; padding: 0.5em; border:1px solid;}
	.charview{ text-align: center; margin: 0; height 10px;}
	<?PHP $link = "red"; ?>
</style>
<div id="charview" align="center">
	<h3 class="ui-widget-header charview h3">Character Informations - <b><?php echo $status = ($player->isOnline()) ? "<font color='green'>".$player->getName()."</font>" : "<font color='red'>".$player->getName()."</font>"; ?> ( <?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?> )</b></h3>
	<br>
<table cellspacing="1" cellpadding="0" border="0" style="width: 100%; height: 100%;">
<tbody>
<tr><td style="text-align: left;" ><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/sexd.png"></td><td>
<b><?php echo $sex = ($player->getSex() == 1) ? "Male" : "Female" ?></b><br><font size="1" color="#484848">Sex</font><br></td>
<td style="text-align: left;"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/homejf.png"></td>
<td width="44%"><b><?php echo $config['worlds'][$player->getWorld()]; ?></b><br>
<font size="1" color="#484848">Residence</font></td>
            </tr><tr>
            <td style="text-align: left;" width="10%"><img alt="" src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/voc.png"></td>
          <td>
		  <?php $rank_of_player = $player->getRank(); if(!empty($rank_of_player)) { $guild_id = $rank_of_player->getGuild()->getId(); $guild_name = $rank_of_player->getGuild()->getName(); echo "".$rank_of_player->getName()." of the <a href='../../guilds/view/$guild_id'><font color =\"".$link."\">".$guild_name."</font></a>";}?><br>
            <font size="1" color="#484848">Guild</font></td>
            <td style="text-align: left;"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/Cuckoo_Clock.gif"></td>
            <td><b><?php echo $lastlogin = ($player->getLastLogin() == 0) ? "<font color=\"red\">Never</font>" : UNIX_TimeStamp($player->getLastLogin()); ?></b><br>
            <font size="1" color="#484848">Last login</font></td>
            </tr>
        <tr><td style="text-align: left;" width="10%"><img alt="" src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/Winning_Lottery_Ticket.gif"></td>
        <td><b><?php echo $status = ($account->isPremium()) ? "<font color=\"green\">Premium Status</font>" : "<font color=\"red\">Free Status</font>"; ?></b><br></td>
           <td style="text-align: left;"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/Research_Notes.gif"></td>
				<td><b><?php echo ago($player->getCreated())." | ".UNIX_TimeStamp($player->getCreated()); ?></b><br>
             <font size="1" color="#484848">Created</font></td>
        </tr>
        <tr><td style="text-align: left;" width="10%"><img alt="" src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/worldvo.png"></td>
          <td><?php echo $config['groups'][$player->getGroup()]; ?><br><font size="1" color="#484848">Game Position</font></td>
            <td style="text-align: left;" width="10%"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/rangor.png"></td>
            <td ><b><?php echo $player->getLevel(); ?></b><br>
            <font size="1" color="#484848">Level</font><br>
	</td>
    </tr>
    </tbody>
</table>

</div>
<br>
<br>

<?php 
	$GLOBALS['player'] = $player;
	$ide = new IDE;
	try {
		$ide->loadInjections("character_view");
	}
		catch(Exception $e) {
			error($e->getMessage());
		}
	
}
?>
 
Why like this?
Code:
<?php echo $status = ($account->isPremium()) ? "<font color=\"green\">Premium Status</font>" : "<font color=\"red\">Free Status</font>"; ?>

Code:
<?php echo ($account->isPremium() ? "<font color=\"green\">Premium Status</font>" : "<font color=\"red\">Free Status</font>"); ?>
 
Omg i guess you should? if i used $status = then i needed to display it rofl?

and that way i just executed it
 
0mg :pP rofl.. Anyway i was to tired. It was the basic command to display it.. I made to much today rofl sori
 
Omg i guess you should? if i used $status = then i needed to display it rofl?

and that way i just executed it

You are using '$status =' inside of echo.

PHP:
$status = ($account->isPremium() ? "<font color=\"green\">Premium Status</font>" : "<font color=\"red\">Free Status</font>");

echo $status;

///////////////

echo ($account->isPremium() ? "<font color=\"green\">Premium Status</font>" : "<font color=\"red\">Free Status</font>");

SEE THE DIFFERENCE?

/facepalm.jpg
 
looks nice and clean :p

That was what i was aiming for ^^

Here is the images:
htdocs > public > images > charview >
MEGAUPLOAD - The leading online storage and file delivery service

And script:
htdocs > system > application > views >
Code:
<?php 
require_once("system/application/config/create_character.php"); 
    if(in_array(strtolower($player->name), $config['restricted_names'])) 
        error("You are not authorized to view this character."); 
    else { 
    if($player->isDeleted()) alert("This character has been deleted."); 
    if($player->isNameLocked()) alert("This character has been name locked."); 

    try { 
        $comment = nl2br(decodeString($player->getComment())); 
    } 
    catch (Exception $e) { 
        $comment = "Could not load comment."; 
    } 
     
?> 
<style type="text/css"> 
    #charview { width: 97%; height: 100%; padding: 0.5em; border:1px solid;} 
    .charview{ text-align: center; margin: 0; height 10px;} 
    <?PHP $link = "red"; ?> 
</style> 
<div id="charview" align="center"> 
    <h3 class="ui-widget-header charview h3">Character Informations - <b><?php echo $status = ($player->isOnline()) ? "<font color='green'>".$player->getName()."</font>" : "<font color='red'>".$player->getName()."</font>"; ?> ( <?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?> )</b></h3> 
    <br> 
<table cellspacing="1" cellpadding="0" border="0" style="width: 100%; height: 100%;"> 
<tbody> 
<tr><td style="text-align: left;" ><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/sexd.png"></td><td> 
<b><?php echo $sex = ($player->getSex() == 1) ? "Male" : "Female" ?></b><br><font size="1" color="#484848">Sex</font><br></td> 
<td style="text-align: left;"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/homejf.png"></td> 
<td width="44%"><b><?php echo $config['worlds'][$player->getWorld()]; ?></b><br> 
<font size="1" color="#484848">Residence</font></td> 
            </tr><tr> 
            <td style="text-align: left;" width="10%"><img alt="" src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/voc.png"></td> 
          <td> 
          <?php $rank_of_player = $player->getRank(); if(!empty($rank_of_player)) { $guild_id = $rank_of_player->getGuild()->getId(); $guild_name = $rank_of_player->getGuild()->getName(); echo "".$rank_of_player->getName()." of the <a href='../../guilds/view/$guild_id'><font color =\"".$link."\">".$guild_name."</font></a>";}?><br> 
            <font size="1" color="#484848">Guild</font></td> 
            <td style="text-align: left;"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/Cuckoo_Clock.png"></td> 
            <td><b><?php echo $lastlogin = ($player->getLastLogin() == 0) ? "<font color=\"red\">Never</font>" : UNIX_TimeStamp($player->getLastLogin()); ?></b><br> 
            <font size="1" color="#484848">Last login</font></td> 
            </tr> 
        <tr><td style="text-align: left;" width="10%"><img alt="" src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/Win.png"></td> 
        <td><b><?php echo $status = ($account->isPremium()) ? "<font color=\"green\">Premium Status</font>" : "<font color=\"red\">Free Status</font>"; ?></b><br></td> 
           <td style="text-align: left;"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/Research_Notes.png"></td> 
                <td><b><?php echo ago($player->getCreated())." | ".UNIX_TimeStamp($player->getCreated()); ?></b><br> 
             <font size="1" color="#484848">Created</font></td> 
        </tr> 
        <tr><td style="text-align: left;" width="10%"><img alt="" src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/worldvo.png"></td> 
          <td><?php echo $config['groups'][$player->getGroup()]; ?><br><font size="1" color="#484848">Game Position</font></td> 
            <td style="text-align: left;" width="10%"><img src="<?PHP echo "".WEBSITE."" ?>/public/images/charview/rangor.png"></td> 
            <td ><b><?php echo $player->getLevel(); ?></b><br> 
            <font size="1" color="#484848">Level</font><br> 
    </td> 
    </tr> 
    </tbody> 
</table> 

</div> 
<br> 
<br> 

<?php  
    $GLOBALS['player'] = $player; 
    $ide = new IDE; 
    try { 
        $ide->loadInjections("character_view"); 
    } 
        catch(Exception $e) { 
            error($e->getMessage()); 
        } 
     
} 
?>
 
Back
Top