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

Kal Corp
Average Member

USA
878 Posts

Posted - 18 January 2001 :  13:43:51  Show Profile  Visit Kal Corp's Homepage
Your not using the 3.1sr4 standards for DB and NT modes. this is needed so that it works with both

Need to change

sSql = "Select Member_ID from Forum_Members where M_Name = '" & Request.Cookies(strUniqueID & "User")("Name") & "'"

TO

sSql = "Select Member_ID from Forum_Members where " & strDBNTSQLName& " = '" & strDBNTUserName & "'"

Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 18 January 2001 :  14:49:00  Show Profile  Visit Rob Poretti's Homepage
Hi guys!

Further to that thought, 'Kal Corp'....

This: sSql = "Select Member_ID from Forum_Members where " & strDBNTSQLName& " = '" & strDBNTUserName & "'"

Should actually be: sSql = "Select Member_ID from " & strTablePrefix & "Members where " & strDBNTSQLName& " = '" & strDBNTUserName & "'"

based on code in the rest of the forum...

Has someone drafted a standard on SNITZ coding -- structures/conventions/standards etc? This would be extremely useful for the developer, the moderators, the users. I can't see a down side of doing this -- except someone has to do it!



Edited by - Rob Poretti on 18 January 2001 23:44:38
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 18 January 2001 :  19:20:08  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Hi guys!

Further to that thought, 'Kal Corp'....

This: sSql = "Select Member_ID from Forum_Members where " & strDBNTSQLName& " = '" & strDBNTUserName & "'"

Should [i]actually[/] be: sSql = "Select Member_ID from " & strTablePrefix & "Members where " & strDBNTSQLName& " = '" & strDBNTUserName & "'"

based on code in the rest of the forum...



Oh woops... Thanks rob for pointing that out. I need to change all the FORUM_ to strTablePrefix for this to work with people that have changed that varibable.

Thanks Kal Corp..Your right! I need to do the dbnt stuff for nt users and db modes. Sorry for not thinking of that.

Next service realise should have these changes. Time-permitting.


- Alan
Go to Top of Page

SniperDude
Starting Member

USA
47 Posts

Posted - 19 January 2001 :  10:08:24  Show Profile  Visit SniperDude's Homepage  Send SniperDude an ICQ Message
Hi guys/gals...

been working on the event mod that AzKnight has started... and finished with the weekly display ... and started the private events and addition of times...

You can see the results here..

http://www.nwcfonline.com/main/forum/events.asp

I am having trouble with the showform() function ... it shows all the new fields I added but refuses to read the database and put the results into the form...

I have spent too much time on this.. and need to actually do some work at work.. so I am opening the half finished code up to the pro's .. ...

Let me know if you cant figure out my logic... but I think I documented it well enough...

-Tim

Event code (2 files) http://www.nwcfonline.com/public/events1b.zip

Also I added three columns to the Forum_Events Table

START_TIME [date/time]
END_TIME [date/time]
EVENT_TYPE [number] Event Type (0 = Public) (1=Private) (2=Personal)

I Created another table called.

[FORUM_EVENTS_ALLOW_PRIVATE] <-- unimplented due to forms not working yet.

MEMBER_ID [number] planned on using same logic as the forums are using.
EVENT_ID [number]

Okay thats bout it...

Let me know what you think of my work on it so far...
Have a great day.

-Tim


*Graphics Withheld for Adminstrative reasons*
-Tim
System Admin
Go to Top of Page

Morpheus73
Average Member

Denmark
597 Posts

Posted - 19 January 2001 :  11:01:00  Show Profile
quote:

Hi guys/gals...

been working on the event mod that AzKnight has started... and finished with the weekly display ... and started the private events and addition of times...

You can see the results here..

http://www.nwcfonline.com/main/forum/events.asp

I am having trouble with the showform() function ... it shows all the new fields I added but refuses to read the database and put the results into the form...

I have spent too much time on this.. and need to actually do some work at work.. so I am opening the half finished code up to the pro's .. ...

Let me know if you cant figure out my logic... but I think I documented it well enough...

-Tim

Event code (2 files) http://www.nwcfonline.com/public/events1b.zip

Also I added three columns to the Forum_Events Table

START_TIME [date/time]
END_TIME [date/time]
EVENT_TYPE [number] Event Type (0 = Public) (1=Private) (2=Personal)

I Created another table called.

[FORUM_EVENTS_ALLOW_PRIVATE] <-- unimplented due to forms not working yet.

MEMBER_ID [number] planned on using same logic as the forums are using.
EVENT_ID [number]

Okay thats bout it...

Let me know what you think of my work on it so far...
Have a great day.

-Tim


*Graphics Withheld for Adminstrative reasons*
-Tim
System Admin



Getting somewhere FAST here!...

stumbled across this calender/events thing ... mayby u can use itīs source for inspiration/understanding private events?

