Author |
Topic |
|
Ez4arab
Junior Member
479 Posts |
Posted - 25 June 2002 : 20:06:47
|
i have made this code to display last 10 topic in the forum useing marquee futher HRER is the code:
<!--#INCLUDE FILE="config.asp" --> <!--#INCLUDE FILE="inc_functions.asp" -->
<% Dim sQLQuery Dim count count = "10" sQLQuery = "select FORUM_TOPICS.TOPIC_ID, " & _ " FORUM_TOPICS.T_SUBJECT from FORUM_TOPICS" & _ " ORDER BY FORUM_TOPICS.TOPIC_ID DESC;" Set dataConn = Server.CreateObject("ADODB.Connection") dataConn.Open strConnString Set RSlist = Server.CreateObject("ADODB.recordset") Rslist.Open sqlQuery, dataConn
idirection="right" iscrollamount="3" iSpeed = 100 ' Speed of Marquee (higher = slower) %> <div align="center"><center> <table width="95%" border="1" cellpadding="1" cellspacing="0" style="border-collapse: collapse" bordercolor="<% =strTableBorderColor%>" width="100%" id="AutoNumber1"> <tr> <td width="25%" bgcolor="<%=strHeadCellColor%>" valign="top"><p align="center"><font face="<% =strDefaultFontFace%>" size="<% =strDefaultFontSize %>">ÂÎÑ ÚÔÑ ãæÇÖíÚ Ýí ÇáãäÊÏì</font></p></td> <td width="75%" valign="top"> <% Response.Write "<MARQUEE " & _ "direction='"& idirection &"' scrollamount='"& iscrollamount &"' " & _ "scrolldelay='" & iSpeed & "' "& vbNewline
Do While Not RSlist.EOF AND count < "5"
Response.Write "<font face='" & strDefaultFontFace & "' size='" & strDefaultFontSize & "'>" & _ "<a href=""topic.asp?TOPIC_ID=" & RSlist("TOPIC_ID") & " "" " & " class=""pageLinks"" > " & RSlist("T_SUBJECT") & "</a> *** </font>" & vbNewline
'increment count count = count + 1
RSlist.Movenext Loop Response.Write "</MARQUEE>" & vbNewline %> </td> </tr> </table> </center> </div>
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 26 June 2002 : 22:18:04
|
Tried it out, and it's a nice little mod. First thing that it needs though is to check access to a topic before displaying it.
I'm just curious about that marquee tag, since I've never seen it. Anyone know how widely supported it is?
It also might be interesting to do a version that displays active topics, rather than the last 10. Certainly not a database hit you'd want to put on every page, but perhaps your homepage.
The table design strays from the Snitz standard tables (uses border instead of 1 pixel cellpadding), and your <table> tag contains more than one width attribute.
Edited by - Dan Martin on 26 June 2002 22:24:24 |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 27 June 2002 : 00:17:15
|
marquee is a proprietary IE tag. this code needs a browser check otherwise it is really going to screw up in Netscape, Opera and Mozilla.
http://www.nineinchnailz.com
Edited by - dayve on 27 June 2002 00:20:25 |
|
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 27 June 2002 : 04:12:01
|
you might also want to make the suggestions bt ruirib in this topic, regarding count, the code seems very similar so i think it should apply to this.
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=30099
I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day. --Frank Sinatra
Edited by - Hamlin on 27 June 2002 06:28:45 |
|
|
Ez4arab
Junior Member
479 Posts |
Posted - 27 June 2002 : 19:50:08
|
quote:
marquee is a proprietary IE tag. this code needs a browser check otherwise it is really going to screw up in Netscape, Opera and Mozilla.
i have made surfy to my users i get this result from 1000 members 90% IE 5 % NS 2 % Opera 3 % other
i see most of my users uesd IE.
quote: you might also want to make the suggestions bt ruirib in this topic, regarding count, the code seems very similar so i think it should apply to this.
i like your code to diplay the topic so that i made modify to your code to display topic in marquee.
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 27 June 2002 : 22:20:40
|
quote:
quote:
marquee is a proprietary IE tag. this code needs a browser check otherwise it is really going to screw up in Netscape, Opera and Mozilla.
i have made surfy to my users i get this result from 1000 members 90% IE 5 % NS 2 % Opera 3 % other
i see most of my users uesd IE.
quote: you might also want to make the suggestions bt ruirib in this topic, regarding count, the code seems very similar so i think it should apply to this.
i like your code to diplay the topic so that i made modify to your code to display topic in marquee.
we all know IE is the most popular browser, but you should still include a routine to bypass this feature if the browser is NOT IE...
http://www.nineinchnailz.com |
|
|
|
Topic |
|