Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Twitter Style Load More Results with jQuery and Ajax

Hi all.
How I can make it instead of makepagenav function in maincore.php?


You can help to me?
You cannot achieve this, just by editing maincore.php. You need to code different php files which will be used to Retrieve the more content.

In your example, the file ajax_more.php is used to fetch more content. You will need to make files similar to this fore news, threads, etc...
Someone had a similar request on Romanian NSS a while ago.

Here is an improve version of that solution:
- add this code to a panel. Due to markup, on some themes this might not work, however it works on all themes build by Matonor, like Aer, Atlantis, Phos etc. and any other themes that follows more or less the same markup like Ddraig or Eriksson, haven't tested any other themes.
The code can be developed to be compatible with other areas of the site too.
The only "bad" thing this solution is that you'll still be downloading the whole page and not just the necessary data.

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]// AJAX news and forum
@header("Content-type: text/html; charset=".$locale['charset'].""wink;
$siteurl = $settings['siteurl'];

$page = FUSION_SELF;
$id = "";
$script = "";
if ($page == "news.php"wink {
$id = $page."?rowstart=";
$script = "1";
} elseif ($page == "viewforum.php"wink {
$id = "forum/".$page."?forum_id=";
$script = "1";
} elseif ($page == "viewthread.php"wink {
$id = "forum/".$page."?thread_id=";
$script = "1";
if (!empty($script)) {
add_to_footer("<script type='text/javascript'>
jQuery('.pagenav a'wink.live('click', function(e){
var el = this;
$('body'wink.append(\"<img class='aloader' style='background-color: #fff; box-shadow: 0 0 26px #444; padding: 4px 20px; position: fixed; top: 0; left: 50%;' src='".IMAGES."ajaxloader.gif' />\"wink;

var parts = el.href.split('='wink;
var trgt = parts[1] + '=';
var row = parts[2];
if (!row) {
var trgt = parts[1];
var row = '';
$('#main-bg'wink.load('".$siteurl.$id."' + trgt + row + ' #container', function() {
$('html, body'wink.animate({scrollTop:0}, 200);
Loader image, place it in images/ folder www.php-fusion.co.uk/forum/attachments/ajaxloader.gif
JoiNNN attached the following file:
ajaxloader.gif [723Bytes / 18 Downloads]
Thread Information
3 posts
3296 times
Last Post
Last updated on 7 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Mehmet, Ankur, JoiNNN