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

AAC ZnoteAAC HELP highlighting boxes inside boxes php

johnsamir

Advanced OT User
Joined
Oct 13, 2009
Messages
1,126
Solutions
6
Reaction score
198
Location
Nowhere
Hello I Use ZnoteAAC 1.5



I would like that when i hover the mouse in the boxes that contains the info the boxes get highlighted by a specfic color for example orange
OutfitRankNameVocationLevelPoints
img
1
cl.png
Sorcerersito
Master Sorcerer11322871213
img
1
cl.png
Sorcerersito
Master Sorcerer11322871213
img
2
cl.png
Paladini
Royal Paladin10618970080
img
2
cl.png
Paladini
Royal Paladin10618970080
img
3
br.png
The Arche On Fire
Paladin9814881250
img
3
br.png
The Arche On Fire
Paladin9814881250
img
4
br.png
Felipe Rodriguez
Sorcerer76700
I have an example in the file buypoints.php
with this function
Code:
<div class="TableContainer highlight" style="margin-top: 1cm;margin-bottom: 1cm; ">
and this code
Code:
<style>
    /* CSS for highlighting effect */
    .highlight:hover {
        background-color: #f2f2f2; /* Light grey background color when hovered */
        cursor: pointer; /* Change cursor to pointer on hover */
    }
</style>

Tried to reproduce it in high scores, but the boxes get never highlighted, i highlight the background page or screw up everything. Can somebody lend me a hand with this? here is my script might be tables are not properly made or similar and that might be interfering.
Lua:
 <!-- <div class="TableContainer"> -->
         <div class="TableContainer ">
        <div class="CaptionContainer">
            <div class="CaptionInnerContainer">
                <span class="CaptionEdgeLeftTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionBorderTop" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionVerticalLeft" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                    <div class="Text">Ranking for <?php echo skillName($type) .", ". (($vocation === 'all') ? 'any vocation' : vocation_id_to_name($vocation)) ?>.</div>
                <span class="CaptionVerticalRight" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                <span class="CaptionBorderBottom" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionEdgeLeftBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            </div>
        </div>
        <form action="" method="GET">
            <table class="Table3" cellspacing="1">
                <tr>
                    <td>
                        <div class="InnerTableContainer">
                            <table style="width:100%;">
                                <tr>
                                    <td>
                                        <div class="TableShadowContainerRightTop">
                                            <div class="TableShadowRightTop" style="background-image:url(layout/tibia_img/table-shadow-rt.gif);"></div>
                                        </div>
                                        <div class="TableContentAndRightShadow" style="background-image:url(layout/tibia_img/table-shadow-rm.gif);">
                                            <div class="TableContentContainer">
                                                <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
                                                    <tr>
                                                        <td>
                                                            <select name="type">
                                                                <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
                                                                <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
                                                                <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
                                                                <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
                                                                <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
                                                                <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
                                                                <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
                                                                <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
                                                                <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select name="vocation">
                                                                <option value="all" <?php if (!is_int($vocation)) echo "selected"; ?>>Any vocation</option>
                                                                <?php
                                                                foreach ($configVocations as $v_id => $v_data) {
                                                                    if ($v_data['fromVoc'] === false) {
                                                                        $selected = (is_int($vocation) && $vocation == $v_id) ? " selected $vocation = $v_id" : "";
                                                                        echo '<option value="'. $v_id .'"'. $selected .'>'. $v_data['name'] .'</option>';
                                                                    }
                                                                }
                                                                ?>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select name="page">
                                                                <?php
                                                                $pages = ($vocGroup[$type] !== false) ? ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($vocGroup[$type]) / $highscore['rowsPerPage']))) : 1;
                                                                for ($i = 0; $i < $pages; $i++) {
                                                                    $x = $i + 1;
                                                                    if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                                                                    else echo "<option value='".$x."'>Page: ".$x."</option>";
                                                                }
                                                                ?>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <!-- <input type="submit" value=" View " class="btn btn-info"> -->
                                                            <input type="Submit" value="View" class="BigButton btn" style="background: url(layout/tibia_img/sbutton.gif); width:135px;height:25px;border: 0 none;" border="0">
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                        <div class="TableShadowContainer">
                                            <div class="TableBottomShadow" style="background-image:url(layout/tibia_img/table-shadow-bm.gif);">
                                                <div class="TableBottomLeftShadow" style="background-image:url(layout/tibia_img/table-shadow-bl.gif);"></div>
                                                <div class="TableBottomRightShadow" style="background-image:url(layout/tibia_img/table-shadow-br.gif);"></div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </form>

here a photo of how it looks so you can have an idea

Untitled.png
 
Solution
im doing it in clean file i have highlighted the margins of the boxes that i want to highlight but not the entire box as i want
@hemrenus321 @tobi132
View attachment 84888
Lua:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore vocation
$configVocations = $config['vocations'];
//$debug['configVocations'] = $configVocations;

$vocationIds = array_keys($configVocations);

