Latest Shouts In The Shoutbox -- View The Shoutbox · Rules
  


  Reply to this topicCreate New TopicCreate New Poll

 Ajax Sign In/Sign Out, Official Plugin
gunblaza
 Posted: Nov 10 2011, 02:21 PM
Quote
Custom title
Admin
92 Posts
Joined 5-August 11


Ajax Sign In/Sign Out
This Shift Plugin removes the redirect pages for Shift's quick sign in feature and for signing out.

Installation
Place the following code above "<div id='overlay'></div>".
CODE
 <script>
 /* Shift Skin Framework [Official Plugin]
  * Ajax Sign In/Sign Out
  * http://shift.b1.jcink.com
  */
 
 Shift.plugin.ajaxSignIn = {
  init: function() {
   $(function() {
    $("#popup-login form").submit(function(e){
     e.preventDefault();
     Shift.plugin.ajaxSignIn._in();
    });
    $("#userbar .signout").click(function(e){
     e.preventDefault();
     Shift.plugin.ajaxSignIn._out();
    });
   });
  },
  _in: function(){
   var _username = $('#popup-login form input[name=UserName]').val(),
    _password = $('#popup-login form input[name=PassWord]').val();
   
   if(!_username || !_password){
    Shift.func.notice("Incorrect Username or Password.");
   } else {
    $.post("index.php?act=Login&CODE=01&CookieDate=1", $("#popup-login form").serialize(), function(data){
     if(!$('.pformstrip:contains("The following errors were found")',data).length){
      location.reload();
     } else {
      Shift.func.notice("Incorrect Username or Password.");
     }
    });
   }
  },
  _out: function(){
   $.post("index.php?act=Login&CODE=03&key="+ Shift.globals["auth_key"], function(data){
    location.reload();
   });
  }
 };
 Shift.plugin.ajaxSignIn.init();
 </script>


Updates
N/A

Please register to report bugs or post feedback. Thank you.


This is my signature
PM
GMaster479
 Posted: Apr 16 2012, 03:53 PM
Quote
Newbie
Developer
4 Posts
Joined 7-October 11


Gun, this one isn't working for me I am sorry to say.
PM
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Plugins | Next Newest »

Topic Options Reply to this topicCreate New TopicCreate New Poll