Please remove a module from the register module position, then please open the layouts/default.php file and change line:
- Code: Select all
- // defines if register is active
 define('GK_REGISTER', ($this->modules('register') ? $userID == 0 : false));
to:
- Code: Select all
- // defines if register is active
 define('GK_REGISTER', $userID == 0 ? true : false);
In the same file please also remove the following fragment:
- Code: Select all
- <?php if(GK_REGISTER): ?>
 <div id="gkPopupRegister">
 <div class="gkPopupWrap">
 <?php $this->loadBlock('tools/register'); ?>
 </div>
 </div>
 <?php endif; ?>
then please open the layouts/block/nav.php file and change the registration path in this fragment (if necessary):
- Code: Select all
- <a href="<?php echo $this->URLbase(); ?>index.php?option=com_users&view=registration" id="btnRegister"><?php echo JText::_('TPL_GK_LANG_REGISTER'); ?></a>
 
And finally - please open file: js/gk.scripts.js and change fragment:
- Code: Select all
- // login popup
 if(document.id('btnLogin') || document.id('btnRegister')) {
 var popup_overlay = document.id('gkPopupOverlay');
 popup_overlay.setStyles({'display': 'block', 'opacity': '0'});
 popup_overlay.fade('out');
 var opened_popup = null;
 var popup_login = null;
 var popup_login_h = null;
 var popup_login_fx = null;
 var popup_register = null;
 var popup_register_h = null;
 var popup_register_fx = null;
 
 if(document.id('btnLogin')) {
 popup_login = document.id('gkPopupLogin');
 popup_login.setStyle('display', 'block');
 popup_login_h = popup_login.getElement('.gkPopupWrap').getSize().y + 8;
 popup_login_fx = new Fx.Morph(popup_login, {duration:200, transition: Fx.Transitions.Circ.easeInOut}).set({'opacity': 0, 'height': 0, 'margin-top':0});
 document.id('btnLogin').addEvent('click', function(e) {
 new Event(e).stop();
 popup_overlay.fade(0.85);
 popup_login_fx.start({'opacity':1, 'margin-top': -popup_login_h / 2, 'height': popup_login_h});
 opened_popup = 'login';
 });
 }
 
 if(document.id('btnRegister')) {
 popup_register = document.id('gkPopupRegister');
 popup_register.setStyle('display', 'block');
 popup_register_h = popup_register.getElement('.gkPopupWrap').getSize().y + 8;
 popup_register_fx = new Fx.Morph(popup_register, {duration:200, transition: Fx.Transitions.Circ.easeInOut}).set({'opacity': 0, 'height': 0, 'margin-top':0});
 document.id('btnRegister').addEvent('click', function(e) {
 new Event(e).stop();
 popup_overlay.fade(0.85);
 popup_register_fx.start({'opacity':1, 'margin-top': -popup_register_h / 2, 'height': popup_register_h});
 opened_popup = 'register';
 showGKRecaptcha('gk_recaptcha',  'submit_1', 'recaptcha_required_1');
 });
 }
 
 popup_overlay.addEvent('click', function() {
 if(opened_popup == 'login')   {
 popup_overlay.fade('out');
 popup_login_fx.start({
 'opacity' : 0,
 'height' : 0,
 'margin-top': 0
 });
 }
 
 if(opened_popup == 'register') {
 popup_overlay.fade('out');
 popup_register_fx.start({
 'opacity' : 0,
 'height' : 0,
 'margin-top': 0
 });
 }
 });
 }
 
to:
- Code: Select all
- // login popup
 if(document.id('btnLogin')) {
 var popup_overlay = document.id('gkPopupOverlay');
 popup_overlay.setStyles({'display': 'block', 'opacity': '0'});
 popup_overlay.fade('out');
 var opened_popup = null;
 var popup_login = null;
 var popup_login_h = null;
 var popup_login_fx = null;
 
 if(document.id('btnLogin')) {
 popup_login = document.id('gkPopupLogin');
 popup_login.setStyle('display', 'block');
 popup_login_h = popup_login.getElement('.gkPopupWrap').getSize().y + 8;
 popup_login_fx = new Fx.Morph(popup_login, {duration:200, transition: Fx.Transitions.Circ.easeInOut}).set({'opacity': 0, 'height': 0, 'margin-top':0});
 document.id('btnLogin').addEvent('click', function(e) {
 new Event(e).stop();
 popup_overlay.fade(0.85);
 popup_login_fx.start({'opacity':1, 'margin-top': -popup_login_h / 2, 'height': popup_login_h});
 opened_popup = 'login';
 });
 }
 
 popup_overlay.addEvent('click', function() {
 if(opened_popup == 'login')   {
 popup_overlay.fade('out');
 popup_login_fx.start({
 'opacity' : 0,
 'height' : 0,
 'margin-top': 0
 });
 }
 });
 }
 
That's all - I'll make this topic a sticky topic 