$vocation = 'all';
if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) {
    $vocation = (int)$_GET['vocation'];
    if...
First code
Code:
<style>
 
 
        .highlight {
            background-color: rgba(255, 255, 0, 0.2); /* Light yellow background with transparency */
            position: relative;
            z-index: 10; /* Higher than other elements */
        }

        .highlight:hover {
            background-color: rgba(255, 255, 0, 0.5); /* Darker yellow on hover */
            z-index: 20; /* Even higher on hover */
        }
        .hoverTable tr{
        background: #b8d1f3;
    }
    
</style>
Code:
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .highlight {
            background-color: rgba(255, 255, 0, 0.2); /* Light yellow background with transparency */
            position: relative;
            z-index: 10; /* Higher than other elements */
        }

        .highlight:hover {
            background-color: rgba(255, 255, 0, 0.5); /* Darker yellow on hover */
            z-index: 20; /* Even higher on hover */
        }
        .hoverTable tr{
        background: #b8d1f3;
    }
    </style>
</head>

the first table code

Code:
<div class="TableContainer highlight">
    <table class="hoverTable">
    <div class="CaptionContainer">
        <div class="CaptionInnerContainer">
            <span class="CaptionEdgeLeftTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            <span class="CaptionEdgeRightTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            <span class="CaptionBorderTop" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
            <span class="CaptionVerticalLeft" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
            <div class="Text">Ranking for <?php echo skillName($type) .", ". (($vocation === 'all') ? 'any vocation' : vocation_id_to_name($vocation)) ?>.</div>
            <span class="CaptionVerticalRight" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
            <span class="CaptionBorderBottom" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
            <span class="CaptionEdgeLeftBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            <span class="CaptionEdgeRightBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
        </div>
    </div>
    <form action="" method="GET">
        <table class="Table3" cellspacing="1">
            <tr>
                <td>
                    <div class="InnerTableContainer">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <div class="TableShadowContainerRightTop">
                                        <div class="TableShadowRightTop" style="background-image:url(layout/tibia_img/table-shadow-rt.gif);"></div>
                                    </div>
                                    <div class="TableContentAndRightShadow" style="background-image:url(layout/tibia_img/table-shadow-rm.gif);">
                                        <div class="TableContentContainer">
                                            <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
                                                <tr>
                                                    <td>
                                                        <select name="type">
                                                            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
                                                            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
                                                            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
                                                            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
                                                            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
                                                            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
                                                            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
                                                            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
                                                            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <select name="vocation">
                                                            <option value="all" <?php if (!is_int($vocation)) echo "selected"; ?>>Any vocation</option>
                                                            <?php
                                                            foreach ($configVocations as $v_id => $v_data) {
                                                                if ($v_data['fromVoc'] === false) {
                                                                    $selected = (is_int($vocation) && $vocation == $v_id) ? " selected $vocation = $v_id" : "";
                                                                    echo '<option value="'. $v_id .'"'. $selected .'>'. $v_data['name'] .'</option>';
                                                                }
                                                            }
                                                            ?>
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <select name="page">
                                                            <?php
                                                            $pages = ($vocGroup[$type] !== false) ? ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($vocGroup[$type]) / $highscore['rowsPerPage']))) : 1;
                                                            for ($i = 0; $i < $pages; $i++) {
                                                                $x = $i + 1;
                                                                if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                                                                else echo "<option value='".$x."'>Page: ".$x."</option>";
                                                            }
                                                            ?>
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <input type="Submit" value="View" class="BigButton btn" style="background: url(layout/tibia_img/sbutton.gif); width:135px;height:25px;border: 0 none;" border="0">
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="TableShadowContainer">
                                        <div class="TableBottomShadow" style="background-image:url(layout/tibia_img/table-shadow-bm.gif);">
                                            <div class="TableBottomLeftShadow" style="background-image:url(layout/tibia_img/table-shadow-bl.gif);"></div>
                                            <div class="TableBottomRightShadow" style="background-image:url(layout/tibia_img/table-shadow-br.gif);"></div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </form>
</div>
<head>

