Version: 1.1.2, by IdanB
Developer Last Online: May 2010
Category: Miscellaneous Hacks -
Version: 3.8.2
Rating:
Released: 05-20-2009
Last Update: 05-22-2009
Installs: 122
DB Changes Uses Plugins
No support by the author.
Forum Minimum Age Restriction
By: Idan B.
1. Description & Usage:
Forum Minimum Age Restriction hack will allow the forum admin to set minimum age restriction for the given forum. Should the age be under the minimum age, the user will be unable to view forum.
2. Installation:
Please click Mark as Installed.
Installation is pretty easy - just download & install:
Goto: AdminCP->Plugin System->Manage Products : Choose "Add/Import Product" and import this product xml (product-forum_min_age.xml)
3. Upgrade From Older Version:
1. uninstall previous version
2. Download new version xml & install as instructed in previous section.
4. Configuration:
Once installed, the "Forum Manger" under admincp will have extra section for each forum:
Section name: "Minimum Age Requirement"
Enabled ? - Yes/No
Minimum Age - Text (INT)
Hide Forum ? - Yes/No
5. Known Bugs:
- [S]Advanced Search still listing all forums (including hidden ones).[/S] fixed in v1.1.2
6. TO-DO's LIST (Next Versions):
- Bypass to certain usergroups
7. Extra Notes:
The text used in this modification is fully configured via phrase manager in admincp.
- "Last Post" : min_age_limit_cannot_view_last_post_info
- "access denied" error_under_min_age
typo in "restriction" word fixed. sorry about that
Enjoy hack & dont forget to click Mark as Installed
Would it be possible to have this have its own catagory/forum selection page? For sites that have LOTS of catagories/forums it is a bit cumbersome to have to go in and edit each and every forum whereby if it had its own list it should be easier to select.
If you could select a catagory and have it tag all the forums under it that would work too.
Thanx!
hmm, yea, that's possible. i'll add support for it on next version
i'm aware of that, i'll try to optimize that in future version.
The hide/show forum forced me to use manipulation on the templates.
I used datastore instead though, so it wont have too many unneeded reads.
EDIT: to further clear up the "behind-the-scene" made:
1. during intial load i store both of the mentioned templates into the datastore, and clear both of them.
2. during hook loads, a check is made vs. mod logic (for should be visible or not).
3. Based on previous check, i assign to the template value (or empty string) from the datastore cache variable.
So counters may show it's uncached, while it's in fact some sort of cache (assigning template value from datastore cache).
If a member changes their date of birth will they have access to the restricted forums immediately?
Thank you.
Yes.
Might be worth to implant some code modification that prevent user from re-setting his birthday date. If anyone has any suggestion, these can be implanted into next version.