Question about redirecting.

a complete banner management system, any number of banners can be added
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Question about redirecting.

Postby hcteks on Sat 09. Apr, 2005 08:39

Hello,

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
hcteks
Poster
Poster
 
Posts: 4
Joined: Tue 06. Jul, 2004 22:23

Return to Complete banner [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron