Thank you for this wonderful module!

I think it would be of great benefit to allow for multiple terms of use that would need to be checked off. Many sites have "Terms of Use", "Privacy Policy" etc... There are many circumstances where several documents must be agreed to before registering.

thank you.

Comments

Chill35’s picture

Status: Active » Postponed
timtoon’s picture

Status: Postponed » Patch (to be ported)
StatusFileSize
new1.62 KB

I agree. Initially, I removed check_plain() from line 152 in terms_of_use.module to allow inserting <a> tags, but then wrote a way to include links to nodes by including the node title in quotes, preceded by an @ sign (ex. @"Privacy Policy" links to a node called Privacy Policy). It even supports escaped quotes (\") for titles with quotes in them.

iva2k’s picture

subscribe

iva2k’s picture

Just to let people know - I included this feature in a combined patch #759064: Combined patch to address multiple issues and feature requests

kars-t’s picture

Status: Patch (to be ported) » Needs work
+++ terms_of_use.module	15 Apr 2009 19:48:22 -0000
@@ -151,11 +151,30 @@ function terms_of_use_form_user_register
+  	if(substr($checkbox_label,$i,2) == '@"') {
+  		$start = $i+2;
+  		$end = strpos($checkbox_label,'"',$start);
+  		while(substr($checkbox_label,$end-1,1) == "\\") {
+	  		$end = strpos($checkbox_label,'"',$end+1);
+  		}
+		$title = substr($checkbox_label, $start, ($end-$start));
+ 		$node = node_load(array('title' => str_replace( '\\"','"',$title) ) );
+ 		$checkbox_label = str_replace('@"'.$title.'"', l($node->title, 'node/'. $node->nid), $checkbox_label);
+		$i = $end+1;
+  	} else {
+  		$i++;
+  	}

Coding style issues. Please fix them. And set your patches to "Needs review" and not to be "to be ported" :)

Powered by Dreditor.

joostvdl’s picture

subscribe

tomsm’s picture

subscribing

agileware’s picture

Title: Multiple Terms » Multiple node links in terms checkbox label
Version: 6.x-1.8 » 6.x-1.12
Status: Needs work » Needs review
StatusFileSize
new2.47 KB

Here is a similar but different patch.

It uses tokens of the form @node:nid where nid is the node ID of the node you want to link to.

It also addresses a few issues with the original patch:
* Coding standards.
* Simplifies the logic.
* Doesn't use $node as the variable when loading the nodes for these links, because that would overwrite the existing $node variable, which is being used for other purposes.
* Adds extra info on the new tokens to the field description so people know they can do it.

Also note that if you don't use the @link token the terms will still display in the fieldset.

I made the patch for 6.x-1.12 so I haven't tested with 6.x-1.x-dev but the patch does apply to dev with a slight offset so it will probably work.

kars-t’s picture

Status: Needs review » Closed (won't fix)

Hi

I won't add anything to D6 anymore. I believe this would be a great addition for D7. Feel free to reopen if you want to make a new patch.