Not Solved MyBB Ajax Pagination showforum.php showthread.php
Not Solved
This user has been denied support. This user has been denied support.

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

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;
    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?
i have find workng tut in mybb
here is live demo.

i have find this tut.
but i have not good knowledge in php and i cant make it fully.

post code in forum display below {$headinclude}

<script type="text/javascript">
				lang.no_new_posts = "Forum Contains No New Posts";
			lang.click_mark_read = "Click to mark this forum as read";
			lang.inline_edit_description = "(Click and hold to edit)";
			lang.post_fetch_error = "There was an error fetching the posts.";
			// -->

				var currentPage = 1, page, totalPages = Math.ceil( 656 / 20 );
				jQuery(document).on( 'click', '.pages a', function(e){
					page = jQuery( this ).attr( 'data-page' );

					if( currentPage == page || page > totalPages )
					jQuery( '.overlay' ).fadeIn().css({ 'width': jQuery( '.forumdisplay-major .pagination-top + .wrapper' ).width(), 'height': jQuery( '.forumdisplay-major .pagination-top + .wrapper' ).height() });
					jQuery( '.spinner' ).fadeIn();//.css({ 'margin-top': jQuery( '.forumdisplay-major .wrapper' ).width()/2 - 50 });
					jQuery.get( '{fid}&page=' + page, function(data){
						jQuery( '.forumdisplay-major' ).html(data );
						currentPage = page;
						jQuery('html,body').animate({scrollTop: 0}, 'fast');

				} );
		<script src=""></script>
		<script src=""></script>
		<script type="text/javascript" src=""></script>

goo to tamplate edit and add code in multipage_page


<a href="{$page_url}" class="pagination_page" data-page="{$i}"> {$i}</a>
now ponint is

i cant make it if anyone can make this forumdisplayajax.php so it will working perfectly.

can anyone help to complete this awesome funtion
Not Solved

The MyBB Group offers support under the conditions of our Support Eligibility policy. It is apparent that one or more of your forums do not meet the conditions of our policy and therefore you are ineligible for support. This could be because of adult, piracy or hacking related content or because your forum does not display the minimum “Powered by MyBB” notice.

If you have any questions regarding this policy please post in the Private Inquiries forum.

The MyBB Group.

Please do not PM me for support. I am looking to be hired for paid services.

You can view my paid services here.

Forum Jump:

Users browsing this thread: 1 Guest(s)