Author |
Topic  |
Kal Corp
Average Member
  
USA
878 Posts |
Posted - 18 January 2001 : 13:43:51
|
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 & "'"
|
 |
|
Rob Poretti
Junior Member
 
Canada
435 Posts |
Posted - 18 January 2001 : 14:49:00
|
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 |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 18 January 2001 : 19:20:08
|
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
|
 |
|
SniperDude
Starting Member
USA
47 Posts |
Posted - 19 January 2001 : 10:08:24
|
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 |
 |
|
Morpheus73
Average Member
  
Denmark
597 Posts |
Posted - 19 January 2001 : 11:01:00
|
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
|
 |
|
Rob Poretti
Junior Member
 
Canada
435 Posts |
Posted - 19 January 2001 : 12:38:12
|
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...
|
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 19 January 2001 : 13:39:39
|
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
|
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
|
CrAzY
New Member

USA
50 Posts |
Posted - 19 January 2001 : 13:47:18
|
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 |
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 19 January 2001 : 13:58:40
|
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
|
 |
|
Aznknight
Senior Member
   
USA
1373 Posts |
Posted - 19 January 2001 : 14:01:42
|
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
|
 |
|
CrAzY
New Member

USA
50 Posts |
Posted - 19 January 2001 : 20:53:07
|
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 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 19 January 2001 : 21:19:43
|
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' |
 |
|
Rob Poretti
Junior Member
 
Canada
435 Posts |
Posted - 20 January 2001 : 00:49:44
|
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 |
 |
|
lcs78816
Junior Member
 
195 Posts |
Posted - 20 January 2001 : 00:56:41
|
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 %>
|
 |
|
Topic  |
|