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 Events Calendar Version 2 sr 1
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 12

Aznknight
Senior Member

USA
1373 Posts

Posted - 13 April 2001 :  14:56:51  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
just found out that your download zip doesn't work rkattan.

here's the error:
Microsoft JET Database Engine error '80040e21'

The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.

/webdev/download.asp, line 49


- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

Zude
Starting Member

USA
9 Posts

Posted - 13 April 2001 :  14:59:37  Show Profile  Visit Zude's Homepage  Send Zude an ICQ Message
I'm using mySQL 3.23.33, here is how I overcame the use of TOP:

For example, in events_inc.asp on line 324, we have the "upcoming events" display. I removed the {"TOP" & intDisplay} portion and added the mySQL-compatible "LIMIT" modifier to the end of the SELECT statement, as follows:

quote:

function DisplayUpcomingEvents
strSql = "SELECT event_id, start_date, event_title, PRIVATE, " & strDBNTSQLName & " FROM " & strTablePrefix & "EVENTS LEFT JOIN " & strMemberTablePrefix & "Members ON " & strTablePrefix & "EVENTS.added_by = " & strMemberTablePrefix & "Members.Member_ID WHERE start_date >= '" & DateToStr(date()) & "' and start_date < '" & DateToStr(DateAdd("d",30,date())) & "' Order by start_date, event_id ASC LIMIT " & intDisplay


The reason that this works is because the statement is already returning the events ordered by start_date (ASCending), so using the LIMIT parameter gets us what we want.

Other lines/files that need changing:

  • events_inc.asp , line 365 (SELECT statement in function DisplayPastEvents)

  • events_functions.asp, line 948, (SELECT statement in function DisplayUpcomingEvents)

  • events_functions.asp, line 988, (SELECT statement in function DisplayPastEvents)



It would be great to add a global check for mySQL that would use an alternate SQL statement to use LIMIT instead of TOP, which would take care of this problem. Unfortunately, I don't have time to do that at the moment.

Note that I also had to change the INNER JOIN that was originally in the script to a LEFT JOIN in order to be able to use the ON...WHERE clause, because mySQL doesn't seem to allow this with INNER JOINs. Things are working fine at the moment. I think that this would only be a problem if there were null entries in the FORUM_EVENTS table.

Regards,
Zude



Go to Top of Page

rkattan
Starting Member

USA
12 Posts

Posted - 13 April 2001 :  15:02:25  Show Profile
quote:

Here's a comment from me:
Also doesn't changing the strToDate function in inc_functions.asp to accomodate the your events calendar mess it up for other parts of the site that uses that function?

- Alan


this is to be tested a lot, but i don't think so, as the mod i change is general, and the Date variable, either 13/04/2001 or April 13, 2001, the ASP language reads it the same..

Hoping no errors occur for the forum code itself, this will appear with the feedbacks you asked for

ps: Download error fixed.

Edited by - rkattan on 13 April 2001 15:07:02
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 13 April 2001 :  15:30:50  Show Profile
quote:

I got this error both in events.asp and events_inc.asp :

quote:
Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/Forum/events_inc.asp, line 187


on my code in line 187 is:
	rs.Open ssql, my_Conn
%>






does anyone haveany idea?I couldn't get it work

Go to Top of Page

VernMan
Starting Member

24 Posts

Posted - 13 April 2001 :  20:04:02  Show Profile
I've installed the calendar (great job by the way). I've noticed that when I post a public event as admin and log in as a user that does not have admin privileges this user can still delete public events. Is this by design? If so how can I stop them from deleting public messages and limiting public message to administrators only?

Any ideas?
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 13 April 2001 :  20:16:28  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

I've installed the calendar (great job by the way). I've noticed that when I post a public event as admin and log in as a user that does not have admin privileges this user can still delete public events. Is this by design? If so how can I stop them from deleting public messages and limiting public message to administrators only?

Any ideas?



Thanks

