Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Category-ing in Calendar
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jóhannes
Junior Member

Iceland
139 Posts

Posted - 13 January 2003 :  12:12:16  Show Profile  Visit Jóhannes's Homepage  Send Jóhannes an AOL message
Hi

I am using the Calendar MOD in v.3.4.03

Is there a way to have categorys in the Calendar? That is:

I have 3 categorys (cars, meetings and football) and with some entries. Can I have a "drop-down" list to display one of them (category) at a time (that is: I want only to see "football" entries)?

can I change the URL from:
intranet.test.is/dagatal/cal.asp?view=monthly&date=13.1.2003

to something like this:
intranet.test.is/dagatal/cal.asp?FORUM_ID=1&view=monthly&date=13.1.2003

what changes do I have to make in ASP?

Jóhannes


Edited by - Jóhannes on 14 January 2003 15:07:13

red1
Junior Member

355 Posts

Posted - 14 January 2003 :  00:34:58  Show Profile
You can add something like this to the WHERE clause of the sql string:
Edit: code deleted

My Mods:
New Events Calendar
New Non-database Active Users

Edited by - red1 on 20 January 2003 10:34:16
Go to Top of Page

Jóhannes
Junior Member

Iceland
139 Posts

Posted - 14 January 2003 :  05:13:26  Show Profile  Visit Jóhannes's Homepage  Send Jóhannes an AOL message
I'm not very good at this SQL buisness . This is the SQL for Monthly view:

'### Get the topics from the db ###
strSql = "SELECT T.TOPIC_ID, " & _
                "T.T_SUBJECT, " & _
                "T.T_AUTHOR, " & _
                "T.T_MESSAGE, " & _
                "T.FORUM_ID, " & _
                "T.T_STATUS, " & _
                "T.T_EVENT_DATE, " & _
                "C.CAT_MODERATION, " & _
                "F.F_MODERATION " & _
          "FROM " & strTablePrefix & "TOPICS T, " & _
                    strTablePrefix & "CATEGORY C, " & _
                    strTablePrefix & "FORUM F " & _
          "WHERE T.T_ISEVENT=1 " & _
          "AND (T.T_EVENT_DATE > '" & DateToStr(DateSerial(Year(dateHolder),Month(dateHolder),1-1)) & "') " & _
          "AND (T.T_EVENT_DATE < '" & DateToStr(DateSerial(Year(dateHolder),Month(dateHolder)+1,1)) & "') " & _
          "AND   F.FORUM_ID = T.FORUM_ID " & _
          "AND   C.CAT_ID = T.CAT_ID " & _
          "ORDER BY T.T_EVENT_DATE Asc"


How do I edit this ?

Jóhannes


Edited by - Jóhannes on 14 January 2003 14:32:28
Go to Top of Page

red1
Junior Member

355 Posts

Posted - 14 January 2003 :  21:02:32  Show Profile
Like this:

Edit: code deleted

My Mods:
New Events Calendar
New Non-database Active Users

Edited by - red1 on 20 January 2003 10:33:41
Go to Top of Page

Jóhannes
Junior Member

Iceland
139 Posts

Posted - 15 January 2003 :  03:40:36  Show Profile  Visit Jóhannes's Homepage  Send Jóhannes an AOL message
I did that (in the SQL in monthly-view) but then I get this:

ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/intranet/vsk/dagatal/cal.asp, line 634


Any suggestions ?

Jóhannes

Go to Top of Page

red1
Junior Member

355 Posts

Posted - 15 January 2003 :  06:46:34  Show Profile
sorry about that... use this one (this works, I tested it)
strSql = "SELECT T.TOPIC_ID, " & _
                "T.T_SUBJECT, " & _
                "T.T_AUTHOR, " & _
                "T.T_MESSAGE, " & _
                "T.FORUM_ID, " & _
                "T.T_STATUS, " & _
                "T.T_EVENT_DATE, " & _
                "C.CAT_MODERATION, " & _
                "F.F_MODERATION " & _
          "FROM " & strTablePrefix & "TOPICS T, " & _
                    strTablePrefix & "CATEGORY C, " & _
                    strTablePrefix & "FORUM F " & _
          "WHERE T.T_ISEVENT=1 " & _
          "AND (T.T_EVENT_DATE > '" & DateToStr(DateSerial(Year(dateHolder),Month(dateHolder),1-1)) & "') " & _
          "AND (T.T_EVENT_DATE < '" & DateToStr(DateSerial(Year(dateHolder),Month(dateHolder)+1,1)) & "') " & _
          "AND   F.FORUM_ID = T.FORUM_ID " & _
          "AND   C.CAT_ID = T.CAT_ID "

intForum_ID = chkString(Request.Querystring("FORUM_ID"),"SQLString")
if intForum_ID <> "" and IsNumeric(intForum_ID) then 
	strSql = strSql & "AND T.FORUM_ID = " & clng(intForum_ID) & " "
end if

strSql = strSql & "ORDER BY T.T_EVENT_DATE Asc"

My Mods:
New Events Calendar
New Non-database Active Users
Go to Top of Page

Jóhannes
Junior Member

Iceland
139 Posts

Posted - 15 January 2003 :  08:19:17  Show Profile  Visit Jóhannes's Homepage  Send Jóhannes an AOL message
red1, you are a genius.
Many thanks for your support. That fixed it.



Jóhannes

Go to Top of Page

Jóhannes
Junior Member

Iceland
139 Posts

Posted - 20 January 2003 :  09:44:52  Show Profile  Visit Jóhannes's Homepage  Send Jóhannes an AOL message
...one more

This is working fine in all view's except in the yearly-view (cal.asp?view=yearly)

There is no "strsql" in the cal.asp page for the "Sub Yearlyview" to edit, but there is one in the cal_functions.asp. If I edit that like this:

strSql = "SELECT T_EVENT_DATE " & _
            "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)) & "') "

                      
intForum_ID = chkString(Request.Querystring("FORUM_ID"),"SQLString")
if intForum_ID <> "" and IsNumeric(intForum_ID) then 
	strSql = strSql & "AND T.FORUM_ID = " & clng(intForum_ID) & " "
end if

strSql = strSql & "ORDER BY T.T_EVENT_DATE Asc"


I get this error:

Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.


Help !!!

Jóhannes

Go to Top of Page

red1
Junior Member

355 Posts

Posted - 20 January 2003 :  10:31:17  Show Profile
try this:

intForum_ID = chkString(Request.Querystring("FORUM_ID"),"SQLString")
if intForum_ID <> "" and IsNumeric(intForum_ID) then 
	strSql = strSql & "AND FORUM_ID = " & clng(intForum_ID) & " "
end if

strSql = strSql & "ORDER BY T_EVENT_DATE Asc"


Let me know if it works.

My Mods:
New Events Calendar
New Non-database Active Users
Go to Top of Page

Jóhannes
Junior Member

Iceland
139 Posts

Posted - 20 January 2003 :  11:08:08  Show Profile  Visit Jóhannes's Homepage  Send Jóhannes an AOL message
That fixed it.

Thanks.


Jóhannes

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