Print Page | Close Window

Access forum according to DOB setting?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4330
Printed Date: 02 April 2026 at 6:36am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Access forum according to DOB setting?
Posted By: serendipity
Subject: Access forum according to DOB setting?
Date Posted: 18 July 2003 at 11:34am
I'd like to set up a forum that allows only those members who are 18 or over to access a certain forum, but still allow them to post in other forums that have no age restriction. If member enters no date-of-birth in their profile, or the date of birth means they're under 18, they can see the forum but they just can't enter.

Is this possible??



Replies:
Posted By: faubo
Date Posted: 18 July 2003 at 11:45am

you will have to modify your registry page.

use datadiff to see if the user is under 18, if he/she is... then give them the normal group permissions settings.

If they are above 18 instead of the normal group permissions you put them in the Above18 group permissions.

Now you just need to set up the above 18 forum to only accept people from above18 group.

 

This is only theory, but I think it should work



-------------
http://www.conhecerparaconservar.org - I don't know how to make you click here


Posted By: serendipity
Date Posted: 18 July 2003 at 3:09pm
Sorry, prob a stupid question but what is datadiff ??


Posted By: faubo
Date Posted: 18 July 2003 at 3:53pm

Not stupid, I wrote that in a hurry, should have explained better.

DateDiff is a VBScript date function.

(start a copy from 4guysfromrolla)

DateDiff returns the difference in intervals between two dates. The interval can be one of the following settings:

	"yyyy"		Year
	"q"		Quarter
	"m"		Month
	"y"		Day of Year
	"d"		Day
	"w"		Weekday
	"ww"		Week of Year
	"h"		Hour
	"n"		Minute
	"s"		Second

So, DateDiff("d",#10/5/98#,#10/8/98#) would return 3, since there are three days between 10/8/98 and 10/5/98.

(end copy)

you need DateDiff("yyyy", DOB, Today), if return 18 then the user already have 18.

Off course you will need to change manually when a user signs with less than 18 but then complete 18 years old, although you probably can do some automatic way to do that.



-------------
http://www.conhecerparaconservar.org - I don't know how to make you click here


Posted By: serendipity
Date Posted: 18 July 2003 at 4:05pm
Aaah, got it. I'm assuming this would be code on registration.asp page somewhere. I'll play with it and see what I can come up with.

Thanks for your help!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net