http://www.aspemporium.com/aspEmporium/examples/dayplanner/index.asp

Well godīs speed 2 all u coders!

MPH73



Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 19 January 2001 :  12:38:12  Show Profile  Visit Rob Poretti's Homepage
Hi Aznknight,

I've added an acronym tag to display a "pop-up" of the start date when hovering over an "upcoming or recent event". See below...


function emitupcomingevents
dim rs
Set Rs = Server.CreateObject("ADODB.RecordSet")
strSql = "SELECT start_date, event_title, M_Name FROM FORUM_EVENTS Inner JOIN Forum_Members ON FORUM_EVENTS.added_by = Forum_Members.Member_ID WHERE start_date >= '" & date() & "' and start_date < '" & DateAdd("d",120,date()) & "' Order by start_date"

rs.Open strSql, my_Conn
do until rs.EOF
Response.Write "<font face=" & strDefaultFontFace & " size=" & strFooterFontSize & "><a href=events.asp?date=" & rs("Start_Date") & "><acronym title='" & rs("Start_Date") & "'>" & rs("Event_Title") & "</acronym></a></font><br>"
rs.MoveNext
loop
rs.Close
set rs = nothing
end function

function emitpastEvents
dim rs
Set Rs = Server.CreateObject("ADODB.RecordSet")
strSql = "SELECT start_date, event_title, M_Name FROM FORUM_EVENTS Inner JOIN Forum_Members ON FORUM_EVENTS.added_by = Forum_Members.Member_ID WHERE start_date < '" & date() & "' and start_date > '" & DateAdd("d",-120,date()) & "' Order by start_date desc"

rs.Open strSql, my_Conn
do until rs.EOF
Response.Write "<font face=" & strDefaultFontFace & " size=" & strFooterFontSize & "><a href=events.asp?date=" & rs("Start_Date") & "><acronym title='" & rs("Start_Date") & "'>" & rs("Event_Title") & "</acronym></a></font><br>"
rs.MoveNext
loop
rs.Close
set rs = nothing
end function


Question: I'd like to do a similar thing on the "View Calendar" -- to display the event title when hovering over a date with an event (green). If you have a moment, could you point out either where this is or how I might find it? Thanks...

Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 19 January 2001 :  13:39:39  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Let me know what you think of my work on it so far...
Have a great day.

-Tim



Coolio! Nice work building on. However I was thinking of something a bit different for the weekly view. More of a horizontal view than a vertical view. It will look more like the Main calendar then the events detail.

- Alan
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 19 January 2001 :  13:44:07  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Getting somewhere FAST here!...

stumbled across this calender/events thing ... mayby u can use itīs source for inspiration/understanding private events?

http://www.aspemporium.com/aspEmporium/examples/dayplanner/index.asp

Well godīs speed 2 all u coders!

MPH73




the calendar from the link is okay.
I'm actually modeling this after the big dog:
http://calendar.msn.com.
Look at there weekly and daily views.

- Alan
Go to Top of Page

CrAzY
New Member

USA
50 Posts

Posted - 19 January 2001 :  13:47:18  Show Profile  Send CrAzY an AOL message  Send CrAzY an ICQ Message
I've been working on this for the last week and still haven't been successful in getting this to work for me.

I know AznKnight you don't have it setup for SQL, but does anyone out there have this mod working on SQL Server 7??? If so can you please post the code so I can try it on my server.

Thanks.

I'm Beyond Help
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 19 January 2001 :  13:58:40  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

I've been working on this for the last week and still haven't been successful in getting this to work for me.

I know AznKnight you don't have it setup for SQL, but does anyone out there have this mod working on SQL Server 7??? If so can you please post the code so I can try it on my server.

Thanks.

I'm Beyond Help




Hey Crazy I know when one the reason why this mod didn't work on sql server db, pointed out by Kal Corp. I didn't use the strDBNTSQLNAME variable. I've working on a new release of this mod that will fix that. Hope it will make it work with sql. Just started on this yesterday.

- Alan
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 19 January 2001 :  14:01:42  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Hi Aznknight,

I've added an acronym tag to display a "pop-up" of the start date when hovering over an "upcoming or recent event". See below...



Very Neat and useful idea! I'll implement it on nice version too .

quote:

Question: I'd like to do a similar thing on the "View Calendar" -- to display the event title when hovering over a date with an event (green). If you have a moment, could you point out either where this is or how I might find it? Thanks...



What would happen when a day has 2 or more events? which event title will the acronym tag point to?

In the EmitMonth and EmitMonth 2 look for this and then add the acronym around the intPrintDay.

if dtoday = date() then
' Print the date in a highlighted font
Write_TD2 "<A HREF=events.asp?date="& Server.URLEncode(dToday) & "&month=" & month(dToday) & "&year=" & year(dToday) & " CLASS='EVENT'> " & intPrintDay & "</A>", "TODAY", dToday
else
' Print the date in a highlighted font
Write_TD2 "<A HREF=events.asp?date="& Server.URLEncode(dToday) & "&month=" & month(dToday) & "&year=" & year(dToday) & " CLASS='EVENT'> " & intPrintDay & "</A>", "HL", dToday
end if