second code table with the variable that you gave me
Lua:
 <div class="TableContainer highlight" style="margin-top: 1cm;margin-bottom: 1cm;">
    <table class="hoverTable">
    <div class="CaptionContainer">
        <div class="CaptionInnerContainer">
            <span class="CaptionEdgeLeftTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            <span class="CaptionEdgeRightTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            <span class="CaptionBorderTop" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
            <span class="CaptionVerticalLeft" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
            <div class="Text">Highscores</div>
            <span class="CaptionVerticalRight" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
            <span class="CaptionBorderBottom" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
            <span class="CaptionEdgeLeftBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            <span class="CaptionEdgeRightBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
        </div>
    </div>

    <table class="Table3" cellspacing="1">
        <tr>
            <td>
                <div class="InnerTableContainer">
                    <table style="width:100%;">
                        <tr>
                            <td>
                                <div class="TableShadowContainerRightTop">
                                    <div class="TableShadowRightTop" style="background-image:url(layout/tibia_img/table-shadow-rt.gif);"></div>
                                </div>
                                <div class="TableContentAndRightShadow" style="background-image:url(layout/tibia_img/table-shadow-rm.gif);">
                                    <div class="TableContentContainer">
                                        <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
                                            <tr class="TableContentHeader">
                                                <table id="highscoresTable" class="table table-striped table-hover">
                                                    <tr class="yellow">
                                                        <?php if ($loadOutfits) echo '<td style="background-color: #4f4f4f;">Outfit</td>'; ?>
                                                        <td style="background-color: #4f4f4f;"><strong>Rank</strong></td>
                                                        <td style="background-color: #4f4f4f;"><strong>Name</strong></td>
                                                        <td style="background-color: #4f4f4f;"><strong>Vocation</strong></td>
                                                        <td style="background-color: #4f4f4f;"><strong>Level</strong></td>
                                                        <?php if ($type === 7) echo '<td style="background-color: #4f4f4f;">Points</td>'; ?>
                                                    </tr>

                                                    <?php
                                                    if ($vocGroup[$type] === false) {
                                                        ?>
                                                        <tr>
                                                            <td colspan="5">Nothing to show here yet.</td>
                                                        </tr>
                                                        <?php
                                                    } else {
                                                        for ($i = 0; $i < count($vocGroup[$type]); $i++) {
                                                            if (pageCheck($i, $page, $rowsPerPage)) {
                                                                $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png">  ' : '';
                                                                ?>
                                                                <tr>
                                                                    <?php if ($loadOutfits): ?>
                                                                        <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&addons=<?php echo $vocGroup[$type][$i]['addons']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></strong></td>
                                                                    <?php endif; ?>
                                                                    <td><strong><?php echo $i+1; ?></strong></td>
                                                                    <td><strong><?php echo $flag; ?><strong><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></strong></td>
                                                                    <td><strong><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></strong></td>
                                                                    <td><strong><?php echo $vocGroup[$type][$i]['value']; ?></strong></td>
                                                                    <?php if ($type === 7) echo "<td><strong>". $vocGroup[$type][$i]['experience'] ."</strong></td>"; ?>
                                                                </tr>
                                                                <?php if ($loadOutfits): ?>
                                                                    <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&addons=<?php echo $vocGroup[$type][$i]['addons']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td>
                                                                <?php endif; ?>
                                                                <td><strong><?php echo $i+1; ?></strong></td>
                                                                <td><strong><?php echo $flag; ?><strong><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></strong></td>
                                                                <td><strong><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></strong></td>
                                                                <td><strong><?php echo $vocGroup[$type][$i]['value']; ?></strong></td>
                                                                <?php if ($type === 7) echo "<td><strong>". $vocGroup[$type][$i]['experience'] ."</strong></td>"; ?>
                                                                </tr>
                                                                <?php
                                                            }
                                                        }
                                                    }
                                                    ?>
                                                </table>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="TableShadowContainer">
                                    <div class="TableBottomShadow" style="background-image:url(layout/tibia_img/table-shadow-bm.gif);">
                                        <div class="TableBottomLeftShadow" style="background-image:url(layout/tibia_img/table-shadow-bl.gif);"></div>
                                        <div class="TableBottomRightShadow" style="background-image:url(layout/tibia_img/table-shadow-br.gif);"></div>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</div>
nothing changes. this is the whole code

 
You already have this class there:
Code:
<table id="highscoresTable" class="table table-striped table-hover">

table-hover, but it should be hoverTable instead, because in css the minus is important, and also you need to be precise.
 
im doing it in clean file i have highlighted the margins of the boxes that i want to highlight but not the entire box as i want
@hemrenus321 @tobi132
Untitled.png
Lua:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore vocation
$configVocations = $config['vocations'];
//$debug['configVocations'] = $configVocations;

$vocationIds = array_keys($configVocations);

$vocation = 'all';
if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) {
    $vocation = (int)$_GET['vocation'];
    if (!in_array($vocation, $vocationIds)) {
        $vocation = "all";
    }
}

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false;
$loadOutfits = ($config['show_outfits']['highscores']) ? true : false;

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shield",
        6 => "Fish",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $vocGroups = fetchAllScores($rows, $config['ServerEngine'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits);
    $cache->setContent($vocGroups);
    $cache->save();
} else {
    $vocGroups = $cache->load();
}

if ($vocGroups) {
    $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]];
    ?>

    <h1>Ranking for <?php echo skillName($type) .", ". (($vocation === 'all') ? 'any vocation' : vocation_id_to_name($vocation)) ?>.</h1>

    <form action="" method="GET">

        <select name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>

        <select name="vocation">
            <option value="all" <?php if (!is_int($vocation)) echo "selected"; ?>>Any vocation</option>
            <?php
            foreach ($configVocations as $v_id => $v_data) {
                if ($v_data['fromVoc'] === false) {
                    $selected = (is_int($vocation) && $vocation == $v_id) ? " selected $vocation = $v_id" : "";
                    echo '<option value="'. $v_id .'"'. $selected .'>'. $v_data['name'] .'</option>';
                }
            }
            ?>
        </select>

        <select name="page">
            <?php
            $pages = ($vocGroup[$type] !== false) ? ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($vocGroup[$type]) / $highscore['rowsPerPage']))) : 1;
            for ($i = 0; $i < $pages; $i++) {
                $x = $i + 1;
                if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                else echo "<option value='".$x."'>Page: ".$x."</option>";
            }
            ?>
        </select>

        <input type="submit" value=" View " class="btn btn-info">
    </form>

    <table id="highscoresTable" class="table table-striped table-hover">

        <tr class="yellow">
            <?php if ($loadOutfits) echo "<td>Outfit</td>"; ?>
            <td>Rank</td>
            <td>Name</td>
            <td>Vocation</td>
            <td>Level</td>
            <?php if ($type === 7) echo "<td>Points</td>"; ?>
        </tr>

        <?php
        if ($vocGroup[$type] === false) {
            ?>
            <tr>
                <td colspan="5">Nothing to show here yet.</td>
            </tr>
            <?php
        } else {
            for ($i = 0; $i < count($vocGroup[$type]); $i++) {
                if (pageCheck($i, $page, $rowsPerPage)) {
                    $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png">  ' : '';
                    ?>
                    <!-- <tr class="highlight" onmouseover="highlightRow(this)" onmouseout="resetRow(this)"> -->
                        <?php if ($loadOutfits): ?>
                            <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td>
                        <?php endif; ?>

                        <td><?php echo $i+1; ?></td>
                         <!-- <tr class="highlight" onmouseover="highlightRow(this)" onmouseout="resetRow(this)"> -->
                        <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td>
                        <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td>
                        <td><?php echo $vocGroup[$type][$i]['value']; ?></td>
                        <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?>
                    </tr>
                    <?php
                }
            }
        }
        ?>
    </table>
    <?php
}
include 'layout/overall/footer.php'; ?>
    <style>
