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)
 MOD: Snitz Calendar
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 11

Aznknight
Senior Member

USA
1373 Posts

Posted - 20 January 2001 :  01:27:31  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 20 January 2001 :  01:50:27  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 20 January 2001 :  01:53:59  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

seven
Senior Member

USA
1037 Posts

Posted - 20 January 2001 :  10:49:14  Show Profile  Visit seven's Homepage
When adding a new event what lines of code in events.asp
actually check to see if your logged in or not?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 20 January 2001 :  13:27:00  Show Profile  Visit HuwR's Homepage
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
Go to Top of Page

seven
Senior Member

USA
1037 Posts

Posted - 20 January 2001 :  13:34:36  Show Profile  Visit seven's Homepage
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]
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 21 January 2001 :  02:49:55  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

§am Ï Åm
Starting Member

12 Posts

Posted - 21 January 2001 :  06:23:37  Show Profile  Send §am Ï  Åm an ICQ Message
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 21 January 2001 :  07:19:58  Show Profile  Visit HuwR's Homepage
Both links should be working now.

'Resistance is futile'
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 21 January 2001 :  14:57:45  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 21 January 2001 :  15:07:33  Show Profile  Visit HuwR's Homepage


I had missed the s on the filename, should be ok now

'Resistance is futile'
Go to Top of Page

KXS
New Member

Canada
66 Posts

Posted - 22 January 2001 :  12:57:53  Show Profile  Send KXS an ICQ Message
Guys,

Did anyone end up creating a week view in this Calendar?

------------------
"keeping it real"
Go to Top of Page

Lohman
Starting Member

35 Posts

Posted - 22 January 2001 :  13:41:55  Show Profile
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 22 January 2001 :  14:21:28  Show Profile  Visit HuwR's Homepage
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
Go to Top of Page

Lohman
Starting Member

35 Posts

Posted - 22 January 2001 :  14:37:31  Show Profile
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



Go to Top of Page
Page: of 11 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07