Thursday, October 29th, 2009

YQLAutoTagger – making it easier for people to tag their content

Category: JavaScript, Usability

I am right now part of the Stackoverflow DevDays conference tour introducing the attendees to the things Yahoo has to offer for developers. One of the things is YQL as an easy way to use web services. When talking to the Stackoverflow developers they wondered how to make it easier for people to tag their questions. I’ve taken on the challenge and whipped up a GreaseMonkey script that enhances the Stackoverflow question form to automatically add tags to the question using the Yahoo Term Extractor API. You can see a screencast of the pimped StackOverflow or install the GreaseMonkey Script.

The next logical step was to clean up the script a bit and make it work without Greasemonkey. Now you can simply embed it into any document. See it in action on YouTube:

As shown in the demo page, all you need to do is to point to the script and call the init() method with the two field IDs as parameters.

  1. <form action="#" method="get" accept-charset="utf-8">
  2.   <div>
  3.      <label for="mainfield">Your Message:</label>
  4.      <textarea id="mainfield" name="mainfield">Hello I am a programmer that does care about interfaces. What kind of library can I use that gives me a defined set of widgets that have been tested in the real world?</textarea>
  5.  </div>
  6.    <div>
  7.       <label for="tags">Tags:</label><input type="text" id="tags" name="tags"/>
  8.    </div>
  9. </form>
  11. <script type="text/javascript" src="">
  12. </script>
  13. <script type="text/javascript">YQLAutoTagger.init('mainfield','tags');</script>

There are some ways to customise the script and its behaviour, all of which are described on GitHub. Download the script and read the docs there.

Posted by Chris Heilmann at 9:10 am
1 Comment

1.8 rating from 48 votes

1 Comment »

Comments feed TrackBack URI

Excellent thanks

Comment by Aphrodisiac — January 22, 2010

Leave a comment

You must be logged in to post a comment.