Quote:
Originally Posted by simonhind
so the $redir_phrase its self will become the URL ?
if so, all i need to do is register the variable as follows
PHP Code:
$redir_phrase = $vbulletin->options['myredirect'];
would this be what i need to do ?
|
Oh, right, I should have mentioned: you would set $vbulletin->url to the url, like:
Code:
$vbulletin->url = $vbulletin->options['myredirect'];
print_standard_redirect($redir_phrase);
That assumes that $redir_phrase is a phrase name. If it's the actual text, then you would want the second parameter to print_standard_redirect to be false (it's true by default).
Also, print_standard_redirect will use http headers to do a redirect so that the user won't see the message unless their browser doesn't support header redirects (I have no idea if that even happens at all these days). If you want to be sure that the message is displayed, use true for the third parameter.
Edit: also I forgot that I had the vb3 code loaded when I copied the description of print_standard_redirect() above - I replaced it with the vb4 version. This brings up another issue: if you're redirecting to a url that isn't part of your site, you might need to set the "bypasswhitelist" parameter to true.