PDA

View Full Version : Miscellaneous Hacks - Forum Minimum Age Restriction


IdanB
05-20-2009, 10:00 PM
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:
- Advanced Search still listing all forums (including hidden ones). 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 :p

Enjoy hack & dont forget to click Mark as Installed :)

IdanB
05-21-2009, 07:36 PM
23 May 2009 (01:35PM) - Version 1.1.2 released :

BUG FIX: Hidden forums are no longer displayed on list on the "Advanced Search" screen.


23 May 2009 (01:00AM) - Version 1.1.1 released :

BUG FIX: forum marked to be hidden were still showing in some conditions while moving from forumhome to forumdisplay.
BUG FIX: Search will now "drop" from results any thread/post that is located on "hidden forum" for the user.
BUG FIX: Add permission check to threads view as well, so should any direct link to thread be followed, he wont be able to view the thread.


22 May 2009 - Version 1.1.0 released :

UPDATE: Plugins names have been renamed to better names.
UPDATE: Now age calculation algorithm will only be executed once & then stored in datastore cache.
NEW: forum manager will now show default values when adding new forum.
NEW: now possible to hide forum from under-aged user completely !

HMBeaty
05-21-2009, 07:45 PM
Awesome IdanB. Thank you very much for this.

pein87
05-21-2009, 08:19 PM
installed this is what I need for my more mature members.

marianoblesa
05-21-2009, 10:49 PM
Good Mod

Sweeks
05-21-2009, 11:53 PM
Excellent mod, thank you :)
________
How to roll a blunt (http://howtorollablunt.net/)

Reycer
05-22-2009, 12:22 AM
needed this a while back. Will definatly give it a go. Thanks

jonah1892
05-22-2009, 01:56 AM
would there be any chance to hide the age restricted forum all together

as i would be concerned younger members can see this and change their age to gain access

IdanB
05-22-2009, 05:34 AM
would there be any chance to hide the age restricted forum all together

as i would be concerned younger members can see this and change their age to gain access

Yea, i think that can be done - it will require template edit though, to place the entire bit under condition of var placed inside the hook.
I'll put it as an option for next version.

Hornstar
05-22-2009, 06:51 AM
Thankyou! finally I have a way to set things.

Now I would love the option to set for specific usergroups to be able to bypass the setting. eg. premium members can be any age to access the section.

mrtroybaker
05-22-2009, 07:03 AM
Been waiting on this for a while' Thanks

Installed

IdanB
05-22-2009, 11:33 AM
would there be any chance to hide the age restricted forum all together

as i would be concerned younger members can see this and change their age to gain access
This feature now available with new version.

mrtroybaker
05-22-2009, 06:34 PM
Love the idea. But there is a problem.
It still does not hide the forum. If the member clicks the main forum it gives the error but if the member clicks "last post" it will still let them in.
After clicking the "last post" and getting in I can now enter the 18 and over section with a username that is 9 years old

mrtroybaker
05-22-2009, 06:43 PM
Ok, it did hide the forum but only after refreshing the page. But as long as it can be seen you can still get in by using the "last post" link

IdanB
05-22-2009, 06:44 PM
hmm.. i assumed if forum access is denied it will prevent him from thread link...
but you are right, i'll fix it: will add check on thread page as well.
will update hack by tomorrow noon (maybe even in next hour or so)

IdanB
05-22-2009, 07:01 PM
Ok, it did hide the forum but only after refreshing the page. But as long as it can be seen you can still get in by using the "last post" link

When you select the "hide forum" the forum still visible for you ?
Also where does it show you the last post link ? (that one should be replaced by phrase)

I'm adding now check on thread view as well, so should u get there from some unknown source, it will show denied access as well.

IdanB
05-22-2009, 08:49 PM
Here's work progress:
1. I've confirmed the bug which resulted with the forum still visible in some condition, while going from forumhome to forumdisplay.
This bug is now fixed: now forum in the "forumdisplay" is properly hidden.
2. Last Post link was hidden already. Couldnt not confirm any bug there. according to all my testing this worked fine. Did you mean by any chance you got the link from some search / or "new posts" link ? as that's one loophole that wasnt covered.
3. To cover any loophole of any kind = I've also added check on "showtread". so if user may obtain link to post (from somewhere), he will not be able to see it.

TO-DO:
Now working on 1 more (last) fix - to "filter" any posts from search results (on hidden forums) from under-aged users, so they wont be aware of such forums.

Once this last "search filter fix" is ready, i'll upload new version code (will be towards tomorrow after-noon). as i dont want to "spam" with too often updates. i will upload all of these fixes tomorrow.

regards.

IdanB
05-22-2009, 09:45 PM
finished updating modification - new version uploaded (1.1.1)
All "immediate bugs" been fixed.

Note: One possible "loophole" still remains - if going into "advanced search", under-age user will be able to see list of all forums names (including hidden ones).
He can't search them !! (only see their names)
I'm still researching on how to code so that list wont show hiddens ones. i hope this will be fixed on next version.

Hostboard
05-22-2009, 10:09 PM
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!

mrtroybaker
05-22-2009, 10:16 PM
Yes, all the problems were fixed. Thank you. Great hack

IdanB
05-23-2009, 07:12 AM
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 :)

