EQdkp Plus

From IT Wiki
Jump to navigation Jump to search

Fix Item ToolTips

Under General Admin in the Administration Panel go to Settings, then go to the Itemtooltip tab.

At the bottom, change the Use own tooltips to On.

For the Code for the own tooltips enter:

<script defer src="https://zam.zamimg.com/j/tooltips.js?c"></script>  
<script defer>var zam_tooltips = { "iconizelinks": true }</script>

For the Item-Link for the tooltips enter:

<a href="https://everquest.allakhazam.com/db/item.html?item={ITEMNAME}" {ITEMLINK}> {ITEMNAME}</a>

This works for all items except those whose the name is not completely unique.

For example, it doesn't work for "Hunter's Cloak" because a search at Allakhazam brings up three items if you put Hunter's Cloak in the search:

  • Gnoll Hunter's Cloak
  • Hunter's Cloak
  • Royal Dragon Hunter's Cloak

Now, I believe it is impossible to have it work if the names were exactly the same, which is why my EverQuest Inventory Report program uses the Darkpaw official item ID and goes to Lucy instead of Allakhazam for linking. However, someone with better knowledge of URL codes than I might be able to tell us the code to at least not search for anything but exactly "Hunter's Cloak", which would not include any words before and after Hunter's Cloak.

Fix non-numeric value error in yuicompressor

For the error, "PHP Warning: A non-numeric value encountered in .../libraries/yuicompressorPHP/CSSmin.php on line 769", replace the function:

 private function normalize_int($size)
    {
        if (is_string($size)) {
            switch (substr($size, -1)) {
                case 'M': case 'm': return $size * 1048576;
                case 'K': case 'k': return $size * 1024;
                case 'G': case 'g': return $size * 1073741824;
            }
        }

        return (int) $size;
    }

with:

    private function normalize_int($size)
{
    if (is_string($size)) {
        // Get the numeric part of the size string
        $numericSize = intval($size);

        switch (substr($size, -1)) {
            case 'M': case 'm': return $numericSize * 1048576;
            case 'K': case 'k': return $numericSize * 1024;
            case 'G': case 'g': return $numericSize * 1073741824;
        }
    }

    return (int) $size;
}