Merhaba. Örnek resimdeki sarı yazı ile yazılan yere haber başlığını nasıl yazdırabilirim. Gazete sitelerindeki gibi haberlerin üzerine gelince resimle beraber yazıda değişecek. Teşekkürler. Elimdeki koda aşağıdaki gibidir.
http://img57.resimup.net/di/7DWP.jpg
<div class="content_sep"></div><div class="headline_container"><div class="headline"><div class="headline_1_container"><div class="image"><a id="news_link" href=""><img id="news_image" src="images/1x1.gif" alt=""/></a></div><div class="title"><a id="news_title"></a></div><div id="news_arrow" class="arrow"></div><div class="other"><?php
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline' and haber_aktif='yes' order by haber_tarih desc limit 10");
$i=0;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
$basliklink = permayap($haber_baslik);
if ($haber_video != "") {
$vhaber_baslik = "$haber_baslik <font color=#FF0>(Video)</font>"; }
else {
$vhaber_baslik = $haber_baslik;
}
echo "<div class=\"item\"><div class=\"item_image\"><a href=\"haber-$haber_id-$basliklink.html\" onmouseover=\"HD_jumpTo(".$i.")\" onmouseout=\"return HD_forwClick()\" title=\"$haber_baslik\"><img id=\"news_image\" src=\"images_up/$haber_manset_resim\" alt=\"$haber_baslik\" title=\"$haber_baslik\"/></a></div></div>";
$i++;
endwhile;
?></div><div class="other_2"><?php
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline' and haber_aktif='yes' order by haber_tarih desc limit 5,5");
$i=5;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
$basliklink = permayap($haber_baslik);
if(strlen($haber_baslik)>40){
$haber_baslik="".substr($haber_baslik,0,40)."";
}
if ($haber_video != "") {
$vhaber_baslik = "$haber_baslik <font color=#FF0>(Video)</font>"; }
else {
$vhaber_baslik = $haber_baslik;
}
echo "<div class=\"item\"><a href=\"haber-$haber_id-$basliklink.html\" onmouseover=\"HD_jumpTo(".$i.")\" onmouseout=\"return HD_forwClick()\" title=\"$haber_baslik\">$vhaber_baslik</a></div>";
$i++;
endwhile;
?></div><div class="all_link2"><a href="son24saat.html" title=""><img src="images/1x1.gif" alt=""></a></div></div><div style="display: none; position: absolute: left: -1000; top: -1000;"><?php
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline' and haber_aktif='yes' order by haber_tarih desc limit 0,10");
$i=1;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
echo "<img src=\"images_up/$haber_manset_resim\" alt=\"$haber_baslik\" title=\"$haber_baslik\"/>";
$i++;
endwhile;
?></div><script src="js/headline.js"></script><script><?php
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline' and haber_aktif='yes' order by haber_tarih desc limit 0,10");
$i=0;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
echo "HD_idList[$i] = \"$haber_manset_resim\";";
$i++;
endwhile;
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline' and haber_aktif='yes' order by haber_tarih desc limit 0,10");
$i=0;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
echo "HD_titleList[$i] = \"\";";
$i++;
endwhile;
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline' and haber_aktif='yes' order by haber_tarih desc limit 0,10");
$i=0;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
echo "HD_imageList[$i] = \"$haber_manset_resim\";";
$i++;
endwhile;
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline' and haber_aktif='yes' order by haber_tarih desc limit 0,10");
$i=0;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
$basliklink = permayap($haber_baslik);
echo "HD_seoList[$i] = \"haber-$haber_id-$basliklink.html\";";
$i++;
endwhile;
?>HD_forwClick();</script></div>
<div class="tabs"><div class="headline_other"><div class="first_item"><?php
$satirsay=0;
$satirsor=mysql_query("select * from haber_haberler where haber_tur='headline_other' and haber_aktif='yes' order by haber_tarih desc limit 2");
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline_other' and haber_aktif='yes' order by haber_tarih desc limit 2");
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
$basliklink = permayap($haber_baslik);
if($satirsay % 2 == 0){
$inner1="first";
$inner11="first_inner";
}
else {
$inner1="second";
$inner11="second_inner";
}
echo"
<div class=\"$inner1\"><div class=\"$inner11\"><div class=\"image\"><a href=\"haber-$haber_id-$basliklink.html\" title=\"$haber_baslik\"><img src=\"images_up/$haber_ic_resim\" alt=\"$haber_baslik\" title=\"$haber_baslik\"/></a></div><div class=\"title\"><a href=\"haber-$haber_id-$basliklink.html\" title=\"$haber_baslik\">$haber_baslik</a></div></div></div>";
endwhile;
?></div><?php
$hbsorgu=mysql_query("select * from haber_haberler where haber_tur='headline_other' and haber_aktif='yes' order by haber_tarih desc limit 2,9");
$i=1;
while($hsatir=mysql_fetch_array($hbsorgu)):
$haber_id="$hsatir[0]";
$haber_kategori="$hsatir[1]";
$haber_baslik="$hsatir[2]";
$haber_paragraf="$hsatir[3]";
$haber_metni="$hsatir[4]";
$haber_etiket="$hsatir[5]";
$haber_kaynak="$hsatir[6]";
$haber_rating="$hsatir[7]";
$haber_tarih="$hsatir[8]";
$haber_manset_resim="$hsatir[9]";
$haber_ic_resim="$hsatir[10]";
$haber_tur="$hsatir[11]";
$haber_video="$hsatir[12]";
$haber_aktif="$hsatir[13]";
$basliklink = permayap($haber_baslik);
if ($haber_video != "") {
$vhaber_baslik = "$haber_baslik <font color=#900>(Video)</font>"; }
else {
$vhaber_baslik = $haber_baslik;
}
echo" <div class=\"item\"><a href=\"haber-$haber_id-$basliklink.html\" title=\"$haber_baslik\">$vhaber_baslik</a></div>";
$i++;
endwhile;
?></div></div></div>
Zaman
2012-12-05 22:37:30Php PHP MANŞET HABER