Members login

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 Jan 08, 2013 10:27 am
Reply with quote
Report this post
Hi gavick team,

I want to know how can I do for adding a text link (members access) above the login button on the top of right template ?

And how to add to 2 text on gkpagetop with one "Hi, John Doe" and the second, the day date.
See my screenshot please.

For the "Hi, John Doe", I have add a new position on my news template. Here is my layouts/default.php code.

Code: Select all
<?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;
//
$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.'"' : '';
   
// code used to add the nobg class for the #gkHeader when at least one header module
// contains the nobg suffix.
jimport('joomla.application.module.helper');
$header_modules = JModuleHelper::getModules('header');
$header_nobg = false;
// looking for the nobg suffix
foreach($header_modules as $mod) {
   $params = json_decode($mod->params);
   
   if(stripos($params->moduleclass_sfx, 'nobg') !== FALSE) {
      $header_nobg = true;
   }
}

?>
<!DOCTYPE html>
<html lang="<?php echo $this->APITPL->language; ?>" <?php echo $tpl_page_suffix; ?>>
<head>
   <?php if($this->browser->get('browser') == 'ie8' || $this->browser->get('browser') == 'ie7' || $this->browser->get('browser') == 'ie6') : ?>
   <meta http-equiv="X-UA-Compatible" content="IE=edge" />
   <?php endif; ?>
    <?php if($this->API->get("chrome_frame_support", '0') == '1' && ($this->browser->get('browser') == 'ie8' || $this->browser->get('browser') == 'ie7' || $this->browser->get('browser') == 'ie6')) : ?>
    <meta http-equiv="X-UA-Compatible" content="chrome=1"/>
    <?php endif; ?>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2.0">
    <jdoc:include type="head" />
    <?php $this->layout->loadBlock('head'); ?>
   <?php $this->layout->loadBlock('cookielaw'); ?>
