Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

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
12 years 3 weeks ago #1 by flosen
Hello.
I've got a question: When logging in with Kunena login Module, user will be redirected to start page. Is it possible that he will be redirected to the current page?
I only found hints for the old 1.5 version... Does anybody know the required changes in kunena.login.php?

Flo

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

More
12 years 3 weeks ago #2 by sozzled
G'day, flosen, and welcome to Kunena?

What version of Kunena and Kunena Login module are you using? Your configuration report and a screenshot of your Kunena Login settings will answer this question.

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

More
12 years 3 weeks ago - 11 years 11 months ago #3 by flosen
Thank you!
I use the current versions (both 1.7.2).
This message contains confidential information

Database collation check: The collation of your table fields are correct

Legacy mode: Disabled | Joomla! SEF: Enabled | Joomla! SEF rewrite: Enabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 60 seconds | Max execution memory: 128M | Max file upload: 10M

Kunena menu details:
Warning: Spoiler!

Joomla default template details : ja_purity_ii | author: JoomlArt.com | version: 1.2.0 | creationdate: August 2011

Kunena default template details : Blue Eagle (default) | author: Kunena Team | version: 1.7.0 | creationdate: 2011-08-29

Kunena version detailled: Installed version: 1.7.2 | Build: 5215 | Version name: Omega | Kunena detailled configuration:

Warning: Spoiler!

Third-party components: UddeIm 2.6

Third-party SEF components: None

Plugins: System - Mootools Upgrade: Disabled | System - Mootools12: Disabled | Kunena Search 1.7.2 | Kunena Discuss 1.7.2

Modules: Kunena Login 1.7.2

Attachments:
Last edit: 11 years 11 months ago by sozzled. Reason: Reveal K 1.7 configuration report in message

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

More
12 years 3 weeks ago #4 by sozzled
Thank you. Your Kunena Login configuration (screenshot) shows:

German: URL-Weiterleitung beim Anmelden = News
English: Login Redirection Page = News

So, that explains why users always go to the home page - the "News" page - of your website when they login from the Kunena Login module.

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

More
12 years 3 weeks ago - 12 years 3 weeks ago #5 by flosen
Okay. But there is no way to choose 'current site' or something. I only can choose my Menu-Links. I think that option is not included and must be 'hacked'.
in kunena.login.php I tried to build something from the Joomla login module (where this function works), but I didn't get it work. I want to use the Kunena-Login module because I want to see the Avatar, PM-link,... Of course I can try to manipulate the Joomla login module, but I hope, that someone has already done this with Kunena login module.
Last edit: 12 years 3 weeks ago by flosen.

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

More
12 years 3 weeks ago - 12 years 3 weeks ago #6 by flosen
Ok I got it. I had to change the getReturnURL() in mod_kunenalogin/class.php
From
Code:
function getReturnURL() { $itemid = $this->params->get ( $this->type ); if ($itemid) { $menu = & JSite::getMenu (); $item = $menu->getItem ( $itemid ); $url = JRoute::_ ( $item->link . '&Itemid=' . $itemid, false ); } else { // stay on the same page $uri = JFactory::getURI (); $url = $uri->toString ( array ('path', 'query', 'fragment' ) ); }

to
Code:
function getReturnURL() { $uri = JFactory::getURI (); $url = $uri->toString ( array ('path', 'query', 'fragment' ) ); return base64_encode ( $url ); }

But what I don't understand: The function includes the option to stay on the same page, if no parameter is chosen in config. But in config I have to choose a link from my menu. So the if else function would be perfect, if you could choose 'nothing' in config, because than you can choose another fix page for logout.

Thanks, greetings Flo
p.s. Sorry for my english...
Last edit: 12 years 3 weeks ago by flosen.

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

More
11 years 11 months ago - 11 years 11 months ago #7 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: 11 years 11 months ago by vkuder.

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

Time to create page: 0.441 seconds