Ajax Functions for MyBB?
Destro Offline
Junior Member
**
Posts: 39
Joined: Nov 2012
Post: #1
Ajax Functions for MyBB?
Hi.

As the title, I want to ask that

"Is this possible to create some Ajax functions for MyBB like Ajax Login, Ajax Pagination ?"


1. MyBB Ajax Login

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var username = $("input#username").val();
var password = $("input#password").val();  

function make_base_auth(user, password) {
  var tok = user + ':' + password;
  var hash = btoa(tok);
  return "Basic " + hash;
}
$.ajax
  ({
    type: "POST",
    url: "member.php",
    dataType: 'json',
    async: false,
    data: '{}',
    beforeSend: function (xhr){
        xhr.setRequestHeader('Authorization', make_base_auth(username, password));
    },
    success: function (){
        alert('Logged In!');
    }
});


Please check above code, did I miss anything?


2. MyBB Ajax Pagination

Any suggestion for this?

(This post was last modified: 05-12-2013 07:14 PM by Destro.)
05-12-2013 07:14 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Ajax Functions for MyBB? - Destro - 05-12-2013 07:14 PM
RE: Ajax Functions for MyBB? - Jonatthu - 05-13-2013, 04:12 AM
RE: Ajax Functions for MyBB? - ZiNgA BuRgA - 05-13-2013, 11:49 AM
RE: Ajax Functions for MyBB? - Destro - 05-14-2013, 03:02 AM
RE: Ajax Functions for MyBB? - leefish - 05-13-2013, 09:42 PM
RE: Ajax Functions for MyBB? - prince - 01-28-2017, 01:11 AM
RE: Ajax Functions for MyBB? - Alson - 09-12-2017, 09:12 PM

 Standard Tools
Forum Jump: