Helpful Information
 
 
Category: Modification Requests/Questions (Unpaid)
Date Of Birth Restrictions....

How about a hack where the user's date of birth can prevent them from entering certain forums? Could be useful for sites where there are adult-related forums or other forums which you would prefer young members not to see. If the member does not enter their date of birth, when they click on a restricted forum, they would be redireced to a message saying: "Please enter you date of birth in your user cp."

Does this sound like a good idea? I'm sorry if this has already been suggested/made etc.

edit forumdisplay.php, find:


$getperms=getpermissions($forumid,-1,-1,$foruminfo['parentlist']);
if (!$getperms[canview]) {
show_nopermission();
}


After that add:


$usersbirthyear=trim(substr($bbuserinfo[birthday],0,4));
if ((int)$usersbirthyear<1900 OR !$usersbirthyear)
{ eval("standarderror(\"".gettemplate("fill_birthyear")."\");");exit;}
if ((int)$usersbirthyear>1990)
{ eval("standarderror(\"".gettemplate("you_are_young")."\");");exit;


Create a templated named "fill_birthyear" which will be displayed if he didnt fill his birtyear field.

Create a templated named "you_are_young" which will be displayed if he was born after 1990. (Edit "1990" according to your wish)

Enjoy! :)

Thanks, this could prove useful :)










privacy (GDPR)