BatuhanUyar adlı üyeden alıntı

index.php kodları


include('mysql.php');
$last_msg_id=$_GET['last_msg_id'];
$action=$_GET['action'];

if($action <> "get")
{
?>

<script></script>
<script>
$(document).ready(function()
{
function last_msg_funtion()
{
var ID=$(".message_box:last").attr("id");
$('div#last_msg_loader').html('');
$.post("scroll.php?action=get&amp;amp;last_msg_id="+ID,

function(data){
if (data != "") {
$(".message_box:last").after(data);
}
$('div#last_msg_loader').empty();
});
};

$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
last_msg_funtion();
}
});
});
</script>
blogkenti.Com - Scroll Load Demo



//Include load_first.php
$sql=$dba->query("SELECT ID,post_title,post_name FROM wp_posts WHERE post_status='publish' ORDER BY ID DESC LIMIT 25");
while($row=$dba->fetch_array($sql))
{
$msgID= $row['ID'];
$msg= $row['post_title'];
$link=$row['post_name'];
?>



}

?>

}else{
include('scroll.php'); //include load_second.php
}
$dba->close();
?>

&nbsp;



scroll.php kodları

include('mysql.php');
$last_msg_id=$_GET['last_msg_id'];
$sql=$dba->query("SELECT * FROM wp_posts WHERE ID<'$last_msg_id' and post_status='publish' ORDER BY ID DESC LIMIT 5");
$last_msg_id="";
while($row=$dba->fetch_array($sql))
{
$msgID= $row['ID'];
$link=$row['post_name'];
$msg= $row['post_title'];
?>



}
$dba->close();
?>


Kendine göre düzenle


ben bunları anlayacak seviyede değilim dostum sağol yine de..