Author |
Topic  |
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 11 January 2001 : 11:39:27
|
You're welcome, Jeff 
Edited by - Richard Kinser on 11 January 2001 16:22:19 |
 |
|
slemieux
Junior Member
 
USA
234 Posts |
Posted - 11 January 2001 : 11:46:56
|
Good work Alan!
I redid all the SQL statements so they work on MS SQL as well. Still have a couple problems perhaps someone can help me with.
First... this code function emitpastEvents dim rs Set Rs = Server.CreateObject("ADODB.RecordSet") strSql = "SELECT start_date, event_title " strSql = strSql & " FROM FORUM_EVENTS " 'strSql = strSql & " where start_date < " & date() 'strSql = strSql & " and start_date > " & DateAdd("d",-30,date()) strSql = strSql & " Order by start_date desc" rs.Open strSql, my_Conn do until rs.EOF Response.Write "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><a href=events.asp?date=" & rs("Start_Date") & ">" & rs("Event_Title") & "</a></font><br>" rs.MoveNext loop rs.Close set rs = nothing end function
I Commented out the WHERE clause and everything works, however not as it should. With those uncommented I get Microsoft JET Database Engine error '80040e14'
Division by zero
?
Scott LeMieux Ready... Fire... Aim!!  |
 |
|
tteal
Junior Member
 
USA
438 Posts |
Posted - 11 January 2001 : 12:08:01
|
First and foremost, awesome mod!!!!
I tried implementing this on my SQL server and must point out a few items:
- changed MEMO to VARCHAR - changed DATE to DateTime
I also had to change every instance on the events.asp page that had the # to an ' character when dealing with dates.
I tried adding a new event and got this error:
ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/forum/events.asp, line 490
Anyone getting the same error? Have any idea how to fix it?
Thank you.
Cheers, Tim
http://www.free-guestbook.com |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 11 January 2001 : 12:28:01
|
quote:
Alan,
I think you left this line out of events.asp:
TD.NON2 {font-family: Tahoma, Verdana, Arial; font-size :12px; background-color :lightgrey; font-weight :normal}
Richard, Good catch! I thought I was missing a style.
quote:
Also line.gif was missing from the .zip file
and in events.asp the link for line.gif (line #600) was as: images\line.gif
Here is the line.gif: 
Woops that was something that I should've taken out. Don't need for this look and feel.
Okay I've updated the zip files with these 2 changes.
Oh yeah, I also added the prev and next months dates bug fix too. All in the zip now.
Edited by - aznknight on 11 January 2001 12:31:33 |
 |
|
tteal
Junior Member
 
USA
438 Posts |
Posted - 11 January 2001 : 12:29:41
|
I've figured out the error I was getting:
Replace around line 490 in the events.asp file with the one below:
sSql = "Select Member_ID from Forum_Members where M_Name = '" & Request.Cookies(strCookieURL & "User")("Name") & "'"
Thanks.
Cheers, Tim
http://www.free-guestbook.com |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 11 January 2001 : 12:33:57
|
quote:
I've figured out the error I was getting:
Replace around line 490 in the events.asp file with the one below:
sSql = "Select Member_ID from Forum_Members where M_Name = '" & Request.Cookies(strCookieURL & "User")("Name") & "'"
Thanks.
Cheers, Tim
http://www.free-guestbook.com
Yeah this was made for snitz3.1 sr 4 so the cookies are handled different. If you use an earlier version. Tim's change above should be the only thing. |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 11 January 2001 : 12:41:12
|
quote:
Good work Alan!
I redid all the SQL statements so they work on MS SQL as well. Still have a couple problems perhaps someone can help me with.
Thanks Slemieux,
I don't have sql server locally to test this mod against.
However my next site will prolly run on sql server on my web host, so after you've made ths compatible with sql server, can you release the code so I can add it to this mod?
Hey Tim, Can you put up text link for your dbsetup of this mod for sql server? |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 11 January 2001 : 12:43:43
|
quote:
Can you zip up the corrected mod and give us a link to get it? *smile*
Zip Collected.
CHANGES: 1) deleted table row with the line.gif 2) Added richard's fix 3) added the missing non2 style. |
 |
|
tteal
Junior Member
 
USA
438 Posts |
Posted - 11 January 2001 : 12:47:02
|
Link to the SQL Server script that I used:
http://www.tealnet.com/forum/snitz/eventstable_setup.txt
Also in addition to everything I mentioned previously about the # and replacing with the ' when dealing with dates, also in the DELETE function it needs to be:
"DELETE FROM TABLE" vice "DELETE * FROM TABLE"
====================================== Attn: AznKnight
Possibly we can all come together and do something up so that the administrator can enter an event "globally" in all calendars? That would be very cool to put an event on the calendar and everyone will see it!
Tim
Cheers, Tim
http://www.free-guestbook.com |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 11 January 2001 : 12:53:34
|
quote:
It generates little popups when a date in bold is hovered over. Maybe it would be a nice little enhancement to include. I use it because I don't show a "full" version of the calendar.
John
Hey John,the dhtml popup is a nice effect. But I think this will be an add-on done on individual basis since snitz does not support dhtml at this time.
I went out on a limb using the styles but it would have been a shame if I didn't add the neat styles effects that I already had.
Your concept does give me an idea to use the "alt" tag on the dates of the smaller calendar so you kinda have a popup with the events will you leave the mouse over the date. On todo list. |
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 11 January 2001 : 12:54:12
|
Alan,
I thought it looked better with the line.gif..
It's to separate the S M T W T F S from the date #'s in the small calendar on the left.
Thanks for your hard work. This is a really cool addition.  |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 11 January 2001 : 13:18:51
|
quote:
Alan,
I thought it looked better with the line.gif..
It's to separate the S M T W T F S from the date #'s in the small calendar on the left.
Thanks for your hard work. This is a really cool addition. 
Richard Hmm, I think you're right on this... I added the line.gif image to the zip and re-updated events.asp with it. New zip now. Same link.
Whoa, with all these quick re-releases, it reminds me of the days when snitz had betas and service releases daily and hourly...woo hoo.
Edited by - aznknight on 11 January 2001 13:25:57 |
 |
|
SuTech
Starting Member
USA
23 Posts |
Posted - 11 January 2001 : 13:45:55
|
did anybody else run into this. I post an event using one user ID, then switch to a different user, post an event for the same day so there are two out there now. Both events show the user name of the first poster for that day though, the second user name doesn't show on his event.
|
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 11 January 2001 : 13:49:21
|
I have to ask if you're using sr4 or not? I checked this for sr4 and did not get this. |
 |
|
tteal
Junior Member
 
USA
438 Posts |
Posted - 11 January 2001 : 14:11:45
|
SuTech, I get the same thing.... if I post the message as User Bob who is a normal user, I can add the message and it will show up. However, I cannot edit/delete my own message as Bob the regular user.
If I add messages and am level "x" or above (assuming moderator/admin), then I can edit/delete messages.
Something is really weird here.. :) Also, if I add messages as user Bob and other users have entered events on the same day, they all show up as user Bobs' events....
Just thought I'd mention these things.
Cheers, Tim
http://www.free-guestbook.com |
 |
|
Topic  |
|