4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: BartAfterDark on June 22, 2009, 06:20:57 PM

Title: Remove Terms of Registration?
Post by: BartAfterDark on June 22, 2009, 06:20:57 PM
How can I remove the terms, so users are forwarded to the register form instead of the Agree to terms ?

Open: Register.php

Find:
Code: [Select]
if ($action == "") {
  $action = "signup";
}
Replace with:
Code: [Select]
if ($action == "") {
  $action = "register";
}
Title: Re: Remove Terms of Registration?
Post by: V@no on June 23, 2009, 02:41:37 AM
Are you still asking? ;)
Title: Re: Remove Terms of Registration?
Post by: BartAfterDark on June 23, 2009, 10:33:25 AM
Nope hehe :) Couldn't post a reply to my thread.

But maybe this could get added to the FAQ or something, if anyone else wants to remove the "Terms of Registration" ?
Title: Re: Remove Terms of Registration?
Post by: neverkas on July 15, 2009, 03:21:11 AM
Very good is what I wanted!
But I have a query, I can make the terms appears in the 2nd Register?

Everything that appears in it, complete the form, then click to get a "radio button" I accept the terms, and finally gives Register.

Can be done?


Ex.
User:
Pass:
Email:
Code Verif.:
I accept the terms. (Button Radio left)
Send
Title: Re: Remove Terms of Registration?
Post by: BartAfterDark on July 15, 2009, 12:01:51 PM
It can be done with some JS code :)
Works that way, that the submit button is disabled until the user has checked the terms box.

     
Code: [Select]
<input type="checkbox" name="terms" onclick="this.form.submit.disabled = !this.checked" value="Y">
      I agree to the WEBSITE <strong>Terms of Service</strong> and <strong>Privacy Policy</strong></label>
    <br />
    <label>
Title: Re: Remove Terms of Registration?
Post by: neverkas on July 15, 2009, 06:22:44 PM
And you can not add in register.php?
To be required to accept, but acceptance does not create the account.
Because if JS is disabled and you can register without clicking "Accept Terms"

EDIT:


No click in Termns, say: ˇRellena el campo !
Click in Terms, say:
An unexpected error occured. Please try again later.
Ha habido un error. Por favor vuelva atrás e inténtelo de nuevo. Si el problema persiste, contacte con el administrador.
Because it gives me error?


<input type="checkbox" name="user_terms" onclick="this.form.submit.disabled = !this.checked" value="Y">

It:
Code: [Select]
 $user_password = (isset($HTTP_POST_VARS['user_password'])) ? trim($HTTP_POST_VARS['user_password']) : "";
replacement by:
Code: [Select]
 $user_password = (isset($HTTP_POST_VARS['user_password'])) ? trim($HTTP_POST_VARS['user_password']) : "";
 $user_terms = (isset($HTTP_POST_VARS['user_terms'])) ? trim($HTTP_POST_VARS['user_terms']) : "";



It:
Code: [Select]
   if ($user_password == "") {
      $msg .= (($msg != "") ? "<br />" : "").$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['password']), $lang['field_required']);
      $error = 1;
    }

replacement by:
Code: [Select]
if ($user_password == "") {
      $msg .= (($msg != "") ? "<br />" : "").$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['password']), $lang['field_required']);
      $error = 1;
    }
    if ($user_terms == "") {
      $msg .= (($msg != "") ? "<br />" : "").$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['terms']), $lang['field_required']);
      $error = 1;
    }



It:
Code: [Select]
           (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").$additional_field_sql.")

replacement by:
Code: [Select]
           (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_terms").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").$additional_field_sql.")
Title: Re: Remove Terms of Registration?
Post by: BartAfterDark on July 21, 2009, 04:37:42 PM
I don't quite know if the last reply was a question or what.

But you need to edit register_form.html in your template file with the code i posted earlier