add login module to main menu

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Aug 07, 2012 4:03 pm
Reply with quote
Report this post
I would like to know how i would add a login module to the mainmenu as a dropdown effect. Plus add a new module position right over the top of the logo and menu grid...

Thanks
User avatar
Junior Boarder

GK User
Wed Aug 08, 2012 2:52 pm
Reply with quote
Report this post
I was able to solve my problem. I just added a new module grid to the tope of the page and then added a pop up login module. But I would still like to know the process of adding new Module Styles to this template?
User avatar
Junior Boarder

GK User
Sun Sep 02, 2012 10:15 pm
Reply with quote
Report this post
Hi

Besides adding on templateDetails.xml file and (naturally) on ../layout/ php file where you want, you need to add it on ../lib/framework/gk.const.php

Cheers
User avatar
Platinum Boarder

GK User
Wed Sep 05, 2012 4:47 pm
Reply with quote
Report this post
Hello charles99, hi Seichinha!

I also have some questions for deployment module login or register.
In the case of this model, I found these complexes to the template, but we go to work.
I find it interesting to explain about this inclusion therefore follows some ways according to what was explained by seichinha.
Are the ways ...

\templates\gk_creative\templateDetails.xml
\templates\gk_creative\layouts\default.php
\templates\gk_creative\lib\framework\gk.const.php


in templateDetails.xml, these positions are:
Code: Select all
      <positions>
            <!-- Template specific Module Positions -->
            <position>breadcrumb</position>
            <position>usermenu</position>
            <position>header_top</position>
            <position>header_bottom</position>
            <position>footer_nav</position>
            
            <!-- STANDARD Module Positions -->
            <position>sidebar</position>
            <position>mainbody</position>
            <position>mainbody_top</position>
            <position>mainbody_bottom</position>
            
            <!-- TOP Module Positions -->
            <position>top1</position>
            <position>top2</position>
            
            <!-- BOTTOM Module Positions -->
            <position>bottom1</position>
            <position>bottom2</position>
            <position>bottom3</position>
            <position>bottom4</position>
            
            <!-- MENU Module Positions -->
            <position>menu1</position>
            <position>menu2</position>
            <position>menu3</position>
            <position>menu4</position>
            <position>menu5</position>
            <position>menu6</position>
            <position>menu7</position>
            <position>menu8</position>
            <position>menu9</position>
            <position>menu10</position>
            
            <!-- TAB Module Positions -->
            <position>tab1</position>
            <position>tab2</position>
            <position>tab3</position>
            <position>tab4</position>
            <position>tab5</position>
            <position>tab6</position>
            <position>tab7</position>
            <position>tab8</position>
            <position>tab9</position>
            <position>tab10</position>
      </positions>


in default.php, is thus:

Code: Select all
// No direct access.
defined('_JEXEC') or die;
//
$this->layout->generateLayout();
//
$app = JFactory::getApplication();
$user = JFactory::getUser();
// getting User ID
$userID = $user->get('id');
// getting params
$option = JRequest::getCmd('option', '');
$view = JRequest::getCmd('view', '');
// defines if com_users
define('GK_COM_USERS', $option == 'com_users' && ($view == 'login' || $view == 'registration'));
// other variables
$btn_login_text = ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT');
$tpl_page_suffix = $this->page_suffix != '' ? ' class="'.$this->page_suffix.'"' : '';



in gk.const.php, is thus:

Code: Select all
// definitions of module positions default styles
$GK_TEMPLATE_MODULE_STYLES = array(
   'header_top' => 'none',
   'header_bottom' => 'none',
   'breadcrumb' => 'none',
   'usermenu' => 'none',
   'footer_nav' => 'none',
   
   'mainbody' => 'gk_style',
   'mainbody_top' => 'gk_style',
   'mainbody_bottom' => 'gk_style',
   
   'sidebar' => 'gk_style',
   'top1' => 'gk_style',
   'top2' => 'gk_style',
   'bottom1' => 'gk_style',
   'bottom2' => 'gk_style',
   'bottom3' => 'gk_style',
   'bottom4' => 'gk_style'
);


In my code changed to:

