Visual.SpellCheck And Sociable Fix

Posted on October 2006 at about 4:52 AM by hwa

For those who use the WordPress plugin Visual.SpellCheck and Sociable, i don’t know whether this happen to you or not, but for me if i enable both plugin i will get this strange problem where the “Check Spelling” button from the plugin Visual.SpellCheck in my editor doesn’t show up.

So i went dig up the code and found out that it’s actually the JavaScript from Sociable crashed with the one from Visual.SpellCheck. The JavaScript is from line 355 until 370 in sociable.php, the function of this script is to enable drag and drop in Sociable option page, which i think is very cool.

Anyway i noticed that this block of JavaScript will load every time even thought you are not in the option page, which i think is not necessary. So i moved the JavaScript from line number 355 until 370 which should looks like this:-

  1. <script language="JavaScript" type="text/javascript"><!--
  2. var dragsort = ToolMan.dragsort();
  3. var junkdrawer = ToolMan.junkdrawer();
  4. window.onload = function() {
  5.     dragsort.makeListSortable(
  6.         document.getElementById("sociable_site_list")
  7.     );
  8. }
  9.  
  10. /* make checkbox action prettier */
  11. function toggle_checkbox(id) {
  12.   var checkbox = document.getElementById(id);
  13.     if (checkbox.checked)
  14.         checkbox.parentNode.className = 'active';
  15.     else
  16.         checkbox.parentNode.className = 'inactive';
  17. }
  18. --></script>

And paste the above JavaScript block to line number 504, just before the drag and drop in Sociable option page, or anywhere before the following line:-

  1. <ul id="sociable_site_list"></ul>

And this should fix the “Check Spelling” button won’t load problem. The idea is to only load the JavaScript block in the Sociable option page.

One Response to “Visual.SpellCheck And Sociable Fix”

  1. WordPress Spell Check Plugin - hwa2u.com 02 Oct 2006

Leave a Reply

You must be logged in to post a comment.