PHP Manşet Tarzı Gösterim
-
Merhaba , aşağıda çekip listelediğim verileri manşet slider şeklinde nasıl gösterbelirim, haber sitelerinde olan şekiller gibi göstermek istiyorum
<table width="460" cellpadding="0" cellspacing="0">
<tr>
<?
$resultNews=mysql_query("SELECT haber_id,images_id,haber_baslik,haber_tanitim FROM haber_list WHERE categories_root ='3' AND haber_status='0' ORDER BY haber_tarih DESC LIMIT 2");
while ($dataNews=mysql_fetch_object($resultNews)){
?>
<td width="220" valign="top"><img class="haberimg" alt="<?=stripslashes($dataNews->haber_baslik)?>" src="images.php?src=/images/haber/<?=$dataNews->images_id?>.jpg&h=100&w=225&zc=1"/><a href="<?=SEO($dataNews->haber_baslik).'-'.$dataNews->haber_id.'h.htm'?>"><b><?=stripslashes($dataNews->haber_baslik)?></b><br><?=stripslashes($dataNews->haber_tanitim)?></a></td>
<?
}
?>
</tr>
</table>
-
Php kodunu verdiğim linkteki manşet tasarımlarından birine giydirmen yeterli
http://www.pcgazete.com/ajax-manset-haber-sistemleri-1_h61.html
-
Bir tanesini indirdim şimdi, ama döngüye sokacağım için 1nci den sonrasını silmem gerekiyor. İşte burada zorlanıyorum
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9" />
<title>Ajax Manşet Haber Sistemi</title>
<LINK rev=stylesheet media=all href="css/news.css" type=text/css rel=stylesheet>
</head>
<body><div align="center">
<SCRIPT language=javascript>
var CurrentHotScreen = 0 ;
function setHotQueryList(screen){
var Vmotion = "forward" ;
var MaxScreen = 7 ;
if (screen >= MaxScreen) {
screen = 0 ;
Vmotion = "reverse" ;
}
cleanallstyle();
document.getElementById("focus_"+screen).className = "up" ;
if(null!=hot_query_td.filters){
hot_query_td.filters[0].apply();
hot_query_td.filters[0].motion = Vmotion;
}
for (i=0;i<MaxScreen;i++) {
document.getElementById("switch_"+i).style.display = "none" ;
}
document.getElementById("switch_"+screen).style.display = "block" ;
if(null!=hot_query_td.filters){
hot_query_td.filters[0].play();
}
CurrentHotScreen = screen ;
}
function refreshHotQuery(){
refreshHotQueryTimer = null;
setHotQueryList(CurrentHotScreen+1);
refreshHotQueryTimer = setTimeout('refreshHotQuery();', 5000);
}
</SCRIPT>
<DIV class=newsMain>
<DIV class=topNewsBox>
<DIV class=topNews>
<DIV class=topNewsPic>
<TABLE>
<TBODY>
<TR>
<TD id=HotSearchList
style="FILTER: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.25,wipestyle=0,motion=forward)">
<DIV id=switch_0><A onclick=setClick();
href="http://www.pcgazete.com/"
blockid="931" target="_blank"><IMG alt="Haber Resim 1"
src="images/01.jpg"></A></DIV>
<DIV id=switch_1><A onclick=setClick();
href="http://www.pcgazete.com/"
blockid="931" target="_blank"><IMG alt="Haber Resim 2"
src="images/02.jpg"></A></DIV>
<DIV id=switch_2><A onclick=setClick();
href="http://www.pcgazete.com/"
blockid="931" target="_blank"><IMG alt="Haber Resim 3"
src="images/03.jpg"></A></DIV>
<DIV id=switch_3><A onclick=setClick();
href="http://www.pcgazete.com/"
blockid="931" target="_blank"><IMG alt="Haber Resim 4"
src="images/04.jpg"></A></DIV>
<DIV id=switch_4><A onclick=setClick();
href="http://www.pcgazete.com/"
blockid="931" target="_blank"><IMG alt="Haber Resim 5"
src="images/05.jpg"></A></DIV>
<DIV id=switch_5><A onclick=setClick();
href="http://www.pcgazete.com/"
blockid="931" target="_blank"><IMG alt="Haber Resim 6"
src="images/06.jpg"></A></DIV>
<DIV id=switch_6><A onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931"><IMG alt="Haber Resim 7"
src="images/07.jpg"></A></DIV></TD></TR></TBODY></TABLE></DIV>
<DIV class=topNewsList>
<img src="images/jrjd.jpg" width="253" height="25" />
<UL>
<LI><A class=up id=focus_0 onmouseover=show_focus_image(0);
title="Haber Başlık 1" onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 1</A> </LI>
<LI><A id=focus_1 onmouseover=show_focus_image(1); title="Haber Başlık 2"
onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 2</A> </LI>
<LI><A id=focus_2 onmouseover=show_focus_image(2); title="Haber Başlık 3"
onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 3</A> </LI>
<LI><A id=focus_3 onmouseover=show_focus_image(3); title="Haber Başlık 4"
onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 4</A> </LI>
<LI><A id=focus_4 onmouseover=show_focus_image(4); title="Haber Başlık 5"
onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 5</A> </LI>
<LI><A id=focus_5 onmouseover=show_focus_image(5); title="Haber Başlık 6"
onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 6</A> </LI>
<LI><A id=focus_6 onmouseover=show_focus_image(6); title="Haber Başlık 7"
onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 7</A> </LI></UL></DIV></DIV>
<DIV class=topNewsBg></DIV></DIV>
<SCRIPT>
function cleanallstyle() {
for (i=0;i<7;i++) {
document.getElementById("focus_"+i).className = "" ;
}
}
function show_focus_image(index) {
clearTimeout(refreshHotQueryTimer);
setHotQueryList(index);
refreshHotQueryTimer = setTimeout('refreshHotQuery();', 5000);
}
function setClick() {
clearTimeout(refreshHotQueryTimer);
}
var refreshHotQueryTimer = null ;
var hot_query_td = document.getElementById('HotSearchList');
setHotQueryList(CurrentHotScreen);
refreshHotQueryTimer = setTimeout('refreshHotQuery();', 5000);
</SCRIPT></DIV>
</div>
</body>
</html>
-
Nereyi silmen gerekiyor hacı anlamadım döngüye aşağıdaki kodu sok, değişkenlerini yazmayı unutma.
---- Döngü İçi Başlangıç -------
<DIV id=switch_0><A onclick=setClick();
href="http://www.pcgazete.com/"
blockid="931" target="_blank"><IMG alt="Haber Resim 1"
src="images/01.jpg"></A></DIV>
---- Döngü İçi Bitiş -------
</TD></TR></TBODY></TABLE></DIV>
<DIV class=topNewsList>
<img src="images/jrjd.jpg" width="253" height="25" />
<UL>
---- Döngü İçi Başlangıç -------
<LI><A class=up id=focus_0 onmouseover=show_focus_image(0);
title="Haber Başlık 1" onclick=setClick();
href="http://www.pcgazete.com/" target="_blank"
blockid="931">Haber Başlık 1</A> </LI>
---- Döngü İçi Bitiş -------
</UL></DIV></DIV>
Geri kalan kodları olduğu gibi yaz. Göz kararı yaptım denemedim ama olması lazım bu şekilde
-
yardımın için çok teşekkür ederim dostum
-
bu konu lazım olacak bana ileride. Bir çizik atayım.
