köşe yazarı problem... - Google Fan Webmaster Forum
Google Fan Webmaster Forum  
herşeyi sana yazdım

Geri git   Google Fan Webmaster Forum > Server Side Programlama > ASP
KEY
Kayıt ol Articles Sosyal Gruplar Forumları Okundu Kabul Et

ASP Script sorunları yardım paylaşım bölümü

Cevapla
 
LinkBack Seçenekler
  1  
Alt 27-11-2008, 16:23:37
 
Standart köşe yazarı problem...

merhaba öncelikle yapmaya çalıştığım olayı anlatayım. bazı sitelerde örneğin internethaber.com daki gibi yazar kısmını yapmaya çalışıyorum. lakin yeni bir kayıt girildiğinde aynı yazardan sayfadan ikinci bir defa çıkıyor yazının id leri farklı olmasına rağmen nasıl çözebiliriz acaba o kosmın kodlamasını aşağıdaki gibi...

<div id="scriptmenu">
<%
Set zec = Server.CreateObject("ADODB.Recordset")
sql = "Select * from zecyazi where Onay=1 order by sira"
zec.Open sql,ObjCon_ilet,1,3
%>
<%
do while not zec.eof
%>

<table width="100%"class="mnu" bordercolor="#FFFFFF" border="1" cellspacing="0" cellpadding="1" style="border-collapse:collapse">
<tr bgColor="#F2F2F2" onMouseOver="bgColor='#FF9240'" onMouseOut="bgColor='#F2F2F2'">
<td class="mnutbl2" valign="middle">

<font size="3">
<%
sira=zec("sira")
top=1
%>
<%Set sql = ObjCon_ilet.Execute("select TOP "&top&" * from zecyazi where onay=1 and sira=" & sira & " Order by yaziid desc" )%>
<a href="haber_oku.asp?yaziid=<%=zec("yaziid")%>" onMouseover="changetext(icerik[1]);changetext1(icerik2[1])"><FONT color="black" face="Verdana" style="font-size: 8pt"><%=zec("yazarismi")%></FONT></a>

</td>
</tr>
</table>
<%
If not sql.Eof Then
sql.Movenext
End If
%>

<%
zec.movenext
Loop
%></div>


her ihtimale karşı db si ile birlikte 2 mb olduğu için kendi siteme rarlı dosya olarak upload ettim. yardımlarınız için şimdiden teşekkürler.

http://www.aksarayguncel.com/upload/ykose.rar
Alıntı ile Cevapla
  2  
Alt 27-11-2008, 17:24:09
 
Standart

ben tam olarak anlıyamadım

örnek adres gösterirsen yardımcı olmya calısırım
Alıntı ile Cevapla
  3  
Alt 27-11-2008, 20:49:05
 
Standart

örnek olarak internethaber.com adresinde yer alan köşe yazarı sistemini yapmaya çalışıyorum.


<!-- #include file="dbyegit.asp"-->

<LINK href="zitil.css" type=text/css
rel=stylesheet>

<style type="text/css">
<!--
.style1 {
font-size: 9px;
font-weight: bold;
color: #FF0000;
}
.style3 {font-size: 9px; font-weight: bold; font-family: Tahoma;}
-->
</style>
<script type="text/javascript">

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

</script>

<script language="JavaScript">
function openWin(theURL,winName,features) {
window.open(theURL,winName,features);
}

// -->
</script>
<%
Set zec1 = Server.CreateObject("ADODB.Recordset")
sql1 = "Select * from zecyazi where Onay=1 order by yaziid desc"
zec1.Open sql1,ObjCon_ilet,1,3
baslik=zec1("yazarismi")
kisa=zec1("yazibaslik")
hyazarresim=zec1("yazarresim")
%>
<script>
<!--

