How to add "agree to terms and conditions"
Moderator: 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.
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.
-
- Joomla! Enthusiast
- Posts: 113
- Joined: Mon Dec 10, 2007 6:59 pm
How to add "agree to terms and conditions"
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
tim
- dhuelsmann
- 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"
Community Builder has that feature.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
-
- Joomla! Enthusiast
- Posts: 113
- Joined: Mon Dec 10, 2007 6:59 pm
Re: How to add "agree to terms and conditions"
Thanks again for your continuous help. I'll check Community Builder out.
Tim
Tim
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Jun 30, 2008 7:56 am
Re: How to add "agree to terms and conditions"
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
- dhuelsmann
- 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"
Did you enter the link to your terms and conditions page in CB configuration? If you did, try turning off SEF if on.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
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
-
- Joomla! Enthusiast
- Posts: 114
- Joined: Fri Aug 22, 2008 3:37 pm
- Location: India
- Contact:
Re: How to add "agree to terms and conditions"
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
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
-
- Joomla! Fledgling
- Posts: 1
- Joined: Fri Feb 11, 2011 1:53 am
- Location: Philippines
- Contact:
Re: How to add "agree to terms and conditions"
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.
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.
Finally you will need to remove the original token from the form.
Change this line ...
To this....
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!
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();">
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>
Change this line ...
Code: Select all
<?php echo JHTML::_( 'form.token' ); ?>
Code: Select all
<?php if (false) echo JHTML::_( 'form.token' ); ?>
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
-
- Joomla! Apprentice
- Posts: 15
- Joined: Tue Mar 15, 2011 3:07 am
Re: How to add "agree to terms and conditions"
Hi rritoch
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/ ?
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.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
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/ ?
-
- Joomla! Apprentice
- Posts: 15
- Joined: Tue Mar 15, 2011 3:07 am
Re: How to add "agree to terms and conditions"
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.
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.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Nov 02, 2011 10:08 am
Re: How to add "agree to terms and conditions"
Thanks for the useful template. Was very much of help!
- 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"
any proper solution on how to add the text on terms and conditions before proceed with the registration?
- Per Yngve Berg
- Joomla! Master
- Posts: 30935
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: How to add "agree to terms and conditions"
Joomla 1.0 is obsolete now. Transfer to the newest version 2.5 of Joomla.
- 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"
I am using Joomla 2.5 -Per Yngve Berg wrote:Joomla 1.0 is obsolete now. Transfer to the newest version 2.5 of Joomla.
Do you know how to insert the term and agreement text/article on Joomla 2.5? HOW?
- Per Yngve Berg
- Joomla! Master
- Posts: 30935
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: How to add "agree to terms and conditions"
Start a new topic in the proper Joomla 2.5 forum.
- 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"
nice solution...Per Yngve Berg wrote:Start a new topic in the proper Joomla 2.5 forum.
- 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"
the terms and condition was included on Joomla version 2.5.6 -- i guess this issue is solved and closed