templateDetails.xml
Code: Select all
            <!-- Template specific Module Positions -->
            <position>breadcrumb</position>
            <position>usermenu</position>
            <position>login</position>
            <position>register</position>
            <position>header_top</position>
            <position>header_bottom</position>
            <position>footer_nav</position>
            
            <!-- STANDARD Module Positions -->
            <position>sidebar</position>
            <position>mainbody</position>
            <position>mainbody_top</position>
            <position>mainbody_bottom</position>
            
            <!-- TOP Module Positions -->
            <position>top1</position>
            <position>top2</position>
            
            <!-- BOTTOM Module Positions -->
            <position>bottom1</position>
            <position>bottom2</position>
            <position>bottom3</position>
            <position>bottom4</position>
            
            <!-- MENU Module Positions -->
            <position>menu1</position>
            <position>menu2</position>
            <position>menu3</position>
            <position>menu4</position>
            <position>menu5</position>
            <position>menu6</position>
            <position>menu7</position>
            <position>menu8</position>
            <position>menu9</position>
            <position>menu10</position>
            
            <!-- TAB Module Positions -->
            <position>tab1</position>
            <position>tab2</position>
            <position>tab3</position>
            <position>tab4</position>
            <position>tab5</position>
            <position>tab6</position>
            <position>tab7</position>
            <position>tab8</position>
            <position>tab9</position>
            <position>tab10</position>
      </positions>

default.php

Code: Select all
// No direct access.
defined('_JEXEC') or die;
//
$this->layout->generateLayout();
//
$app = JFactory::getApplication();
$user = JFactory::getUser();
// getting User ID
$userID = $user->get('id');
// getting params
$option = JRequest::getCmd('option', '');
$view = JRequest::getCmd('view', '');
// defines if com_users
define('GK_COM_USERS', $option == 'com_users' && ($view == 'login' || $view == 'registration'));
// other variables
$btn_login_text = ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT');
$tpl_page_suffix = $this->page_suffix != '' ? ' class="'.$this->page_suffix.'"' : '';
// defines if register is active
define('GK_REGISTER', ($this->modules('register')));
// defines if login is active
define('GK_LOGIN', $this->modules('login'));
// defines if com_users
define('GK_COM_USERS', $option == 'com_users' && ($view == 'login' || $view == 'registration'));
?>


gk.const.php

Code: Select all
// definitions of module positions default styles
$GK_TEMPLATE_MODULE_STYLES = array(
   'header_top' => 'none',
   'header_bottom' => 'none',
   'breadcrumb' => 'none',
   'usermenu' => 'none',
   'footer_nav' => 'none',
   'login' => 'none',
   'register' => 'none',
   
   'mainbody' => 'gk_style',
   'mainbody_top' => 'gk_style',
   'mainbody_bottom' => 'gk_style',
   'sidebar' => 'gk_style',
   'top1' => 'gk_style',
   'top2' => 'gk_style',
   'bottom1' => 'gk_style',
   'bottom2' => 'gk_style',
   'bottom3' => 'gk_style',
   'bottom4' => 'gk_style'
);


After these changes and replacement of their files, I enabled the module in position gk_register register
that did not exist before, but even enabled the record button is not enabled or login.

Have you tried other alternatives too, but without success.
I'm sure missing some modification.
Can someone point out mistakes and help me?
Grateful! ;)
User avatar
Senior Boarder

GK User
Thu Sep 06, 2012 12:53 pm
Reply with quote
Report this post
vitorreis wrote:After these changes and replacement of their files, I enabled the module in position gk_register register
that did not exist before, but even enabled the record button is not enabled or login.

Have you tried other alternatives too, but without success.
I'm sure missing some modification.
Can someone point out mistakes and help me?
Grateful! ;)


Yes you must add more, because in your case it's not only adding module position and validate on our template framework.

Are you doing this customization on Creative template?
User avatar
Platinum Boarder

GK User
Thu Sep 06, 2012 5:52 pm
Reply with quote
Report this post
Yes you must add more, because in your case it's not only adding module position and validate on our template framework.

Are you doing this customization on Creative template?


Yes!
I work in various projects of gavickPro, but in this case for implant login module or register module i work in creative.

Would be simple to put a menu item for directing the login page or registration.
But my idea is to put the gk_register module, which adds the popup how the TWN2 and myStore and more...
I do not know if you can understand me. :D

Thanks for the feedback.
User avatar
Senior Boarder


cron