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/O Code)
 Age Restriction Mod Idea

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 [?]

 
   

T O P I C    R E V I E W
Carefree Posted - 06 May 2008 : 01:45:34
I would like a mod that allows different portions of the board to be automatically blocked from under-aged visitors/members. For example, one of the boards I visit occasionally has an adult humor section - and the mods have to review users by birthdate & manually modify the access lists to let people in after they become of age.

That is a bit more effort than I want to put into it. If we could use a check DOB string and if that particular section of the board had an age restriction in effect, the young'ns would be disallowed.<
15   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 26 May 2008 : 00:32:36
Time to move this one. I'm through with it.

I put a copy on SnitzBitz.

Upon registration, minors (between your minimum age restriction and 21) will automatically be assigned to a minors' usergroup (which denies access to any "Adult" areas) that you create.

When the minor turns 21, they are automatically moved from the minors' usergroup to the members' usergroup and allowed access to those formerly restricted areas.<
Carefree Posted - 25 May 2008 : 23:31:51
I figured out a way in.


    strSQL = "SELECT MEMBER_ID, M_KEY, M_DOB FROM " & strMemberTablePrefix & "MEMBERS_PENDING " & _
			 " WHERE M_KEY = '" & key & "'"
    set rsAdult = Server.CreateObject("ADODB.Recordset")
    rsAdult.open strSql, my_Conn
    if rsAdult.EOF or rsAdult.BOF then
    	'do nothing
    else
    	MDOB = rsAdult("M_DOB")
    	MMAge = DateDiff("yyyy", DOBToDate(MDOB), Date)
    end if
		rsAdult.close
		set rsAdult = Nothing


That populates the field. Now to see if the rest works.<
Carefree Posted - 25 May 2008 : 22:20:57
You missed the fourth-to-last post. I'm modifying register.asp so that new members who are minors will automatically be assigned to a user group which precludes their having access to portions of the board. Thus it definitely does have to do with pending members.

As for strMemberTablePrefix, that isn't the issue; tried that.<
phy1729 Posted - 25 May 2008 : 21:43:30
Pending members have nothing to do with this if I read the topic post correctly.

Also I forgot member tables have a diffrent prefix so it's
strMemberTablePrefix & "MEMBERS<
Carefree Posted - 25 May 2008 : 21:22:11
Tried both, but until registration is complete, the member remains in the pending table (checked the DBase).<
phy1729 Posted - 25 May 2008 : 21:19:30
Your using the wrong table. i.e. MEMBERS_PENDING not MEMBERS<
Carefree Posted - 25 May 2008 : 18:35:05
Maybe a fresh eye will help again.

Here's the routine for register.asp - after the else, it continues with adult auto-joining (if applicable):

    strSQL = "SELECT M_DOB FROM " & strTablePrefix & "MEMBERS_PENDING " & _
			"WHERE M_NAME = '" & strNewMemberName & "'"
    set rsAdult = Server.CreateObject("ADODB.Recordset")
    rsAdult.open strSql, my_Conn
    if not rsAdult.EOF then 
    	Member_DOB = rsAdult("M_DOB")
    	MMAge = DateDiff("yyyy", DOBToDate(Member_DOB), Date)
    end if
		rsAdult.close
		set rsAdult = Nothing
		if MMAge < 21 then
			USERGROUP_ID = 8
			MEMBER_TYPE = 1
			set rsClr = my_Conn.execute(strSql)
			if not rsClr.BOF and not rsClr.EOF then
				strSql = "INSERT INTO " & strTablePrefix & "USERGROUP_USERS " &_
					"(USERGROUP_ID, MEMBER_ID, MEMBER_TYPE) VALUES "
				myConn.execute(strSql)
			end if
			rsClr.close
			set rsClr = Nothing
		else


I'm not getting a value from the age check routine (in red), anyone see why?<
Carefree Posted - 25 May 2008 : 17:26:11
That fixed part 2, thanks. I had to rewrite part 3, but it now works.
Now I have to rewrite the register.asp portion of automatically assigning people (minors) to the minor User Group and this will be done.<
cripto9t Posted - 25 May 2008 : 12:08:57
I may be off the mark, but I think you're missing something.
strSql = "SELECT USERGROUP_ID FROM " & strTablePrefix & "USERGROUP_USERS " &_
			"WHERE MEMBER_ID = " & MemberID
		Set rsGroups = Server.CreateObject("ADODB.Recordset")
		rsGroups.open strSql, my_Conn
                if rsGroups.EOF or rsGroups.BOF then
                         'some error msg
                     else
                         USERGROUP_ID = rsGroups("USERGROUP_ID")
                     end if
		rsGroups.close
		set rsGroups = Nothing
