Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Login Module 1.7.2: Redirect to current page?

More
14 years 1 month ago - 14 years 1 month ago #121974 by vkuder
As usual, I give up waiting for someone to actually answer your original question.

Just don't use the Kunena Login Module. Use the default Joomla Login and set the login and logout Redirection Page options to "Default". You can remove the built-in Kunena login display shown at the top of the Forum by setting the "Login and Registration" option in the "Integration" tab of Kunena configuration to "None".

That seems to work fine (as per your request) in Joomla 2.5.3 with Kunena 1.7.2. (The only thing I haven't tested is to see if the Registration link in the Joomla Login will register and add a new user to Kunena correctly.)

Of course you will lose the Kunena Login features like - Last Visit - Avatar - My Profile - My Posts - Recent Discussions - My Messages Links. But personally I'd give that all up just to not have users redirected every time they login or logout. All of those options are shown once on the Forum Page anyhow - and/or there are other Joomla modules available that will do the same thing.

FOLLOWUP: If you want to have a Vertical module that includes the user Avatar and all the links in the Kunena Login form, rename /modules/mod_kunenalogin/tmpl/vertical.php and replace it with a new vertical.php file containing this code...
Code:
<?php /** * @version $Id$ * @package Kunena Login * * @Copyright (C) 2010-2011 Kunena Team. All rights reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.kunena.org */ defined('_JEXEC') or die(); ?> <div class="klogin-vert"> <?php if($this->type == 'logout') : ?> <?php if ($this->params->get('greeting')) : ?> <div class="klogin-hiname"> <?php echo JText::sprintf('MOD_KUNENALOGIN_HINAME','<strong>'.CKunenaLink::GetProfileLink ( $this->my->id, $this->user->getName()).'</strong>' ); ?> </div> <?php endif; ?> <div class="klogin-avatar"> <?php if ($this->params->get('showav')) : $avatar = $this->kunenaAvatar( $this->my->id ) ; echo $avatar; endif; ?> </div> <div> <?php if ($this->params->get('lastlog')) : ?> <div class="klogin-lastvisit"> <ul> <li class="kms"> <span class="klogin-lasttext"><?php echo JText::_('MOD_KUNENALOGIN_LASTVISIT'); ?></span> <span class="klogin-lastdate" title="<?php echo CKunenaTimeformat::showDate($this->my->lastvisitDate, 'date_today', 'utc'); ?>"> <?php echo CKunenaTimeformat::showDate($this->my->lastvisitDate, 'ago', 'utc'); ?> </span> </li> </ul> </div> <?php endif; ?> </div> <div> <ul class="klogin-loginlink"> <?php if ($this->params->get('showmessage')) : ?> <?php if ($this->PMlink) : ?> <li class="klogin-mypm"><?php echo $this->PMlink; ?></li> <?php endif ?> <?php endif; ?> <?php if ($this->params->get('showprofile')) : ?> <li class="klogin-myprofile"><?php echo CKunenaLink::GetProfileLink ( $this->my->id, JText::_ ( 'MOD_KUNENALOGIN_MYPROFILE' ) ); ?></li> <?php endif; ?> <?php if ($this->params->get('showmyposts')) : ?> <li class="klogin-mypost"><?php echo CKunenaLink::GetShowMyLatestLink ( JText::_ ( 'MOD_KUNENALOGIN_MYPOSTS' ) ); ?></li> <?php endif; ?> <?php if ($this->params->get('showrecent')) : ?> <li class="klogin-recent"><?php echo CKunenaLink::GetShowLatestLink ( JText::_ ( 'MOD_KUNENALOGIN_RECENT' ) ); ?></li> <?php endif; ?> </ul> </div> <?php endif; ?> </div>

Then add the Kunena Login Module (which will use the tweaked code above that removes the form elements) just below the normal Joomla Login Module. Hide the Module Title and the "Greeting" in the Kunena Login module (the Joomla module already has that). Then the module will be empty for Guests, so set it to "Hide if Empty". If you are using an Advanced Module Manager you can also hide the module when using the Forum component, as the Avatar and all those links are already shown on the Forum page. Now you have "the best of both worlds"! B)
Last edit: 14 years 1 month ago by vkuder.

Please Log in or Create an account to join the conversation.

Time to create page: 0.240 seconds