IdanB
05-23-2009, 09:42 AM
I've fixed the "loophole" that was displaying hidden forum names on the advanced search screen.
New version posted - v1.1.2 :)

dxflw
05-23-2009, 02:37 PM
Thanks a llot for creating my request!!
Installed & Nominated!

Hasann
05-23-2009, 02:52 PM
Uncached templates: forumhome_forumbit_level1_nopost (3)
Uncached templates: forumhome_forumbit_level2_post (18)

dxflw
05-23-2009, 02:54 PM
The Hack works not with subforums.. will be work in the update?

IdanB
05-23-2009, 02:58 PM
The Hack works not with subforums.. will be work in the update?

yes, there will be fix for sub forums.

IdanB
05-23-2009, 03:19 PM
Uncached templates: forumhome_forumbit_level1_nopost (3)
Uncached templates: forumhome_forumbit_level2_post (18)

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).

Sweeks
05-23-2009, 09:35 PM
If a member changes their date of birth will they have access to the restricted forums immediately?

Thank you.
________
MARY JANE (http://maryjanes.info/)

bigmonay2k
05-23-2009, 11:15 PM
Ggggrrreeeat Work My Dude...you Are The Best...i'll wait til all the bugs are fix

IdanB
05-24-2009, 02:32 AM
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.

jonah1892
05-24-2009, 04:55 AM
This feature now available with new version.

thanks for the quick work, works a treat for hiding forums based on age (after a refresh of the page)

Sweeks
05-24-2009, 10:47 AM
I would like it to prevent users from resetting their age in the usercp after registering with the original.

That's the problem, users can simply re-register just to gain access if their age doesnt meet the minimum requirements.
________
Blonde stripping (http://www.++++tube.com/categories/323/stripping/videos/1)

IdanB
05-24-2009, 03:51 PM
I would like it to prevent users from resetting their age in the usercp after registering with the original.

That's the problem, users can simply re-register just to gain access if their age doesnt meet the minimum requirements.

I agree. Just remember that the hidden forum feature shouls take care of it, as what they can't see they can't want.

That being said, i will try to add in future version some feature that will prevent from users to re-setting their age to a different age (unless no age has been specificed) & for those who wish to change it, i'll make some "admin request" that will show this request as pending for admin, and from there he can decide if to change or not..

jaredwilli
05-26-2009, 03:54 PM
I could have used this a long time ago instead of making an adult usergroup and adult forum only they can see. But i am guessing this isnt full proof since people can just change their age so they are older.

IdanB
05-26-2009, 04:21 PM
I could have used this a long time ago instead of making an adult usergroup and adult forum only they can see. But i am guessing this isnt full proof since people can just change their age so they are older.

There is hardly any "silver bullet" in those things...
Even custom usergroup could be "breached" as well - what's to stop some kid to pm admin & say he has incorrect age in db ? (or re-register with new user & different age)

Guess that as long as the exsitance of such forum is kept private (ie. the hide forum feature available here), there isnt too much problem, as if kids dont even know there is another forum he can't go, he wouldnt feel any need to "cheat" his age to gain any special privelages access to it.

I'll apply soon enough some "age lock" system into this modification, that should reduce abuse close to zero. (of course no one can prevent from some1 to re-register again under different nick, just for access, but guess that's best that can be done about it).

Budweiser
05-29-2009, 11:09 PM
I installed your mod but there is a conflict with another "required" mod on my site..
The mod in conflict is "Sorky Sub Forum List Control (https://vborg.vbsupport.ru/showthread.php?t=203353)" version 1.7.1

When your mod was enabled, the sub forums on forumhome were not collapsible.
(a feature of the Sorky mod)

I will notify Sorky (https://vborg.vbsupport.ru/member.php?u=198765) also.. If you two can make your mods compatible that would be great. I definitely can use your mod.

Thnx, Kev

IdanB
05-30-2009, 07:26 AM
I installed your mod but there is a conflict with another "required" mod on my site..
The mod in conflict is "Sorky Sub Forum List Control (https://vborg.vbsupport.ru/showthread.php?t=203353)" version 1.7.1

When your mod was enabled, the sub forums on forumhome were not collapsible.
(a feature of the Sorky mod)

I will notify Sorky (https://vborg.vbsupport.ru/member.php?u=198765) also.. If you two can make your mods compatible that would be great. I definitely can use your mod.

Thnx, Kev

i'll try to look into it & resolve it.

Sorky
05-31-2009, 02:57 AM
I installed your mod but there is a conflict with another "required" mod on my site..
The mod in conflict is "Sorky Sub Forum List Control (https://vborg.vbsupport.ru/showthread.php?t=203353)" version 1.7.1

It certainly stops the show/hide and quite a lot more!!!

This mod will probably conflict with quite a few others as it makes a copy of the templates and then clears them before my Mod has a chance to dynamically modify them. Its a bit hard to modify something that isn't there ;)

The best fix is I believe to make his Mod copy and clear the the templates after we have a chance to modify them ;) Just make the following change...

Plugins & ProductsPlugin ManagerProduct : Forum Minimum Age / Datastore cache templates
Hook Location = parse_templates
Execution Order = 9


PS: For some reason I seemed to have to refresh my browser once or twice to get it to kick in.

Bro_Joey_Gowdy
06-09-2009, 03:06 PM
Any chance of seeing a maximum age cutoff added to this?

HMBeaty
06-13-2009, 06:31 PM
Ok, found a small bug in this modification after having it installed for quite a while. I was tweaking one of my modifications and had my forums in debug mode and noticed a few templates not being cached. SO, I went through, disabled all of my installed modifications one by one and found it was this one. After figuring out what was going on, I made a fix for it. So, just download, un-zip, and go to your AdminCP > Plugins & Products > Download / Upload Plugins and upload this plugin and you are done!

IdanB
06-14-2009, 02:05 AM
thanks for fix. I'll integrate it on next rev along with other fixes found.

Budweiser
06-16-2009, 12:33 AM
Will your next version be compatible with 'Sorky Sub Forum List Control'?

Also would it be possible to integrate in this mod the ability to disable the cuss filter for selected forums. That way you can set a minimum age and allow unrestricted wordage with the same mod.

Thnx..

KevinL
06-16-2009, 06:03 PM
I nstalled this and when I enabled this on a forum it hides all my forums and all I get is N: <-- that is all that is shown haha

Awesome concept though :)

IdanB
06-17-2009, 04:49 PM
Will your next version be compatible with 'Sorky Sub Forum List Control'?

Also would it be possible to integrate in this mod the ability to disable the cuss filter for selected forums. That way you can set a minimum age and allow unrestricted wordage with the same mod.

Thnx..

i havent looked into the that specific mod, so can't really comment as to if its possible to integrate or not, and if this will be available on the next rev.

i'm not sure i understood the request: you want that certain age can curse on selected forum and other may not ?

IdanB
06-17-2009, 04:51 PM
I nstalled this and when I enabled this on a forum it hides all my forums and all I get is N: <-- that is all that is shown haha

Awesome concept though :)

