1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

bbcode item tooltips

Discussion in 'Census: EverQuest II' started by Dedith, Jan 4, 2012.

  1. Dedith

    Dedith Guest

    I've been wanting this for a while, so I wrote up a quick little jquery snippet to do this.  I've set it up on our guildlaunch site, feel free to to with it.  It should work on any page within the site (announcements, custom html, forum posts, etc.)  It runs with ajax/async:true so it'll update the tags as the data becomes available.

    Here's a sample page I put up showing it running: <a rel="nofollow" href="http://ardentregression.guildportal.com/Guild.aspx?GuildID=410269&TabID=3653108"]http://ardentregression.guildportal...p;TabID=3653108[/url]

    Edit: and sure enough, getting timeouts from census.daybreakgames.com as I post this.. lol  Well, it should be working so if the link to census.daybreakgames.com fails it'll just remove the item bbcode tags and leave the items listed there.. not completely bad.  haha

     
  2. DanKinney

    DanKinney Guest

    Very, very cool dedith!

    -dan

     
  3. Dedith

    Dedith Guest

    lol, it's not liking IE9 at home..  worked in Firefox and my IE9 at work.. /sigh

     
  4. Quicktiger

    Quicktiger Guest

    Works on Safari as well.

     
  5. DanKinney

    DanKinney Guest

    Who uses IE?

    Actually - my primary computers (home & work) are all MacOS-based now, so IE will be a blind spot for me anyway.

    -dan

     
  6. Dedith

    Dedith Guest

    lol, I'll have to work on troubleshooting the issue later, looks like the findItems() is failing to work.. prolly some change in IE9.  It's using base jquery for most if not all of it, so it should be fairly compatible.   Too many games to play, not enough time to code.. lol

     
  7. Dethdlr

    Dethdlr Guest

    Doesn't work with Firefox v3.6.24. 

    Who in their right mind would be running that old a version of Firefox you might ask?  Sadly, the place I work.  /sigh

    But it looked cool when I looked at it from home. :)

     
  8. feldon30

    feldon30 Guest

    I'm running Firefox 3.6.24 cause the Firefox fast track of 4/5/6/7/8/9/whatever has left behind quality with performance. Sure it runs fast, when it doesn't crash.

     
  9. Zoltaroth

    Zoltaroth Guest

    I bailed on Firefox post version 3.6.x.  I use chrome now just like the rest of the modern world ;)

     
  10. Dethdlr

    Dethdlr Guest

    Here, here!  I use chrome at home unless I have to load a work site that only works with IE.  When that happens there are numerous four letter words assailing anyone within earshot.

     
  11. Lantis

    Lantis Guest

    I'm still debating switching from Firefox (which I have used since back when it was called Phoenix, version 0.5 or about that) to Chrome.  However the main reason would be so I can sync my [strikethru]contacts[/strikethru] bookmarks/logins with my Android devices (1 tablet and 1 phone).  The Android version of FIrefox is... atrocious.

    Otherwise, I run Firefox Aurora (which is the pre-beta release), and it's pretty solid for me.  Beside, Chrome is on a similar fast track release too if you think about it :cool:  But at least Chrome evolves, while Firefox is doing too much "let's schuffle the UI just so we can call this a new version".

     
  12. Dedith

    Dedith Guest

    The #1 reason to use Firefox is Firebug, OMG did I pick up on a lot of javascript/css/dom behaviors I did not expect.

     
  13. Dedith

    Dedith Guest

    I fixed the script to support the newer item.modifier array, but IE9 is still borked..  is there a good FireBug equiv for IE9?

     
  14. Dethdlr

    Dethdlr Guest

    Hit F12.  Not the best tool around but can be useful in trying to track down IE bugs.

     
  15. Dedith

    Dedith Guest

    Dethdlr - You rock, but you've also brought me to a new conundrum. 

    When I open a fresh IE9 browser, the findText function (found on internet really) does not seem to work or trigger.  However, when I open the console (browser and document modes show IE9 standard) and refresh the page, they work without changing any modes.  Anyone see this behavior before?  I'm at a total loss on why..  It's fairly straight forward jquery usage in the findText function..

    Code:
    <code>function findText(element, pattern, callback) { for (var childi= element.childNodes.length; childi-->0;) { var child= element.childNodes[childi]; if (child.nodeType==1) { findText(child, pattern, callback); } else if (child.nodeType==3) { var matches= []; var match; while (match= pattern.exec(child.data)) matches.push(match); for (var i= matches.length; i-->0;) callback.call(window, child, matches[i]); } } } findText($('html&#39;)[0], /[item]/gi, function(node, match) { // do stuff }</code>
    The only 'odd' part I thought was having to use the [0] on $('html&#39;) in the call.. It wouldnt work otherwise in firefox/etc.  But, again, this works in IE9 if the damned console is open.. wth.

     
  16. Dedith

    Dedith Guest

    omg, I'm reading it's the console.log() call... because console doesn't exist prior to opening the dev tools.. /sigh

    Edit: Yup, that fixed it..  /grumble

     
  17. Dethdlr

    Dethdlr Guest

    Disclaimer: I didn't check anything, I'm just guessing based on past experience.

    Have you checked the DOCTYPE of the page you're loading?  I believe that when the console is open, it can make the page render using a certain browser mode and document mode (you can change them as well).  The DOCTYPE I believe is what determines how the page will render by default.  But when you open that console, it may be picking something different and rendering the page differently giving you different results.  If you don't have a DOCTYPE in your page, the browser is just guessing on how you want the page to render.

    But of course, I could be wrong. <img src="/station/images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" border="0" />

     
  18. DanKinney

    DanKinney Guest

    I would strongly recommend that you look at jQuery.  It has a crap-ton of awesome ways to deal with the DOM in a cross-browser fashion.  It may not be completely appropriate for a tooltip that is intended to be used on multiple sites, but it may save you a ton of work.

    -dan

     
  19. Dedith

    Dedith Guest

    heh  This is done in jquery, 1.6.2 or so, whatever guildlaunch uses.  The console.log() was debugging code.. which stopped the script in ie9..

     

Share This Page