- Alan


- Alan
Go to Top of Page

CrAzY
New Member

USA
50 Posts

Posted - 19 January 2001 :  20:53:07  Show Profile  Send CrAzY an AOL message  Send CrAzY an ICQ Message
quote:

quote:

I've been working on this for the last week and still haven't been successful in getting this to work for me.

I know AznKnight you don't have it setup for SQL, but does anyone out there have this mod working on SQL Server 7??? If so can you please post the code so I can try it on my server.

Thanks.

I'm Beyond Help




Hey Crazy I know when one the reason why this mod didn't work on sql server db, pointed out by Kal Corp. I didn't use the strDBNTSQLNAME variable. I've working on a new release of this mod that will fix that. Hope it will make it work with sql. Just started on this yesterday.

- Alan




Hey Alan,
I look forward to testing it out when you're finished. Please inform me of it when you're complete. And as I mentioned before, if you'd like access to a SQL Server to test it on please let me know and I'll be more than happy to set you up some space on the one I use.

I'm Beyond Help
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 19 January 2001 :  21:19:43  Show Profile  Visit HuwR's Homepage
quote:

quote:

Hi guys!

Further to that thought, 'Kal Corp'....

This: sSql = "Select Member_ID from Forum_Members where " & strDBNTSQLName& " = '" & strDBNTUserName & "'"

Should [i]actually[/] be: sSql = "Select Member_ID from " & strTablePrefix & "Members where " & strDBNTSQLName& " = '" & strDBNTUserName & "'"

based on code in the rest of the forum...



Oh woops... Thanks rob for pointing that out. I need to change all the FORUM_ to strTablePrefix for this to work with people that have changed that varibable.

Thanks Kal Corp..Your right! I need to do the dbnt stuff for nt users and db modes. Sorry for not thinking of that.

Next service realise should have these changes. Time-permitting.


- Alan




if it relates to MEMBERS, you should change it to strMemberTablePrefix

'Resistance is futile'
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 20 January 2001 :  00:49:44  Show Profile  Visit Rob Poretti's Homepage
quote:

quote:

Hi Aznknight,

I've added an acronym tag to display a "pop-up" of the start date when hovering over an "upcoming or recent event". See below...



Very Neat and useful idea! I'll implement it on nice version too .

quote:

Question: I'd like to do a similar thing on the "View Calendar" -- to display the event title when hovering over a date with an event (green). If you have a moment, could you point out either where this is or how I might find it? Thanks...



What would happen when a day has 2 or more events? which event title will the acronym tag point to?

In the EmitMonth and EmitMonth 2 look for this and then add the acronym around the intPrintDay.

if dtoday = date() then
' Print the date in a highlighted font
Write_TD2 "<A HREF=events.asp?date="& Server.URLEncode(dToday) & "&month=" & month(dToday) & "&year=" & year(dToday) & " CLASS='EVENT'> " & intPrintDay & "</A>", "TODAY", dToday
else
' Print the date in a highlighted font
Write_TD2 "<A HREF=events.asp?date="& Server.URLEncode(dToday) & "&month=" & month(dToday) & "&year=" & year(dToday) & " CLASS='EVENT'> " & intPrintDay & "</A>", "HL", dToday
end if


- Alan


- Alan




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:

function emitupcomingevents
dim rs
Set Rs = Server.CreateObject("ADODB.RecordSet")
strSql = "SELECT start_date, end_date, event_title, M_Name FROM FORUM_EVENTS Inner JOIN Forum_Members ON FORUM_EVENTS.added_by = Forum_Members.Member_ID WHERE start_date >= '" & date() & "' and start_date < '" & DateAdd("d",180,date()) & "' Order by start_date"
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=" & strFooterFontSize & "><a href=events.asp? date=" & rs("Start_Date") & "><acronym title='" & rs("Start_Date") & "'>" & Trim(rs("Event_Title")) & "</acronym></a></font><br>"
ELSE
Response.Write "<font face=" & strDefaultFontFace & " size=" & strFooterFontSize & "><a href=events.asp?date=" & rs("Start_Date") & "><acronym title='" & rs("Start_Date") & " - " & rs("End_Date") & "'>" & Trim(rs("Event_Title")) & "</acronym></a></font><br>"
END IF
rs.MoveNext
loop
rs.Close
set rs = nothing


Perhaps someone might find this useful...

Cheers!



Edited by - Rob Poretti on 20 January 2001 00:52:20
Go to Top of Page

lcs78816
Junior Member

195 Posts

Posted - 20 January 2001 :  00:56:41  Show Profile
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 %>

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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07