by axew3 » Thu Jan 25, 2018 6:21 pm
I would really appreciate it thanks in advance
Is obscure what's the meaning of this, most of the time
To detect redirect from a login, as on this case, in phpBB, may can be achieved checking the protected
object redirect and redirect the user only in this case, in this way:
open:
includes/functions.php
search for:
Code: Select all
function redirect($url, $return = false, $disable_cd_check = false)
{
global $user, $phpbb_path_helper, $phpbb_dispatcher;
just after this, add the follow, changing the correct URL that point to your WordPress:
Code: Select all
global $request;
$mode = $request->variable('mode', '');
if($mode == 'login' ){
header("Location: http://www.my-nice-wp.com/");
exit;
}
when user login, will be then redirected to the assigned URL on the function header, and after phpBB logged in cookies have been released: so if WP_w3all will be active, the user will be added on fly also into WordPress.
The Javascript code to achieve this is even more easy, but i suppose for consistence, you may prefer this php way.
[quote]I would really appreciate it thanks in advance[/quote]
Is obscure what's the meaning of this, most of the time :D
To detect redirect from a login, as on this case, in phpBB, may can be achieved checking the protected [i]object redirect[/i] and redirect the user only in this case, in this way:
open: [i]includes/[b]functions.php[/b][/i]
search for:
[code]function redirect($url, $return = false, $disable_cd_check = false)
{
global $user, $phpbb_path_helper, $phpbb_dispatcher;[/code]
just after this, add the follow, changing the correct URL that point to your WordPress:
[code]global $request;
$mode = $request->variable('mode', '');
if($mode == 'login' ){
header("Location: http://www.my-nice-wp.com/");
exit;
}[/code]
when user login, will be then redirected to the assigned URL on the function header, and after phpBB logged in cookies have been released: so if WP_w3all will be active, the user will be added on fly also into WordPress.
The Javascript code to achieve this is even more easy, but i suppose for consistence, you may prefer this php way.