Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1260)
AGE & GENDER BOARD FILTER MOD
By Eliana Tamerin (http://www.simplemachines.org/community/index.php?action=profile;u=30373) || Originally by Senkusha (http://www.simplemachines.org/community/index.php?action=profile;u=949)
This mod is written for 1.1.5. It may work on older versions (no guarantee), but it will not work on any 2.0 versions. An upgrade to 2.0 is not yet planned.Warning
Installing any modification is a risk to your forum. Please
backup BOTH your database (structure and data) and files before attempting to install. You have been warned.
Known Conflicts
- Gender on Registration (http://custom.simplemachines.org/mods/index.php?mod=407) by JayBachatero (http://custom.simplemachines.org/mods/index.php?action=profile;u=4365)
- Registration - Show Gender (http://custom.simplemachines.org/mods/index.php?mod=1012) by LPCA (http://custom.simplemachines.org/mods/index.php?action=profile;u=21625)
IntroductionRestrict entrance into a specific board by profile-set age or gender. Users are restricted from editing their age and gender after it has been set (only admins can after that). Ages over 80 default to 0 for the purposes of this mod.
Also, please note that
this mod will restrict guests from entering the boards you modify with the age/gender options. This also means that seach engines will not be able to access these boards.
How To Use This Mod-Install the mod
-Navigate to Admin CP > Boards > (Board you wish to modify) "Modify"
-Enter minimum age and maximum age or select gender you wish to restrict
-Click "Modify"
-Users are now allowed into/restricted from the board you just modified based on their minimum age, maximum age or gender
-To require the gender and/or birthdate fields on the registration page:
--Navigate to Admin CP > Registration > Settings
--Check/uncheck the options at the bottom
--Save
Regarding UpgradesWhen the mod version is upgraded, I will try to provide upgrade packages for earlier versions. However, because the number of supported versions may become overly strenuous, I will only
guarantee upgrade scripts for the past
two versions of the mod. I will keep the changelog accurate to make it easy to figure out whether you have a version within that timeframe or not. If an upgrade script is not available, you must uninstall the mod prior to installing the newest version. You may need to update each board's settings after doing this.
NotesThis is the first mod of Eliana Tamerin, taken over from another coder. Please keep that in mind as you request features or ask for support. However, feature requests/suggestions and support requests are always welcome. Patience is advised.
Changelog0.1.0 - August, 2006o Initial Release (http://www.simplemachines.org/community/index.php?topic=103884.0) by Senkusha (http://www.simplemachines.org/community/index.php?action=profile;u=949)
0.1.0 - September, 2007o Mod is updated for 1.1.3 by JohnyB (http://www.simplemachines.org/community/index.php?action=profile;u=67763)
1.0 - June 17, 2008o Taken over by Eliana Tamerin (http://www.simplemachines.org/community/index.php?action=profile;u=30373)
o Mod is updated to 1.1.5.
o Mod is brought up to SMF Coding Standards and submitted to mod site
1.0.2 - June 17, 2008o Fixed issues as required by SMF Customization Team
1.0.4 - June 17, 2008o Fixed loopholes in ManageBoards and Profile to restrict age
1.1.0 - June 21, 2008o Fixed misspelling in language
o Added Maximum Age to view board option
1.1.1 - June 26, 2008o Added upgrade option to installer
1.2.0 - July 13, 2008o Fixed bug that didn't allow users who haven't set their birthdates to enter unrestricted forums (unrestricted by age)
o Added registration field for gender (code borrowed with permission from GenderonRegistration mod)
o Added registration field for birthdate
o Added settings in ADMIN CP > REGISTRATION > SETTINGS to require gender and/or birthdate on registration page
1.2.1 - July 23, 2008o Fixed bug on registration page related to requiring the gender field. (Thanks to [SiNaN] (http://www.simplemachines.org/community/index.php?action=profile;u=118168)
Glad to see it approved. Good luck with it Eliana. ;)
Nice one Eliana ;)
-[n3rve]
I need that modifications on my some sites . Thats taking time , doing it manual thank you for that. But i read your plans for 2.0 if it can be earlier it would be better.
I basically just put that so I wouldn't get 200 people asking me for a 2.0 version or when it would be out. I'm sticking to what's there, but I won't say that a 2.0 version will never happen. It's just not planned at the moment (primarily because Beta4 is going to introduce a lot of bug fixes, and that means code fixes, so I'd just have to start over again).
Hello,
Looks interesting and I'm going to consult with my Admin Team about implementing it. And if I understand correctly, guests won't be able to look at any boards with age restrictions because guests can't say how old they are, yes?
Very minor nit... the text string about setting the minimum age has the word "minimum" misspelt ;).
Thank you for making it available.
Cal
Thanks for the interest, Cal.
To answer your question, guests will not be able to see any boards you set age or gender requirements on (because guests have no profile information so they can't set their age or gender). Nor will spiders, so if you're concerned about getting those forums indexed by search engines, then don't restrict them.
And thank you for pointing out the misspelling, I'll chalk it up for a fix for the next version.
is there an option to force the restrictions to apply to mods/admins also?
Well, that sort of defeats the point of being an admin. Admins have "god" powers over the entire forum, so restricting them would contradict that.
I can probably put in an option for it, but why? You won't be able to see the specific boards there either, then, if you're an admin.
Nice mod and would be useful for my forum, but I'm getting this at the top:
Quote// Start Age and Gender Filter Mod $txt['min_age_title'] = 'Minimum Age to View Board:'; $txt['min_age_desc'] = 'What is the mimiumn age for viewing access for this board?'; $txt['gender_title'] = 'Gender Restricted (only):'; $txt['gender_desc'] = 'Which gender is this board restricted to view / post?'; $txt['gender_block_disabled'] = 'Unrestricted'; $txt['gender_block_gender_set'] = 'Unknown Genders Only'; $txt['gender_block_girls'] = 'Male Only'; $txt['gender_block_boys'] = 'Female Only'; $txt['gender_block_gender_unset'] = 'Male and Female Only'; // End Age and Gender Filter Mod
What do I need to change to make this go away?
Your language file didn't edit properly. Open your /Themes/default/languages/modifications.english(whatever else it is, might be utf8 or british, etc).php and move the ?> to the bottom of the file. Save and reupload.
That worked! Thanks :)
Not a problem.
Quote from: Eliana Tamerin on June 21, 2008, 10:53:46 AM
Well, that sort of defeats the point of being an admin. Admins have "god" powers over the entire forum, so restricting them would contradict that.
I can probably put in an option for it, but why? You won't be able to see the specific boards there either, then, if you're an admin.
I have both male and female admins so not seeing it wouldn't be an issue. However in my case I would like to make two boards. One 'The Boy's Room' and one 'Girl's Only'. They wouldn't be truely one sex or the other if admins could constantly peek in and see what the other sex was saying. I want a place for each sex to be comfortable talking amoungst themselves without feeling like whatever they say could be seen by the other sex.
Well, in Load.php, this is the code you'd have to edit:
if (!$user_info['is_admin'])
{
$user_info['query_see_board'] .= ' && b.MinAge <= ' . (int) $age;
// Add condition for Unrestricted Genders, then qualify based on 0 (Unset Gender), 1 (Males), 2 (Females), 3 (Boys OR Girls, no UNSET genders!)
$user_info['query_see_board'] .= ' && ((b.gender_sel = -1 || b.gender_sel = ' . $memberGenderType . ') || (b.gender_sel = 3 && ' . $memberGenderType . ' > 0))';
}
If the conditional is removed, then it applies to admins as well as members. Something like:
$user_info['query_see_board'] .= ' && b.MinAge <= ' . (int) $age;
// Add condition for Unrestricted Genders, then qualify based on 0 (Unset Gender), 1 (Males), 2 (Females), 3 (Boys OR Girls, no UNSET genders!)
$user_info['query_see_board'] .= ' && ((b.gender_sel = -1 || b.gender_sel = ' . $memberGenderType . ') || (b.gender_sel = 3 && ' . $memberGenderType . ' > 0))';
I'm currently working on version 1.1, which will fix a few bugs and include a new feature: "Maximum Age to enter board" (so now you can restrict to a certain agegroup).
Just working out the last few little bugs and kinks, especially with the install/upgrade/uninstallation. I don't want to force you guys to uninstall, because it does go a bit screwy, and I'm trying to figure out a resolution to that.
BTW, if you have uninstalled and your members can't see your forums, just modify them and save without changing any info. That should work.
Cool! ... if I install this.... how would I do this? (in index.template.php)
... if age is under 14 ...
don't echo ' <a href="here.html">some link</a>';
or, would there be a simpler way of me of just doing that? :p
This seems like a VERY useful mod - and I am anxious to give it a try!
Thanks!
Read the "How to use this mod" part of the first post. It's much simpler than that.
It´s a perfekt mod :)
Czech translation:
./Themes/default/languages/Modifications.czech.php
// Start Age and Gender Filter Mod
$txt['min_age_title'] = 'Minimální věk pro zobrazení fóra:';
$txt['min_age_desc'] = '(napiste číslicí minimální věk)';
$txt['gender_title'] = 'Povolení dle pohlaví:';
$txt['gender_desc'] = '(vyberte jednu z možností)';
$txt['gender_block_disabled'] = 'Neomezeno';
$txt['gender_block_gender_set'] = 'Nezjištěno';
$txt['gender_block_girls'] = 'Jen muži';
$txt['gender_block_boys'] = 'Jen ženy';
$txt['gender_block_gender_unset'] = 'Muži i ženy';
// End Age and Gender Filter Mod
Thanks for using my mod, MaxiPes.
For 1.1, I'm adding in two more language strings:
$txt['min_age_zero'] = '(0 to disable)';
$txt['max_age_eighty'] = '(80 to disable)';
I'd love to include the Czech language, but I don't want it to be incomplete.
Alright, I've fixed the issue I was having with the upgrader. Version 1.1 is now
Released!Version 1.1 features:
- Bug fix for age restriction on profile
- Added feature: Maximum Age to Restrict
I highly recommend upgrading to 1.1, as the bug in 1.0 prevented everybody from editing the age in their profiles, regardless of whether it was previously set or not.
You may use the package as an upgrade script. To do so, do not uninstall 1.0.4, but download the 1.1 package and upload to your package manager like a normal mod. Then install like normal, and it will work.
You're so fast. Thanks for the update Eliana. ;)
Thank you very much, Eliana.
I used this mod a "few versions ago" (lol), but it didn't worked with 1.1.5. Now it does!
That's a great find to "adult boards" and other stuff... lol
Thanks for using the mod, and for your kind words, softcore.
Excellent Mod
Just incase anyone asks, on my forum i had this scenario:
Boards disappeared to users.
This was rectified simply by editing each board and clicking modify to save it.
The board would then appear.
Everything works perfectly.
Installed on: www.voguefm.co.uk
A happy customer :)
I love this mod, thank you Eliana!
One thing I would like to suggest for a future release is that the date of birth be required on the registration form (if possible), not just a check box that says "I am at least [##] years old".
Of course, I'm thinking that this would ideally tie into the user profile. For now, I've added a custom profile fields and forced this info to be entered.
Maybe that should be a separate mod... :-\
I would love to install this as I would like an adult forum, however I have a few questions first, and I know that the coder isn't around, so I'll just post it and wait for an answer ;)
1 - Does this have it so that all members are forced to update their age? Meaning, as soon as I installed this, perhaps there could be a message that states a member cannot use the forum without updating their birthday? That way all members have to answer it. If not is there a way to do it?
2 - Does this restrict mods who are underage? I have two moderators who are under 18 that I wouldn't want to get into the adult area.
Quote from: ladynightowl on June 27, 2008, 12:26:43 PM
Of course, I'm thinking that this would ideally tie into the user profile. For now, I've added a custom profile fields and forced this info to be entered.
Maybe that should be a separate mod... :-\
Isn't there already a way to force a user to enter a birthday when registering? If not, how did you get this Age Mod to work with your Custom Field for age, so that the Age Mod reads the Age Field?
Have a good holiday Eliana. ;)
Let me try to give answer until Eliana is back.
1) Okay, let's force them.
Load.php
Find:
?>
Replace:
function checkAge()
{
global $ID_MEMBER, $context, $db_prefix;
if($context['user']['is_guest'])
return false;
$request = db_query("
SELECT birthdate
FROM {$db_prefix}members
WHERE ID_MEMBER = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);
list ($birthdate) = mysql_fetch_row($request);
mysql_free_result($request);
if((empty($birthdate) || $birthdate === '0001-01-01') && $context['current_action'] != 'profile' && $context['current_action'] != 'logout')
redirectexit('action=profile;u=' . $ID_MEMBER . ';sa=forumProfile');
elseif((empty($birthdate) || $birthdate === '0001-01-01') && $context['current_action'] == 'profile')
echo '<span style="color: red; font-weight: bold;">Please fill in your birtdate profile area.</span>';
}
?>
index.php
Find:
loadPermissions();
Replace:
loadPermissions();
// Did they select their age?
checkAge();
2) It restricts. Even if the user is a Global Moderator or the moderator of that board.
3) Let's force the users to enter their age while registering too.
Register.template.php
Find:
document.forms.creator.regSubmit.disabled = isEmptyText(document.forms.creator.user) || isEmptyText(document.forms.creator.email) || isEmptyText(document.forms.creator.passwrd1) || !document.forms.creator.regagree.checked;
Replace:
document.forms.creator.regSubmit.disabled = isEmptyText(document.forms.creator.user) || isEmptyText(document.forms.creator.email) || isEmptyText(document.forms.creator.passwrd1) || !document.forms.creator.regagree.checked || isEmptyText(document.forms.creator.bday1) || isEmptyText(document.forms.creator.bday2) || isEmptyText(document.forms.creator.bday3);
Find:
<input type="password" name="passwrd2" size="30" tabindex="', $context['tabindex']++, '" />
</td>
</tr>';
Replace:
<input type="password" name="passwrd2" size="30" tabindex="', $context['tabindex']++, '" />
</td>
</tr><tr>
<td width="40%">
<b>', $txt[563], ':</b>
<div class="smalltext">', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '</div>
</td>
<td>
<input type="text" name="bday3" size="4" maxlength="4" value="" tabindex="', $context['tabindex']++, '" /> -
<input type="text" name="bday1" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" /> -
<input type="text" name="bday2" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" />
</td>
</tr>';
Register.php
Find:
loadLanguage('Login');
Replace:
loadLanguage('Login');
loadLanguage('Profile');
It works!!! Thank you SiNaN! You're brilliant! The only very very small glitch is the tab order - when you go to tab to the next field, it skips the birthday one altogether and goes right to CAPTCHA. Other than that, it's perfect.
Quote from: Kat9119 on July 01, 2008, 01:31:26 AM
Quote from: ladynightowl on June 27, 2008, 12:26:43 PM
Of course, I'm thinking that this would ideally tie into the user profile. For now, I've added a custom profile fields and forced this info to be entered.
Maybe that should be a separate mod... :-\
Isn't there already a way to force a user to enter a birthday when registering? If not, how did you get this Age Mod to work with your Custom Field for age, so that the Age Mod reads the Age Field?
As far as I know, you can only set the minimum age in the registration settings - but, it doesn't make a person enter their birthday, it only makes it so they have to check a box that says "I am at least {whatever age you specify} years old." If they don't check the box, their registration can be rejected.
This Age Mod doesn't work with the Custom Field mod as far as I know - what I did was create a custom text field requesting the date of birth, chose the option to make it a required field and set it so that only I (the admin) can view/edit it.
But, SiNaN has posted a fix for that so I deleted the custom field. Woo Hoo!
Ahh, sorry. Just forgot the tabindex. After you make the changes in the Register.template.php, do this:
Find:
<input type="password" name="passwrd2" size="30" tabindex="', $context['tabindex']++, '" />
</td>
</tr><tr>
<td width="40%">
<b>', $txt[563], ':</b>
<div class="smalltext">', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '</div>
</td>
<td>
<input type="text" name="bday3" size="4" maxlength="4" value="" /> -
<input type="text" name="bday1" size="2" maxlength="2" value="" /> -
<input type="text" name="bday2" size="2" maxlength="2" value="" />
</td>
</tr>';
Replace:
<input type="password" name="passwrd2" size="30" tabindex="', $context['tabindex']++, '" />
</td>
</tr><tr>
<td width="40%">
<b>', $txt[563], ':</b>
<div class="smalltext">', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '</div>
</td>
<td>
<input type="text" name="bday3" size="4" maxlength="4" value="" tabindex="', $context['tabindex']++, '" /> -
<input type="text" name="bday1" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" /> -
<input type="text" name="bday2" size="2" maxlength="2" value="" tabindex="', $context['tabindex']++, '" />
</td>
</tr>';
Fixed the message above too.
What about forcing the users to enter their age, have you tried that?
I caught a wifi signal so I'm posting to say that I fully intend to include a registration field on the next version of the mod. I've also got permission from JayBachatero to use his GenderonRegistration mod code in mine. So 1.2 should have both registration fields included. And SiNaN, if you'll let me, I'll include that code to remind people to update their gender and birthday fields when the mod is installed.
Of course Eliana. They are yours. ;) But you could make changes a bit cause I've -myself- found it annoying as you cannot do anything other then logging out until you define your birthday. :P
oh, well, that stinks that it doesn't work with the Custom Profile Field mod, as I installed that a few days ago and users love it lol
I've been spending my last two days trying to code this properly, and I decided that I wanted to eliminate the need for setting the birthdate altogether (to allow people to retain the ability to set their birth
day but not their birth
year). So I'm working on that, which is why there's no release now.
However, version 1.2 will have registration fields for gender and birthdate (neither required, unless I can't figure out the code I'm trying to write). I would like it also to feature a one-time reminder for setting birthdate & gender, if I can write that properly. We'll see.
Planned changes for 1.2:-
Adding registration fields for gender and birthdate - Done
- Adding reminder feature on installation to remind users to set their gender or birthdate in their profile - Moved to 1.3 version features
-
Allowing users who haven't set their birthdates to enter unrestricted forums (unrestricted by age) - Done
I'm a little confused about the next version.
Please correct me if I'm wrong:
You're saying that you're making it so that the birth date isn't required at registration?
I'm not too concerned about the gender either way, but the birth date is another story. I just think it would be easier if the birth date (at least) was required upon registration.
Perhaps the code can be written to allow the admin to turn off whether this is a required field or not (ideally, this would probably be in the registration settings)? That's just an idea though.
Quote from: ladynightowl on July 10, 2008, 09:13:45 PM
I'm a little confused about the next version.
Please correct me if I'm wrong:
You're saying that you're making it so that the birth date isn't required at registration?
I'm not too concerned about the gender either way, but the birth date is another story. I just think it would be easier if the birth date (at least) was required upon registration.
Perhaps the code can be written to allow the admin to turn off whether this is a required field or not (ideally, this would probably be in the registration settings)? That's just an idea though.
I've added this as a feature in the next version. You can turn on/off the requirement in Admin CP > Registration > Settings.
Still working on the reminder. The thing I'm struggling over is whether to make a variable in the session, so the user is reminded only once-per-login, or whether to make it a field in the member table, so the user is reminded only once ever and then never again.
Anybody have any suggestions? If not, I may wind up making some configuration settings for it, because I can't decide myself.
Phew! Thank you :D
I think you should go with making configuration settings for the reminder, that way the admins can decide and set it the way they want it according to their needs.
I've decided to push back the reminder feature to 1.3. It'll take a lot of work, and I want to get this version out to you guys. Since I fixed the bug related to the unset birthdate, forcing users to set their birthdate isn't a huge priority anymore. I'll include the reminder feature in version 1.3 for sure, though.
So the complete list of changes in 1.2 is as follows:
- Adding registration fields for gender and birthdate
- Adding option to require gender or birthdate fields on registration
- Fixed bug that didn't allow users who haven't set their birthdates to enter unrestricted forums (unrestricted by age)
The new version will be up as soon as I figure out one last change, how to update the 1.1.1 version to 1.2.0 to fix the bug. Should be up sometime today.
EDIT: AGBF version 1.2.0 has been released. Thank you all for your patience and continued use of the mod. An upgrade package has been made available for both versions 1.0.4 and 1.1.1. This will be the last version where an upgrade from 1.0.4 will be supported, so I will leave 1.2 available for quite a while now. Version 1.3 will only support upgrades from 1.1.1 and 1.2.0.
Hi, i tried to install this mod, from the link in your first post, on my SMF 1.1.5 and have experienced an error on the install;
2. Execute Modification ./Sources/Load.php Test failed
are you able to shed any light on this please as to a possible rectification
It installs fine on a clean 1.1.5 version.
It's likely that you have another mod installed conflicting with the installation paths for my mod. Look at the instructions for modifying your file here: http://custom.simplemachines.org/mods/index.php?action=parse;mod=1260;attach=61142;smf_version=1.1.5
Try to use that to edit your Load.php. If you can't get it to work, attach your Load.php file to a post in here and I'll see what I can do.
ok ill see if my limited knowledge can work it out :D
It installs fine for me, but instead of including fields for the birthdate/gender on the registration form, it takes the user to their profile.
There is a sort of note at the top-right of the page once they are in their profile that reminds the user to fill in their birthday/gender, but most people just aren't going to look there.
Can you describe that a little more? I installed it on a test forum, and it seems to show up just fine on the registration page. I attached a screenshot below of what it looks like to me.
I must have done something wrong somewhere...I simply don't have those fields for the birthdate/gender.
Please, see attached.
When I originally went to install it, I had to go back and remove the edits that I made to the register.php and register.template files (from when [SiNaN] helped me add the birthday field a few posts back).
You still have SiNaN's trick on your Load.php and index.php files. Remove that, first of all.
As for the register page, it's possible it simply didn't get edited properly. Try using the parsed instructions (http://custom.simplemachines.org/mods/index.php?action=parse;mod=1260;attach=61142;smf_version=1.1.5) to manually edit the file. If it indeed is edited already, let me know, because that would indicate a serious problem with the mod.
OK, I'll try that, thanks. :)
Yeah, my upgrade script did not account for anything that SiNaN provided for codes. If you added his codes, you should remove them (especially on Reigster.template.php and Register.php), else you will get errors. Only clean installs of my mod is supported in the upgrade. Any tweaks should be reversed.
Got it! The problem was entirely in my register.template file. Mind you, I don't know exactly what that problem was, but I know that I ended up butchering the file ::) so I took a clean copy from a 1.1.5 install package since no other mod has made changes to it, then I entered everything from the parser and it's all good. All the right fields in the right places.
:D
Glad you got it solved. Can't say what the issue was either, but since you got the issue resolved, I won't worry about it.
If anybody else has bugs to report, please let me know. Just remember that if you installed SiNaN's code, you'll need to reverse those changes before updating to 1.2.
Good grief. :( Now I can't click on 'register'. All the fields are there - no error messages in the log, I just can't click on the register button when I test it. I've got all the boxes checked and fields filled in.
Edit: This is also on a test forum with no other mods installed.
Confirmed bug, thanks ladynightowl. I had hoped this was only on my forum.
It has to do this line in Register.template.php
|| isEmptyText(document.forms.creator.gender)
As for now, I will advise everybody to go to Admin CP > Registration > Settings and disable the option of "Require Gender on Registration?" That will allow registrations to continue until I find a solution to this bug.
EDIT: I used the wrong check statement. Let me go find the right one to use, then I'll zip up 1.2.1 with the fix.
You're welcome.
You might also be aware that this bug doesn't let the user change their own gender (whether the option to require them to enter it on registration is enabled or not). They are automatically 'female' - strange thing is that it shows in the forum profile info, but not the profile summary.
I guess I'll leave a note for any potential male members for now and tell them that this is not my idea of a joke. O:)
Admins can change it - I just checked - but that could get rather tedious on a busy forum.
Thanks Lady Night Owl, I'll check that out. That's two bugs now.
Is this just for new registrants? Or does it happen when people who haven't yet set their gender set it (already registered)?
No problem. Good question :\ I'll try to test and let you know.
Edit: It seems to be just new accounts.
Thanks Lady Night Owl. I will work on solving these issues. Let me know if you find any more.
To everyone else, I apologize deeply for these bugs, and I hope that they will not prevent you from using the AGBF mod in the future. Please stay with me and I'll get them fixed ASAP!
Itried installing the mod today and didnt get any error notification on the install and got the succesful install message but it installed a block of text above the banner on my site
// Start Age and Gender Filter Mod $txt['min_age_title'] = 'Minimum Age to View Board:'; $txt['min_age_desc'] = 'What is the minimum age for viewing access for this board?'; $txt['min_age_zero'] = '(0 to disable)'; $txt['max_age_title'] = 'Maximum Age to View Board:'; $txt['max_age_desc'] = 'What is the maximum age for viewing access for this board?'; $txt['max_age_eighty'] = '(80 to disable)'; $txt['gender_title'] = 'Gender Restricted (only):'; $txt['gender_desc'] = 'Which gender is this board restricted to view / post?'; $txt['gender_block_disabled'] = 'Unrestricted'; $txt['gender_block_gender_set'] = 'Unknown Genders Only'; $txt['gender_block_girls'] = 'Male Only'; $txt['gender_block_boys'] = 'Female Only'; $txt['gender_block_gender_unset'] = 'Male and Female Only'; $txt['gender_register_req'] = 'Require Gender on Registration?'; $txt['birthdate_register_req'] = 'Require Birthdate on Registration?'; // End Age and Gender Filter Mod
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi296.photobucket.com%2Falbums%2Fmm162%2Fnikkkistikkki%2Fagemod.jpg&hash=a154e8878843db9517cb758e701c7cf0d3d167b8)
any ideas how to rectify this (note i ent the smartest of guys when it comes to coding so idiot proof answers would be much appreciated thanx)
Quote from: Eliana Tamerin on June 21, 2008, 03:54:37 PM
Your language file didn't edit properly. Open your /Themes/default/languages/modifications.english(whatever else it is, might be utf8 or british, etc).php and move the ?> to the bottom of the file. Save and reupload.
thank you Eliana thats sorted it
I install this mod on my Ideal forum and I received these messages:
2. Execute Modification ./Sources/Load.php Test failed
3. Execute Modification ./Sources/ManageBoards.php Test failed
Any ideas?
**Attached my Load and ManageBoards php files**
it means you must have other mods installed and that you'll need to install it manually.
What are the plans for making this work on 2.0?
I have inserted the code into the Load.php but it still won't also.
For some reason I can't find a piece of code it is requesting in the ManageBaords.php file as well.
Any help is appreciated!
Nice modification.
Great job, Eliana.
Quote from: waremock on July 16, 2008, 09:03:32 AM
What are the plans for making this work on 2.0?
Please refer to the readme/first post of this topic for more information.
Quote from: ghostfreak on July 16, 2008, 12:32:24 PM
I have inserted the code into the Load.php but it still won't also.
For some reason I can't find a piece of code it is requesting in the ManageBaords.php file as well.
Any help is appreciated!
I downloaded both your Load.php and ManageBoards.php files. Load.php has everything edited properly, but I added in the edits for your ManageBoards.php. You must have a mod like the Redirect Boards mod there, which is why one of the code pieces isn't present. For your file, this is what you will be looking for (although future upgrades should work fine without any further manual edits, since it just looks for the mod code, not the normal code):
$context['board'] = array(
'is_new' => true,
'id' => 0,
'name' => $txt['mboards_new_board_name'],
'description' => '',
'count_posts' => 1,
'theme' => 0,
'override_theme' => 0,
'category' => (int) $_REQUEST['cat'],
'no_children' => true,
'is_redirect' => 0,
'count_clicks' => 0,
'target' => '',
'url' => '',
Anyway, ManageBoards.php is attached with changes. Let me know if it still doesn't work.
Quote from: CTwiz on July 16, 2008, 12:53:00 PM
Nice modification.
Great job, Eliana.
Thanks, ccbtimewiz, it's nice to hear it is appreciated. :D
Still not working...now I receive the following message when clicking on the 'Boards' link within the Admin area:
Parse error: syntax error, unexpected T_IF in /home/ghost/public_html/Sources/ManageBoards.php on line 1
Oh and I do have a board redirection mod installed.
Is that the only mod you have installed?
I have a few of them Eliana...but now I can't access my Board area within the Admin Panel.
Would you be able to take out those edits and upload the file again? Just want to check if the Board link works again.
Just use the file you uploaded to me, should still be in your post.
Can you list all the mods you use? I want to see if any other mod conflicts with it.
The mods I have installed are:
1. Signature Area BBCode Buttons 1.5
2. Redirection Boards 2.01
3. Wikipedia BBCode 1.3
4. AJAX Instant Quick Reply 1.0.1
5. Auto Embed Video Clips 2.2
6. Mood Stars 2.0
I'm getting that Database Error message again, it was working fine there then down again for everyone.
It's probably an issue with the Redirection boards. I'll check it out.
What database error are you getting?
Hi,
This mod is super and i don´t want to uninstall it.
What should I modify to enable the users to change Gender and Age?
THX a lot.
MaxiPes
I removed the code from the Load.php file and the database error disappeared...strange.
Quote from: ghostfreak on July 20, 2008, 04:07:58 PM
I removed the code from the Load.php file and the database error disappeared...strange.
What database errors? I need to know what they are so that I can help you.
Quote from: MaxiPes on July 20, 2008, 12:19:17 PM
Hi,
This mod is super and i don´t want to uninstall it.
What should I modify to enable the users to change Gender and Age?
THX a lot.
MaxiPes
If you allow members to change their gender and age, doesn't that defeat the point of the restrictions? That's like asking a child how old he is, to which he responds, "Seven." If you then tell him, "Oh, well, if you were eight, you could have a piece of candy," are you going to believe him when he tells you he's eight now?
And I'm sorry for taking so long in fixing the bugs. Lady Night Owl, I'm unable to replicate the gender always being female bug you reported, can you show me which site you're using this on so I can test it myself? Have you tried it on a separate test site and found the same bug? And what browsers are your members using when they report this bug?
Quote from: Eliana Tamerin on July 20, 2008, 05:33:36 PM
And I'm sorry for taking so long in fixing the bugs. Lady Night Owl, I'm unable to replicate the gender always being female bug you reported, can you show me which site you're using this on so I can test it myself? Have you tried it on a separate test site and found the same bug? And what browsers are your members using when they report this bug?
A link to the site is in my signature if it would help to test it that way. IIRC, this did the same thing on a test forum of mine. Only one member reported having a problem and I believe he was using IE or Firefox (can't say for certain).
From what I can see, the error only occurs only when I force new registrants to select their gender. Otherwise, there is no problem. I just did a test account now and chose male, which worked fine. I do not have the force gender on registration enabled right now since you advised us not to until this was fixed.
Ok, well, if I find the correct JS command to check the field, this bug shouldn't occur. Thanks for explaining the circumstances a bit more, and I don't think it's a problem. I'll try to release a fix for the bug with having gender required not allowing registration.
2 Eliana Tamerin I understand.
I don´t want to uninstall this mod but I need to disable it.
THX ;)
To enable users to change their gender and birthdate again, simply remove all edits from Profile.template.php.
Note: I do not recommend this, as this is creating a loophole in the functionality of the mod.
BTW, MaxiPes, what do you need it for, I'm curious?
I don´t want to use it yet, but this is a very nice mod and I don´t want to lose it.
THX Eliana Tamerin ;)
Eliana helped me so much when I was a newbie here.
Hope this helps you Eliana;
Instead of this code in Register.template.php
isEmptyText(document.forms.creator.gender)
use this
document.forms.creator.gender[0].checked
The button will only be clickable when the first radio choice is not selected.
Or you can try this:
!document.forms.creator.gender[1].checked || !document.forms.creator.gender[2].checked
If the second or third radio button is not selected, the button will not be active.
Thank you so much, SiNaN.
I released AGBF 1.2.1. You can upgrade from 1.2.0 in addition to the previous two versions because this is a bug fix.
After installing AGBF 1.2.1 I got the following message when attempting to set preferences in Admin CP > Boards >
QuoteParse error: syntax error, unexpected ',', expecting ')' in /mnt/web4/21/50/51458650/htdocs/Sources/Subs-Boards.php on line 1525
I cannot enter Boards at the moment. I have
Registration - Show Gender mod 1.0.0 installed. Could it be this that is causing the problem?
Yes, that is causing the issue. I'll put a note in the readme.
Quote from: Eliana Tamerin on July 23, 2008, 06:01:35 PM
Yes, that is causing the issue. I'll put a note in the readme.
How do I solve the problem of not being able to access Admin CP > Boards >? Do I have to uninstall the Registration - Show Gender mod?
Which did you install last? Uninstall that mod, which should undo the conflict. Then you can choose which mod you wish to use.
I installed Age & Gender Board Filter Mod last and want to keep that because it offers more flexibility. I will uninstall Registration - Show Gender mod and see what happens. I'll keep you posted tomorrow. It's way past my bedtime now!
I would recommend uninstalling in the order you installed, which means uninstalling my mod first, then the Registration - Show Gender mod. Why? Because you could make things even worse by faulty uninstalls.
Super upgrade. many thanks.
Thanks for using my mod, djrem.
good modification Eliana ;)
ı think,u should add "edit gender and edit birthdate" on membergroups permissons,ı showed on attachment picture file :)you know, only is_admin can change bırthdates and genders,u had adjust thıs form on profile template.php :)
only ı changed managePermission.php and managePermission.english files :) ı changed profile.php and profile.template.php but ı got template parse error. ı dont know that these files are interested in allow_users :S
you should add next update acording to me ..
And modification.turkish.php :D
ı wish succes
// Yaş ve Cinsiyet filtreleme modifikasyonu başlangıcı
$txt['min_age_title'] = 'Bölüm için minumum yaş:';
$txt['min_age_desc'] = 'Bu bölüme erişim için minumum yaş kaçtır?';
$txt['min_age_zero'] = '(0 a kadar geçerli)';
$txt['max_age_title'] = 'Bölüm için maksimum yaş:';
$txt['max_age_desc'] = 'Bu bölüme erişim için maksimum yaş kaçtır?';
$txt['max_age_eighty'] = '(80 e kadar geçerli)';
$txt['gender_title'] = 'Cinsiyet kısıtlaması (sadece):';
$txt['gender_desc'] = 'Bu bölüm hangi cinsiyet için kısıtlansın?';
$txt['gender_block_disabled'] = 'Kısıtlama';
$txt['gender_block_gender_set'] = 'Bilinmeyen cinsiyetler';
$txt['gender_block_girls'] = 'Yalnızca erkek';
$txt['gender_block_boys'] = 'Yalnızca bayan';
$txt['gender_block_gender_unset'] = 'Hem erkek hemde bayan';
$txt['gender_register_req'] = 'kayıtta cinsiyet iste?';
$txt['birthdate_register_req'] = 'kayıtta doğum tarihi iste?';
// Yaş ve Cinsiyet filtreleme modifikasyonu sonu
Thanks for the suggestion and the translation. I'll include the translation in the next version, and work on making the gender/birthdate edits permissions based.
Gender/birthdate edit I need :D
SUPER!
I have not this alternative:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmegaupload.cz%2Fimages%2Frplindex.php.gif&hash=9774ee7894f1d9e38d201c041c964a6f68464af7)
I have instaled AgeGenderFilter_1.2.1.zip
Next version??
THX
Quote from: Eliana Tamerin on July 27, 2008, 04:30:41 PM
Thanks for the suggestion and the translation. I'll include the translation in the next version, and work on making the gender/birthdate edits permissions based.
I hope to include permission in the next version, otherwise that will come with 1.4.
Quote from: Eliana Tamerin on July 29, 2008, 09:45:45 AM
I hope to include permission in the next version, otherwise that will come with 1.4.
OKi HTX ;)
I'm enjoying :)
hi,
i've got a blog and i'm having the exact opposite problem as all of you. i want to age restrict against readers under 18 getting on the site. i realize people can lie about their age, but i want to install it based just on the principle. iv'e been looking everywhere, but it seems age restricting blogs isn't really something people are interested in doing.
probably a stupid question, but would this plugin work on a wordpress blog? if not, is there anything similar offered away from this site. does anyone know someone who could write something for me?
thank you
This isn't the support site for wordpress. Sorry, but I can only support this mod on the software it was created for, which is Simple Machines Forum.
ok have a slight issue with this mod (I am using SMF 1.1.5)
I created a testdummy user who was male.
He could not see the female only forum on the board index, but if I went to it manually then the forum was visable and I could post. Is there a file that did not get edited properly? or is some other setting conflicting?
I think doesn't have anything preventing users viewing the boards with the url. I can suggest this but, to Eliana:
You can add a new function in Load.php as canSeeBoard(). If there is $board variable defined, this function will work. It will get the board restrictions (age and gender) and check with the users. If it doesn't have permission then you know, fatal_error.
Sorry can't tell if you are talking to me or not there. :P But I can't find a "load.php"
Actually I was talking to Eliana, the author. :P
Yeah, I thought the $context['user_see_query'] would control all that, but I guess I was wrong. I'll have to rewrite a few edits in the load file. I'll work on that for 1.3 as well.
$context['user_see_query'] is just an index which helps in getting the list of the boards that user can see.
If you configure a board for unknown gender, logged-in members with gender can not access the board but guests can. With my quick solution, guests can see the board but cannot enter. This will also reject entering a restricted board by url. It is not probably the best solution but works for me.
Sources/Load.php
$username = $user_settings['memberName'];
// get logged-in member gender id
$gender = $user_settings['gender'];
$user_settings = array();
// give guests gender id of -1
$gender = -1;
'permissions' => array()
,
'gender_id_num' => $gender
'email' => &$user_info['email']
,
'gender_id' => &$user_info['gender_id_num']
Sources/MessageIndex.php
$context['description'] = $board_info['description'];
$context['allowed_gender'] = $board_info['gender_sel'];
In default/MessageIndex.template.php
global $context, $settings, $options, $scripturl, $modSettings, $txt;
$b_allowed = ($context['allowed_gender'] == 3 && ($context['user']['gender_id'] == 1 || $context['user']['gender_id'] == 2)) ? true : false;
if ($context['allowed_gender'] != '-1' && !$context['user']['is_admin'])
if ($b_allowed == false && ($context['allowed_gender'] != $context['user']['gender_id']))
fatal_lang_error('1', false);
I think we should restrict on every page which has the $board variable defined. Just a small Load.php function should be doing the trick. Or the changes you gave should be made in Display, Post, Print and Wireless too.
It's my quick fix and as I said it's not the best way but if you have elegant way, by all means do it.
Yeah, I understand. Gave the idea, I'll leave the rest to author. :P
This is a wonderful mod, I can't wait to use it but I'm waiting for the next version. ;D has me so excited I come back and check daily.
i tried to install this on 1.1.6 and i get an error on the ./Sources/Load.php
anyone found a solution to this?
Quote from: erichamby on September 20, 2008, 12:52:59 AM
i tried to install this on 1.1.6 and i get an error on the ./Sources/Load.php
anyone found a solution to this?
Perhaps you have other modifications that edit that file? What mods do you have installed?
ok i have:
1. Downloads System 1.0.4
2. Blog Community 2.0.2
3. Auto Embed Video/Audio Clips 3.1.2
4. YouTube BBCode 2.3
5. MCLegendII.2 3.0 (also having problems with this plugin)
6. Users Online Today Mod 1.4.0
7. Age and Gender Board Filter 1.2.1 (uploaded but not installed for error)
i got the MCLegendII.2 3.0 plugin working fine. i still need help for this one though
can anyone help? or tell me of anything plugin i may try.
Quote from: erichamby on September 20, 2008, 12:52:59 AM
i tried to install this on 1.1.6 and i get an error on the ./Sources/Load.php
anyone found a solution to this?
Try to install manually. I have this MOD working on 1.1.6, and I use the last file attached to this topic.
On SMF 1.1.7
When I click members, I get this error:
Template Parse Error!
There was a problem loading the /Themes/default/Memberlist.template.php template or language file
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in .../Themes/default/Memberlist.template.php on line 117
line 117
<td class="windowbg2">', (!$context['can_view_email'] || $member['hide_email']) ? '' ' '<a href="mailto:' . $member['email'] . '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . ' ' . $member['name'] . '" /></a>' : '', '</td>
Mods installed:
View Email Permission
PM Informer
Topic Description
This mod
This is related to View Email Permission (http://custom.simplemachines.org/mods/index.php?mod=1088) mod by BurkeKnight (http://www.simplemachines.org/community/index.php?action=profile;u=150637).
Memberlist.template.php
Find:
? '' ' '
Replace:
? '' : '
Parse error: syntax error, unexpected ':', expecting ',' or ';' in .../Themes/default/Memberlist.template.php on line 117
<td class="windowbg2">', (!$context['can_view_email'] || $member['hide_email']) ? '' : '<a href="mailto:' . $member['email'] . '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . ' ' . $member['name'] . '" /></a>' : '', '</td>
Can you attach the whole file? Seems like there is another ternary operation before.
There you go.
Quote from: bros on November 12, 2008, 11:42:40 PM
Parse error: syntax error, unexpected ':', expecting ',' or ';' in .../Themes/default/Memberlist.template.php on line 117
<td class="windowbg2">', (!$context['can_view_email'] || $member['hide_email']) ? '' : '<a href="mailto:' . $member['email'] . '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . ' ' . $member['name'] . '" /></a>' : '', '</td>
I think you forgot to remove the other colon ( : '' ) at the end. The
</a>' : '', '</td>
should be
</a>', '</td>
Quote from: MaxiPes on July 29, 2008, 06:33:24 AM
I have not this alternative:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmegaupload.cz%2Fimages%2Frplindex.php.gif&hash=9774ee7894f1d9e38d201c041c964a6f68464af7)
I have instaled AgeGenderFilter_1.2.1.zip
Next version??
THX
Quote from: Eliana Tamerin on July 29, 2008, 09:45:45 AM
I hope to include permission in the next version, otherwise that will come with 1.4.
Hi, when will be version 1.4. please?
Spanish traduction.
// Start Age and Gender Filter Mod
$txt['min_age_title'] = 'Edad mínima para ver el foro:';
$txt['min_age_desc'] = '¿Cuál es la edad mínima para ver el acceso a este foro?';
$txt['min_age_zero'] = '(0 para deshabilitar)';
$txt['max_age_title'] = 'Edad máxima para ver el foro:';
$txt['max_age_desc'] = '¿Cuál es la edad máxima para ver el acceso a este foro?';
$txt['max_age_eighty'] = '(80 para deshabilitar)';
$txt['gender_title'] = 'Limitar por Género (exclusivamente):';
$txt['gender_desc'] = '¿Para cuál género está este foro restringido a visualizar/publicar?';
$txt['gender_block_disabled'] = 'Sin restricciones';
$txt['gender_block_gender_set'] = 'Só sexos desconocidos';
$txt['gender_block_girls'] = 'Sólo Hombres';
$txt['gender_block_boys'] = 'Sólo Mujeres';
$txt['gender_block_gender_unset'] = 'Sólo Hombres y Mujeres';
$txt['gender_register_req'] = '¿Requerir el género en el registro?';
$txt['birthdate_register_req'] = '¿Requerir la fecha de nacimiento en el registro?';
// End Age and Gender Filter Mod
I love this mod.
Hi,
can't seem to get this to work whatsoever. I am ok with PHP and SMF. The files seemed to have been edited properly. I'm currently on version 1.1.7.
http://strictlyreading.co.uk/forums/ is the forum.
Whatever theme I choose (with dummy account), I can get into the prohibited board. I use the karma mod and I can posts that the karma came from. If one was from the prohibited area, I can get into there also.
Any chance that there is a way to restrict from within threads/posts also?
Thanks,
RG
No support yet? :(
I am wondering if there's a way to make it drop list instead of click boxes?
any chance of some 2.0 RC1 support please
yeah this would be great if this kind of mod would work for version 2...
i have currently no good ideas for alternative ... is there any other mod that places people to sertain group that are in sertain age?
Are you planing on upgrading this for 2.0 RC1-1? I highly need this mod!
Quote from: Chit-Chat ChatterBox Boss on May 28, 2009, 01:01:44 AM
Are you planing on upgrading this for 2.0 RC1-1? I highly need this mod!
second that
this mod is really great
Anyone have this running on 1.1.10? I'm thinking of adding this but don't want the hassle if it doesn't work right.
SMF 2.0 Please....................
This look like "she is bussy for now". :(
Bug found. If you have gender restricted boards - it just hides the board from the list of boards but if someone gives you direct url to the board and you have no gender specified in profile- you can access with no probs.
Currently run it on smf 1.1.11 Any hope this can be fixed?
No update for 1.1.11
darn i have to work on it i guess
Quote from: infyquest on December 29, 2009, 02:44:48 AM
No update for 1.1.11
darn i have to work on it i guess
It should work for 1.1.11.
Quote from: drhamza on June 12, 2009, 10:35:51 AM
Quote from: Chit-Chat ChatterBox Boss on May 28, 2009, 01:01:44 AM
Are you planing on upgrading this for 2.0 RC1-1? I highly need this mod!
second that
this mod is really great
yes... I am using the 1.1.x version, but I like more now the 2.0 and I can't update because I need this mod working...
2.0RC2!??!?!
2.0 RC3?
2.0 RC4?
Lol, seems you desperately want this kcmartz ;) I'll see if I can knock up an unofficial version tomorrow...
If you want, and if it is ok with mod author, you can email it to me, and if it is ok with mod author, I could host this on my website's downloads area (SA Downloads mod)
No Kcmartz, you are not allowed to distribute even a unofficial mod without the author's permission.
like I was saying, IF. But they couldn't just email it to me and noone else? or could they post instructions on how to edit and everything?
Go ahead, kcmartz. Just know, I won't support your version, so anyone with problems will have to come to you.
Sorry about the delays guys. I've been very unmotivated to keep at this with all the chaos and upheaval regarding the SMF team and politics. I hope I can get back into it.
Well, I won't code it, I don't know enough PHP for one, and don't know SMF code except for menu item manually editing etc...
Hi Guys any updates for RC3?
Quote from: welshbikers on July 25, 2010, 09:12:40 AM
Hi Guys any updates for RC3?
No support for a long time...
Quote from: MaXiForum.cz on July 26, 2010, 07:59:54 AM
No support for a long time...
No one's made a new one eh? Bummer.
I rewrote this mod for SMF 2.0 RC3 by using the standard profile fields. See screenshots.
If the author allows it, I ready to provide files with the changes :)
Quote from: Bugo on September 06, 2010, 06:56:48 AM
I rewrote this mod for SMF 2.0 RC3 by using the standard profile fields. See screenshots.
If the author allows it, I ready to provide files with the changes :)
We really needs that this works for SMF 2RC4 now. Because SMF 1.1.12 will become obsolete in the near future, once it is ready for version SMF 2 final.
Perhaps not many people use this mod on their forums, but in my case is vital because my forum is based on genres and ages. Without this mod my users can change the age and change their sex, that is why I have not upgraded to SMF 2RC4.
any chance of an update to this for RC4
Quote from: Succubus Evaligan on November 08, 2010, 12:53:42 PM
Quote from: Bugo on September 06, 2010, 06:56:48 AM
I rewrote this mod for SMF 2.0 RC3 by using the standard profile fields. See screenshots.
If the author allows it, I ready to provide files with the changes :)
We really needs that this works for SMF 2RC4 now. Because SMF 1.1.12 will become obsolete in the near future, once it is ready for version SMF 2 final.
Quote from: Robin1989 on January 27, 2011, 06:58:53 PM
any chance of an update to this for RC4
The following is stated in the mods first post.
This mod is written for 1.1.5. It may work on older versions (no guarantee), but it will not work on any 2.0 versions. An upgrade to 2.0 is not yet planned.
Please make it work on RC5, or create a premium version for it i dont mind to buy a good mod like this with affordable price.
Any plans for 2.0 yet??? I am very interested??
Hello:
I run a children's/ teens board and currently I am using this mod on my 1.1.16 forum.
I would like to upgrade to 2.0.2. and so I really need a 2.0 or 2.0.2 version of this mod. Can any one help??
Thanks
Wiz
Description:
AGE & HIDE AGE BOARD FILTER MOD
Version 1.0
By The Wizard
Special Credit to dooie for wighting the Select Box Code
This Mod is a Spin off of the AGE & GENDER BOARD FILTER MOD
By Eliana Tamerin || Originally by Senkusha
This mod is written for 2.0.2. It may work on older versions (no guarantee), but it will not work on any 1.x versions.
Warning Installing any modification is a risk to your forum. Please backup BOTH your database (structure and data) and files before attempting to install. You have been warned.
Introduction:
Restrict entrance into a specific board by profile-set age. It also allows the user to hide their age from other users (This will not affect the Admins as the will be able to see the users age at all times.) It also hides all the users age's in the Calendar while still allowing everybody to know when their birthday is. A very handy feature if you run a kids/teens forum, or have a board with allot of females on it. Ages over 80 default to 0 for the purposes of this mod.
Also, please note that this mod will restrict guests from entering the boards you modify with the age options. This also means that search engines will not be able to access these boards.
How To Use This Mod
-Install the mod
-Navigate to Admin CP > Boards > (Board you wish to modify) "Modify"
-Enter minimum age and maximum age you wish to restrict
-Click "Modify"
-Users are now allowed into/restricted from the board you just modified based on their his minimum age, maximum age
-Hide Age form other users
-User Profile>Modify Profile>Forum Profile>
--Check/uncheck the option "Do not Show My Age" Under Birthdate
--Save
Regarding Installing and Upgrades of this Mod:
As I have said this is a Spin off of the Age & Gender Board Filter Mod so if you don't have this installed you will have to figure out how to create the required fields in your MySql database. I don't know much about Mysql. Also you will have to install the changes by hand as I don't know how to create a version for the package manager. If anyone knows how to do either please post the files. I know a few users would be greatfull.
Upgrades and Support:
I have no plans for a upgrade nor can I offer support. I am not a true programme. I am what you would call a reverse engineer. I take what people create, and figure out what works, or what needs to be changed, or tweaked. Feel free to make changes to my code and improve on my simple design. Just be nice and post your code so everybody can enjoy.
Does this work?
I have tested this design, and everything works on 2.0.2, but at this time I can't make the birthdate select box when you register a requirement. If you can make this happen please post the code for everybody yo use - thanks.
Gender Mod:
I did not need this feature for my board, and so to make things simpler I just removed the code while I was creating a 2.0.2 version. Also I could not figure out how to make some of the gender code work. If you can help out with this I know other users would be greatfull.
In short my spin off is not as elegant as other mods, but it gets the job done. I hope you all enjoy.
The Wizard
Attached is a text file that lists all the changes that need to be made.
Up.
Any chance this works on SMF 2.0.10?
It's very useful to allow access to some boards based on the age and/or gender of the member.
Can anyone help me update this mod for SMF 2.0.13?
I really need this feature. Thanks!
Even though you have a number of people pointing out why it's a bad feature (and why it's never been updated)?
Yes, even with the limitations.
I run a message board of very conservative, religious people. The "women's forum" is more of a ladies-only bingo night than a women's locker room or slumber party. In other words, stuff men wouldn't want to hear or participate in. None of the male members on my forum would want his permanent account to be set to "female" so he could sneak in and hear how various housewives like to decorate their homes!
Also, my forum is rather small. We're talking about a few thousand members. It's harder to live a lie in a small town than a large city.
Long story short, I've had this feature on my site for a couple years, and "it works" for those in my niche. I've been working on migrating to SMF for a week now, and I got pretty much everything else set up. I seemed to remember there being a male/female board Mod, but I forgot that the (only) Mod was obsolete and ancient.
The honest reality is that if you want that specific plugin, you'll probably have to pay someone, and it probably won't work properly, or build it yourself, or find some alternative.
I'd still suggest using groups and letting people opt into them rather than keying it to the gender field.
Ok, I implemented something by hand which does MOST of what I need.
1. Most of this mod is the "manage boards" code, changes to profile, etc. and basically housekeeping for the new fields. I don't need this.
2. A bunch more of the code has to do with age and age ranges -- again, I don't need this.
I got it working so women see all boards (plus women's only) and men see all boards (plus men's only)
However, if I bookmark the men/women forum, and try to access it from the other gender, it is allowed.
I need to add this restriction, and then I should be good.
As opposed to using the request-access-to-groups feature, I see.
Merged to mod support topic, as it makes more sense for the discussion to be here.
I know this is old, sorry, but I am looking for this mod... any chance of an update or a newer version somewhere?
Thank you :)
Installed smf just for this mod and come to find out that it doesn't work on 2.x :(
Mod was last updated 11 years ago so not very likely.
It's also a really bad idea since 1) users can lie, 2) users can just change these things once they have added them and 3) what stops a user making another account to see the content they're not supposed to see?
Quote from: Arantor on August 13, 2019, 02:39:52 AM
It's also a really bad idea since 1) users can lie, 2) users can just change these things once they have added them and 3) what stops a user making another account to see the content they're not supposed to see?
true, would need to find a way to make it so they can't adjust it after it's been set
and well if found that they had done so, then ban them :D
I'm trying to set up a religious forum and need some forums set for women only and some set for men only.
I mean I guess I could do as someone suggested and just create user group and set permissions that way but that's more of a hassle ;) having to go through and add each new member individually, would be nice to have something like this that is more automated
If it's manual, it's harder for people to lie about it. Mind you, I have to be honest in that I have never been very sympathetic to the entire concept of doing this for that reason.
And there's the fact admins can always see both and that someone might just pass information to the others... Which can end up killing the point entirely or just being drama fuel. I've seen this being done (manually) before and it still ended badly. You might want to define the content there with this in mind already. I suppose there might be some use to certain subjects that no one would want to know, particularly.
Quote from: Gwenwyfar on August 14, 2019, 10:45:49 AM
And there's the fact admins can always see both and that someone might just pass information to the others... Which can end up killing the point entirely or just being drama fuel. I've seen this being done (manually) before and it still ended badly. You might want to define the content there with this in mind already. I suppose there might be some use to certain subjects that no one would want to know, particularly.
hahaha yeah, tmi but it would be mainly set for women to talk about womanly issues (monthly issues, body changes after birth, ect), stuff that men don't really want to read about and then to be fair a men's only forum for them to discuss manly ( :laugh: ) issues that women don't really want to read about... and so that they can ask honestly without fear of the other gender judging them or saying something, well rather stupid...
Ah, makes sense. That'd certainly fall into one of the "don't wanna hear about nor make drama about" zones. At least if your forum doesn't have immature members. Could always add a minimum post limit to cut off people registering just to see something, as well.
If it's about that, make the boards opt in with joinable groups.
Quote from: Arantor on August 14, 2019, 06:14:17 PM
If it's about that, make the boards opt in with joinable groups.
you got my hopes up for nothing :laugh: searched for joinable groups but it's not updated for 2.0.15 either, I'll try to manually install it and see if it works, thank you for the suggestion :)
Why would a mod be updated when it's literally a core feature? Go make a group, select that it is either freely joinable or that people have to request to join, use member then to restrict board access.
Quote from: Arantor on August 14, 2019, 06:14:17 PM
If it's about that, make the boards opt in with joinable groups.
Yeah, I think that's a better idea :P
Quote from: Arantor on August 15, 2019, 02:35:15 AM
Why would a mod be updated when it's literally a core feature? Go make a group, select that it is either freely joinable or that people have to request to join, use member then to restrict board access.
hm, I don't know, I thought you were talking about a mod, I found one named that :D and managed to install it, so this will work I guess. thank you :)
That doesn't do what I talked about - that just expands what the core does already to allow choosing on sign up (as opposed to joining groups after registration)