The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Mon Jun 23, 2008 8:07 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Dec 10, 2007 6:59 pm
Posts: 113
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


Top
 Profile  
 
PostPosted: Mon Jun 23, 2008 12:52 pm 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Sun Oct 02, 2005 12:50 am
Posts: 17557
Location: Omaha, NE
Community Builder has that feature.

_________________
Regards, Dave
http://www.kiwaniswest.org
http://www.huelsmann.us


Top
 Profile  
 
PostPosted: Tue Jun 24, 2008 4:56 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Dec 10, 2007 6:59 pm
Posts: 113
Thanks again for your continuous help. I'll check Community Builder out.

Tim


Top
 Profile  
 
PostPosted: Wed Aug 13, 2008 5:55 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jun 30, 2008 7:56 am
Posts: 11
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


Top
 Profile  
 
PostPosted: Wed Aug 13, 2008 12:07 pm 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Sun Oct 02, 2005 12:50 am
Posts: 17557
Location: Omaha, NE
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
http://www.kiwaniswest.org
http://www.huelsmann.us


Top
 Profile  
 
PostPosted: Tue Nov 04, 2008 1:28 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Aug 22, 2008 3:37 pm
Posts: 114
Location: India
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


Top
 Profile  
 
PostPosted: Fri Feb 11, 2011 3:08 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Feb 11, 2011 1:53 am
Posts: 1
Location: Philippines
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:
<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:
<?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:
<?php echo JHTML::_( 'form.token' ); ?>


To this....
Code:
<?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: viewtopic.php?t=65


Top
 Profile  
 
PostPosted: Sun Apr 03, 2011 11:57 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 15, 2011 3:07 am
Posts: 15
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/ ?


Top
 Profile  
 
PostPosted: Mon Apr 04, 2011 8:26 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 15, 2011 3:07 am
Posts: 15
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.


Top
 Profile  
 
PostPosted: Wed Nov 02, 2011 10:10 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Nov 02, 2011 10:08 am
Posts: 2
Thanks for the useful template. Was very much of help!


Top
 Profile  
 
PostPosted: Sun May 27, 2012 2:53 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Tue Oct 26, 2010 3:54 am
Posts: 703
any proper solution on how to add the text on terms and conditions before proceed with the registration?

_________________
Thanks,
Johans
http://www.johansempuerto.tk
Joomla customize works


Top
 Profile  
 
PostPosted: Sun May 27, 2012 6:43 pm 
Joomla! Master
Joomla! Master
Online

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13757
Location: Akershus, Norway
Joomla 1.0 is obsolete now. Transfer to the newest version 2.5 of Joomla.


Top
 Profile  
 
PostPosted: Sun May 27, 2012 11:58 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Tue Oct 26, 2010 3:54 am
Posts: 703
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?

_________________
Thanks,
Johans
http://www.johansempuerto.tk
Joomla customize works


Top
 Profile  
 
PostPosted: Mon May 28, 2012 7:19 am 
Joomla! Master
Joomla! Master
Online

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13757
Location: Akershus, Norway
Start a new topic in the proper Joomla 2.5 forum.


Top
 Profile  
 
PostPosted: Mon May 28, 2012 7:48 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Tue Oct 26, 2010 3:54 am
Posts: 703
Per Yngve Berg wrote:
Start a new topic in the proper Joomla 2.5 forum.


nice solution... :eek:

_________________
Thanks,
Johans
http://www.johansempuerto.tk
Joomla customize works


Top
 Profile  
 
PostPosted: Wed Jul 25, 2012 12:15 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Tue Oct 26, 2010 3:54 am
Posts: 703
the terms and condition was included on Joomla version 2.5.6 -- i guess this issue is solved and closed

_________________
Thanks,
Johans
http://www.johansempuerto.tk
Joomla customize works


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group