Author |
Topic  |
|
ammar_ggedoN
Starting Member
10 Posts |
Posted - 31 March 2003 : 10:13:59
|
Hi guys (and girls ofcourse),
Is it possible to put a random quote on your forum? It would nice to have a very subtle random quote somewhere above the forum. Everytime you log on a quote would appear. and if you press 'refresh' or something a new quote would appear.
|
|
snaayk
Senior Member
   
USA
1061 Posts |
Posted - 31 March 2003 : 11:29:36
|
Are you asking for this forum to do it or how to modify your forum to show a random quote?
Theres code that can display any random record out a database table. Basically a query that selects a random at record and displays it. Do you need such code? |
 |
|
PeeWee.Inc
Senior Member
   
United Kingdom
1893 Posts |
Posted - 31 March 2003 : 11:38:53
|
look on snitzbitz for "random quote"
http://www.snitzbitz.com |
De Priofundus Calmo Ad Te Damine |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
hayleypink
Junior Member
 
Haiti
145 Posts |
Posted - 16 July 2003 : 08:14:00
|
does any one have a demo of this? wondering where the quote will show on my forum? |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
hayleypink
Junior Member
 
Haiti
145 Posts |
Posted - 16 July 2003 : 10:56:45
|
UMMM stil thinking about it - not sure my members look at the main page anymore they just go straight to active topics! |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
hayleypink
Junior Member
 
Haiti
145 Posts |
Posted - 16 July 2003 : 11:06:26
|
Yeh I would like to find a way to just show the quote without a box in inc_header so it is transparent over the background between the logo and links |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 29 July 2003 : 08:01:33
|
Something subtle like what I have on my site? This is a simple javascript that you can insert anywhere you want. I can give you the code if you'd like.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
dpmcalister
Junior Member
 
United Kingdom
161 Posts |
Posted - 29 July 2003 : 10:23:10
|
Likewise, I've got a basic ASP version (not connected to the Snitz database that can be put anywhere. The ASP code is:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=; DBQ=" & Server.MapPath("database.mdb")
set rs =server.CreateObject("ADODB.Recordset")
set rs.ActiveConnection = Conn
rs.Open "SELECT * FROM quotes"
set rsTopNumber=conn.execute("select count(*) from quotes")
intRecordID = rsTopNumber(0)
rsTopNumber.close
set rsTopNumber = nothing
Randomize
numMove = Int(intRecordID * Rnd)
rs.Move numMove
response.write "" & rs("quote_text") & "<br><b>" & rs("quote_film") & ", " & rs("quote_year") & "</b>"
rs.close
Conn.close
set rs = nothing
set Conn = nothing
%> I think the database make-up is reasonably straightforward, but just shout if you need any help. |
 |
|
|
Topic  |
|