Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • ivan1012 Friend
    #168975

    It seems that in JA Social for joomla 1.7 the code has changed … can you tell me what to change so when i fillout the registration form and click register the link takes me to jom social registration

    Also can you point out what to change if I want to make register button on click to lead to jomsocial user registration and not to dropdown the registration form … thank you…

    CODE of default.php in JA Social module part:

    <?php // no direct access
    defined('_JEXEC') or die('Restricted access'); ?>
    <?php if($type == 'logout') : ?>
    <li>
    <form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" name="form-login" id="login-form">
    <?php if ($params->get('greeting')) : ?>
    <?php if($params->get('name') == 0) : {
    echo JText::sprintf('HINAME', $user->get('name'));
    } else : {
    echo JText::sprintf('HINAME', $user->get('username'));
    } endif; ?>
    <?php endif; ?>
    <input type="submit" name="Submit" class="button logout-button" value="<?php echo JText::_('JLOGOUT'); ?>" />
    <input type="hidden" name="option" value="com_users" />
    <input type="hidden" name="task" value="user.logout" />
    <input type="hidden" name="return" value="<?php echo $return; ?>" />
    <?php echo JHtml::_('form.token'); ?>
    </form>
    </li>
    <?php else : ?>
    <li>
    <a class="login-switch" href="<?php echo JRoute::_('index.php?option=com_user&view=login');?>" onclick="showBox('ja-user-login','mod_login_username',this, window.event || event);return false;" title="<?php JText::_('Login');?>"><span>Login</span></a>

    <!--LOFIN FORM content-->
    <div id="ja-user-login" style="width:370px;">
    <?php if(JPluginHelper::isEnabled('authentication', 'openid')) : ?>
    <?php JHTML::_('script', 'openid.js'); ?>
    <?php endif; ?>
    <form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" name="form-login" id="login-form" >
    <div class="pretext">
    <?php echo $params->get('pretext'); ?>
    </div>
    <fieldset class="userdata">
    <label for="modlgn-username" class="ja-login-user" id="form-login-username">
    <span><?php echo JText::_('Username') ?>:</span><br/>
    <input id="modlgn-username" type="text" name="username" class="inputbox" size="18" />
    </label>
    <label for="modlgn-passwd" class="ja-login-password" id="form-login-password">
    <span><?php echo JText::_('Password') ?>: </span> <br />
    <input type="password" id="modlgn-passwd" name="password" class="inputbox" size="20" alt="password" />
    </label>
    <?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
    <label for="modlgn-remember" id="form-login-remember">

    <input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/>
    </label>
    <?php endif; ?>
    <input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" />
    <input type="hidden" name="option" value="com_users" />
    <input type="hidden" name="task" value="user.login" />
    <input type="hidden" name="return" value="<?php echo $return; ?>" />
    <?php echo JHtml::_('form.token'); ?>
    </fieldset>
    <div class="ja-login-links clearfix">
    <a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
    <?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
    <a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
    <?php echo JText::_('FORGOT_YOUR_USERNAME'); ?></a>
    <?php
    $usersConfig = &JComponentHelper::getParams( 'com_users' );
    if ($usersConfig->get('allowUserRegistration')) : ?>
    <a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
    <?php echo JText::_('REGISTER'); ?></a>
    <?php endif; ?>
    </div>
    <?php echo $params->get('posttext'); ?>
    </form>
    </div>

    </li>
    <?php
    $option = JRequest::getCmd('option');
    $task = JRequest::getCmd('task');
    if($option!='com_user' && $task != 'register') { ?>
    <li>
    <a class="register-switch" href="<?php echo JRoute::_("index.php?option=com_users&task=registration");?>" onclick="showBox('ja-user-register','namemsg',this, window.event || event);return false;" >
    <span><?php echo JText::_('REGISTER');?></span>
    </a>
    <!--LOFIN FORM content-->
    <script type="text/javascript" src="<?php echo JURI::base();?>media/system/js/validate.js"></script>
    <div id="ja-user-register" style="width:370px;">
    <script type="text/javascript">
    /*
    Window.onDomReady(function(){
    document.formvalidator.setHandler('passverify', function (value) { return ($('password').value == value); } );
    });
    */
    </script>

    <?php
    ///if(isset($this->message)){
    // $this->display('message');
    //}
    ?>
    <form id="member-registration" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="form-validate">
    <fieldset>
    <?php if (isset($fieldset->label)):// If the fieldset has a label set, display it as the legend.?>
    <legend><?php echo JText::_($fieldset->label);?></legend>
    <?php endif;?>
    <table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane">
    <tr>
    <td width="30%">
    <label class="hasTip required" for="jform_name" id="jform_name-lbl" title="Name<br>Enter your full name">
    <?php echo JText::_( 'Name' ); ?>:</label>
    </td>
    <td><input type="text" size="30" value="" class="inputbox required" maxlength="50" id="jform_name" name="jform[name]" /><span class="red">*</span></td>
    </tr>
    <tr>
    <td><label title="" class="hasTip required" for="jform_username" id="jform_username-lbl">
    <?php echo JText::_( 'Username' ); ?>:</label></td>
    <td><input type="text" size="30" class="inputbox required" value="" id="jform_username" name="jform[username]" /><span class="red">*</span></td>
    </tr>
    <tr>
    <td><label title="" class="hasTip required" for="jform_password1" id="jform_password1-lbl">
    <?php echo JText::_( 'Password' ); ?>:</label></td>
    <td><input type="password" size="30" class="inputbox required" value="" id="jform_password1" name="jform[password1]" /><span class="red">*</span>
    </td>
    </tr>
    <tr>
    <td><label title="" class="hasTip required" for="jform_password2" id="jform_password2-lbl">
    <?php echo JText::_( 'Confirm Password' ); ?>:</label></td>
    <td><input type="password" size="30" class="inputbox required" value="" id="jform_password2" name="jform[password2]" /><span class="red">*</span></td>
    </tr>
    <tr>
    <td><label title="" class="hasTip required" for="jform_email1" id="jform_email1-lbl"><?php echo JText::_( 'Email' ); ?>:</label></td>
    <td><input type="text" size="30" class="inputbox required" value="" id="jform_email1" name="jform" /><span class="red">*</span></td>
    </tr>
    <tr>
    <td><label title="" class="hasTip required" for="jform_email2" id="jform_email2-lbl">
    <?php echo JText::_( 'Confirm email Address'); ?>:</label></td>
    <td><input type="text" size="30" class="inputbox required" value="" id="jform_email2" name="jform" /><span class="red">*</span></td>
    </tr>
    </table>
    </fieldset>
    <br />
    <p><?php echo "Fields marked with an asterisk (*) are required."; ?></p>
    <button type="submit" class="button validate"><?php echo JText::_('REGISTER');?></button>
    <div>
    <input type="hidden" name="option" value="com_users" />
    <input type="hidden" name="task" value="registration.register" />
    <?php echo JHtml::_('form.token');?>
    </div>
    </form>
    <!-- Old code -->
    </div>
    </li>
    <?php } ?>
    <!--LOFIN FORM content-->
    <?php endif; ?>

    jooservices Friend
    #418134

    Hi,
    To make register button on click to lead to jomsocial user registration and not to dropdown the registration form
    On this code
    [PHP]
    <a class=”register-switch” href=”<?php echo JRoute::_(“index.php?option=com_users&task=registration”);?>” onclick=”showBox(‘ja-user-register’,’namemsg’,this, window.event || event);return false;” >
    <span><?php echo JText::_(‘REGISTER’);?></span>
    </a>
    [/PHP]
    and change to
    [PHP]
    <a class=”register-switch” href=”<?php echo JRoute::_(“index.php?option=com_community&view=register”);?>”>
    <span><?php echo JText::_(‘REGISTER’);?></span>
    </a>
    [/PHP]
    Please let me know your result.
    Thanks.
    Viet Vu

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  jooservices 12 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum