Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • marginmedia Friend
    #143725

    Hi

    I am trying to remove create an account from the login menu on my site.
    I have disabled Allow user registration and new user account activation.

    When you click create an account it does go to a restricted page. What I want to do is not have create an account show at all. Can this be done?

    Thanks

    prakash Friend
    #315415

    hi…

    you can make the necessary changes you want – including removing the create an account links …

    check this file > templates>jatube>html>modlogin>default.php

    there you can make the necessary changes to the login module…

    marginmedia Friend
    #315417

    thanks,

    I am not familiar with php. what piece of code in the default.php will I have to comment out or remove?
    Thanks in Advance

    prakash Friend
    #315419

    hi…

    your final default.php would look like this

    <?php // no direct access
    defined('_JEXEC') or die('Restricted access'); ?>
    <?php if($type == 'logout') : ?>
    <?php if ($params->get('greeting')) : ?>
    <li><a href="<?php echo JRoute::_("index.php?option=com_user&task=logout&return=".base64_encode('index.php'));?>" class="logout-switch"><?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?>
    <?php endif; ?>
    <?php echo JText::_( 'BUTTON_LOGOUT'); ?></a></li>
    <?php else : ?>
    <li>
    <a class="login-switch" href="<?php echo JRoute::_('index.php?option=com_user&view=login');?>" onclick="this.blur();showBox('ja-login','mod_login_username',this);return false;" title="<?php JText::_('Login');?>">Login</a>

    <!--LOFIN FORM content-->
    <div id="ja-login" style="width:450px;">
    <?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="login" id="login" >
    <?php echo $params->get('pretext'); ?>

    <label for="mod_login_username" class="ja-login-user">
    <span><?php echo JText::_('Username') ?>: </span>
    <input name="username" id="mod_login_username" type="text" class="inputbox" alt="username" size="20" />
    </label>

    <label for="mod_login_password" class="ja-login-password">
    <span><?php echo JText::_('Password') ?>: </span>
    <input type="password" id="mod_login_password" name="passwd" class="inputbox" size="20" alt="password" />
    </label>

    <label for="mod_login_remember">
    <input type="hidden" name="remember" id="mod_login_remember" class="inputbox" value="yes" alt="Remember Me" />
    </label>
    <input type="submit" name="Submit" class="button" value="Login" />
    <br />
    <div class="ja-login-links clearfix">
    <a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
    <?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
    <a href="<?php echo JRoute::_( 'index.php?option=com_user&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_user&view=register' ); ?>">
    <?php echo JText::_('REGISTER'); ?></a>
    <?php endif; ?>
    </div>
    <?php echo $params->get('posttext'); ?>

    <input type="hidden" name="option" value="com_user" />
    <input type="hidden" name="task" value="login" />
    <input type="hidden" name="return" value="<?php echo $return; ?>" />
    <?php echo JHTML::_( 'form.token' ); ?>
    </form>
    </div>

    </li>

    <!--LOFIN FORM content-->
    <?php endif; ?>

    *before modifying the default.php please take a backup. never make changes before taking a backup of your old file.

    marginmedia Friend
    #315422

    Thanks that did the trick.
    cheers

    staeske Friend
    #319260

    Hello, Is it also possible to remove the date?
    I like the date but it is only in English language. Here in Belgium we write the day before the month as for e.g. 1 october 2009 instead of october 1, 2009ยต

    thanks!!

    cnip Friend
    #321130

    No answer yet ?

    cnip Friend
    #321131

    <em>@prbalge 142141 wrote:</em><blockquote>hi…

    your final default.php would look like this

    <?php // no direct access
    defined('_JEXEC') or die('Restricted access'); ?>
    <?php if($type == 'logout') : ?>
    <?php if ($params->get('greeting')) : ?>
    <li><a href="<?php echo JRoute::_("index.php?option=com_user&task=logout&return=".base64_encode('index.php'));?>" class="logout-switch"><?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?>
    <?php endif; ?>
    <?php echo JText::_( 'BUTTON_LOGOUT'); ?></a></li>
    <?php else : ?>
    <li>
    <a class="login-switch" href="<?php echo JRoute::_('index.php?option=com_user&view=login');?>" onclick="this.blur();showBox('ja-login','mod_login_username',this);return false;" title="<?php JText::_('Login');?>">Login</a>

    <!--LOFIN FORM content-->
    <div id="ja-login" style="width:450px;">
    <?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="login" id="login" >
    <?php echo $params->get('pretext'); ?>

    <label for="mod_login_username" class="ja-login-user">
    <span><?php echo JText::_('Username') ?>: </span>
    <input name="username" id="mod_login_username" type="text" class="inputbox" alt="username" size="20" />
    </label>

    <label for="mod_login_password" class="ja-login-password">
    <span><?php echo JText::_('Password') ?>: </span>
    <input type="password" id="mod_login_password" name="passwd" class="inputbox" size="20" alt="password" />
    </label>

    <label for="mod_login_remember">
    <input type="hidden" name="remember" id="mod_login_remember" class="inputbox" value="yes" alt="Remember Me" />
    </label>
    <input type="submit" name="Submit" class="button" value="Login" />
    <br />
    <div class="ja-login-links clearfix">
    <a href="<?php echo JRoute::_( 'index.php?option=com_user&view=reset' ); ?>">
    <?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
    <a href="<?php echo JRoute::_( 'index.php?option=com_user&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_user&view=register' ); ?>">
    <?php echo JText::_('REGISTER'); ?></a>
    <?php endif; ?>
    </div>
    <?php echo $params->get('posttext'); ?>

    <input type="hidden" name="option" value="com_user" />
    <input type="hidden" name="task" value="login" />
    <input type="hidden" name="return" value="<?php echo $return; ?>" />
    <?php echo JHTML::_( 'form.token' ); ?>
    </form>
    </div>

    </li>

    <!--LOFIN FORM content-->
    <?php endif; ?>

    *before modifying the default.php please take a backup. never make changes before taking a backup of your old file.</blockquote>

    Super thanks

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

This topic contains 8 replies, has 4 voices, and was last updated by  cnip 15 years, 1 month ago.

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