EQdkp Plus Item/Tooltip Bug Fix

Discussion in 'The Veterans' Lounge' started by Fanra, Aug 31, 2022.

  1. Fanra https://everquest.fanra.info

    Recently, EQdkp Plus stopped showing icons and popup tooltips for items. Here is a fix:

    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:
    HTML:
    <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:
    HTML:
    <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.
  2. Beimeith Lord of the Game

    It's been a while, but there used to be a way for you to differentiate between items with the same name when you input it into the system.
    MasterMagnus likes this.
  3. MasterMagnus The Oracle of AllHigh

    Exactly, as Beimeith says, maybe not an html thing, but a 'how you format the zam input string' thing.

    Have you tried putting single quotes around your {ITEMNAME}?

    Depending on the URL/HTML/string encoding you may need to use %27, &#39;, or '
  4. Beimeith Lord of the Game

    No, when you added items like, from a raid, there was a column you could define the item id or something like that, which let you override the default. I don't have an installed copy to check right now.

    I guess it is a question of if it still works if you are manually defining the item tooltips, idk
    MasterMagnus likes this.
  5. Fanra https://everquest.fanra.info

    None of these seem to work. I believe it may be related to how the Javascript ZAM file code works: https://zam.zamimg.com/j/tooltips.js?c

    Works
    1. https://everquest.allakhazam.com/db/item.html?item=7042
    2. https://everquest.allakhazam.com/db/item.html?item=bloodrage
    3. https://everquest.allakhazam.com/db/item.html?item=bloodied talisman
    Does not work


    Thank you for your ideas. Perhaps some others might work.
    MasterMagnus likes this.
  6. MasterMagnus The Oracle of AllHigh


    I took a poke at it, here's what I found.

    First off, you're using Zam's URL to search by Item ID.
    https://everquest.allakhazam.com/db/item.html?item= [wants a number here] Although I see you said it works with name strings too, I'm guessing it's not as 'full featured' with name strings.

    Found this URL
    https://everquest.allakhazam.com/db/searchdb.html?iname= [looking for a name string]

    Code:
    https://everquest.allakhazam.com/db/searchdb.html?iname=Gnoll Hunter's Cloak
    (String encoding, but spaces are not allowed)

    if typed in a URL field, it becomes:
    Code:
    https://everquest.allakhazam.com/db/searchdb.html?iname=Gnoll%20Hunter%27s%20Cloak
    
    (URL encoding, Space=%20 Apostrophe=%27) This link works with URL encoding.


    If the program spits out the URL with spaces you need to URL Encode it, some way or another.

    Try using the searchdb.html?iname= instead of item.html?item= and see if that is closer to what you want.

    OR
    if your program has an {ITEMID} variable, you could change that line in the program to
    Code:
    <a href="https://everquest.allakhazam.com/db/item.html?item={ITEMID}" {ITEMLINK}> {ITEMNAME}</a>
  7. Moege Augur

  8. Fanra https://everquest.fanra.info

    That's because the web page has to have:
    HTML:
    <script defer src="https://zam.zamimg.com/j/tooltips.js?c"></script>
    <script defer>var zam_tooltips = { "iconizelinks": true }</script>
    loaded first.

    Go to https://everquest.fanra.info/wiki/Fanra's_EverQuest_Wiki:Sandbox and test stuff there.

    What needs to work is the Javascript tooltip, not the link itself.

    To get the link to work rather than just the tooltip needs the Allakazam item ID, which is not the same as the official EQ Item ID. The official EQ Item ID only works on Lucy and Magelo.

    Maybe I should look at using Lucy or Magelo, but still the only way I know to get the official item ID is by either looking it up there or, what I use in EQIR, the /output inventory file from EQ.
    MasterMagnus likes this.
  9. MasterMagnus The Oracle of AllHigh


    Darn, tried it in the sandbox, no new insights.

    I see your example 3 works (URL encoded) which should work for issues with spaces and apostrophe. But will still trigger multiples which you don't want. See my test8(works) and test9(doesn't)

    Without more knowledge on what Zam accepts in those search fields I'm all out of ideas.

    Edit:
    The tool tip and icon seem to work with URL encoding, but the Zam page doesn't.
  10. Gidono https://everquest.allakhazam.com

    Try this url format to get the tooltip to use the in game id.

    https://lucy.allakhazam.com/itemraw.html?id=7610
    MasterMagnus likes this.
  11. MasterMagnus The Oracle of AllHigh

    This works the same for me, Icon and Tooltip work, URL doesn't work, Multiple results don't work. And this is URL Encoding:
    Code:
    https://lucy.allakhazam.com/itemraw.html?id=Gnoll%20Hunter%27s%20Cloak ItemRawTest15
    I notice LUCY has a field named AKZID.

    Could one of these code changes work for you?
    Code:
    <a href="https://lucy.allakhazam.com/itemraw.html?id={AKZID}" {ITEMLINK}> {ITEMNAME}</a>
     
    OR maybe just
     
    <a href="https://lucy.allakhazam.com/itemraw.html?id={ID}" {ITEMLINK}> {ITEMNAME}</a>
    EDIT
    as of last edit time, updated the above code (lucy.)
  12. Lianeb Augur

    You can use
    Code:
    <a href="https://everquest.allakhazam.com/db/item.html?item={ITEMNAME}" {ITEMLINK}> {ITEMNAME}</a>
    Or you can use
    Code:
    <a href="https://everquest.allakhazam.com/db/item.html?item={ITEMID}" {ITEMLINK}> {ITEMNAME}</a>
    IF you fill in the alakhazam ID in the field provided in EQDKP for item IDs when entering the item.
    Using the itemID will help with identifying things that the name alone can't resolve, and you only needed to put ID in for a very select few items for this to happen. This used to work on the old method that alla was using but that changed

    I have not figured out a way for it pull {ITEMID} if present and {ITEMNAME} if ID field is Null, so the tooltip of EQDKP needs to be either ID or NAME. Most choose name since if you did ID you would have to look up the Alla ID number for every item.

    Would be cool if you could do something like
    Code:
    <a href="https://everquest.allakhazam.com/db/item.html?item={ITEMID} | {ITEMNAME}" {ITEMLINK}> {ITEMNAME}</a>
    use itemID as primary and itemname as secondary and only use Name if ID is null. Maybe you can i am not a coder
    MasterMagnus likes this.
  13. Fanra https://everquest.fanra.info

    I will have to read the posts you have all provided to see if I understand.

    But it is important to realize that the EQdkp Plus code I'm using, while it does have a ITEMID variable, there is no way I know of to get any IDs without having to manually find them. In other words, when someone enters an item name into EQdkp Plus because the item dropped in a raid, they only have a name, not an ID number of any kind, neither EQ ID or Allakazam ID number.

    Because there is no way I can imagine to get an ID without manually doing so, I was just hoping that someone could look at the ZAM tooltip Javascript code (link I provided) and see if there was a way to have it take the name like "Hunter's Cloak" and only have that and not "Gnoll Hunter's Cloak" or "Hunter's Cloak xyz". Some way to tell the string to only match an exact match and not any other item that also has "Hunter's Cloak" in the name.

    I will review the posts everyone has made to see if I can understand if your suggestions can resolve this problem or maybe even go further.

    Thank you everyone for your assistance.
    MasterMagnus likes this.