Simple TOS Hack
This is my simple way to have in our School PTA parents read a TOS before signing up to site. I was going to add to 'register page but didn't want to play with form too much and have another mod I want to do to registration form. See.
MY registration wish mod.
What I decided to do was move the links from the 'register' links in Kunena and Joomla site and make those 'Register' links first go to TOS page. The TOS page would have the 'register' links at bottom.
So you have to find any instances of the 'register' link in your site and change it. I had about three and show a couple here as they all look near the same.
I created an 'uncategorized' article in 'Article Manager' called 'TOS'. This had or terms of service as content. I then found the ID for the TOS document was '77'
Code:
http://mysite.com/myfolder/index.php?option=com_content&view=article&id=77
At the bottom of TOS page I put the following code. Basically a few words that they agree by going and registering. Nothing is recorded but it is hard for Joe Average to get to register without having seen TOS and they had to click on 'Register' image to proceed. That is fine for us, we are a small group.
Bottom of TOS page...
Code:
<p class="my_red"> By going to REGISTER page and registering I agree with terms...<a target="_self" href="http://mysite.com/forum/index.php?option=com_user&view=register"><img hspace="10" alt="" vspace="10" align="absMiddle" width="87" height="22" src="images/clipart/register.jpg" /></a></p>
Then changed the 'register' link in the following files which for me was the original and another template I was using from Joomlart..
original in
/public_html/mysite/modules/mod_login/tmpl/default.php
Code:
<ul>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=remind' ); ?>">
<?php echo JText::_('FORGOT_YOUR_USERNAME'); ?></a>
</li>
<?php
$usersConfig = &JComponentHelper::getParams( 'com_users' );
if ($usersConfig->get('allowUserRegistration')) : ?>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=register' ); ?>">
<?php echo JText::_('REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
===========
changed to
Code:
<ul>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=remind' ); ?>">
<?php echo JText::_('FORGOT_YOUR_USERNAME'); ?></a>
</li>
<?php
$usersConfig = &JComponentHelper::getParams( 'com_users' );
if ($usersConfig->get('allowUserRegistration')) : ?>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_content&view=article&id=77' ); ?>">
<?php echo JText::_('REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
************************************
In Joomlart template
/public_html/mysite/templates/ja_beryl/html/mod_login/default.php
Code:
<ul class="ja-login-links">
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<?php
$usersConfig = &JComponentHelper::getParams( 'com_users' );
if ($usersConfig->get('allowUserRegistration')) : ?>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=register' ); ?>">
<?php echo JText::_('REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
======
changed to
Code:
<ul class="ja-login-links">
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<?php
$usersConfig = &JComponentHelper::getParams( 'com_users' );
if ($usersConfig->get('allowUserRegistration')) : ?>
<li>
<a href="<?php echo JRoute::_( 'index.php?option=com_content&view=article&id=77' ); ?>">
<?php echo JText::_('REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
Hope might help someone that has a simlar site that is not so public that needs a tighter TOS setup.
Not much use asking me for help if you try this, as this took days for me to do, but thought it worth the effort to share...
Crunch