Nope this is not by design. A normal member cannot delete another member's public event. However a moderator or admin can delete public event. Probably the 2nd account you're using has moderator status.

I wrote how to make it moderators or admin only in the zip. Follow that.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 13 April 2001 :  22:46:36  Show Profile
quote:

quote:

I've installed the calendar (great job by the way). I've noticed that when I post a public event as admin and log in as a user that does not have admin privileges this user can still delete public events. Is this by design? If so how can I stop them from deleting public messages and limiting public message to administrators only?

Any ideas?




Nope this is not by design.



i got the same problem after installing the mod. if it's not by design, it may be set to allow all members by default. haven't got time to check it though.

Go to Top of Page

VernMan
Starting Member

24 Posts

Posted - 14 April 2001 :  10:34:00  Show Profile
quote:


Nope this is not by design. A normal member cannot delete another member's public event. However a moderator or admin can delete public event. Probably the 2nd account you're using has moderator status.

I wrote how to make it moderators or admin only in the zip. Follow that.




I've setup two accounts one with admin privledeges the other as a normal user but either user can delete any event. If unremark the code so that only admins and moderators can post messages then only they can. Not exactly what I want.

What I would like exactly is to allow only admins and moderates to post public events but anyone can post private events. Anyway to do this?
Go to Top of Page

VernMan
Starting Member

24 Posts

Posted - 14 April 2001 :  15:28:05  Show Profile
Figured it out, the actual line that shows and hides the delete button was remmed out.

As for the other issue, in case anyone's interested I put a value in there to check admin rights, if they exist then display the prompt to check mark weather the post is priviate or not. If no admin rights then the IsPrivateEvent automatically eqauls 1, thereby making it a private post.

Anyone see anything wrong with the way I did that? Any other suggestions?
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 14 April 2001 :  16:57:48  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Figured it out, the actual line that shows and hides the delete button was remmed out.



Yeah you're right I didn't realize this issue before. The fix is this.
Around line 829 in events_functions.asp there are these two lines:

<%'If (mlev >= intAllowed) and (lcase(lcase(rs(strDBNTSQLNAME))) = lcase(Request.Cookies(strUniqueID & "User")("Name"))) or mlev >=3 Then%>
<%If mlev >= intAllowed or lcase(strDBNTUSerName) = lcase(rs(strDBNTSQLNAME)) Then%>


Now uncomment the first line and comment the second line, like this:

<%If (mlev >= intAllowed) and (lcase(lcase(rs(strDBNTSQLNAME))) = lcase(Request.Cookies(strUniqueID & "User")("Name"))) or mlev >=3 Then%>
<%'If mlev >= intAllowed or lcase(strDBNTUSerName) = lcase(rs(strDBNTSQLNAME)) Then%>


I will fix this in the zip too now.

quote:

As for the other issue, in case anyone's interested I put a value in there to check admin rights, if they exist then display the prompt to check mark weather the post is priviate or not. If no admin rights then the IsPrivateEvent automatically eqauls 1, thereby making it a private post.

Anyone see anything wrong with the way I did that? Any other suggestions?



Hey that's pretty clever, Vernman. I don't see any problems with doing it like that

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 14 April 2001 :  20:51:01  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
Okay, this is probably a dumb question, but what exactly does the 'non-US dates support' addition do? I have installed it, and everything looks the same as it used to, from memory anyway. I thought that what it would achieve (in part) is to change the way dates are displayed on events.asp, in the Headings where 'Upcoming Events' and 'Recent Events' are displayed. Both before and after this addition, mine still use the mm/dd/yy format, and I would prefer it if they didn't. This also applies on my default.asp where I have included the inc_functions.asp, as can be seen here. (Note, you will not be able to access my Forums Events Calendar as only Members are allowed). Also, when an event is actually being displayed, the 'Starts:' bit is also still using the mm/dd/yy format. So, what did I just actually modify in the events Mod when I added the Non US support addon?

TIA!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

VernMan
Starting Member

24 Posts

