Adding language flag module position

GK User
Thu Aug 18, 2011 2:48 pm
Hi Guys,

I would like to add a language flag in the login module position. The icon is redirecting to my english website on a different domain.
Whenever I disable the login module and activate my custom html module, it still shows "Your account".
How would it be possible to get an icon beside those links?

Please have a look at the screenshot.

Thank you!
User avatar
Junior Boarder

GK User
Sat Aug 20, 2011 8:35 pm
Seems to be no that easy to solve...
User avatar
Junior Boarder

GK User
Mon Sep 19, 2011 3:38 am
Bump, any ideas?
User avatar
Junior Boarder

teitbite
Mon Sep 19, 2011 4:24 pm
Hi

This is a customization issue. Please try the instruction placed here: 1-general-discussion/86227-how-to-remove-the-top-menu-if-not-on-homepage.html#86555
User avatar
Moderator

GK User
Mon Sep 19, 2011 6:09 pm
Hi

Thanks for your reply!

Uhm, didn't knew that using a module position to something different would be a customization issue.
I have tried to solve this issue but the given link didn't worked out for me as it seems to be different to the current template as I can't find the index.php or the desired code.

Could you give me a helping hand with this issue?
User avatar
Junior Boarder

teitbite
Wed Sep 21, 2011 7:29 pm
Hi

This exact module positions are made for this specifics elements only.

You need to create a new module position for flags.

Add new <position>flags</position> to templateDetails.xml

Than use this code to load this position:

Code: Select all
   <jdoc:include type="modules" name="flags" />


in for example /layouts/blocks/header.php or mainnav.php (depends where it should visible.)
User avatar
Moderator

GK User
Sat Oct 01, 2011 2:20 pm
Hi There,

I'm sorry for late response, I'm not getting any notification about replies here...
I have created a new module position and it is working now.
Thanks for your help!
User avatar
Junior Boarder

GK User
Sat Oct 01, 2011 6:38 pm
Thanks for posting on this topic. I also would like to add a custom HTML module to the "login position" or userarea position on the AppSite template.

I am using the AppsSite template for joomla 1.7.1

I see the templateDetails.xml (located here: gk_appsite/templateDetails.xml)

I also see the block folder but I'm not sure where to place the code. I tried here: gk_appsite/layouts/blocks/tools/login.php

but I am getting an error. :(

Maybe I am not adding it in the correct place? Please advise & greatly appreciate the help!
User avatar
Junior Boarder

GK User
Sat Oct 01, 2011 6:49 pm
Hi,

I'll try to replicate my steps I have done. I have called my new module position "lang".

1. Edit TemplatesDetails.xml and add the lang position:
Code: Select all
<position>login</position>
      <position>lang</position>
      <position>register</position>

2. Edit default.php
Add:
Code: Select all
<?php if($this->modules('lang')) : ?>
<div id="lang">
<jdoc:include type="modules" name="lang" style="none" />
</div>
<?php endif; ?>

Right after:
Code: Select all
<body<?php echo $tpl_page_suffix; ?>>
   <?php if($this->browser->get('browser') == 'ie6' && $this->getParam('ie6bar', '1') == 1) : ?>
   <div id="gkInfobar"><a href="http://browsehappy.com"><?php echo JText::_('TPL_GK_APPSITE_IE6_BAR'); ?></a></div>
   <?php endif; ?>
   
   <?php $this->messages('message-position-1'); ?>
         
   <div id="gkPageTop" class="gkMain gkWrap clear">   
       <?php $this->loadBlock('logo'); ?>


3. Edit gk.const.php to match the following:
Code: Select all
'login' => 'none',
   'lang' => 'none',
   'register' => 'none',

4. Edit gk.stuff.css and add at the bottom:
Code: Select all
#lang {display:inline-block;float:right}


This should be all steps. At least it worked for me but maybe I have missed a step above...
User avatar
Junior Boarder

GK User
Sat Oct 01, 2011 8:07 pm
Perfect! Thank you sooooooo much! Worked like a charm :D
User avatar
Junior Boarder

GK User
Sat Oct 01, 2011 8:22 pm
Great to see it has worked out for you ;-)
User avatar
Junior Boarder


cron