putting different module into "register" position

GK User
Sat Apr 27, 2013 3:57 am
hi guys

i am wanting to replace the small "login/register" button on the top right of the template with the "google translate" module. dimensions are similar, but when i publish the module in the "register" module position its not showing - i am assuming there is some specific coding thats making this position just for register?

is there a way to change this so i can put this other module in that position/placement on template.

thanks!
User avatar
Platinum Boarder

GK User
Sat Apr 27, 2013 8:49 am
You need to edit layout php file as code for register is hard coded.

File: templates/gk_twn2/layouts/blocks/logo.php
Lines: 50 to 61 which is below
Code: Select all
   <?php if((GK_REGISTER || GK_LOGIN) && !GK_COM_USERS) : ?>
   <div id="gkButtons">
      <div>
            <?php if(GK_LOGIN) : ?>
         <a href="<?php echo $this->URLbase(); ?>index.php?option=com_users&amp;view=login" id="btnLogin"><span><?php echo $btn_login_text; ?></span></a>
         <?php endif; ?>
         <?php if(GK_REGISTER) : ?>
         <a href="<?php echo $this->URLbase(); ?>index.php?option=com_users&amp;view=registration" id="btnRegister"><span><?php echo JText::_('TPL_GK_LANG_REGISTER'); ?></span></a>
         <?php endif; ?>
      </div>
   </div>
   <?php endif; ?>


Replace them with below. In below code I have kept original div id for css purposes.

Code: Select all
   <?php if($this->modules('register')) : ?>
   <div id="gkButtons">
      <div>
         <jdoc:include type="modules" name="register" style="<?php echo $this->module_styles['register']; ?>" />   
      </div>
   </div>
   <?php endif; ?>


If you are comfortable with css then you can simply use below and add your own css. See example div id "gkMyRegister".

Code: Select all
   <?php if($this->modules('register')) : ?>
   <div id="gkMyRegister">
         <jdoc:include type="modules" name="register" style="<?php echo $this->module_styles['register']; ?>" />   
   </div>
   <?php endif; ?>


Make sure to publish the module to show on all pages.

See you around...
User avatar
Platinum Boarder

GK User
Sat Apr 27, 2013 9:08 am
thanks for this - its all works until i go to try and alter CSS... as the "google translate" is a dropdon menu, it still sit within a button area - is there anyway to have this work as just a "clear" module with no specific coding - apart from stying in the same spot in the template.

any change i make pulls the positions apart.
User avatar
Platinum Boarder

GK User
Sat Apr 27, 2013 9:14 am
If you use the last example I have given as that doesn't have any css code applied. It would be simple if you can post your website link so we can check.

See you around...
User avatar
Platinum Boarder

GK User
Sat Apr 27, 2013 9:21 am
cool - have put the final one in - but its putting the module to the left of teh screen rather in the right side.

website is www.guidetogay.com

cheers





normanUK wrote:If you use the last example I have given as that doesn't have any css code applied. It would be simple if you can post your website link so we can check.

See you around...
User avatar
Platinum Boarder

GK User
Sat Apr 27, 2013 10:12 am
nevermind - have fixed it - thanks for the help!
User avatar
Platinum Boarder

GK User
Sat Apr 27, 2013 11:45 am
No problem at all, just another quick tip. Add all of your custom css code in to override.css and enable css override in template settings > advanced settings > css override "on". This way you only keep this file safe and all of your css changes will be in one place.

Also add following code as your logo is overlapping your language module and hence keeps refreshing page when user wants to change language.

Code: Select all
#gkLogoWrap {min-height: 100px;}
h1#gkLogo { width: 200px;}


See you around...
User avatar
Platinum Boarder

GK User
Sat Apr 27, 2013 2:55 pm
awesome - thanks for that! its was working on firefox, but that fixed it on safari...

thanks again!


normanUK wrote:No problem at all, just another quick tip. Add all of your custom css code in to override.css and enable css override in template settings > advanced settings > css override "on". This way you only keep this file safe and all of your css changes will be in one place.

Also add following code as your logo is overlapping your language module and hence keeps refreshing page when user wants to change language.

Code: Select all
#gkLogoWrap {min-height: 100px;}
h1#gkLogo { width: 200px;}


See you around...
User avatar
Platinum Boarder

GK User
Sun Apr 28, 2013 8:15 pm
No problem at all, see you around...
User avatar
Platinum Boarder


cron