/*        .highlight {*/
/*            background-color: rgba(255, 255, 0, 0.2); /* Light yellow background with transparency */*/
/*            position: relative;*/
/*            z-index: 10; /* Higher than other elements */
/*        }*/
/**/
/*        .highlight:hover {*/
/*            background-color: rgba(255, 255, 0, 0.5); /* Darker yellow on hover */
/*            z-index: 20; /* Even higher on hover */
/*        }*/
/*        .hoverTable tr{*/
/*        background: #b8d1f3;*/
    }
    .highlight tr:hover td {
    background-color: orange;
}
    </style>
</head>
<script>

function highlightRow(row) {
    row.style.backgroundColor = "orange";
}

function resetRow(row) {
    row.style.backgroundColor = "";
}

// Add event listeners to each table row
document.addEventListener("DOMContentLoaded", function() {
    var rows = document.querySelectorAll("#highscoresTable");
    rows.forEach(function(row) {
        row.addEventListener("mouseenter", function() {
            highlightRow(row);
        });
        row.addEventListener("mouseleave", function() {
            resetRow(row);
        });
    });
});
</script>
Post automatically merged:

its like i can0t highlight the box o
 
Last edited:
im doing it in clean file i have highlighted the margins of the boxes that i want to highlight but not the entire box as i want
@hemrenus321 @tobi132
View attachment 84888
Lua:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore vocation
$configVocations = $config['vocations'];
//$debug['configVocations'] = $configVocations;

$vocationIds = array_keys($configVocations);

$vocation = 'all';
if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) {
    $vocation = (int)$_GET['vocation'];
    if (!in_array($vocation, $vocationIds)) {
        $vocation = "all";
    }
}

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false;
$loadOutfits = ($config['show_outfits']['highscores']) ? true : false;

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shield",
        6 => "Fish",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $vocGroups = fetchAllScores($rows, $config['ServerEngine'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits);
    $cache->setContent($vocGroups);
    $cache->save();
} else {
    $vocGroups = $cache->load();
}

if ($vocGroups) {
    $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]];
    ?>

    <h1>Ranking for <?php echo skillName($type) .", ". (($vocation === 'all') ? 'any vocation' : vocation_id_to_name($vocation)) ?>.</h1>

    <form action="" method="GET">

        <select name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>

        <select name="vocation">
            <option value="all" <?php if (!is_int($vocation)) echo "selected"; ?>>Any vocation</option>
            <?php
            foreach ($configVocations as $v_id => $v_data) {
                if ($v_data['fromVoc'] === false) {
                    $selected = (is_int($vocation) && $vocation == $v_id) ? " selected $vocation = $v_id" : "";
                    echo '<option value="'. $v_id .'"'. $selected .'>'. $v_data['name'] .'</option>';
                }
            }
            ?>
        </select>

        <select name="page">
            <?php
            $pages = ($vocGroup[$type] !== false) ? ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($vocGroup[$type]) / $highscore['rowsPerPage']))) : 1;
            for ($i = 0; $i < $pages; $i++) {
                $x = $i + 1;
                if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                else echo "<option value='".$x."'>Page: ".$x."</option>";
            }
            ?>
        </select>

        <input type="submit" value=" View " class="btn btn-info">
    </form>

    <table id="highscoresTable" class="table table-striped table-hover">

        <tr class="yellow">
            <?php if ($loadOutfits) echo "<td>Outfit</td>"; ?>
            <td>Rank</td>
            <td>Name</td>
            <td>Vocation</td>
            <td>Level</td>
            <?php if ($type === 7) echo "<td>Points</td>"; ?>
        </tr>

        <?php
        if ($vocGroup[$type] === false) {
            ?>
            <tr>
                <td colspan="5">Nothing to show here yet.</td>
            </tr>
            <?php
        } else {
            for ($i = 0; $i < count($vocGroup[$type]); $i++) {
                if (pageCheck($i, $page, $rowsPerPage)) {
                    $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png">  ' : '';
                    ?>
                    <!-- <tr class="highlight" onmouseover="highlightRow(this)" onmouseout="resetRow(this)"> -->
                        <?php if ($loadOutfits): ?>
                            <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td>
                        <?php endif; ?>

                        <td><?php echo $i+1; ?></td>
                         <!-- <tr class="highlight" onmouseover="highlightRow(this)" onmouseout="resetRow(this)"> -->
                        <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td>
                        <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td>
                        <td><?php echo $vocGroup[$type][$i]['value']; ?></td>
                        <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?>
                    </tr>
                    <?php
                }
            }
        }
        ?>
    </table>
    <?php
}
include 'layout/overall/footer.php'; ?>
    <style>
/*        .highlight {*/
/*            background-color: rgba(255, 255, 0, 0.2); /* Light yellow background with transparency */*/
/*            position: relative;*/
/*            z-index: 10; /* Higher than other elements */
/*        }*/
/**/
/*        .highlight:hover {*/
/*            background-color: rgba(255, 255, 0, 0.5); /* Darker yellow on hover */
/*            z-index: 20; /* Even higher on hover */
/*        }*/
/*        .hoverTable tr{*/
/*        background: #b8d1f3;*/
    }
    .highlight tr:hover td {
    background-color: orange;
}
    </style>
</head>
<script>

function highlightRow(row) {
    row.style.backgroundColor = "orange";
}

