Topic-icon GK TWN2 Login Help

Active Subscriptions:

None
10 years 2 months ago - 10 years 2 months ago #41548 by fb_729628948
Hi, I need you guys to help me out with the login on this template gk twnII, by default this template comes with a pos, to show a button on the login position, which is locate on the right top of the template, what I want to acomplish is to get a button, once users click on it, and shows the SC Login module on the modal window popup, I add the default.php file where I see the code to call the login module, am not good coding so,I need some guide:
<?php
/**
 *
 * Default view
 *
 * @version             1.0.0
 * @package             Gavern Framework
 * @copyright			Copyright (C) 2010 - 2011 GavickPro. All rights reserved.
 *               
 */
 
// No direct access.
defined('_JEXEC') or die;
if($this->getParam("cwidth_position", 'head') == 'head') {
$this->generateColumnsWidth();
}
$this->addCSSRule('.gkWrap { width: ' . $this->getParam('template_width','1240px') . '!important; }');
$this->addCSSRule('html { min-width: ' . $this->getParam('template_width','1240px') . '!important; }');
$tpl_page_suffix = '';
if($this->page_suffix != '') {
	$tpl_page_suffix = ' class="'.$this->page_suffix.'"';
}
$tpl_name = str_replace(' ', '_', JText::_('TPL_GK_LANG_NAME'));
$user = JFactory::getUser();
// getting User ID
$userID = $user->get('id');
// getting params
$option = JRequest::getCmd('option', '');
$view = JRequest::getCmd('view', '');
[color=#ff0000]
// defines if register is active
define('GK_REGISTER', ($this->modules('register') ? $userID == 0 : false));
// 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'));[/color]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
	  xmlns:og="http://ogp.me/ns#" 
	  xmlns:fb="http://ogp.me/ns/fb#"
	  xml:lang="<?php echo $this->API->language; ?>" lang="<?php echo $this->API->language; ?>">
<head>
    <?php $this->addTouchIcon(); ?>    
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <jdoc:include type="head" />
    <?php $this->loadBlock('head'); ?>
    <?php $this->loadBlock('cookielaw'); ?>
</head>
<body<?php echo $tpl_page_suffix; ?>>
	<!--[if IE 6]>
   <div id="gkInfobar"><a href="http://browsehappy.com"><?php echo JText::_('TPL_GK_LANG_IE6_BAR'); ?></a></div>
   <![endif]-->
	<?php $this->messages('message-position-1'); ?>
			
	<div id="gkPage" class="gkMain gkWrap">
        <?php if(isset($_COOKIE['gkGavernMobile'.$tpl_name]) &&
              $_COOKIE['gkGavernMobile'.$tpl_name] == 'desktop') : ?>
              <div class="mobileSwitch">
            <a href="javascript:setCookie('gkGavernMobile<?php echo $tpl_name; ?>', 'mobile', 365);window.location.reload();"><?php echo JText::_('TPL_GK_LANG_SWITCH_TO_MOBILE'); ?></a>
             </div>
    <?php endif; ?>  
    
    
        <?php $this->loadBlock('logo'); ?>
        
        <div id="gkMenuWrap" class="clear">    
           	<?php if($this->modules('topmenu1 or search') ) : ?>
           	<div id="gkTopMenu">
           		<?php if($this->modules('topmenu1')) : ?>
           		<div id="gkTopMenu1">
           			<jdoc:include type="modules" name="topmenu1" style="<?php echo $this->module_styles['topmenu1']; ?>" />
           		</div>
           		<?php endif; ?>
           		
           		<?php if($this->modules('search')) : ?>
           		<div id="gkSearch">
           			<jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
           		</div>
           		<?php endif; ?>	
           	</div>
            <?php endif; ?>
           <?php if($this->getParam('show_menu', 1)) : ?>
          	<div id="gkMainMenu" class="clear">
      			<?php
      				$this->menu->loadMenu($this->getParam('menu_name','mainmenu')); 
      			    $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
      			?>
          	</div>
          	<?php endif; ?>
          	<?php if($this->generateSubmenu && $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1), true)): ?>
          	<?php if($this->getParam('show_menu', 1)) : ?>
            <div id="gkSubmenu" class="clear">
          		<?php $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1));?>
          	</div>
          	<?php endif; ?>
			<?php else: ?>
          	
          		<?php if($this->modules('middlemenu')) : ?>
          		<div id="gkMiddleMenu" class="clear">
          			<jdoc:include type="modules" name="middlemenu" style="<?php echo $this->module_styles['middlemenu']; ?>" />
          		</div>
          		<?php endif; ?>
          	
          	<?php endif;?>
          	
          	<?php if($this->modules('breadcrumb or topmenu2')) : ?>         		
          	<div id="gkBottomMenu" class="clear">
          		<?php if($this->modules('breadcrumb')) : ?>
          		<div id="gkBreadcrumb">
          			<jdoc:include type="modules" name="breadcrumb" style="<?php echo $this->module_styles['breadcrumb']; ?>" />
          		</div>
          		<?php endif; ?>	
          		
          		<?php if($this->modules('topmenu2')) : ?>
          		<div id="gkTopMenu2">
          			<jdoc:include type="modules" name="topmenu2" style="<?php echo $this->module_styles['topmenu2']; ?>" />
          		</div>
          		<?php endif; ?>
          	</div>
          	<?php endif; ?>
        </div>	
        
    	<?php $this->messages('message-position-2'); ?>
	    <div id="mainContent" class="gkWrap clear">
	    	<?php $this->loadBlock('header'); ?>
	    	
	    	<?php $this->loadBlock('top'); ?>
	    	
	    	<?php $this->loadBlock('main'); ?>
	    	
	    	<?php $this->loadBlock('user'); ?>
	    </div>
    </div>
    
    <div id="gkBottomWrap" class="gkWrap clear">
        <?php $this->loadBlock('bottom'); ?>
    </div>
    
    <div id="gkFooter" class="gkWrap">
    	<?php $this->loadBlock('footer'); ?> 
    </div>
   
   <?php if(GK_LOGIN && !GK_COM_USERS) : ?>	
   <div id="gkPopupLogin">	
   	<div class="gkPopupWrap">
   	     <?php $this->loadBlock('tools/login'); ?>
   	</div>
   	</div>
   <?php endif; ?>
   
   <?php if(GK_REGISTER && !GK_COM_USERS) : ?>
   <div id="gkPopupRegister">	
   	<div class="gkPopupWrap">
   		<?php $this->loadBlock('tools/register'); ?>
   	</div>
   </div>
   <?php endif; ?>
   
   <?php if((GK_REGISTER || GK_LOGIN) && !GK_COM_USERS) : ?>
   <div id="gkPopupOverlay"></div>
   <?php endif; ?>

	<jdoc:include type="modules" name="debug" />
</body>
</html>


Thanks id advance for any help
Last edit: 10 years 2 months ago by fb_729628948.
The topic has been locked.
Support Specialist
10 years 2 months ago #41552 by alzander
Replied by alzander on topic GK TWN2 Login Help
I don't know that template at all, so I can't tell you an exact answer (and the php file doesn't really help me understand everything either).

The SCLogin module is a standard Joomla module. You should be able to put it in any position defined by your template. The SCLogin module has an option to enable the Modal and change the "Login" link to a text link, instead of a button. With those settings, you should be able to put the module into your template position and it should work how you want.

I hope that helps explain, but if not, let me know.

Thanks,
Alex
The topic has been locked.