Repalce sign up to language

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
Mon Nov 04, 2013 7:19 pm
Reply with quote
Report this post
Hi,
I use joomla 3.0

I try to use the position "login" with the language selector modul, but didn't work
I like to replace the login button by a language selector,
could it be?

thanks
User avatar
Senior Boarder

teitbite
Wed Nov 06, 2013 12:16 pm
Reply with quote
Report this post
Hi

"Login" module position is placed inside a popup so it will not work like that. First You need to replace the code for Login button with a code of a module position.

Please edit file /layout/default.php and replace line 114:

Code: Select all
<a href="<?php echo $this->API->get('login_url', 'index.php?option=com_users&view=login'); ?>" id="gkLogin" class="button inverse"><?php echo ($userID == 0) ? JText::_('TPL_GK_LANG_LOGIN') : JText::_('TPL_GK_LANG_LOGOUT'); ?></a>


with:

Code: Select all
<jdoc:include type="modules" name="login" style="<?php echo $this->module_styles['login']; ?>" />


Than You can use the place where button was with a module position.
User avatar
Moderator

GK User
Thu Nov 07, 2013 11:01 am
Reply with quote
Report this post
Hi there, thanks for the answer!
But i found another solution :
I put :

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


Up the login position:
Code: Select all
<?php if(($this->API->get('reg_link') == '1' && $userID == 0) || $this->API->modules('login')) : ?>


and i didn't delete nothing... and it works!
User avatar
Senior Boarder

teitbite
Thu Nov 07, 2013 4:38 pm
Reply with quote
Report this post
Hi

Of course it can be done like that as well. My code was trying to replace the login button and Yours was to add a new position.
User avatar
Moderator


cron