/*
Textual Tooltip Script-
© Dynamic Drive (Dynamic Drive DHTML(dynamic html) & JavaScript code library)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/


var icerik=new Array()
<%
Set mesax = Server.CreateObject("ADODB.Recordset")
sql = "Select * from zecyazi where Onay=1 order by yaziid desc"
mesax.Open sql,ObjCon_ilet,1,3
%>
<%
i=0
do while i < 10 and not mesax.eof
%>
icerik[<%=i%>]='<br><center><font color="Black" style="font-size: 8pt"><b><%=mesax("yazarismi")%></font></b></center><br><center><font color="Black" style="font-size: 8pt"><%=left(mesax("yazibaslik"),25)%>'
<%
mesax.movenext
i=i+1
Loop
%>
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
appear()
setTimeout("window.onresize=regenerate",450)
}
}

function changetext(whichcontent){

if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptions"):document.a ll.descriptions
cross_el.innerHTML='<font face="Verdana"><small>'+whichcontent+'<font></small>'
}
else if (document.layers){
document.d1.document.d2.document.write('<font face="Verdana"><small>'+whichcontent+'</small></font>')
document.d1.document.d2.document.close()
}

}

function appear(){
document.d1.visibility='show'
}


//-->
</script>
<script>
<!--

/*
Textual Tooltip Script-
© Dynamic Drive (Dynamic Drive DHTML(dynamic html) & JavaScript code library)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/


var icerik2=new Array()
<%
Set zec00 = Server.CreateObject("ADODB.Recordset")
sql00 = "Select * from zecyazi where Onay=1 order by yaziid desc"
zec00.Open sql00,ObjCon_ilet,1,3
%>
<%
i=0
do while i < 10 and not zec00.eof
%>
icerik2[<%=i%>]='<img border="1" src="<%=zec00("yazarresim")%>" width="110" height="150">'
<%
zec00.movenext
i=i+1
Loop
%>
function regenerate1(){
window.location.reload()
}
function regenerate3(){
if (document.layers){
appear1()
setTimeout("window.onresize=regenerate1",450)
}
}

function changetext1(whichcontent){

if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptionsa"):document. all.descriptionsa
cross_el.innerHTML='<font face="Verdana"><small>'+whichcontent+'<font></small>'
}
else if (document.layers){
document.d3.document.d4.document.write('<font face="Verdana"><small>'+whichcontent+'</small></font>')
document.d3.document.d4.document.close()
}

}

function appear1(){
document.d3.visibility='show'
}


//-->
</script>



<body onLoad="regenerate3();regenerate2();goforit()">
<CENTER><script LANGUAGE="JavaScript">
function CC_noErrors() {
return true;
}

window.onerror = CC_noErrors;
</script>

<table border="0" width="22%">
<tr>
<td colspan="2">Köşe Yazarı</td>
</tr>
<tr>
<td rowspan="2" width="55%" valign="top">

<div id="scriptmenu">
<%
Set zec0 = Server.CreateObject("ADODB.Recordset")
sql0 = "Select * from zecyazi "
zec0.Open sql0,ObjCon_ilet,1,3
%>
<%
i=0
do while i < 5 and not zec0.eof
%>

<table width="100%"class="mnu" bordercolor="#FFFFFF" border="1" cellspacing="0" cellpadding="1" style="border-collapse:collapse">
<tr bgColor="#F2F2F2" onMouseOver="bgColor='#FF9240'" onMouseOut="bgColor='#F2F2F2'">
<td class="mnutbl2" valign="middle">

<font size="3">

<%
sira=zec0("sira")
top=1
%>
<%Set sql0 = ObjCon_ilet.Execute("select TOP "&top&" * from zecyazi where onay=1 and sira=" & sira & " Order by yaziid desc" )%>
<a href="haber_oku.asp?yaziid=<%=zec0("yaziid")%>" onMouseover="changetext(icerik[<%=i%>]);changetext1(icerik2[<%=i%>])"><FONT color="black" face="Verdana" style="font-size: 8pt"><%=zec0("yazarismi")%></FONT></a>
</td>
</tr>
</table>
<%
zec0.movenext
i=i+1
Loop
%></div>

</td>
<td width="40%" valign="top">
<p align="center">
<ilayer name="d3" id="d3" width="110" height="140" visibility="hide">
<layer id="d4" height="165">
<div id="descriptionsa" align="center" height="165">
<img border="1" src="<%=hyazarresim%>" width="110" height="150">
</div>
</layer>
</ilayer>
</td>
</tr>
<tr>
<td width="40%" height="73" valign="top" background="yazarresim/kosevar.gif">
<ilayer name="d1" id="d1" width="500" height="120" visibility="hide">
<layer id="d2" width="100%" height="120">
<div id="descriptions">
<center>
<b>
<br>
<font color="black" face="Verdana" style="font-size: 8pt"><%=baslik%> </font>
</b>
</center><br>
<p align="center"><font face="Verdana" style="font-size: 8pt"><%=kisa%>
</font> </div>
</layer>
</ilayer>
</td>
</tr>
</table>

</body>

</html>

sayfanın kodlama bölümü bura. olay örnek verdiğim sitedede olduğu gibi yazarın ismi ve soyismi sol tarafa sabitlemeye çalışıyorum lakin aynı yazarın ikinci bir yazısı eklendiğinde tekrardan ikinci bir yazıyı yine isim ve soy isim olarak yayınlıyor. bir önceki mesajda link duruyor.
Alıntı ile Cevapla
Cevapla


Bookmarks

Seçenekler

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Kapalı
Refbacks are Açık



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 09:15:59.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

“İnsanların en hayırlısı, insanlara faydalı olandır”. H.Ş

Hosting by Radore Hosting

İçerik sağlayacı paylaşım sitelerinden biri olan R10.net WebMaster Forum Adresimizde 5651 Sayılı Kanun’un 8. Maddesine ve T.C.K’nın 125. Maddesine göre TÜM ÜYELERİMİZ yaptıkları paylaşımlardan sorumludur. R10.net hakkında yapılacak tüm hukuksal Şikayetler adresi ile iletişime geçilmesi halinde ilgili kanunlar ve yönetmelikler çerçevesinde en geç 1 (Bir) Hafta içerisinde R10.net yönetimi olarak tarafımızdan gereken işlemler yapılacak ve Avukatlarımız size dönüş yapacaktır.
ARGUS_OK

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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252