Bug #17517

newloginbox -> redirect

Added by David Bruchmann over 12 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Category:
felogin
Target version:
-
Start date:
2007-08-10
Due date:
% Done:

0%

TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Newloginbox has most featuers for redirecting build in, but the variable 'redirect_url' is only known when it's inside the Post/Get-Data.
The Feature of Redirecting per Typoscript can be enabled by changing line 89 of the class in file tx_newloginbox_p1,php from

[OLD]
$redirect_url = t3lib_div::GPvar('redirect_url')

[TO NEW]
$redirect_url = t3lib_div::GPvar('redirect_url') ? t3lib_div::GPvar('redirect_url') : $this->conf['redirect_url'] ;

In Typoscript now the variable 'redirect_url' can be changed and additionally is overwritten when present in the Post/Get-Data.

(issue imported from #M6120)

History

#1 Updated by David Toshack over 12 years ago

would a redirect_pid be better here? Along with getTypoLink?

#2 Updated by David Bruchmann over 12 years ago

using redirect_pid is a good idea, perhaps it can be used additionaly.

Feature of $redirect_url includes some build-in features that can't (easily) build up by $redirect_pid only: You can add an array of domains which are handled depended from where the user comes.
I'm not very familiar with that feature because I still didn't use it, but using only $redirect_pid would again cut build-in functionallity.

I propose to use both, so $redirect_url will only be used if an array of URLs exist, otherwise $redirect_pid should be used.
About further options to manage the redirection-process I didn't spend any time but at least the variables from $fConf and GPvars should also be available in TS-$conf.

#3 Updated by David Toshack over 12 years ago

So long as the getTypoLink call happens before the domain detection I don't think it will matter. Right?

Having both options is also a good idea though. There are existing setups to take into account anyway.

#4 Updated by David Bruchmann over 12 years ago

I think too that doesn't matter.
Perhaps you can economize 2 millisecondes when the array (or list, it's called an array but perhaps is a comma separated list) has not to pe parsed without use ;-)

Perhaps there is an option to definitly control the behavior even if both variables are available, but I think that's only needed for elegance.

#5 Updated by Stefan Strasser over 12 years ago

A first version of a redirection-framework has just been submitted to svn. Tomorrow there should be a t3x-snapshot at [1]. The framework should it make possible to integrate different ways to define redirecting (typoscript, flexform, user-group, ...) after login or logout.
As long as it is not self-explainable the "documentation" may be found in the source-code of pi1/class.tx_newloginbox_pi1.php, starting at line 255.

I would be very happy if you could test it. But please note that it is a development snapshot and may change until the first release on TER. Your feedback is welcome.

[1] http://typo3xdev.sourceforge.net/

#6 Updated by Stefan Strasser over 12 years ago

As it is not very nice to have to look in the sourcecode for some documentation I post here a mini-doc for you may start testing as soon as possible ;-)

Redirection may be configured in different ways, already implemented are:
- Typoscript on login, on error and on logout
plugin.tx_newloginbox_pi1.redirPageLogin = 123
plugin.tx_newloginbox_pi1.redirPageLoginError = 123
plugin.tx_newloginbox_pi1.redirPageLogout = 123
- Flexform (on login)
- redirection-setting from usergroup
- redirection-setting from user
- referrer (page originally requested, no domain-configuration necessary; it exists also an option with Domain-configuration for backwards-compatibility)
- redirect_url through GET/POST

Which methods apply and the order they apply is to be set in Typoscript:
- !! There is at the moment no default-setting here, therefore none of the methods will work before you configure it here !! Shure there will be a default on publishing this feature on TER ...
- here an example-configuration with all methods, just set it like that for testing:
plugin.tx_newloginbox_pi1.redirMethods=typoscriptLogin,typoscriptLoginError,typoscriptLogout,getpost,referrer,referrerDomains,flexformLogin,groupLogin,userLogin
- the last method "wins" (overwrites methods before); if you want the first method that finds some configuration being the winner, set plugin.tx_newloginbox_pi1.redirFirstMethod=1

This should be enough for getting started.

Please use for feedback our newsgroup at [1]. It is IMHO the better place to discuss changes than here in the bugtracker.

[1] typo3.projects.newloginbox on news://news.netfielders.de (only newsgroup, not a mailing list)

#7 Updated by Vahan Amirbekyan over 12 years ago

folks,
I was looking for the redirect feature and found this forum.
I downloaded the latest from svn and tried it.
first could not make it work but then it started getting into intinite redirect loops in both logoff and logon cases.

I cannot share the site access at the moment because will be demoing to a client so will have to roll back to the stable 3.1.

and THANK YOU all guys for the extensions!

regards,

#8 Updated by Chi Hoang over 12 years ago

As far as I understood from reading the document and the code the var $redirect_url should be configured through the var default_pi_vars. I have tried this with the latest newloginbox and the latest Typo3 4.1.2 with no success.

#9 Updated by Steffen Kamper over 12 years ago

please have a look in #6603 for correct redirect for logout

#10 Updated by Steffen Kamper over 11 years ago

fixed in felogin

#11 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF