Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Event Calendar Mod problem

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
n10sive Posted - 01 October 2005 : 16:58:26
If you use private forums and notice that the calendar control highlights the dates of your events for guests, you can apply this mod to cal_functions.asp to correct the problem.

Find the two places in cal_functions.asp (line 85 and 235 aprox) that looke like:

If not rs.EOF then strDates = rs.GetString(,,,",") else blnNoDates = TRUE 


Replace this with the following code:


if not(rs.EOF or rs.BOF) then
	rs.MoveFirst
	do until rs.EOF
		if chkForumAccess(rs("FORUM_ID"),MemberID,FALSE) then
			if len(strDates) > 0 then strDates = strDates & ","
			strDates = strDates & rs("EVENT_DATE")
		end if
		rs.MoveNext
	loop
else
	blnNoDates = TRUE
end if


<
2   L A T E S T    R E P L I E S    (Newest First)
StephenD Posted - 19 October 2005 : 21:18:49
Couple of changes required to get this working on the non-recurring version:

if not(rs.EOF or rs.BOF) then
	rs.MoveFirst
	do until rs.EOF
		if chkForumAccess(rs("FORUM_ID"),MemberID,FALSE) then
			if len(strDates) > 0 then strDates = strDates & ","
			strDates = strDates & rs("T_EVENT_DATE")
		end if
		rs.MoveNext
	loop
else
	blnNoDates = TRUE
end if


Also, need to add FORUM_ID to the SELECT and GROUP BY clauses in the query just before this code block:
strSql = "SELECT T_EVENT_DATE, FORUM_ID FROM " & strTablePrefix & "TOPICS " & _
         "WHERE (T_ISEVENT=1) " & _
         "AND (T_EVENT_DATE >= '" & datetostr(DateSerial(Year(dateToDraw),Month(dateToDraw),1)) & "') " & _
         "AND (T_EVENT_DATE < '" & datetostr(DateSerial(Year(dateToDraw),Month(dateToDraw)+1,1)) & "') " & _
         "GROUP BY T_EVENT_DATE, FORUM_ID " & _
         "ORDER BY T_EVENT_DATE Asc"

set rs = Server.CreateObject("ADODB.Recordset")
rs.open StrSql, My_conn


Works great.. this had always bugged me.
<
MarcelG Posted - 04 October 2005 : 16:25:54
Nice one! Good thinking, and nicely spotted!<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07