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)
 UserGroups v1.0 BETA2
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 10

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 07 January 2004 :  17:42:24  Show Profile
Not quite, I now get the error

ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

function OldisAllowedMember(fForum_ID,fMemberID)
	OldisAllowedMember = 0
	if isDeniedMember(fForum_ID, fMemberID) then exit function
	strSql = "SELECT MEMBER_ID, FORUM_ID FROM " & strTablePrefix & "ALLOWED_MEMBERS "
	strSql = strSql & " WHERE FORUM_ID = " & cLng(fForum_ID)
	strSql = strSql & " AND MEMBER_ID = " & cLng(fMemberID)

	Set rsAllowedMember = Server.CreateObject("ADODB.Recordset")
	rsAllowedMember.open strSql, my_Conn
	blnAM = 0
	if not rsAllowedMember.bof and not rsAllowedMember.eof then blnAM = 1
	rsAllowedMember.close
	set rsAllowedMember = nothing

	'## if the member exists as an allowed member for the forum then return value 1
	if blnAm = 1 then
		OldisAllowedMember = 1
	else

		'## check for usergroup membership
		strGroupsForUser = getGroupMembership(fMemberID,1)
		if strGroupsForUser <> "" then
			'## check to see if the user's groups are a part of this forum
			strSql = "SELECT USERGROUP_ID FROM " & strTablePrefix & "ALLOWED_USERGROUPS "
			strSql = strSql & "WHERE FORUM_ID = " & fForum_ID
			strSql = strSql & " AND PERMS = 0"
			set rsAllowedUserGroups = my_Conn.execute(strSql)
	
			blnAllowed = 0
			Do While Not rsAllowedUserGroups.eof Or OldisAllowedMember = 1
				intUserGroupID = rsAllowedUserGroups("USERGROUP_ID")
				if InStr("," & strGroupsForUser & ",", "," & intUserGroupID & ",") then OldisAllowedMember = 1
				rsAllowedUserGroups.movenext
			Loop
			rsAllowedUserGroups.close
			set rsAllowedUserGroups = nothing
		end if
	end if
end function

The UK MkIVs Forum
Go to Top of Page

gDewar
Starting Member

USA
17 Posts

Posted - 08 January 2004 :  01:41:05  Show Profile  Send gDewar an AOL message
David, no mix and match...

I said you could use

Do Until rsAllowedUserGroups.eof Or OldisAllowedMember = 1

- OR -

Do While Not rsAllowedUserGroups.eof And OldisAllowedMember <> 1

You have:
Do While Not rsAllowedUserGroups.eof Or OldisAllowedMember = 1

If you want to use While Not, you have to use an "AND" operator and compare OldisAllowedMember <> 1

I still say While Not is an extra Op...
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 08 January 2004 :  04:30:14  Show Profile
Thanks, I changed it to

Do Until rsAllowedUserGroups.eof Or OldisAllowedMember = 1

The UK MkIVs Forum
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 14 January 2004 :  15:45:09  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
quote:
Originally posted by gDewar

David,

I come from VB6 land... so maybe this is a dumb question...

In VB, True is = -1, Not 1. I know this is also the case in script because

Response.Write Int(True)

Returns -1

Shouldn't you guys use -1, not 1? Also, why aren't you guys using the True and False keywords to begin with?

This would seem especially important in this lawless land where there are no data types to force the correct values.

Maybe I'm just being a code fascist, I don't know... Just starting to get into this asp stuff so not sure I feel confident enough yet to root out the problem, but I may be more helpful soon - I've been using the forums in Interdev to teach myself this stuff.

Glenn



Nothing wrong with being a finatic :)

Easy question to answer :) The forums are written to be cross database compatible. Access, MySQL, MSSQL, MSDN, Sybase, Oracle, FoxPro, etc... is all possible with this product, not just SQL Server or Access or MySQL... these were all planned from the beginning :)

Reinsnitz (Mike)
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 14 January 2004 :  15:46:53  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
oh... and there are versions out there running all these right now... the problem is the last few didn't share their code with the community to allow us to also make it part of the baseline :)

