I like other people on this board, have had problems with the redirect on the bannerm od. I could never get it to work properly on all browsers, using every fix I could find.
I made a change to the redirect.php file that works on all browsers, but I'm not sure it is the proper solution.
What I did was:
FIND
- Code: Select all
require_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_banner.' . $phpEx);
$template->set_filenames(array(
'body' => 'redirect.tpl'));
$template->assign_vars(array(
'REDIRECT_URL' => $redirect_url,
'MESSAGE' => sprintf($lang['No_redirect_error'],$redirect_url)
));
$template->pparse('body');
REPLACE WITH
- Code: Select all
header("Location:" . $redirect_url);
exit;
Is that code acceptable for use with the mod? Everything works, but I don't know if the proper referrer info gets sent. I got the code from wyrihaximus' toplist mod.
I have also seen this way of redirecting from linkdb 0.0.9:
- Code: Select all
// header("Location: $link_url");
echo '<script>location.replace("' . $link_url . '")</script>';
exit();
I see the author has commented out the php redirect and used the javascrip location.replace. Is one better than the other?
Cheers,
Ian

