-
AuthorPosts
-
rr21 Friend
rr21
- Join date:
- March 2010
- Posts:
- 18
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
March 24, 2010 at 5:05 am #149773How can I put that login module up there?
vitormarques Friendvitormarques
- Join date:
- March 2010
- Posts:
- 70
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 19 times in 18 posts
March 24, 2010 at 9:57 am #337552Hi.
Can you please explain where do you want to put login module? Maybe upload a picture or something.
Cheers
March 24, 2010 at 12:16 pm #337575to do this you will have to create a new module position in the header and assign the login module to that position. You will have to modify the html/php in templates/ja_rasite/layouts/blocks/mainnav.php and then it will probably also need some css modifications.
this page could help:
http://docs.joomla.org/How_do_you_add_a_new_template_position%3Frr21 Friendrr21
- Join date:
- March 2010
- Posts:
- 18
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
March 24, 2010 at 2:36 pm #337589<em>@ftht1 171127 wrote:</em><blockquote>to do this you will have to create a new module position in the header and assign the login module to that position. You will have to modify the html/php in templates/ja_rasite/layouts/blocks/mainnav.php and then it will probably also need some css modifications.
this page could help:
http://docs.joomla.org/How_do_you_add_a_new_template_position%3F</blockquote>step by step please?
<em>@vitormarques 171101 wrote:</em><blockquote>Hi.
Can you please explain where do you want to put login module? Maybe upload a picture or something.
Cheers</blockquote>
picture is up there on the first post
March 24, 2010 at 6:25 pm #337620<em>@rr21 171145 wrote:</em><blockquote>step by step please?</blockquote>
Unfortunately I don’t have time to make a good solution for you, but here is a start, and now you will at least know what files to edit:
Change the contents of /templates/ja_rasite/layouts/blocks/mainnav.php to:
<div id="ja-mainnav" class="wrap">
<div class="main clearfix">
<?php if (($jamenu = $this->loadMenu())) $jamenu->genMenu ($this->getParam('startlevel',0), $this->getParam('endlevel',-1)); ?>
<?php if ($this->countModules('menulogin')) : ?>
<div id="menulogin">
<jdoc:include type="modules" name="menulogin" style="raw" />
</div>
<?php endif; ?></div>
</div><?php if ($this->hasSubmenu() && ($jamenu = $this->loadMenu())) : ?>
<div id="ja-subnav" class="wrap">
<div class="main clearfix">
<?php $jamenu->genMenu (1); ?>
</div>
</div>
<?php endif;?><ul class="no-display">
<li><a href="<?php echo $this->getCurrentURL();?>#ja-content" title="<?php echo JText::_("Skip to content");?>"><?php echo JText::_("Skip to content");?></a></li>
</ul>
then change the contents of templates/ja_rasite/html/mod_login/default.php to:
<?php
/*------------------------------------------------------------------------
# JA Helio for joomla 1.5 - Version 1.2 - Licence Owner JA83611
# ------------------------------------------------------------------------
# Copyright (C) 2004-2008 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
# This file may not be redistributed in whole or significant part.
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php if($type == 'logout') : ?>
<div id="logout-wrap">
<form action="index.php" method="post" name="login" id="login">
<?php if ($params->get('greeting')) : ?>
<div><?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?></div>
<?php endif; ?>
<input type="submit" name="Submit" class="button" value="<?php echo JText::_( 'BUTTON_LOGOUT'); ?>" /><input type="hidden" name="option" value="com_user" />
<input type="hidden" name="task" value="logout" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
</form>
</div>
<?php else : ?>
<?php if(JPluginHelper::isEnabled('authentication', 'openid')) : ?>
<?php JHTML::_('script', 'openid.js'); ?>
<?php endif; ?>
<div id="login-wrap">
<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="10" />
</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="10" 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" /><div class="ja-login-links">
<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>
<?php endif; ?>
then add this to the bottom of template.css
/* menulogin addon begins */
#menulogin {float:right;margin-right:15px}
#menulogin label.ja-login-user span,
#menulogin label.ja-login-password span,
#menulogin div.ja-login-links {
display: none;
}
#menulogin input.inputbox {
margin-right:5px;}
/* menulogin addon ends */the you can go to the modules manager and open the login module and select the “position” box and type in “menulogin”.
This should give you a login form next to your menu. The create account and forgot username links are hidden and you still need to add something to let people know what those fields are for. As I said, I don’t have time to make the perfect solution, but this will at least show you what files to edit and give you a good start.
1 user says Thank You to ftht1 for this useful post
-
AuthorPosts
This topic contains 7 replies, has 3 voices, and was last updated by ftht1 14 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum