-
AuthorPosts
-
August 27, 2009 at 3:41 am #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 Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
August 27, 2009 at 3:57 am #315415hi…
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…
1 user says Thank You to prakash for this useful post
August 27, 2009 at 4:05 am #315417thanks,
I am not familiar with php. what piece of code in the default.php will I have to comment out or remove?
Thanks in Advanceprakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
August 27, 2009 at 4:23 am #315419hi…
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.
1 user says Thank You to prakash for this useful post
August 27, 2009 at 5:21 am #315422Thanks that did the trick.
cheersOctober 1, 2009 at 6:32 am #319260Hello, 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!!
October 21, 2009 at 6:55 am #321130No answer yet ?
October 21, 2009 at 7:10 am #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
-
AuthorPosts
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