Posted - 15 April 2001 :  11:37:05  Show Profile
I've been looking at the code and trying to determine how difficult it would be to add a start and end time feature to this mod.

Is anyone working on something like this? If so could you share this with me? I'd hate to have to reinvent the wheel here if someone's already done it. If not would anyone be intrested in something like this? I'm trying to create an online scheduling calendar for users as a business tool.

Thanks
Go to Top of Page

VernMan
Starting Member

24 Posts

Posted - 16 April 2001 :  11:35:39  Show Profile
I guess that means no ones interested?
Go to Top of Page

Marino
Starting Member

Canary Islands
42 Posts

Posted - 16 April 2001 :  17:58:49  Show Profile  Send Marino an ICQ Message
quote:

***** BUG *****

The the calendar is not working well !!!

i get for each month number of days as the month, for ex, april will show 4 white days, november 11 white days... only december is OK, this is because i use UK date style, DD/MM/YYYY on my server

Fix is on events_function.asp line 11:
find this line:
dNextStart = CDate(intMonthNum + 1 & "/01/" & intYearNum)

and replace with this line:
dNextStart = CDate(MonthName(intMonthNum + 1) & " 1," & intYearNum)

Thanks...




You should change this in events_inc.asp too if you want to use this file, as it doesn't include events_function.asp, but uses its own GetLastDay function.

in events_inc.asp about line #320 (mine is changed, so I don't know exactly the line) inside function GetLastDay:


quote:
find this line:
dNextStart = CDate(intMonthNum + 1 & "/01/" & intYearNum)

and replace with this line:
dNextStart = CDate(MonthName(intMonthNum + 1) & " 1," & intYearNum)




Marino
Go to Top of Page

Marino
Starting Member

Canary Islands
42 Posts

Posted - 16 April 2001 :  18:52:56  Show Profile  Send Marino an ICQ Message
quote:

Okay, this is probably a dumb question, but what exactly does the 'non-US dates support' addition do?


AFAIK the 'non-US dates support' has to be with how the server handles dates. At least for me, which I use a non US server, and need to work with "translated" MS products, I can tell you is a pain to work with dates in those products.

For example, if just type a date in a query against my SQL Server ("spanish" translated) asking for a date like 3/5/01 it will give me March, 5 2001, so the month is first. But, if I ask it for 13/5/01 it will give me May, 13 2001 as it sees that 13 is higher than the high month and it auto-translate mm/dd/yy to dd/mm/yy.

So, what this mod does is handle dates in a way the server can't "get confused" about if you are giving a mm/dd/yy or a dd/mm/yy. In US servers i think you haven't this problem as all dates are in mm/dd/yy format.

quote:

I have installed it, and everything looks the same as it used to, from memory anyway. I thought that what it would achieve (in part) is to change the way dates are displayed on events.asp, in the Headings where 'Upcoming Events' and 'Recent Events' are displayed. Both before and after this addition, mine still use the mm/dd/yy format, and I would prefer it if they didn't. This also applies on my default.asp where I have included the inc_functions.asp, as can be seen here. (Note, you will not be able to access my Forums Events Calendar as only Members are allowed). Also, when an event is actually being displayed, the 'Starts:' bit is also still using the mm/dd/yy format. So, what did I just actually modify in the events Mod when I added the Non US support addon?

TIA!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *



The way to change how dates are displayed has to be with the function FormatDateTime as it uses the server date format to show the date.

I think the solution for this is to code another function (let's call it FormatDateTime2) that is able to show dates not using server defaults. And change the calls to FormatDateTime for FormatDateTime2 in events_functions.asp and events_inc.asp.

Actually I am trying to translate the forum and some mods to spanish, so I will code this function for myself. I am changing also the way the week is shown (as the week for us starts on monday, not on sunday). If you are interested, I can post the changes that should be done.

Marino


Edited by - Marino on 16 April 2001 18:53:59
Go to Top of Page
Page: of 12 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.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07