function resetRow(row) {
    row.style.backgroundColor = "";
}

// Add event listeners to each table row
document.addEventListener("DOMContentLoaded", function() {
    var rows = document.querySelectorAll("#highscoresTable");
    rows.forEach(function(row) {
        row.addEventListener("mouseenter", function() {
            highlightRow(row);
        });
        row.addEventListener("mouseleave", function() {
            resetRow(row);
        });
    });
});
</script>
Post automatically merged:

its like i can0t highlight the box o
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore vocation
$configVocations = $config['vocations'];
//$debug['configVocations'] = $configVocations;

$vocationIds = array_keys($configVocations);

$vocation = 'all';
if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) {
    $vocation = (int)$_GET['vocation'];
    if (!in_array($vocation, $vocationIds)) {
        $vocation = "all";
    }
}

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false;
$loadOutfits = ($config['show_outfits']['highscores']) ? true : false;

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shield",
        6 => "Fish",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $vocGroups = fetchAllScores($rows, $config['ServerEngine'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits);
    $cache->setContent($vocGroups);
    $cache->save();
} else {
    $vocGroups = $cache->load();
}

if ($vocGroups) {
    $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]];
    ?>

    <h1>Ranking for <?php echo skillName($type) .", ". (($vocation === 'all') ? 'any vocation' : vocation_id_to_name($vocation)) ?>.</h1>

    <form action="" method="GET">

        <select name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>

        <select name="vocation">
            <option value="all" <?php if (!is_int($vocation)) echo "selected"; ?>>Any vocation</option>
            <?php
            foreach ($configVocations as $v_id => $v_data) {
                if ($v_data['fromVoc'] === false) {
                    $selected = (is_int($vocation) && $vocation == $v_id) ? " selected $vocation = $v_id" : "";
                    echo '<option value="'. $v_id .'"'. $selected .'>'. $v_data['name'] .'</option>';
                }
            }
            ?>
        </select>

        <select name="page">
            <?php
            $pages = ($vocGroup[$type] !== false) ? ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($vocGroup[$type]) / $highscore['rowsPerPage']))) : 1;
            for ($i = 0; $i < $pages; $i++) {
                $x = $i + 1;
                if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                else echo "<option value='".$x."'>Page: ".$x."</option>";
            }
            ?>
        </select>

        <input type="submit" value=" View " class="btn btn-info">
    </form>

    <table id="highscoresTable" class="table table-striped table-hover">

        <tr class="yellow">
            <?php if ($loadOutfits) echo "<td>Outfit</td>"; ?>
            <td>Rank</td>
            <td>Name</td>
            <td>Vocation</td>
            <td>Level</td>
            <?php if ($type === 7) echo "<td>Points</td>"; ?>
        </tr>

        <?php
        if ($vocGroup[$type] === false) {
            ?>
            <tr>
                <td colspan="5">Nothing to show here yet.</td>
            </tr>
            <?php
        } else {
            for ($i = 0; $i < count($vocGroup[$type]); $i++) {
                if (pageCheck($i, $page, $rowsPerPage)) {
                    $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png">  ' : '';
                    ?>
                    <tr class="highlight">
                        <?php if ($loadOutfits): ?>
                            <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td>
                        <?php endif; ?>

                        <td><?php echo $i+1; ?></td>
                        <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td>
                        <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td>
                        <td><?php echo $vocGroup[$type][$i]['value']; ?></td>
                        <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?>
                    </tr>
                    <?php
                }
            }
        }
        ?>
    </table>
    <?php
}
?>
<style>
    tr.highlight:hover td {
        background-color: orange;
    }
</style>
<?php
include 'layout/overall/footer.php';
?>
 
Solution
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';

if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}

// Fetch highscore type
$type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7;
if ($type > 9) $type = 7;

// Fetch highscore vocation
$configVocations = $config['vocations'];
//$debug['configVocations'] = $configVocations;

$vocationIds = array_keys($configVocations);

$vocation = 'all';
if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) {
    $vocation = (int)$_GET['vocation'];
    if (!in_array($vocation, $vocationIds)) {
        $vocation = "all";
    }
}

// Fetch highscore page
$page = getValue(@$_GET['page']);
if (!$page || $page == 0) $page = 1;
else $page = (int)$page;

$highscore = $config['highscore'];
$loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false;
$loadOutfits = ($config['show_outfits']['highscores']) ? true : false;

$rows = $highscore['rows'];
$rowsPerPage = $highscore['rowsPerPage'];

function skillName($type) {
    $types = array(
        1 => "Club",
        2 => "Sword",
        3 => "Axe",
        4 => "Distance",
        5 => "Shield",
        6 => "Fish",
        7 => "Experience", // Hardcoded
        8 => "Magic Level", // Hardcoded
        9 => "Fist", // Since 0 returns false I will make 9 = 0. :)
    );
    return $types[(int)$type];
}

function pageCheck($index, $page, $rowPerPage) {
    return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false;
}

