DISQUS

DISQUS Hello! Huddled Masses is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Huddled Masses

Joel Bennett's development blog...
Jump to original thread »
Author

Uber Tooltips Replacer

Started by Jaykul · 9 months ago

The ultimate auto-replacer WordPress plugin. Handles acronyms, abbreviations, links and just plain text shortcuts, all in one simple script. ... Continue reading »

7 comments

  • Consider this drive-by encouragement. :)
  • I'm wondering if a script like yours could be used to work on a php message board?
    I have a phpoutburst board installed on our site, and the built in bad word filter is extremely buggy. Your acronym filter seems so much more advanced and customizable... could this is adapted into a php script?
  • One thing to consider with such a plugin is that there will likely be communities of users who share similar vocabularies of Tooltips and Acronyms. It would seem a shame to force each user to (re)create entries, and it would make things much easier to maintain if such lists were shared. Imagine if, rather than reading the definitions of tooltips / acronyms from a local source, the datasource was shared on the net somewhere. (This could be a simple RDF server, as an example.) Now, if anyone anywhere makes an update to the datasource, all users benefit. Of course, there would be problems with "graffiti" and poor-quality content on such a shared, open datasource, but perhaps some wikipedia-ish techniques can manage such vandalism. It also would encourage people to use the plugin, since as soon as you drop it in, your site is dramatically enhanced by the collective intelligence of the web. Hey, I might even be able to help on the server side!
  • You could easily use this on a PHP message board, yes. It's a simple PHP script with a clever regular expression and a list of words to replace.

    Honestly, I'd feel better about reading acronyms from a server if it was strictly moderated, and updates were scheduled or manual. The problem with a PHP plugin is that you end up doing a lot of work to do such 'regular' updates, when you _should_ just be using cron or AT or Windows Scheduler Service.

    Anyway, more to the point, there are already "hundreds":http://www.ucc.ie/cgi-bin/acronym of "acronym":http://www.acronymfinder.com/ "services":http://www3.interscience.wiley.com/stasa/search.html "already":http://www.bized.ac.uk/glossary/acronym.htm "available":http://www.irs.aber.ac.uk/acronyms/ on the net. The problem is, any acronym server which takes additional deffinitions quickly grows huge, with databases of 50,000 to 170,000 acronyms despite being "specialized":http://www.arng.army.mil/tools/acronym.asp. You'd want to write a service that queried one or more of these with each acronym you posted (assuming you would put your acronyms in ALL CAPS or use some other way of recognizing new ones) and then just cache locally the ones you had actually used, because there's no way you're going to store definitions of a couple of hundred acronyms on each blog...

    Personally, I'm actually leaning toward not doing this at all on my site. The fact of the matter is, I don't need (or, really, want) a visible acronym tag style on every instance of "HTML" on my site. It unecessarily emphasizes something which should not be emphasized. Besides that, my readers should already know what HTML means, otherwise they're not going to understand most of the site anyway, so there's really no point.

    As with any publication, it makes more sense to define "new" acronyms in the text the first time you use them in an article, and not at all after that. I don't mind having the acronym or abbr tags in the source (without a style attached) if it helped some semantic application, but somehow I think that it would only be helpful in the case of unusual or obscure acronyms.
  • This is a great combination of things for a plugin. I just wanted to point you in some directions for hints or solutions about your DOM tooltip struggles. On my site I use a fantastic peice of JS from Kryogenix called Nice Titles. It basically takes any A tag with a title attribute, coppies the text of the title attrib., gets rid of the title attrib. and then adds a new attrib. called nicetitle. Then the script finds all nicetitle attribs and tags on a DOM tooltip. The reason for nixing the title attrib. in favor of a new attrib. called nicetitle is to prevent the browser from popping up its own tooltip (a problem I noticed you were having).

    It normally places the tooltip relative to the link's location on the page, but I modified it to follow the mouse while the user hovers over the link. The best part is that you don't have to modify any link code, it's all completely done by whether or not there is a title attrib on the link. Email me if you'd like the code for my mouse following version, or you could always just view my page's source and download the nicetitle.js file. Hope this helps.

    Paul
  • Is this plugin publically available?
  • Doesn't work on Opera 9, weekly build, might work on older versions.

Add New Comment

Returning? Login