<
Carefree Posted - 25 May 2008 : 08:10:16
Here's a routine I wrote for this purpose; it's not doing what I expect it to do, and I'll drive myself batty figuring out why.


'	############################# User Group Age Check Mod #############################
    strSQL = "SELECT M_NAME, MEMBER_ID, M_DOB FROM " & strTablePrefix & "MEMBERS " & _
             "WHERE MEMBER_ID = " & MemberID
    set rsAdult = Server.CreateObject("ADODB.Recordset")
    rsAdult.open strSql, my_Conn
    if not rsAdult.EOF then 
    	Member_DOB = rsAdult("M_DOB")
    	MMAge = DateDiff("yyyy", DOBToDate(Member_DOB), Date)
    end if
		rsAdult.close
		set rsAdult = Nothing


		strSql = "SELECT USERGROUP_ID FROM " & strTablePrefix & "USERGROUP_USERS " &_
			"WHERE MEMBER_ID = " & MemberID
		Set rsGroups = Server.CreateObject("ADODB.Recordset")
		rsGroups.open strSql, my_Conn
		rsGroups.close
		set rsGroups = Nothing

		
		if USERGROUP_ID = 8 then
			if MMAge > 20 then
				USERGROUP_ID = 7
				MEMBER_TYPE = 1
				strSql = "UPDATE " & strTablePrefix & "USERGROUP_USERS " &_
					"(USERGROUP_ID, MEMBER_ID, MEMBER_TYPE) VALUES " &_
					"WHERE MEMBER_ID = " & MemberID
				set rsClr = Server.CreateObject("ADODB.Recordset")
				rsClr.open strSql, my_Conn
				rsClr.close
				set rsClr = Nothing
			end if
		end if
'	############################# User Group Age Check Mod End #########################


Part 1 (in red) works. I've done an output to screen of MMAge and got what I needed.

Part 2 (in green) does not work. It doesn't retrieve the UserGroup_ID from the table. Thus, part 3 is never called and the process fails.<
Carefree Posted - 18 May 2008 : 20:11:40
In the bottom of inc_func_member.asp, there are routines which calculate a member's age from DOB. They're tiny, so I'll include them.


Function DisplayUsersAge(fDOB)
	dtDOB = fDOB
	dtToday = FormatDateTime(strForumTimeAdjust,2)
	DisplayUsersAge = DateDiff("yyyy", dtDOB, dtToday)
	dtTmp = DateAdd("yyyy", DisplayUsersAge, dtDOB)
	if (DateDiff("d", dtToday, dtTmp) > 0) then DisplayUsersAge = DisplayUsersAge - 1
End Function


function DOBToDate(fDOB)
	'Testing for server format
	if strComp(Month("04/05/2002"),"4") = 0 then
		DOBToDate = cdate("" & Mid(fDOB, 5,2) & "/" & Mid(fDOB, 7,2) & "/" & Mid(fDOB, 1,4) & "")
	else
		DOBToDate = cdate("" & Mid(fDOB, 7,2) & "/" & Mid(fDOB, 5,2) & "/" & Mid(fDOB, 1,4) & "")
	end if
end function


I have tried calling this function in several ways to get an age for comparison, but I get a variety of "you're so dumb" messages from my debugger. Would somebody who's used to this bit lend a hand?<
GarethMoore1979 Posted - 16 May 2008 : 18:10:53
haha.... your 72 years old- "your too old, get out!!!!" love it!<
phy1729 Posted - 16 May 2008 : 18:00:04
quote:
Originally posted by Carefree

Let's not go all the way to topic level, age-restricting by forum is sufficient. I'd rather avoid the unnecessary labor of having to set age limits on each/every post. There's already a minimum age for registration, but it leaves a gap for the teen-aged minors (which I'd rather not fill by a visit to the Feds explaining why some sick pervert was using my board to reach teeny-boppers).


I meant FORUM oops. I'll have time next Thursday to work on it if you don't get there first.<
MaD2ko0l Posted - 16 May 2008 : 13:33:01
could you not add another moderation level for age?

maybe modify the forum posting restriction mod? (http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=6220) (download of the file can be located a few posts down from http://forum.snitz.com/forum/topic.asp?TOPIC_ID=66878&SearchTerms=mad2kool)


or maybe you coudl modify the User level moderation mod (found here http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=39014)

1 of these mods must be able to do what you need with a little bit of tweaking<
Carefree Posted - 16 May 2008 : 09:38:12
Let's not go all the way to topic level, age-restricting by forum is sufficient. I'd rather avoid the unnecessary labor of having to set age limits on each/every post. There's already a minimum age for registration, but it leaves a gap for the teen-aged minors (which I'd rather not fill by a visit to the Feds explaining why some sick pervert was using my board to reach teeny-boppers).<

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