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 - 19 November 2003 :  03:22:39  Show Profile
Nikkol, i've found a strange error, it doesn't happen all the time though. I have 3 admins, I have a forum set to "Allowed Member List (hidden)" allowing 2 of the admins (not me) access, I can see it anyway. It is not using UserGroups, just the "Allowed Member List". When one of the other 2 post they sometimes receive a BOF or EOF error on the red line, the post is still saved though. However, looking at the code, it should not exexcute this code anyway, the green code should be executed as the members are in the "Allowed Member List".
I haven't experienced the error myself. Any ideas why this could be happening?
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

Edited by - DavidRhodes on 19 November 2003 03:45:11
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 19 November 2003 :  06:29:21  Show Profile
doesn't make sense if it only happens sometimes. also, how could they get that particular error when there is a check for eof? are you positive it is that line and not another?

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

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 19 November 2003 :  07:41:02  Show Profile
Yeah, it's definitely that line, maybe it needs a BOF check also?
Do While Not rsAllowedUserGroups.eof Or rsAllowedUserGroups.bof Or OldisAllowedMember <> 1

The UK MkIVs Forum

Edited by - DavidRhodes on 19 November 2003 07:41:21
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 19 November 2003 :  13:29:48  Show Profile
you could try it and see, but you'd think that eof would be enough.

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

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 19 November 2003 :  13:53:27  Show Profile
It should, the recordset was empty, which it is because UserGroups are not set up on the forum, then EOF and BOF should be the same.

I'm still confused as to why it read that code in the first place, the members who received the error were in the Allowed Member List so it should've exited the function at the green code in my previous post.

The UK MkIVs Forum
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 19 November 2003 :  16:32:04  Show Profile
you could try a response.write of that sql near the top to see if it maybe something's amiss there. It's thinking that they are not in the allowed member list, so we need to find out why.

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

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 19 November 2003 :  18:09:48  Show Profile
ok, will try it tomorrow, cheers

The UK MkIVs Forum
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 20 November 2003 :  08:44:50  Show Profile
quote:
Originally posted by Reinsnitz

You may not realy want to override the deny...




Ok...but lets say that I won't be needing to restrict someone form the whole forum, without having to take him away from the groups that grants him access. Is ther away to get DENY not to oweride?!

An example....

We have Person 1, 2, 3 and 4
...and Forum A, B, C, D and E.

Person 1 will have access to A B C
Person 2 will have access to B C D
Person 3 will have access to A C D
Person 4 will have access to A B D
Finaly ALL shall have access to E

How do I set upp my groups? Any Idea!

At least for me it seems quite complex to set up the grous when DENY owerides other settings.

/CirruZZ
(Spelling in English isn't my thing )
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 20 November 2003 :  09:25:08  Show Profile
Just make all the forums allowed member list and then make a group for each forum (for the example you showed that would be the best solution). You will not need DENY on any of the groups.

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

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 20 November 2003 :  09:48:30  Show Profile
quote:
Originally posted by Nikkol

Just make all the forums allowed member list and then make a group for each forum (for the example you showed that would be the best solution). You will not need DENY on any of the groups.


Ok! I'll try that!


/CirruZZ

Edited by - CirruZZ on 20 November 2003 11:36:40
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 21 November 2003 :  19:47:32  Show Profile  Visit Nathan's Homepage
So, a hypothetical question involving the User Groups and Active Users mods. (Sorry, I know this is a tangent)

Say a member is in several groups. Say that a given 'view' shows users association with groups in such a way that it could only associate the user with a single group. For example, maybe different groups get a different highlight color in the active users page. You can only be highlighed one color.

Which would you rather.
A) The admin chooses which groups are more important, and you are highlighed your 'most important' group color.
B) You choose which of your groups you want most to be associated with in your profile. More work for you, but more chioce too.

Nathan Bales
CoreBoard | Active Users Download

Edited by - Nathan on 21 November 2003 19:48:01
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 21 November 2003 :  20:01:15  Show Profile
Good point,
I see UserGroups as more of an admin facility on my forum though and don't see the need for users to see it.

The UK MkIVs Forum
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 21 November 2003 :  20:04:08  Show Profile
hehe ... i've read your post Nathan, something like 10 times now. i've decided that it's my lack of having experience with your MOD to know what the heck you are asking!!!

so, someone else might be better answering your question, but what are you trying to achieve actually? you want to be able to show UserGroups stats on the active users pages?

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

Nathan
Help Moderator

USA
7664 Posts

Posted - 21 November 2003 :  20:09:16  Show Profile  Visit Nathan's Homepage
Actually, I'm trying to decide which of these two features I'm going to impement on CoreBoard.

This may help explain my question (and why I ask it) better -> http://www.coreboard.net/default.aspx?View=Topic&ID=49

(Without one of these two features, users of CoreBoard couldn't distingush between users and admins)

I asked the question here because the people using this thread are interested in/and know whats up with Usergroups.

Shameful, I know

Nathan Bales
CoreBoard | Active Users Download

Edited by - Nathan on 21 November 2003 20:11:39
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 21 November 2003 :  20:12:43  Show Profile
ya, but why can't you display all groups on the active page? (i think i just don't know how active users works I guess)

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
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.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07