Facebook Login for IE10

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robru
    Senior Member
    • Nov 2004
    • 127
    • 4.1.x

    #16
    What's the name of this script in vBulletin 4.2.1 ?

    /clientscript/vbulletin_facebook.js?v=420c don't exist in the cliientscript folder in 4.2.1

    Comment

    • BirdOPrey5
      Senior Member
      • Jul 2008
      • 9613
      • 5.6.3

      #17
      The file is vbulletin_facebook.js the ?v=420 or ?v=421 is just to make sure the browser reloads the new version of the file.

      Comment

      • BirdOPrey5
        Senior Member
        • Jul 2008
        • 9613
        • 5.6.3

        #18
        Note- Unfortunately even though the file exists the is_ie part has changed and I cannot get this to work in 4.2.1. Will try more later.

        Comment

        • Ross L
          New Member
          • Dec 2007
          • 26
          • 3.8.x

          #19
          Any up
          Xbox 360 Forums

          Comment

          • XGC Viper XI
            Member
            • Sep 2007
            • 60
            • 5.5.x

            #20
            In the vbulletin_facebook.js search for if(A){FB.UIServer.setActiveNode and change to if(A && YAHOO.env.ua.ie < 7){FB.UIServer.setActiveNode

            I got this to display the connect button with vBulletin 4.2.1 and IE 10. Now if I can get the like buttons to show up.

            Comment


            • robru
              robru commented
              Editing a comment
              Thank you, that's do the trick with IE10/11 and vBulletin 4.2.1

            • GeorgeB
              GeorgeB commented
              Editing a comment
              Tried this and didn't work. Must have changed again or something.

            • vicos
              vicos commented
              Editing a comment
              This works with MSIE 11 and vB 4.2.2
          • camoit
            Member
            • Mar 2011
            • 59
            • 4.1.x

            #21
            Thanks the code worked just fine for me.

            OK so after finding Zuckerburg and kicking him in the nads I now have his autograph from him on this nice restraining order.

            But I'm running V 4.1.12 and all is well. I did use the altered code if (is_ie && YAHOO.env.ua.ie < 7) Because I'm using IE 8 and XP. so the < 7 was a better fit then the < 10 and I have other members with old computers. SO..
            The code did fix did several things.
            #1: fixed the button and the non connecting problem.
            #2: with FB conect ON when hitting the back button in IE it would fail to go back. This was because IE was unable to load the java graphic. With the code above it works just fine.
            So to the next guy that reads this here is the trick one more time just to let them know.

            Go into your site and find this file.
            /clientscript/vbulletin_facebook.js

            Now open it in notepad ++

            search for: is_ie
            then replace with this.
            Code:
             is_ie && YAHOO.env.ua.ie < 7
            Now the code should look like this with a little lead in and lead out code just to help you make sure you have the correct place.
            Code:
             ;if(is_ie && YAHOO.env.ua.ie < 7){FB.UIServer.
            But just in case you want the hole line here it is. It's just one big long line of Zuckerburg causing millions of VB man hours to fix our sites so there there junk will work for another 6 months tell the next cheese head in there company comes along and shows Zuckerburg some new flashy thing and he says WoW I "Like it" Fag,,, Sorry for the rant.. Why do we need FB? The bulletin boards were first. Back when it was all pearl script. May a large thumb fly over him and drop a big old LIKE on the top of his head.. OOps I did it again.

            Here is the full code.

            Code:
            function vB_Facebook(A){if(typeof (FB)!="object"){console.log("Facebook API Load Failure");return }this.config=A;this.ids={loginform_id:"navbar_loginform",loginform_usernameid:"navbar_username",loginform_passwordid:"navbar_password",fb_usernameid:"facebookusername",fb_passwordid:"facebookpassword",fb_associateid:"facebookassociate",invisibles:[{id:"fb_headerbox"},{id:"fbregbox"}],publishcheckboxid:"fb_dopublish",loginbtns:[{id:"fb_loginbtn"},{id:"fb_regloginbtn"},{id:"fb_getconnected"}]};this.loginscope={scope:"email,user_about_me,user_activities,user_birthday,user_interests,user_likes,user_website,user_location,user_work_history"};FB.init({appId:this.get_config("appid"),status:true,cookie:true,xfbml:true,oauth:true});if(is_ie && YAHOO.env.ua.ie < 7){FB.UIServer.setActiveNode=function(C,B){FB.UIServer._active[C.id]=B};FB.UIServer.setLoadedNode=function(C,B){FB.UIServer._loadedNodes[C.id]=B}}if(LOGGEDIN&&this.get_config("connected")){this.prepare_publishtofacebook()}this.register_loginbtns();this.make_visible()}vB_Facebook.prototype.get_config=function(A){if(typeof (this.config)=="undefined"||typeof (this.config[A])=="undefined"){return false}else{return this.config[A]}};vB_Facebook.prototype.register_loginbtns=function(){for(var C=0;C<this.ids.loginbtns.length;C++){var D=fetch_object(this.ids.loginbtns[C].id);if(D){YAHOO.util.Event.on(D,"click",this.handle_fbLogin,this,true)}}var B=fetch_object(this.ids.fb_usernameid);var E=fetch_object(this.ids.fb_passwordid);var A=fetch_object(this.ids.fb_associateid);if(B&&E&&A){YAHOO.util.Event.on(A,"click",this.login_and_associate,this,true);this.fb_username_listener=new YAHOO.util.KeyListener(B,{keys:13},{fn:this.handle_associate_keypress,scope:this,correctScope:true});this.fb_username_listener.enable();this.fb_password_listener=new YAHOO.util.KeyListener(E,{keys:13},{fn:this.handle_associate_keypress,scope:this,correctScope:true});this.fb_password_listener.enable()}};vB_Facebook.prototype.make_visible=function(){for(var A=0;A<this.ids.invisibles.length;A++){var B=fetch_object(this.ids.invisibles[A].id);if(B){YAHOO.util.Dom.removeClass(B,"hidden")}}};vB_Facebook.prototype.do_fbRedirect=function(){var A=window.top.location.href.replace(/#.*/,"");var B=(window.top.location.search.substring(1)?"&":"?");window.top.location=A+B+"dofbredirect=1"+window.top.location.hash};vB_Facebook.prototype.handle_fbLogin=function(A){YAHOO.util.Event.stopEvent(A);FB.getLoginStatus(function(B){if(B.authResponse){vBfb.do_fbRedirect();return }else{FB.login(function(C){if(C.authResponse){vBfb.do_fbRedirect()}},vBfb.loginscope)}})};vB_Facebook.prototype.handle_associate_keypress=function(B,A){YAHOO.util.Event.preventDefault(A[1]);this.login_and_associate()};vB_Facebook.prototype.login_and_associate=function(){var D=fetch_object(this.ids.loginform_id);var A=fetch_object(this.ids.loginform_usernameid);var C=fetch_object(this.ids.loginform_passwordid);var B=fetch_object(this.ids.fb_usernameid);var E=fetch_object(this.ids.fb_passwordid);if(A&&B){A.value=B.value}if(C&&E){C.value=E.value}if(D){D.onsubmit();D.submit()}};vB_Facebook.prototype.register_logout=function(){FB.logout(vBfb.do_fbRedirect)};vB_Facebook.prototype.prepare_publishtofacebook=function(){var E=fetch_object(this.ids.publishcheckboxid);var C=E;while(C&&C.tagName.toLowerCase()!="form"){C=C.parentNode}this.editFormEl=C;if(this.editFormEl){if(this.editFormEl.id=="form_widget_comments"&&E.type!="radio"){this.onSubmitEvent=this.editFormEl.sbutton.onclick;this.editFormEl.sbutton.onclick=null;YAHOO.util.Event.on(this.editFormEl.sbutton,"click",this.check_publishingperms_cmscomment,this,true)}else{this.onSubmitEvent=this.editFormEl.onsubmit;this.editFormEl.onsubmit=null;YAHOO.util.Event.on(this.editFormEl,"submit",this.check_publishingperms,this,true);var B=this.editFormEl.getElementsByTagName("input");for(var D=0;D<B.length;D++){var A=B[D];if(A.type=="submit"||A.type=="image"){YAHOO.util.Event.on(A,"click",this.track_submitbutton,this,true)}}}}};vB_Facebook.prototype.track_submitbutton=function(A){this.btnClicked=YAHOO.util.Event.getTarget(A)};vB_Facebook.prototype.is_pubCbChecked=function(){var A=fetch_object(this.ids.publishcheckboxid);return(typeof (A)!="undefined"&&A.checked==1)};vB_Facebook.prototype.check_publishingperms=function(A){YAHOO.util.Event.stopEvent(A);if(this.is_pubCbChecked()&&(this.btnClicked.name=="sbutton"||this.btnClicked.id=="save_btn"||this.btnClicked.id=="apply_btn")){FB.login(function(B){vBfb.handle_submit_override()},{scope:"publish_stream"})}else{this.handle_submit_override()}};vB_Facebook.prototype.check_publishingperms_cmscomment=function(A){if(this.is_pubCbChecked()){FB.login(function(B){vBfb.onSubmitEvent()},{scope:"publish_stream"})}else{this.onSubmitEvent()}};vB_Facebook.prototype.handle_submit_override=function(){if(typeof (this.onSubmitEvent)=="undefined"||!this.onSubmitEvent||this.onSubmitEvent.call(this.editFormEl)){var A=document.createElement("input");A.setAttribute("type","hidden");A.setAttribute("name",this.btnClicked.name);A.setAttribute("value",this.btnClicked.value);this.editFormEl.appendChild(A);this.editFormEl.submit()}};function loadFacebookAPI(C){var A,B="facebook-jssdk";if(document.getElementById(B)){return }A=document.createElement("script");A.id=B;A.async=true;A.src="//connect.facebook.net/"+C+"/all.js";document.getElementsByTagName("head")[0].appendChild(A)};

            Comment

            Related Topics

            Collapse

            Working...