Reinsnitz (Mike)
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 14 January 2004 :  17:05:59  Show Profile
Reinsnitz, your going off topic
Nikkol, did you get that fix above, it looks to have been correct fingers crossed

The UK MkIVs Forum
Go to Top of Page

gDewar
Starting Member

USA
17 Posts

Posted - 24 January 2004 :  02:19:32  Show Profile  Send gDewar an AOL message
quote:
Originally posted by Reinsnitz

Nothing wrong with being a finatic :)

Easy question to answer :) The forums are written to be cross database compatible. Access, MySQL, MSSQL, MSDN, Sybase, Oracle, FoxPro, etc... is all possible with this product, not just SQL Server or Access or MySQL... these were all planned from the beginning :)



Mike,

I am honored that you took notice of my question.

On the DB question, I can see the importance of that. In fact, I love the adapations that have been made so that code can be easily written to work with all the different databases.

But many of the instances where I see 1 being used as a boolean True value, are not related to Boolean fields in a database.

Another question:
Is there a set of coding conventions for Snitz that MOD developers are asked to follow?

Lastly, I'm not sure I'm asking these questions in the right forum... David seemed to suggest we unwittingly went off topic... Is there a section of the forum for discussing preferred code methodology for Snitz?

Edited by - gDewar on 24 January 2004 14:23:53
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 24 January 2004 :  16:18:05  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
quote:
Originally posted by gDewar


But many of the instances where I see 1 being used as a boolean True value, are not related to Boolean fields in a database.

Another question:
Is there a set of coding conventions for Snitz that MOD developers are asked to follow?


Their is nothing wrong with using 1 or 0 as a boolean true as long as it's consistent. And since some DBMS return 1 as true and others -1 as true, using a numeric value in a boolean context allows for the cross-DBMS use.

quote:
Originally posted by gDewar


Lastly, I'm not sure I'm asking these questions in the right forum... David seemed to suggest we unwittingly went off topic... Is there a section of the forum for discussing preferred code methodology for Snitz?


A better forum would be this one: http://forum.snitz.com/forum/forum.asp?FORUM_ID=17

But most of all a new topic is always preferrable to asking a non-related question in an existing topic. It's much more likely to get a response in a new topic.

Dave Maxwell
Barbershop Harmony Freak
Go to Top of Page

Ferragi
Starting Member

Brazil
4 Posts

Posted - 31 January 2004 :  09:41:25  Show Profile  Visit Ferragi's Homepage  Send Ferragi an ICQ Message
Hi,

Where can I find the UserGroupMOD required for this update?

I tried many places on this forum and some MOD sites but could not find it...

Fabio Ferragi
IVAO Assitant Network Admin

Edited by - Ferragi on 02 February 2004 13:14:36
Go to Top of Page

Ferragi
Starting Member

Brazil
4 Posts

Posted - 02 February 2004 :  13:14:54  Show Profile  Visit Ferragi's Homepage  Send Ferragi an ICQ Message
Does anyone still follow this topic?

Fabio Ferragi
IVAO Assitant Network Admin
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 02 February 2004 :  18:55:21  Show Profile
yes, just have been way too busy in my real life. Not sure what you are asking in your previous post. the MOD is still available via the link in this topic.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Ferragi
Starting Member

Brazil
4 Posts

Posted - 03 February 2004 :  11:37:57  Show Profile  Visit Ferragi's Homepage  Send Ferragi an ICQ Message
Ohhh nevermind.... I must have read something wrong, sorry :\

Fabio Ferragi
IVAO Assitant Network Admin
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 04 February 2004 :  20:10:38  Show Profile
Can I apply this to 3.4.04 ? It looks like some standard 3.4.04 functions regarding user rights have changed,
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 04 February 2004 :  20:13:08  Show Profile
haven't tried it with the latest version, so I don't really know. Anyone else try?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 10 February 2004 :  10:49:39  Show Profile
In 3.4.04 the active.asp and search.asp pages have changed. Instead of calling a function "chkDisplayForum" a function "chkForumAccessNew" is called.

Your mod modified a bit of "chkDisplayForum" so my logic is, "chkForumAccessNew" needs to be modified to.

I think the other Usergroup Mod changes are ok in 3.4.04
Go to Top of Page
Page: of 10 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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07