do you have any other mods installed that can affect the forumbit ?
Can you try to disable rest of plugins to tell if this is a conflict with some other mod installed ?

IdanB
06-17-2009, 04:52 PM
Any chance of seeing a maximum age cutoff added to this?

i'll try to add it as feature on next rev.

pandoros
07-02-2009, 02:38 PM
I have been looking for this!
Thanks!!

elenh
07-03-2009, 08:27 PM
when will be comes the updated version? thanks

IdanB
07-04-2009, 11:55 AM
I'll try to release next update during next 2-4 days.
Last few weeks been bit busy with other developments, neglected to update this one.
Sorry about this.

Brathamike
07-04-2009, 02:15 PM
Very Nice...Thank You Sir

Nominated for MOTM!

elenh
07-07-2009, 10:55 AM
I'll try to release next update during next 2-4 days.
Last few weeks been bit busy with other developments, neglected to update this one.
Sorry about this.

Great! MOTM

peleh
08-06-2009, 01:40 AM
I have some issues.

In my forum, unregistered users can view the post titles and forum, but not the topic content.

So, underage users can go inside by login out, and then loging in from the inside, so they have full access to the forum.

elenh
08-06-2009, 12:34 PM
It is updated?

blissend
08-28-2009, 05:50 PM
I have some issues.

