Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • rr21 Friend
    #149773

    How can I put that login module up there?

    vitormarques Friend
    #337552

    Hi.

    Can you please explain where do you want to put login module? Maybe upload a picture or something.

    Cheers

    ftht1 Friend
    #337575

    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

    rr21 Friend
    #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

    ftht1 Friend
    #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.

    rr21 Friend
    #337641

    perfect! thank you!

    ftht1 Friend
    #337732

    i would change

    #menulogin input.inputbox {
    margin-right:5px;}

    to

    #menulogin input.inputbox {
    margin:-1px 5px 0 0;}

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

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