$cache = new Cache('engine/cache/highscores');
if ($cache->hasExpired()) {
    $vocGroups = fetchAllScores($rows, $config['ServerEngine'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits);
    $cache->setContent($vocGroups);
    $cache->save();
} else {
    $vocGroups = $cache->load();
}

if ($vocGroups) {
    $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]];
    ?>

    <h1>Ranking for <?php echo skillName($type) .", ". (($vocation === 'all') ? 'any vocation' : vocation_id_to_name($vocation)) ?>.</h1>

    <form action="" method="GET">

        <select name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>

        <select name="vocation">
            <option value="all" <?php if (!is_int($vocation)) echo "selected"; ?>>Any vocation</option>
            <?php
            foreach ($configVocations as $v_id => $v_data) {
                if ($v_data['fromVoc'] === false) {
                    $selected = (is_int($vocation) && $vocation == $v_id) ? " selected $vocation = $v_id" : "";
                    echo '<option value="'. $v_id .'"'. $selected .'>'. $v_data['name'] .'</option>';
                }
            }
            ?>
        </select>

        <select name="page">
            <?php
            $pages = ($vocGroup[$type] !== false) ? ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($vocGroup[$type]) / $highscore['rowsPerPage']))) : 1;
            for ($i = 0; $i < $pages; $i++) {
                $x = $i + 1;
                if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>";
                else echo "<option value='".$x."'>Page: ".$x."</option>";
            }
            ?>
        </select>

        <input type="submit" value=" View " class="btn btn-info">
    </form>

    <table id="highscoresTable" class="table table-striped table-hover">

        <tr class="yellow">
            <?php if ($loadOutfits) echo "<td>Outfit</td>"; ?>
            <td>Rank</td>
            <td>Name</td>
            <td>Vocation</td>
            <td>Level</td>
            <?php if ($type === 7) echo "<td>Points</td>"; ?>
        </tr>

        <?php
        if ($vocGroup[$type] === false) {
            ?>
            <tr>
                <td colspan="5">Nothing to show here yet.</td>
            </tr>
            <?php
        } else {
            for ($i = 0; $i < count($vocGroup[$type]); $i++) {
                if (pageCheck($i, $page, $rowsPerPage)) {
                    $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png">  ' : '';
                    ?>
                    <tr class="highlight">
                        <?php if ($loadOutfits): ?>
                            <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td>
                        <?php endif; ?>

                        <td><?php echo $i+1; ?></td>
                        <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td>
                        <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td>
                        <td><?php echo $vocGroup[$type][$i]['value']; ?></td>
                        <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?>
                    </tr>
                    <?php
                }
            }
        }
        ?>
    </table>
    <?php
}
?>
<style>
    tr.highlight:hover td {
        background-color: orange;
    }
</style>
<?php
include 'layout/overall/footer.php';
?>
Worked ! Thank you
Post automatically merged:

taking the opportunity @hemrenus321
can you help me make look better the powergamers box? Would appreciate it very much by now it looks like a huge rectangle
Untitled.png

, and it has been almost impossible to do want i want which if reduce this huge rectangle to a square box.
Lua:
<!-- comienzo powergamers -->
                <div class="right_box">
    <div class="corner_lt"></div>
    <div class="corner_rt"></div>
    <div class="corner_lb"></div>
    <div class="corner_rb"></div>
    <div class="title"><img src="layout/img/3exp.gif"><span style="background-image: url(layout/widget_texts/powergamers.png);"></span></div>
    <div class="content">
        <div class="rise-up-content">
            <ul class="toplvl">
                <?php
                function coloured_value($valuein)
                {
                    error_reporting(E_ALL ^ E_NOTICE);
                    $value2 = $valuein;
                    while(strlen($value2) > 3)
                    {
                        $value = '.'.substr($value2, -3, 3);
                        $value2 = substr($value2, 0, strlen($value2)-3);
                    }
                    @$value = $value2.$value;
                    if($valuein > 0)
                        return '<b><font color="yellow">lvl:'.$value.'</font></b>';
                    elseif($valuein < 0)
                        return '<font color="red">'.$value.'</font>';
                    else
                        return $value;
                }

                $cache = new Cache('engine/cache/topPowergamers');
                if ($cache->hasExpired()) {
                    
                    $znotePlayers = mysql_select_multi('SELECT * FROM players WHERE group_id < 2 ORDER BY  experience - exphist_lastexp DESC LIMIT 5;');
                    $cache->setContent($znotePlayers);
                    $cache->save();
                } else {
                    $znotePlayers = $cache->load();
                }

                if ($znotePlayers) {
                    foreach ($znotePlayers as $player) {
                        $nam = $player['name'];
                        if (strlen($nam) > 15) {
                            $nam = substr($nam, 0, 12) . '...';
                        }
                        //echo '<li style="margin: 6px 0;"><div style="position:relative; left:-48px; top:-48px;"><div style="background-image: url(layout/outfitter/outfit.php?id='.$player['looktype'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                    //<a style="margin-left: 19px;" href="characterprofile.php?name=' .$player['name']. '">' .$nam. '</a>';
                                    
                                    //echo '<span style="float: right;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';

                      //  echo '<li style="margin: 6px 0;"><img style="margin-top: -37px; margin-left: -37px;" src="https://outfit-images-oracle.ots.me/12xx_latest_walk/animoutfit.php?id=' . $player['looktype'] . '&addons=' . $player['lookaddons'] . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '&g=0&h=3&i=1"></img>';
                       // echo '<a style="margin-left: 17px;" href="characterprofile.php?name=' . $player['name'] . '">' . $nam . '</a>';
                       //echo '<span style="float: center;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';
                        //echo '<span style="float: right;">' . coloured_value($player['experience'] - $player['exphist_lastexp']) . ' - Level ' . $player['level'] . '</span></li>';
                 //   }
                //}
              
            //</ul>
                        // original code
                       // echo '<li style="margin: 6px 0;"><div style="position:relative; left:-48px; top:-48px;"><div style="background-image: url(layout/outfitter/outfit.php?id='.$player['looktype'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                //    <a style="margin-left: 19px;" href="characterprofile.php?name=' .$player['name']. '">' .$nam. '</a>';
                                    
                                //    echo '<span style="float: right;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';
                        //comienza nuevo xodigpo
                                 echo '
<div class="outfit">
    <li style="margin: 8px 5px;">
        <div style="position:relative; left:-48px; top:1px;">
            <img src="' . $config['show_outfits']['imageServer'] . '?id=' . $player['looktype'] .
            (isset($player['lookaddons']) ? '&addons=' . $player['lookaddons'] : '') .
            '&head=' . (isset($player['lookhead']) ? $player['lookhead'] : '') .
            '&body=' . (isset($player['lookbody']) ? $player['lookbody'] : '') .
            '&legs=' . (isset($player['looklegs']) ? $player['looklegs'] : '') .
            '&feet=' . (isset($player['lookfeet']) ? $player['lookfeet'] : '') . '" alt="img">
            <div style="position:relative; left:74px; top:-25px;">
                <a style="margin-right: 13px;" href="characterprofile.php?name=' . $player['name'] . '"><strong>' . $nam . '</strong></a>
                <span style="position: absolute; left: 100px; top: 0;">' . coloured_value($player['level']-$player['exphist_lastexp']) . '</span>
            </div>
        </div>
    </li>
</div>
            ';
                        //echo '<span style="float: right;">' . coloured_value($player['experience'] - $player['exphist_lastexp']) . ' - Level ' . $player['level'] . '</span></li>';
                    }
                }
                ?>
            </ul>
                        </div>
                    </div>
                    <div class="border_bottom"></div>
                </div>
                        <!-- final de comienzo powergamers -->
 
Last edited:
msg me on discord: tastytoast97
Worked ! Thank you
Post automatically merged:

taking the opportunity @hemrenus321
can you help me make look better the powergamers box? Would appreciate it very much by now it looks like a huge rectangle
View attachment 84889

, and it has been almost impossible to do want i want which if reduce this huge rectangle to a square box.
Lua:
<!-- comienzo powergamers -->
                <div class="right_box">
    <div class="corner_lt"></div>
    <div class="corner_rt"></div>
    <div class="corner_lb"></div>
    <div class="corner_rb"></div>
    <div class="title"><img src="layout/img/3exp.gif"><span style="background-image: url(layout/widget_texts/powergamers.png);"></span></div>
    <div class="content">
        <div class="rise-up-content">
            <ul class="toplvl">
                <?php
                function coloured_value($valuein)
                {
                    error_reporting(E_ALL ^ E_NOTICE);
                    $value2 = $valuein;
                    while(strlen($value2) > 3)
                    {
                        $value = '.'.substr($value2, -3, 3);
                        $value2 = substr($value2, 0, strlen($value2)-3);
                    }
                    @$value = $value2.$value;
                    if($valuein > 0)
                        return '<b><font color="yellow">lvl:'.$value.'</font></b>';
                    elseif($valuein < 0)
                        return '<font color="red">'.$value.'</font>';
                    else
                        return $value;
                }

                $cache = new Cache('engine/cache/topPowergamers');
                if ($cache->hasExpired()) {
                  
                    $znotePlayers = mysql_select_multi('SELECT * FROM players WHERE group_id < 2 ORDER BY  experience - exphist_lastexp DESC LIMIT 5;');
                    $cache->setContent($znotePlayers);
                    $cache->save();
                } else {
                    $znotePlayers = $cache->load();
                }

                if ($znotePlayers) {
                    foreach ($znotePlayers as $player) {
                        $nam = $player['name'];
                        if (strlen($nam) > 15) {
                            $nam = substr($nam, 0, 12) . '...';
                        }
                        //echo '<li style="margin: 6px 0;"><div style="position:relative; left:-48px; top:-48px;"><div style="background-image: url(layout/outfitter/outfit.php?id='.$player['looktype'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                    //<a style="margin-left: 19px;" href="characterprofile.php?name=' .$player['name']. '">' .$nam. '</a>';
                                  
                                    //echo '<span style="float: right;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';

                      //  echo '<li style="margin: 6px 0;"><img style="margin-top: -37px; margin-left: -37px;" src="https://outfit-images-oracle.ots.me/12xx_latest_walk/animoutfit.php?id=' . $player['looktype'] . '&addons=' . $player['lookaddons'] . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '&g=0&h=3&i=1"></img>';
                       // echo '<a style="margin-left: 17px;" href="characterprofile.php?name=' . $player['name'] . '">' . $nam . '</a>';
                       //echo '<span style="float: center;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';
                        //echo '<span style="float: right;">' . coloured_value($player['experience'] - $player['exphist_lastexp']) . ' - Level ' . $player['level'] . '</span></li>';
                 //   }
                //}
            
            //</ul>
                        // original code
                       // echo '<li style="margin: 6px 0;"><div style="position:relative; left:-48px; top:-48px;"><div style="background-image: url(layout/outfitter/outfit.php?id='.$player['looktype'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                //    <a style="margin-left: 19px;" href="characterprofile.php?name=' .$player['name']. '">' .$nam. '</a>';
                                  
                                //    echo '<span style="float: right;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';
                        //comienza nuevo xodigpo
                                 echo '<li style="margin: 6px 0;">
                                        <div style="position:relative; left:-48px; top:-48px;">
                                        <div style="background-image: url(' . $config['show_outfits']['imageServer'] . '?id=' . $player['looktype'] .
                                            (isset($player['lookaddons']) ? '&addons=' . $player['lookaddons'] : '') .
                                            '&head=' . (isset($player['lookhead']) ? $player['lookhead'] : '') .
                                            '&body=' . (isset($player['lookbody']) ? $player['lookbody'] : '') .
                                            '&legs=' . (isset($player['looklegs']) ? $player['looklegs'] : '') .
                                            '&feet=' . (isset($player['lookfeet']) ? $player['lookfeet'] : '') . ');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                                <a style="margin-left: 24px;" href="characterprofile.php?name=' . $player['name'] . '"><strong>' . $nam . '</strong></a>
                                                <span style="float: right;">' . coloured_value($player['level']-$player['exphist_lastexp']) . '</span>
                                       
                                    </li>';
                        //echo '<span style="float: right;">' . coloured_value($player['experience'] - $player['exphist_lastexp']) . ' - Level ' . $player['level'] . '</span></li>';
                    }
                }
                ?>
            </ul>
                        </div>
                    </div>
                    <div class="border_bottom"></div>
                </div>
                        <!-- final de comienzo powergamers -->
