View Full Version : Children on forums
MishyMashy
06-12-2016, 09:20 AM
I don't want to ban under 16s from my forum as there isn't anything that is adult content anyway but to keep them safe online I was wondering if there is a way to show users that someone is under 16 years old? something that can be added under their username or in their signature?
thanks.
Snowhog
06-12-2016, 09:12 PM
vBulletin alread has a feature during registration to add a birthdate. It isn't mandatory though.
Yes, you could use a basic if statement in the postbit template for this.
https://www.vbulletin.com/docs/html/template_conditionals
alcazarx
06-13-2016, 05:59 AM
Provided the users enter their real age.
MarkFL
06-13-2016, 06:37 AM
If you want a bold red message directly below the username in the postbit (assuming you have the online status next to the username), then create a plugin with the hook location "postbit_display_complete" with the code:
if ($post['birthday'])
{
$age = floor((TIMENOW - strtotime($post['birthday']))/31556926);
if ($age < 16)
{
$post['onlinestatus'] .= '<div style="color: #FF0000; font-weight: bold;">User is ' . $age . ' years old!</div>';
}
}
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.