</head>
<body<?php echo $tpl_page_suffix; ?><?php if($this->browser->get("tablet") == true) echo ' data-tablet="true"'; ?><?php if($this->browser->get("mobile") == true) echo ' data-mobile="true"'; ?><?php $this->layout->generateLayoutWidths(); ?>>   
   <?php if ($this->browser->get('browser') == 'ie7' || $this->browser->get('browser') == 'ie6') : ?>
   <!--[if lte IE 7]>
   <div id="ieToolbar"><div><?php echo JText::_('TPL_GK_LANG_IE_TOOLBAR'); ?></div></div>
   <![endif]-->
   <?php endif; ?>   
   
    <?php if(count($app->getMessageQueue())) : ?>
    <jdoc:include type="message" />
    <?php endif; ?>
 
    <section id="gkPageTop" <?php if($header_nobg): ?> class="nobg"<?php endif; ?>>
       <div class="gkPage">
          <?php $this->layout->loadBlock('logo'); ?>
         
          <?php if($this->API->get('show_menu', 1)) : ?>
          <div id="gkMobileMenu">
             <?php echo JText::_('TPL_GK_LANG_MOBILE_MENU'); ?>
             <select onChange="window.location.href=this.value;">
             <?php
                 $this->mobilemenu->loadMenu($this->API->get('menu_name','mainmenu'));
                 $this->mobilemenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
             ?>
             </select>

          </div>
         /************ HERE IS THE CODE I HAVE INSERT TO OBTAIN HI, JOHN DOE **************/

            <?php if($this->API->modules('personnalisation')) : ?>
            <div id="gkpersonnalisation">
             <jdoc:include type="modules" name="personnalisation" style="<?php echo $this->module_styles['personnalisation']; ?>" />
            <?php endif; ?>

                        /************ END OF MY OWN CODE **************/
            </div>

            
          <?php if($this->API->get('rss_link') == '1' || $this->API->modules('login')) : ?>
          <div id="gkUserArea">
             <?php if($this->API->modules('login')) : ?>
             <a href="<?php echo $this->API->get('login_url', 'index.php?option=com_users&view=login'); ?>" id="gkLogin"><?php echo ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT'); ?></a>
             <?php endif; ?>
             
             <?php if($this->API->get('rss_link') == '1') : ?>
             <a href="<?php echo $this->API->get('rss_url', '#'); ?>" id="gkRSS"><?php echo JText::_('TPL_GK_LANG_RSS'); ?></a>
             <?php endif; ?>
          </div>
          <?php endif; ?>

          </div>
          <?php endif; ?>
         
          <?php if($this->API->get('show_menu', 1)) : ?>
          <div id="gkMainMenu">
             <?php
                $this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
                 $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
             ?>   
          </div>
          <?php endif; ?>
       </div>
    </section>
   
    <?php if($this->API->modules('bannertop')) : ?>
    <section id="gkBannerTop">
       <div class="gkPage">
          <jdoc:include type="modules" name="bannertop" style="<?php echo $this->module_styles['bannertop']; ?>" />
       </div>
    </section>
    <?php endif; ?>

   <?php if($this->API->modules('topmenu')) : ?>
   <section id="gkContentTop" class="gkPage">
      <?php if($this->API->modules('topmenu')) : ?>
      <div id="gkTopMenu">
         <jdoc:include type="modules" name="topmenu" style="<?php echo $this->module_styles['topmenu']; ?>" />
      </div>
      <?php endif; ?>
      
      <?php if($this->API->modules('social')) : ?>
      <div id="gkSocial">
         <jdoc:include type="modules" name="social" style="<?php echo $this->module_styles['social']; ?>" />
      </div>
      <?php endif; ?>
      
      <?php if($this->API->modules('search')) : ?>
      <div id="gkSearch">
         <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
      </div>
      <?php endif; ?>
      <!--[if IE 8]>
      <div class="ie8clear"></div>
      <![endif]-->
   </section>
   <?php endif; ?>

   <div id="gkPageContent" class="gkPage">
       <section id="gkContent"<?php if($this->API->get('sidebar_position', 'right') == 'left') : ?> class="gkColumnLeft"<?php endif; ?>>               
         <div id="gkContentWrap"<?php if($this->API->get('inset_position', 'right') == 'left') : ?> class="gkInsetLeft"<?php endif; ?>>
            <?php if($this->API->modules('top1')) : ?>
            <section id="gkTop1" class="gkCols3<?php if($this->API->modules('top1') > 1) : ?> gkNoMargin<?php endif; ?>">
               <div>
                  <jdoc:include type="modules" name="top1" style="<?php echo $this->module_styles['top1']; ?>"  modnum="<?php echo $this->API->modules('top1'); ?>" modcol="3" />
               </div>
            </section>
            <?php endif; ?>
            
            <?php if($this->API->modules('top2')) : ?>
            <section id="gkTop2" class="gkCols3<?php if($this->API->modules('top2') > 1) : ?> gkNoMargin<?php endif; ?>">
               <div>
                  <jdoc:include type="modules" name="top2" style="<?php echo $this->module_styles['top2']; ?>" modnum="<?php echo $this->API->modules('top2'); ?>" modcol="3" />
               </div>
            </section>
            <?php endif; ?>
            
            <?php if($this->API->modules('breadcrumb') || $this->getToolsOverride()) : ?>
            <section id="gkBreadcrumb">
               <?php if($this->API->modules('breadcrumb')) : ?>
               <jdoc:include type="modules" name="breadcrumb" style="<?php echo $this->module_styles['breadcrumb']; ?>" />
               <?php endif; ?>
               
               <?php if($this->getToolsOverride()) : ?>
                  <?php $this->layout->loadBlock('tools/tools'); ?>
               <?php endif; ?>
               
               <!--[if IE 8]>
               <div class="ie8clear"></div>
               <![endif]-->
            </section>
            <?php endif; ?>
            
            <?php if($this->API->modules('mainbody_top')) : ?>
            <section id="gkMainbodyTop">
               <jdoc:include type="modules" name="mainbody_top" style="<?php echo $this->module_styles['mainbody_top']; ?>" />
            </section>
            <?php endif; ?>   
            
            <section id="gkMainbody">
               <div<?php if($this->API->get('inner_inset_position', 'right') == 'left') : ?> class="gkInnerInsetLeft"<?php endif; ?>>
               <?php if(($this->layout->isFrontpage() && !$this->API->modules('mainbody')) || !$this->layout->isFrontpage()) : ?>
                  <jdoc:include type="component" />
               <?php else : ?>
                  <jdoc:include type="modules" name="mainbody" style="<?php echo $this->module_styles['mainbody']; ?>" />
               <?php endif; ?>
               </div>
               
               <?php if($this->API->modules('inner_inset')) : ?>
               <aside id="gkInnerInset"<?php if($this->API->modules('inner_inset') == 1) : ?> class="gkOnlyOne"<?php endif; ?>>
                  <jdoc:include type="modules" name="inner_inset" style="<?php echo $this->module_styles['inner_inset']; ?>" />
               </aside>
               <?php endif; ?>
            </section>
            
            <?php if($this->API->modules('mainbody_bottom')) : ?>
            <section id="gkMainbodyBottom">
               <jdoc:include type="modules" name="mainbody_bottom" style="<?php echo $this->module_styles['mainbody_bottom']; ?>" />
            </section>
            <?php endif; ?>
         </div>
         
         <?php if($this->API->modules('inset')) : ?>
         <aside id="gkInset"<?php if($this->API->modules('inset') == 1) : ?> class="gkOnlyOne"<?php endif; ?>>
            <jdoc:include type="modules" name="inset" style="<?php echo $this->module_styles['inset']; ?>" />
         </aside>
         <?php endif; ?>
       </section>
       
       <?php if($this->API->modules('sidebar')) : ?>
       <aside id="gkSidebar"<?php if($this->API->modules('sidebar') == 1) : ?> class="gkOnlyOne"<?php endif; ?>>
          <jdoc:include type="modules" name="sidebar" style="<?php echo $this->module_styles['sidebar']; ?>" />
       </aside>
       <?php endif; ?>
       <!--[if IE 8]>
       <div class="ie8clear"></div>
       <![endif]-->
   </div>
      
   <?php if($this->API->modules('bottom1')) : ?>
   <section id="gkBottom1" class="gkCols6<?php if($this->API->modules('bottom1') > 1) : ?> gkNoMargin<?php endif; ?> gkPage">
      <jdoc:include type="modules" name="bottom1" style="<?php echo $this->module_styles['bottom1']; ?>" modnum="<?php echo $this->API->modules('bottom1'); ?>" />
   </section>
   <?php endif; ?>
   
    <?php if($this->API->modules('bottom2')) : ?>
    <section id="gkBottom2" class="gkCols6<?php if($this->API->modules('bottom2') > 1) : ?> gkNoMargin<?php endif; ?> gkPage">
       <jdoc:include type="modules" name="bottom2" style="<?php echo $this->module_styles['bottom2']; ?>" modnum="<?php echo $this->API->modules('bottom2'); ?>" />
    </section>
    <?php endif; ?>
   
    <?php if($this->API->modules('lang')) : ?>
    <section id="gkLang">
       <div class="gkPage">
            <jdoc:include type="modules" name="lang" style="<?php echo $this->module_styles['lang']; ?>" />
         </div>
    </section>
    <?php endif; ?>
   
    <?php $this->layout->loadBlock('footer'); ?>
       
      <?php $this->layout->loadBlock('social'); ?>
   
   <?php $this->layout->loadBlock('tools/login'); ?>
   <div id="gkPopupOverlay"></div>
      
   <jdoc:include type="modules" name="debug" />
