Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 display last 10 topic in marquee bar
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ez4arab
Junior Member

479 Posts

Posted - 25 June 2002 :  20:06:47  Show Profile  Visit Ez4arab's Homepage
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  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
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
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 27 June 2002 :  00:17:15  Show Profile  Visit dayve's Homepage
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
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 27 June 2002 :  04:12:01  Show Profile
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
Go to Top of Page

Ez4arab
Junior Member

479 Posts

Posted - 27 June 2002 :  19:50:08  Show Profile  Visit Ez4arab's Homepage
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.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 27 June 2002 :  22:20:40  Show Profile  Visit dayve's Homepage
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07