Page 1 of 1

How to add "agree to terms and conditions"

Posted: Mon Jun 23, 2008 8:07 am
by hello1world
any way to add "agree to these terms and conditions" like you see on all websites? Want this feature when the user registers with my joomla site. thanks.

tim

Re: How to add "agree to terms and conditions"

Posted: Mon Jun 23, 2008 12:52 pm
by dhuelsmann
Community Builder has that feature.

Re: How to add "agree to terms and conditions"

Posted: Tue Jun 24, 2008 4:56 am
by hello1world
Thanks again for your continuous help. I'll check Community Builder out.

Tim

Re: How to add "agree to terms and conditions"

Posted: Wed Aug 13, 2008 5:55 am
by mochi86
i am using community builder and this feature is enabled but when i click on terms and conditions link i get a 404 error page..:S

Re: How to add "agree to terms and conditions"

Posted: Wed Aug 13, 2008 12:07 pm
by dhuelsmann
mochi86 wrote:i am using community builder and this feature is enabled but when i click on terms and conditions link i get a 404 error page..:S
Did you enter the link to your terms and conditions page in CB configuration? If you did, try turning off SEF if on.

Re: How to add "agree to terms and conditions"

Posted: Tue Nov 04, 2008 1:28 pm
by priyasdipu
Hi,

Can anybody please help me on this case

Suppose that i want to create a page of "agreeing to terms and conditions" before navigating to other page like before submitting an article, so what to do for that?

Are there any modules for that?
Will be glad for any suggestions

Re: How to add "agree to terms and conditions"

Posted: Fri Feb 11, 2011 3:08 am
by rritoch
I recently solved this problem in Joomla! 1.5 and it may work in Joomla! 1.0 . After reviewing Joomla! internals there is virtually no way of doing this without altering the internals or making or using a custom user component. But you can sneak around this problem using the Joomla! security token. Here is how it is done....

First copy the default.php file from JPATH_BASE/com_user/views/register/tmpl/default.php to your theme JPATH_BASE/templates/*THEME_ID*/html/com_user/register/default.php

Now you must alter your JPATH_BASE/templates/*THEME_ID*/html/com_user/register/default.php file.

First alter the form tag to this... If the user has javascript enabled this will prevent them from seeing the ugly invalid token page.

Code: Select all

<script type="text/javascript"><!--

 function checkAgree() {
     var agree = document.getElementById('formAgree');          
     if (!agree.checked) {
        alert('To become a member you must agree to our terms of service!');
        return false;
     }  
     return true;
 }

--></script>
<form action="<?php echo JRoute::_( 'index.php?option=com_user' ); ?>" method="post" id="josForm" name="josForm" class="form-validate" onsubmit="return checkAgree();">
Secondly add in your terms of service after the verify password field. Be sure to change the URL from /path/to/tos.html to where your terms are actually located.

Code: Select all

<?php
 
 // Terms of Service
       
 $tokenHTML = str_replace('type="hidden"','id="formAgree" type="checkbox"',JHTML::_( 'form.token' ));

 $tosURL = "/path/to/tos.html"; // REPLACE THIS!
 
?>
<tr>
	<td height="40" style="vertical-align: top;">
		<label>
			Terms of service:			
		</label>
	</td>
	<td>
		<iframe src="<?php echo htmlentities($tosURL); ?>" width="250" height="150"></iframe>
	</td>
</tr>
<tr>
  <td colspan="2">
    <p><?php echo $tokenHTML; ?> <b>Agree to terms of service.</b> *</p>
  </td>
</tr>
<tr>
Finally you will need to remove the original token from the form.

Change this line ...

Code: Select all

<?php echo JHTML::_( 'form.token' ); ?>
To this....

Code: Select all

<?php if (false) echo JHTML::_( 'form.token' ); ?>
And your done! The user must agree to the terms to register!

Problems like this are why I designed my own platform, sometimes its better to throw out the baby with the bath water cause you don't have to deal with dirty water again!

Re: How to add "agree to terms and conditions"

Posted: Sun Apr 03, 2011 11:57 pm
by Chris1978
Hi rritoch
rritoch wrote:First copy the default.php file from JPATH_BASE/com_user/views/register/tmpl/default.php to your theme JPATH_BASE/templates/*THEME_ID*/html/com_user/register/default.php
I can find the JPATH_BASE/com_user/views/register/tmpl/default.php file but when i go to move it to the directory JPATH_BASE/templates/*THEME_ID*/html/com_user/register/default.php there is no such directory as /com_user/register in the THEME_ID directory. The furthest i can go is to the /THEME_ID/html directory.

Do i need to create the directory structure com_user/register then drop in the default.php file there or should it already exist?

Am i looking in the right place. according to your instruction it should be moved to in my case (live site) public_html/templates/rhuk_milkyway/html/ ?

Re: How to add "agree to terms and conditions"

Posted: Mon Apr 04, 2011 8:26 am
by Chris1978
For all those that has a similar problem this may help. Works for a lot of people so i read:-

1. go to joomla global configuration from your admin account and deactivate allow user registration (set it to "NO")
2. Then using your ftp client locate cb 1.2's login module (i use cb 1.1 and its module login is mod_cblogin.php found in "path_to_your_joomla_1.5_directory/modules/mod_cblogin/)(i don't know if its the same for cb 1.2.. try your luck but the next steps will remain the same)
3.download the file on to your hard drive and rename it to default_login.php *NO EDITION OR HACKS TO THE CODE*
4. Now from your ftp client open the directory of the template you are using for joomla. (here i use the example of joomla 1.5 default template called ruhk_milkway)
5. the path should be "path_to_your_joomla_1.5_directory/tempelates/rhuk_milkyway/html once you are in the html directory of your tempelate create this folder if it is not there "CREATE FOLDER ='com_user'"
6. Open the com_user folder and create another folder named "login"
7. Now open the login folder and just upload the default_login.php that you created in step no. 3 and thats that.
NOW all your unregistered/unlogged users will be forced to cb's login module if they click on links that requires registered users and also from this page they can create a new account through cb registration page.

Re: How to add "agree to terms and conditions"

Posted: Wed Nov 02, 2011 10:10 am
by Artedo
Thanks for the useful template. Was very much of help!

Re: How to add "agree to terms and conditions"

Posted: Sun May 27, 2012 2:53 pm
by johans
any proper solution on how to add the text on terms and conditions before proceed with the registration?

Re: How to add "agree to terms and conditions"

Posted: Sun May 27, 2012 6:43 pm
by Per Yngve Berg
Joomla 1.0 is obsolete now. Transfer to the newest version 2.5 of Joomla.

Re: How to add "agree to terms and conditions"

Posted: Sun May 27, 2012 11:58 pm
by johans
Per Yngve Berg wrote:Joomla 1.0 is obsolete now. Transfer to the newest version 2.5 of Joomla.
I am using Joomla 2.5 -

Do you know how to insert the term and agreement text/article on Joomla 2.5? HOW?

Re: How to add "agree to terms and conditions"

Posted: Mon May 28, 2012 7:19 am
by Per Yngve Berg
Start a new topic in the proper Joomla 2.5 forum.

Re: How to add "agree to terms and conditions"

Posted: Mon May 28, 2012 7:48 am
by johans
Per Yngve Berg wrote:Start a new topic in the proper Joomla 2.5 forum.
nice solution... :eek:

Re: How to add "agree to terms and conditions"

Posted: Wed Jul 25, 2012 12:15 am
by johans
the terms and condition was included on Joomla version 2.5.6 -- i guess this issue is solved and closed