Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Will this be available in Drupal 7?
Comment | File | Size | Author |
---|---|---|---|
#13 | validateage-7.x-1.x-dev.zip | 15.75 KB | SerkanB |
#7 | validateage-7.x-1.1.zip | 16.45 KB | shane1090 |
Comments
Comment #1
theullrich CreditAttribution: theullrich commentedi second this motion.
Comment #2
basicmagic.net CreditAttribution: basicmagic.net commentedsubscribe
Comment #3
knalstaaf CreditAttribution: knalstaaf commentedStop subscribing, start following
Comment #4
fraweg CreditAttribution: fraweg commentedHello,
will there be a port for Drupal 7 or is there another module that do this?
Best regrads
Frank
Comment #5
nouriassafi CreditAttribution: nouriassafi commentedYou can try http://drupal.org/project/legal
Comment #6
fraweg CreditAttribution: fraweg commentedHello,
Thanks for your answer. I will test it.
Best regards
Frank
Comment #7
shane1090 CreditAttribution: shane1090 commentedHi,
I've needed to convert this to Drupal 7 for my own use, so I thought I would post it here - pretty new to understanding Drupal development, but I have this updated module working smoothly on my development site. No idea how to get it up on this project page as a dev build, but if someone has access to do it then great :D
One change from the original is the inclusion of cookie that checks to see if the user has already submitted their date of birth. If the cookie exists and the age request was not enough for access, the cookie reports DENIED and sends the user to a restricted content page to avoid repeat attempts at trying a date of birth to get access.
Comment #8
fraweg CreditAttribution: fraweg commentedHello shane1090,
thanks for your work! maybe you should contact the developer (nicholas.alipaz and gwen) directly so they can make a dev version from your code.
I have test it and have this issue:
when I go to "admin/config/people/validateage"
Any idea how to solve this?
Best regards
Frank
Comment #9
shane1090 CreditAttribution: shane1090 commented@fraweg I'm just creating a new version which has got a few bug fixes - I have found a temporary solution to the issue above which is editing roughly line 283 of validateage.module and remove the ampersand from the variable on the validateage_admin function call.
Hope to upload a newer version soon.
Comment #10
nicholas.alipaz CreditAttribution: nicholas.alipaz commentedShane, I quickly looked through the code you provided and am interested in bringing you on as a possible D7 maintainer. This is assuming we can work out some remaining issues I saw in the code.
Drupal Coding Standards need to be followed including using soft-tabs.
The issue you mention with cookie does not seem like an appropriate solution. This module originally used cookies to track and I moved it from cookies to sessions when becoming the maintainer. Sessions are better IMO since storing data on the user's browser is less secure and it requires them using cookies in their browser. Please review what code you changed moving from the D6 version and see if you can add the session tracking back in and remove the cookie tracking.
Comment #11
shane1090 CreditAttribution: shane1090 commentedThanks for the response, I'll take a look through the link you've provided.
With regards to the cookie, this was crucial for the site that I was modifying the module to work with. Tracking using sessions is OK, but the problem comes when your expecting repeat visitors - constantly having to re-enter your DOB to access the site limits it's accessibility and is frustrating. The change I made to use cookies came after a few weeks of testing in which most people testing got annoyed with it. With using cookies visitors can come back to the site without needing to re-enter their DOB (this was in-mind of visitors who didn't want to register to the site, as I'm aware that there is the facility already to bypass the validation if they are logged in).
What I am proposing is providing the option for the module to operate either by tracking session or cookies - providing the choice to the user of the module depending on how they are planning to use it.
Comment #12
nicholas.alipaz CreditAttribution: nicholas.alipaz commentedOkay, that makes sense and I see how it could be useful. If that is the case then we would need to have a setting to enable cookie tracking and an explanation of its benefits in the description of the new setting field. I believe defaulting it to off on install would be best initially.
Comment #13
SerkanB CreditAttribution: SerkanB commentedWell, i've uised the 6.x-1.1 and ported it to D7, without any new features.
Summary of Changes:
What i've tested:
Well... I ported it myself, because i wasn't sure about the cookie-stuff in the other port, and didn't really need it, and since it wasn't final i didn't want to use it on a project.
Comment #14
SerkanB CreditAttribution: SerkanB at Bright Solutions GmbH commentedI guess one could argue to use https://www.drupal.org/project/field_validation for D7 instead of porting this. Just validate for "maximum date: -18 years" and it seems to work just fine.