Lua:
<!-- comienzo powergamers -->
                <div class="right_box">
    <div class="corner_lt"></div>
    <div class="corner_rt"></div>
    <div class="corner_lb"></div>
    <div class="corner_rb"></div>
    <div class="title"><img src="layout/img/3exp.gif"><span style="background-image: url(layout/widget_texts/powergamers.png);"></span></div>
    <div class="content">
        <div class="rise-up-content">
            <ul class="toplvl">
                <?php
                function coloured_value($valuein)
                {
                    error_reporting(E_ALL ^ E_NOTICE);
                    $value2 = $valuein;
                    while(strlen($value2) > 3)
                    {
                        $value = '.'.substr($value2, -3, 3);
                        $value2 = substr($value2, 0, strlen($value2)-3);
                    }
                    @$value = $value2.$value;
                    if($valuein > 0)
                        return '<b><font color="yellow">lvl:'.$value.'</font></b>';
                    elseif($valuein < 0)
                        return '<font color="red">'.$value.'</font>';
                    else
                        return $value;
                }

                $cache = new Cache('engine/cache/topPowergamers');
                if ($cache->hasExpired()) {
                  
                    $znotePlayers = mysql_select_multi('SELECT * FROM players WHERE group_id < 2 ORDER BY  experience - exphist_lastexp DESC LIMIT 5;');
                    $cache->setContent($znotePlayers);
                    $cache->save();
                } else {
                    $znotePlayers = $cache->load();
                }

                if ($znotePlayers) {
                    foreach ($znotePlayers as $player) {
                        $nam = $player['name'];
                        if (strlen($nam) > 15) {
                            $nam = substr($nam, 0, 12) . '...';
                        }
                        //echo '<li style="margin: 6px 0;"><div style="position:relative; left:-48px; top:-48px;"><div style="background-image: url(layout/outfitter/outfit.php?id='.$player['looktype'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                    //<a style="margin-left: 19px;" href="characterprofile.php?name=' .$player['name']. '">' .$nam. '</a>';
                                  
                                    //echo '<span style="float: right;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';

                      //  echo '<li style="margin: 6px 0;"><img style="margin-top: -37px; margin-left: -37px;" src="https://outfit-images-oracle.ots.me/12xx_latest_walk/animoutfit.php?id=' . $player['looktype'] . '&addons=' . $player['lookaddons'] . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '&g=0&h=3&i=1"></img>';
                       // echo '<a style="margin-left: 17px;" href="characterprofile.php?name=' . $player['name'] . '">' . $nam . '</a>';
                       //echo '<span style="float: center;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';
                        //echo '<span style="float: right;">' . coloured_value($player['experience'] - $player['exphist_lastexp']) . ' - Level ' . $player['level'] . '</span></li>';
                 //   }
                //}
            
            //</ul>
                        // original code
                       // echo '<li style="margin: 6px 0;"><div style="position:relative; left:-48px; top:-48px;"><div style="background-image: url(layout/outfitter/outfit.php?id='.$player['looktype'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                //    <a style="margin-left: 19px;" href="characterprofile.php?name=' .$player['name']. '">' .$nam. '</a>';
                                  
                                //    echo '<span style="float: right;">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</span></li>';
                        //comienza nuevo xodigpo
                                 echo '<li style="margin: 6px 0;">
                                        <div style="position:relative; left:-48px; top:-48px;">
                                        <div style="background-image: url(' . $config['show_outfits']['imageServer'] . '?id=' . $player['looktype'] .
                                            (isset($player['lookaddons']) ? '&addons=' . $player['lookaddons'] : '') .
                                            '&head=' . (isset($player['lookhead']) ? $player['lookhead'] : '') .
                                            '&body=' . (isset($player['lookbody']) ? $player['lookbody'] : '') .
                                            '&legs=' . (isset($player['looklegs']) ? $player['looklegs'] : '') .
                                            '&feet=' . (isset($player['lookfeet']) ? $player['lookfeet'] : '') . ');width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div>
                                                <a style="margin-left: 24px;" href="characterprofile.php?name=' . $player['name'] . '"><strong>' . $nam . '</strong></a>
                                                <span style="float: right;">' . coloured_value($player['level']-$player['exphist_lastexp']) . '</span>
                                       
                                    </li>';
                        //echo '<span style="float: right;">' . coloured_value($player['experience'] - $player['exphist_lastexp']) . ' - Level ' . $player['level'] . '</span></li>';
                    }
                }
                ?>
            </ul>
                        </div>
                    </div>
                    <div class="border_bottom"></div>
                </div>
                        <!-- final de comienzo powergamers -->
 
Back
Top