</body>
</html>
User avatar
Expert Boarder

GK User
Tue Jan 08, 2013 10:37 am
Reply with quote
Report this post
Sorry, another things.

What I want obtain is having 3 columns on the black header (gkpagetop) with the first column "Hi, John Doe", the second column the "day date" and the third column a link "Access Members" to the black popup login page.
User avatar
Expert Boarder

GK User
Fri Jan 11, 2013 3:13 pm
Reply with quote
Report this post
There is no reply gavick Team ? :(
User avatar
Expert Boarder

GK User
Sat Jan 12, 2013 12:08 pm
Reply with quote
Report this post
HI,

the main concept you want is how to add a block just above the menu,

First thing is make sure is there any module postion available at the top of menu. If there is no module then first you need to create a new module postion there

Just follow this steps to achieve it.
https://www.gavick.com/documentation/joomla-extensions/how-to-add-new-module-position/

Lets hope you have created a new postion successfully. Step two will be to finding a right modules which does the job.

For date and time : use this module http://ty2u.com/help/joomla/modules/date-and-time.html
user name and welocme message : Use this module http://extensions.joomla.org/extensions/contacts-and-feedback/greetings/16319
Members icon: use a custom HTML and write your own css and html for it.

Hope it solves your prob or at least give you a general idea.
User avatar
Expert Boarder

GK User
Tue Jan 15, 2013 10:12 am
Reply with quote
Report this post
Thanks for all
User avatar
Expert Boarder

teitbite
Thu Jan 17, 2013 4:06 am
Reply with quote
Report this post
Hi

Yes @raviufor this is a good solution.

@abdenour sorry for not responding, but when thread is bumped sysem is moving it to the end of the line so I could not seen Your question for some time.
User avatar
Moderator


cron