How to add "agree to terms and conditions"

Joomla version 1.0 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderators: General Support Moderators, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
hello1world
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Mon Dec 10, 2007 6:59 pm

How to add "agree to terms and conditions"

Post by hello1world » Mon Jun 23, 2008 8:07 am

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

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

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

Post by dhuelsmann » Mon Jun 23, 2008 12:52 pm

Community Builder has that feature.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

hello1world
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Mon Dec 10, 2007 6:59 pm

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

Post by hello1world » Tue Jun 24, 2008 4:56 am

Thanks again for your continuous help. I'll check Community Builder out.

Tim

mochi86
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Jun 30, 2008 7:56 am

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

Post by mochi86 » Wed Aug 13, 2008 5:55 am

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

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

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

Post by dhuelsmann » Wed Aug 13, 2008 12:07 pm

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.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

priyasdipu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Fri Aug 22, 2008 3:37 pm
Location: India
Contact:

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

Post by priyasdipu » Tue Nov 04, 2008 1:28 pm

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
To read something interesting, Visit
http://www.incubation360.com
Crystallizing Idiosyncrasies

rritoch
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Feb 11, 2011 1:53 am
Location: Philippines
Contact:

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

Post by rritoch » Fri Feb 11, 2011 3:08 am

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!
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65

Chris1978
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Mar 15, 2011 3:07 am

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

Post by Chris1978 » Sun Apr 03, 2011 11:57 pm

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/ ?

Chris1978
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Mar 15, 2011 3:07 am

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

Post by Chris1978 » Mon Apr 04, 2011 8:26 am

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.

Artedo
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Nov 02, 2011 10:08 am

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

Post by Artedo » Wed Nov 02, 2011 10:10 am

Thanks for the useful template. Was very much of help!

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

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

Post by johans » Sun May 27, 2012 2:53 pm

any proper solution on how to add the text on terms and conditions before proceed with the registration?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27554
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

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

Post by Per Yngve Berg » Sun May 27, 2012 6:43 pm

Joomla 1.0 is obsolete now. Transfer to the newest version 2.5 of Joomla.

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

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

Post by johans » Sun May 27, 2012 11:58 pm

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?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27554
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

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

Post by Per Yngve Berg » Mon May 28, 2012 7:19 am

Start a new topic in the proper Joomla 2.5 forum.

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

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

Post by johans » Mon May 28, 2012 7:48 am

Per Yngve Berg wrote:Start a new topic in the proper Joomla 2.5 forum.
nice solution... :eek:

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

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

Post by johans » Wed Jul 25, 2012 12:15 am

the terms and condition was included on Joomla version 2.5.6 -- i guess this issue is solved and closed


Locked

Return to “Installation - 1.0.x”