Ajax Functions for MyBB?
prince Offline
Junior Member
**
Posts: 2
Joined: Jan 2017
Post: #6
RE: Ajax Functions for MyBB?
here is live demo.

nulledbb.com

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

post code in forum display below {$headinclude}

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<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.";
			// -->

			jQuery(function(){
				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 )
						return;
		
					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( 'https://nulledbb.com/forumdisplayajax.php?fid={fid}&page=' + page, function(data){
						jQuery( '.forumdisplay-major' ).html(data );
						currentPage = page;
						jQuery('html,body').animate({scrollTop: 0}, 'fast');
					});

					e.preventDefault();
				} );
			});
		</script>
		<script src="
https://nulledbb.com/assets/nulled/js/remodal.js"></script>
		<script src="https://cdn.nulledbb.com/jscripts/jeditable/jeditable.min.js"></script>
		<script type="text/javascript" src="https://cdn.nulledbb.com/jscripts/inline_edit.js?ver=1804"></script>


goo to tamplate edit and add code in multipage_page
data-page="{$i}"

like

Code:
<a href="{$page_url}" class="pagination_page" data-page="{$i}"> {$i}</a>

now ponint is
forumdisplayajax.php

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

01-28-2017 01:11 AM
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: