Closed (fixed)
Project:
Terms of Use
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2008 at 09:40 UTC
Updated:
7 Jul 2012 at 16:49 UTC
Jump to comment: Most recent file
I have very long text for term of use of my site, so I don't like to show all this text in the registration page.
Is possible to have this solution:
put only a link to the term of use page in the registration page containing the checkbox, like this:
Terms of use of this page are available here (<- this a link to the terms of use page)
[x] I certify that I read and I agree with these terms
Thank you
MXT
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | terms_of_use_link.patch | 1.79 KB | floretan |
Comments
Comment #1
Chill35 commentedIf you theme the Terms, yes, it's possible, and very easy.
I was about to post the code here, then realized that there is a bug in the module theming function and implementation of HOOK_theme. Let me fix that first.
Comment #2
Chill35 commentedHere's what you'd put in your theme template.php file, e.g. for the garland theme.
(Not tested.)
Comment #3
Chill35 commentedLet me know if that works. I fixed the theming bug, so please use/test 6.x-1.8.
Comment #4
Chill35 commentedAnd I forgot: please clear your web site's cache (that will clear your theme registry).
Roger out,
Comment #5
mxtOk! it works fine!
Thank you for your work.
;-)
MXT
Comment #6
Chill35 commentedThank you!
I will add the information to the README.txt file.
Comment #7
fleshgrinder commentedGerman version:
I couldn't find the possibility ot translate it with a .po file or via Drupal, so I thought I share it with you.
Kindest regards
Fleshgrinder
Comment #8
venusrising commentedIs there a way to make the terms of use within a scroll box on the registration page or something that would make it possible to still have the checkbox but not the entire text on the registration page? Thanks so much.
Comment #9
venusrising commentedThanks to everyone for the posts, the above code works great!
Comment #10
neroflick commentedThanks .. this worked! But how can one make the link open in a new window? I think this quite necesary to prevent a visitor from navigating away from the registration form after filling all the fields.
Any tips?
Comment #11
fleshgrinder commentedHi neroflick,
a fast and dirty version?
That's also valid XHTML 1.0 strict.
Kindest regards
Fleshgrinder
Comment #12
tonimuendel commentedthanks for this Chill35, it worked great in Drupal 6.9 but I can't get it to work for 6.10.
Has anyone had the same issue?
Referring to this:
Comment #13
tonimuendel commentednever mind. It works now. I think it was a Cache thing.
Comment #14
floretan commentedThe theming option works to a certain extent, but it doesn't let you have a link to the terms of use inside the checkbox label:
[x] I agree to the Terms of Use.
This patch adds the possibility to do this by putting the @link token inside the checkbox label. For the example above, you would create a node with title "Terms of Use" (nid = 123), set the checkbox label to "I agree to the @link.", which would get replaced with
I agree to the <a href="node/123">Terms of Use</a>.When the @linkn token is present, the full text of the terms of use is not displayed on the form.
Comment #15
Chill35 commented@flobruit: There were problems with your patch, $str_agree was undefined, etc. I fixed this and improved the help text as well and provided an example. Stay tuned for a new release. Thank you for the patch!
Comment #16
Chill35 commentedComment #17
ailgm commentedJust as mentioned by neroflick (post #10) I would also like to have a scrolling region, so the terms can be on the page but in a limited space. Can anyone suggest a way to do this? Or could it be considered as a new feature request?
Comment #18
floretan commentedAdding a scrolling region can be done with some CSS. Just set the container of the terms of use to have a fixed height, like
height: 50px;, andoverflow: auto;.Comment #19
Chill35 commentedThanks Flobruit, that's the correct answer.
Comment #21
manoloka commentedHas this been added to the latest dev?
Thanks
Comment #22
manoloka commentedWhat am I doing wrong?
I've added
to the garland template.php
But nothing changes ??? I still got the whole T&C with no link anywhere.
Any ideas?
I use garland with a colour preset.
Comment #23
manoloka commentedMy mistake :-s
I forgot to flush the cache, it works now.
However I thought the "new window" had been implemented.
Thanks
Comment #24
Manonline commentedIt is possible to use HTML tags instead of the token? I have "Terms of use" and "Privacy Policy" and I'll wondered if this feature is implemented.
thanks ;)
Comment #25
kars-t commented@Manonline
Please file a new issue if this still is a problem.
Comment #26
venusrising commentedThis was working great prior to the current update. How can this be reapplied as it now makes my box huge with the checkbox at bottom and link way up at top
Comment #27
kars-t commented@venusrising
Could you please post more information.
Are you overriding the theming funktion?
I did add an CSS file maybe this gives you some trouble?
Comment #28
fleshgrinder commentedI'd like to add the following to my (old) post #11 for anybody who finds this thread.
The use of
target="helpwindow"is also valid XHTML 1.0 strict and does not need any JavaScript. If you want to open the terms of use in a pop-up you have no choice and must use JavaScript.Comment #29
kars-t commented@fleshgrinder
Thanks for your Input. But please do not use t() this way.
http://groups.drupal.org/node/15177
http://drupalcontrib.org/api/function/t/6
You must not put variables into t() directly but pass them into tokens. The way you use t() you will get unwanted strings into the local table.
Comment #30
fleshgrinder commentedThanks for the hint Kars-T. It’s and old code and I had a look at all of my issues and saw the JavaScript I just wanted to show up a way to get rid of the JS in the link. But there is even more clean-up necessary in my code. Here’s a new version; now even without any variable to store the output in and I changed the use of
$node->nidin the link to$node->path, this way the link will make use of the path alias.I checked the
target="helpwindow"again, it’s not valid XHTML strict. I assumed it wrong, but it is valid XHTML transitional and I recommend using transitional at all and not strict to everybody. Strict doesn’t have any advantages over transitional.Comment #31
kars-t commentedThanks fleshgrinder! :)
I will for the module so I have free hand in this issue and probably use ctools to make a pluggable API. So we can easily hook in all JS popup scripts we want. Will take some time but I hope it will rock as Drupal normally does!
Comment #32
venusrising commentedSorry yes, I was using the old fix but when I installed the update it still works as it once did Except is now leaves a huge amount of space between the link and the checkbox
Comment #33
fleshgrinder commentedI'll have a look at the newest version the next days. Have you checked your CSS (with Firebug or something similar), maybe the problem is related to some new styles from an update.
Comment #34
tsi commentedJust sharing my solution to this, using hook_form_alter in your module :
just set the
YOURMODULENAMEto your module name andurl('terms-service')to your terms path.Comment #35
kars-t commented