• Hello
    I am using a plugin AdSense Manager made by you
    Your plugin has a short code list showing in the post editor to insert short code into post.
    Wordpress has been updated to version 3.3. and they updated the Javascript Post Editor tinyMCE also. Your plugin does not work with this new wp version 3.3.
    Short code list is not shown in the editor. but your wp hooks are working. It may be for the updated tinyMCE editor.
    Please Update your plugin.

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter Md Jahidul Islam

    (@onetarek)

    Hey I have solved the problem.
    AdSense Manager Plugin have some javascript problem for wp3.3

    document.getElementById("ed_toolbar").insertBefore(ed_adsensem, document.getElementById("ed_spell"));
    
    					/* Below is a Kludge for IE, which causes it to re-read the state of onChange etc. set above. Tut tut tut */
    					if (navigator.appName == 'Microsoft Internet Explorer') {
    						document.getElementById("ed_toolbar").innerHTML=document.getElementById("ed_toolbar").innerHTML;
    					}

    PROBLEMS
    1. The HTML element ‘ed_spell’ has been changed in wp3.3 . Now it is ‘qt_content_spell’
    2. With using ‘qt_content_spell’ you will found error because when this javascript is called , ‘ed_toolbar’ element has not been created yet. tinyMCY script creates button elements on body load.
    3. It is not a good idea to create an element by insertBefore() before another because now that is a problem. And it is depending on another element’s availability. Should use appendChild() function.

    I have already update my own plugin that also has shortcode inserting system into post.

    SOLUTION:
    ——— 1. ————
    a. call your above JS on window load.

    window.onload = function ()
    {
    Javascript code goes here
    }

    b. use appendChild() instead of insertBefore().
    so final codes will be following

    window.onload = function ()
    {
    					document.getElementById("ed_toolbar").appendChild(ed_adsensem);
    
    					/* Below is a Kludge for IE, which causes it to re-read the state of onChange etc. set above. Tut tut tut */
    					if (navigator.appName == 'Microsoft Internet Explorer') {
    						document.getElementById("ed_toolbar").innerHTML=document.getElementById("ed_toolbar").innerHTML;
    					}
    }

    This technique will but has an issue because window.onload = function (){} work only one time. If another plugin follow same technique then last call will only work. This plugin and my plugin create same problem. Only one was working.
    Finally I solved the problem for both my plugin and
    SOLUTION 2
    ——————–2——————-
    USE

    if(window.attachEvent){
         window.attachEvent("onload",YOUR_FUNCTION);
     }else{
         window.addEventListener("load",YOUR_FUNCTION,false);
     }

    ————–FINAL CODE———————————-
    replace the JS codes that I have wrote top of this post with following

    function your_functiton()
    {
    					document.getElementById("ed_toolbar").appendChild(ed_adsensem);
    
    					/* Below is a Kludge for IE, which causes it to re-read the state of onChange etc. set above. Tut tut tut */
    					if (navigator.appName == 'Microsoft Internet Explorer') {
    						document.getElementById("ed_toolbar").innerHTML=document.getElementById("ed_toolbar").innerHTML;
    					}
    }
    if(window.attachEvent){
         window.attachEvent("onload",your_functiton);
     }else{
         window.addEventListener("load",your_functiton,false);
     }

    I will working fine

    Regards
    Md Jahidul Islam (oneTarek)

Viewing 1 replies (of 1 total)
  • The topic ‘AdSense Manager Plugin Does not work with WP3.3’ is closed to new replies.