Author |
Topic  |
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 20 January 2001 : 01:27:31
|
quote:
if it relates to MEMBERS, you should change it to strMemberTablePrefix
'Resistance is futile'
Ahhh gotcha Huwr, so guess doing a replace all to strTablePrefix wasn't sufficient. Thanks.
- Alan
|
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 20 January 2001 : 01:50:27
|
quote:
Thanks Allan for the info -- I was able to get what I wanted done...
Yes, of course you are right about days with more than 1 event -- it looks like it would be difficult to show all events for a day within the acronym tag. Forunately for me, most of my dates are an event over a period of days, so this is just fine -- for others maybe not so fine! (I still think it's usefull)
Anyway, I "tweaked" the acronym pop-up over the "Upcoming/Recent Events", if you're interested -- here's the code just for the upcooming function:
Perhaps someone might find this useful...
Cheers!
Edited by - Rob Poretti on 20 January 2001 00:52:20
Oh good, glad it was what you wanted.
Hey I incorporated your if-then case for events that span days and applied it to my new version and here's what the upcomingevents function looks like on the version i'm working on.
function EmitUpcomingEvents dim rs Set Rs = Server.CreateObject("ADODB.RecordSet") strSql = "SELECT TOP 20 start_date, end_date, event_title, " & strDBNTSQLName& " FROM " & _ strTablePrefix & "EVENTS Inner JOIN " & strMemberTablePrefix & "Members ON " & strTablePrefix & "EVENTS.added_by = " & strMemberTablePrefix & "Members.Member_ID WHERE " & _ "start_date >= #" & date() & "# and start_date < #" & DateAdd("d",30,date()) & "# Order by start_date, event_id ASC" rs.Open strSql, my_Conn do until rs.EOF IF FormatDateTime(rs("Start_Date"), 2)=FormatDateTime(rs("End_Date"), 2) THEN Response.Write "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><a href=" & sScript & ".asp? date=" & rs("Start_Date") & "><acronym title='" & formatdatetime(rs("Start_Date"),1) & "'>" & left(rs("Event_Title"),25) & "</acronym></a></font><br>" ELSE Response.Write "<font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><a href=" & sScript & ".asp?date=" & rs("Start_Date") & "><acronym title='" & rs("Start_Date") & " - " & rs("End_Date") & "'>" & left(rs("Event_Title"),25) & "</acronym></a></font><br>" END IF rs.MoveNext loop rs.Close set rs = nothing end function
Notice it also has the strDBNTSQLname and strTablePrefix stuff.
- Alan
Edited by - aznknight on 20 January 2001 01:51:05 |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 20 January 2001 : 01:53:59
|
quote:
just in case if anyone only wants the administrator have full control of posting events on calender, change this line 267:
<%if mlev >= 1 then%>
to this
<% if (mlev = 4) or (lcase(strNoCookies) = "1") then %>
Actually changing this line will only hide the add an event link. Someone can still manipulate the query string and add events.
Need to change the mlev manually at some other points as well if you to make it admin only.
- Alan
|
 |
|
seven
Senior Member
   
USA
1037 Posts |
Posted - 20 January 2001 : 10:49:14
|
When adding a new event what lines of code in events.asp actually check to see if your logged in or not? |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 20 January 2001 : 13:27:00
|
quote:
quote:
just in case if anyone only wants the administrator have full control of posting events on calender, change this line 267:
<%if mlev >= 1 then%>
to this
<% if (mlev = 4) or (lcase(strNoCookies) = "1") then %>
Actually changing this line will only hide the add an event link. Someone can still manipulate the query string and add events.
Need to change the mlev manually at some other points as well if you to make it admin only.
- Alan
Azknight,
hope you don't mind, I have changed your code so that on my site it does not store the dates as dates, but stores them as strings as the forum does. I have also added a private event marker.
here is the file if you want to check it out events.asp db setup script
Obviously, it won't work if you already have the events table set up with dates.
'Resistance is futile'
Fixed the broken link
Edited by - huwr on 20 January 2001 13:52:04 |
 |
|
seven
Senior Member
   
USA
1037 Posts |
Posted - 20 January 2001 : 13:34:36
|
the second link isn't working...
db setup script
Obviously, it won't work if you already have the events table set up with dates.
'Resistance is futile' [/quote] |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 21 January 2001 : 02:49:55
|
quote:
Azknight,
hope you don't mind, I have changed your code so that on my site it does not store the dates as dates, but stores them as strings as the forum does. I have also added a private event marker.
here is the file if you want to check it out events.asp db setup script
Obviously, it won't work if you already have the events table set up with dates.
'Resistance is futile'
Fixed the broken link
Edited by - huwr on 20 January 2001 13:52:04
Hey Huwr, I don't mind at all .
I tried it originally using dates as string but was a bit uncomfortable doing that so I use normal dates instead. But if you can pull it off when date as strings...all the better!
Cool I want to see how you would do the private events thingy.
Too bad both the links aren't working right now.
- Alan
|
 |
|
§am Ï Åm
Starting Member
12 Posts |
Posted - 21 January 2001 : 06:23:37
|
How would I go about just giving the add ability to just the moderator of that particular forum? I would like to have the ability to add an event calendar and create a calendar for each forum, I was planning on just having the ability to be able to add an extra in the admin functions so instead of being able to just adding a forum, url, topic but also able add a calendar for that forum as well?
TIA
Edited by - §am Ï Åm on 21 January 2001 06:32:23 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 21 January 2001 : 07:19:58
|
Both links should be working now.
'Resistance is futile' |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 21 January 2001 : 14:57:45
|
quote:
here is the file if you want to check it out events.asp db setup script
Obviously, it won't work if you already have the events table set up with dates.
'Resistance is futile'
Fixed the broken link
Edited by - huwr on 20 January 2001 13:52:04
I still can't access the events2.txt file. Page not found error. the table setup file was fine though.
- Alan
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 21 January 2001 : 15:07:33
|

I had missed the s on the filename, should be ok now
'Resistance is futile' |
 |
|
KXS
New Member

Canada
66 Posts |
Posted - 22 January 2001 : 12:57:53
|
Guys,
Did anyone end up creating a week view in this Calendar?
------------------ "keeping it real" |
 |
|
Lohman
Starting Member
35 Posts |
Posted - 22 January 2001 : 13:41:55
|
Huwr: I'm using you implementation and all works well until I attempt to enter a day containing events. If I do, I get the following error:
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. /forums/events.asp, line 937
Any Ideas?
I'm using SQL 7.0 SP2 On Win2K Server Using NT Usernames
=================EDIT==================== I found the following info on it. I'm still not sure what it's telling me though 
http://support.microsoft.com/support/kb/articles/q228/9/35.asp
FIX: Uninitialized String Variables, Empty String Values, Jet Provider, and Errors Occurred
-------------------------------------------------------------------------------- The information in this article applies to:
ActiveX Data Objects (ADO), versions 2.0, 2.01, 2.1, 2.5, 2.6 Microsoft OLE DB Provider for Jet, versions 3.51, 4.0 Microsoft Data Access Components versions 2.0, 2.1, 2.5, 2.6
--------------------------------------------------------------------------------
SYMPTOMS If a WITH statement is used to store an empty string value to one field and an uninitialized string to the very next field, an error will occur when using the Microsoft OLE DB Provider for Jet 3.51 or 4.00 that shipped with MDAC versions prior to 2.5. The error that will occur is as follows on version MDAC versions prior to 2.5:
'Errors Occurred' On MDAC 2.5 installations using the OLE DB Provider for Jet 3.51 the following error will occur: 'Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.' No error will occur on MDAC 2.5 using the OLE DB Provider for Jet 4.0 that shipped with it, specifically version 4.0.2927.4.
RESOLUTION If it is still necessary to use the OLE DB Provider for Jet 3.51 or MDAC versions prior to 2.5 then it will be necessary to make sure all variables are properly initialized. Otherwise this problem is resolved in the OLE DB Provider for Jet 4.0 that shipped with MDAC 2.5, specifically version 4.0.2927.4.
Edited by - Lohman on 22 January 2001 13:48:41 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 22 January 2001 : 14:21:28
|
It is basically telling you it is a bug with version of MDAC/JEt on your server. I check the code, I may be able to prevent the error from occuring
'Resistance is futile'
You say the error occurs when try to view events, but the error pertains to updating a value.
Are you able to add events ?
Do you have the latest file, I changed it yesterday?
Edited by - huwr on 22 January 2001 14:28:16 |
 |
|
Lohman
Starting Member
35 Posts |
Posted - 22 January 2001 : 14:37:31
|
Thankyou for replying HuwR. I am able to add an event to any date w/o problems. The error occurs when I attempt to view the event, or view the date containing an event.
I just downloaded/installed your version a few hours ago. I could never get Aznknight's to work but I had been trying for about a day. I deleted the FORUM_EVENTS table before installing your stuff and just de-did the setup.
I'm running Win2K Server with SP1 actually. Maybe it's a bug in SP1. Is anyone else running a similar server? My Product Version for SQL shows 7.00.842 .
THANKYOU Aznknight and Thank You HuwR
|
 |
|
Topic  |
|