![]() |
php support needed
i have been working on a script for a few weeks now, and nearly at
final stages of releasing it, but i need help with the following PHP Code:
basically the above writes a cookies to block access, so the idea is if the statement above is true the redirect to a given $varaiable set in admincp |
You could use the vbulletin function print_standard_redirect():
Code:
// ############################################################################# |
Quote:
if so, all i need to do is register the variable as follows PHP Code:
|
Quote:
Code:
$vbulletin->url = $vbulletin->options['myredirect']; 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. |
i am not sure if you understand
all my functions are called as PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
I don't know if I understand either. Are you not able to call print_standard_redirect(), or is it that you don't think it does what you want? Why not this:
Code:
function blockAccess($message) { |
Quote:
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' |
oops - it had a typo, it was missing a ';'. I fixed it in my post above.
|
Quote:
ok i have some progress but now i am getting PHP Code:
|
Quote:
Edit: Maybe try this: Code:
print_standard_redirect('phrase_to_show', true, false, -1, true); |
All times are GMT. The time now is 10:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|