By larry on
Hello all,
I've gone through the Forums looking for a way to implement a Terms & Conditions setting...and have not found one yet. The 'Legal' module has not been updated since 4.3, although it's author said last month he will look for a way to make it work with the 4.5 series. I've also fiddled with the profile module...creating a checkbox and putting 'Terms & Conditions' next to it. It works correctly for one user, however, when two or more users also agree, my 'Terms & Conditions' becomes a link in everyones profile account, much like country or gender here on Drupal. That's silly for Terms & Conditions. Anyone have an idea how to implement this?
Thanks,
Larry
Comments
I've done it...
...just this past week, for my Fenway Views site. I've provided my changes to the legal module owner (Robert Castelo) and he passed them on to Killes, who was also working on upgrading the module. I also changed the terms display from a textarea to a div (scrollable, with a touch of CSS) so it can be formatted with HTML. Attachments seem to be disabled for comments, but here's the important function:
And the legal.css file I added:
Thanks for the Legal
Thanks for the Legal code, it looks very nice on your site -- but; what does one do with the above php code? 8-|
In the file legal.module,
In the file legal.module, replace the existing legal_user function with the PHP code I provided. Also, you need to add that snippet of CSS to the style.css file for your theme - otherwise the whole thing will appear without scrollbars, which may be fine if you have a short terms & conditions statement.
Re: In the file legal.module,
Dear mike,
Thank you for your assistance. Your code did the trick for my registration page as well.
thanks...works like a charm, but...
Hello mikeryan,
Thank you very much for the code and module update, works like a charm. I have one question though, where is the information stored...or is there any to store? I mean, if user xyz clicks 'I accept', where is that exactly stored? In the profile module, which I only use for reference, you created your own database table. Is this information actually stored anywhere or is it just a barrier to entry that must be crossed? Thanks again for your work and sharing.
Ciao,
Larry
Oh...I gotta ask. Do you know how to make the description appear in 'admin/modules'? I know it does not really matter for functionality...I'm just curious because the hooks are driving me nuts and I'd like to learn how they work. Thanks again.
--There are no Kangaroos in Austria--
Right now, the legal module
Right now, the legal module just presents a barrier which must be crossed at registration time, nothing is stored. However, I would like to see it enhanced so users would be forced, if the administrator chooses, to re-accept the terms & conditions when they're changed. I.e., the acceptance would be stored as a boolean, and a checkbox in the settings would indicate whether the administrator wants re-acceptance - if checked, that boolean would be cleared for all registered users, and at login time if the value is false the user would need to review and accept the new terms.
As for the module description, that's set in the help hook. This is the current legal_help() I have:
Works perfectly
Thanks for your reply. Your idea about re-acceptance of Terms & Conditions is an interesting one. It could be extended to all sorts of other things like site-wide announcements or a user rating system. I appreciate you sharing your module...works very nicely. Thanks again.
Ciao,
Larry
--There are no Kangaroos in Austria--
hi mikeryan, Thank you for
hi mikeryan,
Thank you for the patches.
Also, good idea; it would be great to be able to force users to re-accept the T&C.
-Ryan
Data
Legal module collects all the necessary data to have a T&C versioning system as described above, it's a feature I was planning to implement, just never had the time to do it. I'll try to get it done after I update the module for 4.7.
Cortext Communications
Drupal Themes & Modules
------------------------------------------
Drupal Specialists: Consulting, Development & Training
Robert Castelo, CTO
Code Positive
London, United Kingdom
----
Any work to use in 4.7
Wondering if anything is being done to get the legal.module to work in 4.7. I've downloaded and added the fix referenced here but am not able to get to display the Terms and Conditions in the registration form at all. I'm using 4.7 beta6.
Legal for 4.7
Legal module will be updated for 4.7 shortly before Drupal 4.7 is released.
Cortext Communications
Drupal Themes & Modules
------------------------------------------
Drupal Specialists: Consulting, Development & Training
Robert Castelo, CTO
Code Positive
London, United Kingdom
----
Thanks for providing the legal module
Recently, I have been trying to implement a terms & conditions checkbox to use at the bottom of my registration page, not knowing that a module provided this facility already. I stumbled across this thread, found the legal module, installed it in no time at all and it was working perfectly right out of the box. Excellent work to all involved in the creation of this module. Many thanks.