Author |
Topic |
|
fpgal
New Member
93 Posts |
Posted - 17 June 2002 : 21:49:22
|
While searching through the forum for anything on the subject of marquee or ticker displays of latest topics, I found links to this site.
Forum: http://www.saintpaulweb.net/spw/forum/events.asp Marquee on home page: http://www.saintpaulweb.net
This person has somehow managed to call a set of the most recent events from the Events Calendar and placed it in a very cool vertical marquee on their front page. Does anyone know how to do this? Or where they got the code? I want to use it for the main page of my News database.
Thanks!
fpgal
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 June 2002 : 00:14:52
|
depending on your coding capabilities, there are a lot of free scroller scripts at http://www.dynamicdrive.com that can somewhat easily be incorporated to read the database and accomplish this. if you don't have an answer in one week (because I am leaving town tomorrow) I will gladly make this mod for you.
I would first try ruirib's recommendation. the snitz community is known for sharing source code freely.
http://www.nineinchnailz.com |
|
|
fpgal
New Member
93 Posts |
Posted - 18 June 2002 : 15:56:02
|
Wow! Nice offer, Dayve! Thanks! I don't have the skill to force it to do it myself. I tried that first. My recent SQL experiences have taught me that I need to study how those database calls work in depth! LOL!!!
I'll try emailing them first, though, before taking you up on your offer. They just happen to be French and I am not terribly fluent in it. Well, maybe I'll get lucky and they will also speak English. Enjoy your trip!
fpgal
|
|
|
hubert
Starting Member
7 Posts |
Posted - 20 June 2002 : 06:43:07
|
Hello Fpgal,
I can speak chinese also..
Here is the code below
1)ASP Code <% ' The following is the code for the scrolling news ticker. This will only work on a IIS server and IE browsers. Netscape users will still see the news, but it will not scroll. Dim sTxt, iSpeed, iTop, iLeft, iWidth, iHeight, sHtml1, sHtml2, sHtml4, strSQL,sMarquee Dim conCurrent Dim rstCurrent Set conCurrent = CreateObject("ADODB.Connection") Set rstCurrent = Server.CreateObject("ADODB.Recordset") conCurrent.Open "Driver={Microsoft Access Driver (*.mdb)};" & _ "DBQ= your_path_to_Db\forum_2000.mdb" strSQL = "SELECT * FROM Rqevents" Set rstCurrent = conCurrent.Execute(strSQL) sHtml1 = "<br><B><FONT SIZE='1' face='Arial, Helvetica, sans-serif' COLOR='Black'>" sHtml2 = "<A HREF='forum/events.asp?date=" sHtml3 = "'>" sHtml4 = "</A></FONT></B>" sTxt = "" rstCurrent.movefirst do while not rstCurrent.eof 'I used variables here to try and reduce this long assignment sTxt = sTxt & sHtml1 & DoDateTime((rstCurrent("Expr1").Value), 2, 1030) & " - " & sHtml2 & _ rstCurrent("Expr1") & sHtml3 & rstCurrent("EVENT_TITLE") & sHtml4 rstCurrent.movenext loop iSpeed = 40 ' Speed of Marquee (higher = slower) iTop = 0 ' Y Location Within Object iLeft = 0 ' X Location"""" iWidth = 355 ' Width iHeight = 100 ' Height 'Insert marquee into objects innerHtml Property (in this Case a table cell) sMarquee="<MARQUEE onmouseover='this.stop();' " & _ "onmouseout='this.start();'direction='up' scrollamount='1' " & _ "scrolldelay='" & iSpeed & "' top='" & iTop & "' left='" & iLeft & _ "' width='" & iWidth & "' height='" & iHeight & "'>" & sTxt & "</MARQUEE>" conCurrent.close 'Don't forget to clean-up! set conCurrent = Nothing %> 2) Put the marquee anywhere in your page <Body> <%=sMarquee%> </body>
3) Don't forget to make a SQL statement re:
SELECT TOP 15 FORUM_EVENTS.EVENT_TITLE, DateSerial(Mid([START_DATE],1,4),Mid([START_DATE],5,2),Mid([START_DATE],7,2)) AS Expr1 FROM FORUM_EVENTS WHERE (((DateSerial(Mid([START_DATE],1,4),Mid([START_DATE],5,2),Mid([START_DATE],7,2)))>Now()-10)) ORDER BY DateSerial(Mid([START_DATE],1,4),Mid([START_DATE],5,2),Mid([START_DATE],7,2));
That's it ! ps/ check fields before I still use a 3.3 forum version
Kind regards from Saint-Paul de Vence (France) & thanks to Snitz forum
Hubert
|
|
|
fpgal
New Member
93 Posts |
Posted - 28 June 2002 : 00:13:53
|
Many thanks, Hubert! I just arrived back in town and received your email also. I really appreciate your sharing this.
I will try it out and let you know how it works for me.
fpgal
|
|
|
|
Topic |
|
|
|