In my forum, unregistered users can view the post titles and forum, but not the topic content.

So, underage users can go inside by login out, and then loging in from the inside, so they have full access to the forum.

I can confirm that the users on my forum have similar issues. There is also a slight glitch or something where users over the age requirement viewing the forum will sometimes get warned for being to young. The workaround is to simply browse back into that thread/forum. Basically refresh.

Using vbulletin 3.8.4

matthewhotdude
09-03-2009, 12:45 PM
Is this still supported?

Sometimes members who are over the age limit set 18 can not view the forum

boris163
09-04-2009, 09:12 PM
IS THERE ANY MOD WHICH SHOWS A PRE-PAGE WERE THE VISITORS WOULD CLICK
"YES I'M OVER 18" or "NO I UNDER 18"?

and only then they could enter the specific forum/category?

LIKE THIS ONE

http://onone.co.il/forum_rules5.php

profanitytalker
09-23-2009, 07:48 AM
reserved

matthewhotdude
09-23-2009, 08:05 AM
This is actually a awsome mod, "If" it worked all the time

rob01
10-31-2009, 04:03 AM
forumhome_forumbit_level2_post

why this mod use so many queries??

matthewhotdude
04-26-2010, 04:30 AM
Had to un install this and password protect the adult forums, as this mod sometimes lets under 18's enter the forums there not supposed to :(

gobadgers77
05-04-2010, 07:51 PM
Is there any way this can be revised to bypass certain usergroups? So my moderators can access these forums and do their job?

JacquiiDesigns
12-30-2010, 06:03 AM
great idea - doesn't work though.
Tis a shame really, as I would like this functionality for my forum.
Thanks for the share anyway...

Jacquii.

Scyther
07-05-2011, 05:54 PM
cool mod..marked installed

AxleWolfe
09-16-2011, 05:22 AM
I made a test account with an age of 10 and its allowed to view it.......why?:confused:

mp3president
12-28-2011, 06:15 AM
It randomly works, it could be a great mod if it worked all the time.
I uninstalled it now, but I'm still searching for a great replacement or fixed mod.
And I'm not only searching for a vB3.8 version, but also for a vB4.1 version.

Can somebody give me a hint by PM?

Artes_Marciales
01-13-2013, 12:33 PM
Amazing!

Artes_Marciales
01-19-2013, 06:39 PM
Uncached templates: forumhome_forumbit_level1_nopost (3)
Uncached templates: forumhome_forumbit_level2_post (18)
same problem : (

ArchAngelz
02-23-2013, 02:14 PM
Any version of this for vb4?

wwwjen
03-20-2013, 02:54 AM
I have version 4.2 enless i am setting something wrong thanks

Skyrider
10-12-2013, 11:16 AM
Can someone make this work for vB4.x? Thanks!