Log in

View Full Version : $url for standard_redirect not working


Nullifi3d
01-29-2006, 02:13 PM
I have my own vbulletin page and in it are several functions of which are different redirects depending on the action. However for some reason the do query string in the url ($url) is changing and I don't know why. it's causing permission error because it's redirecting to incorrect urls.
Some examples:$url = "http://www.webhostdebate.com/banners.php?do=add";
eval(print_standard_redirect("You campaign has been removed.", false, true));

$url = "http://www.webhostdebate.com/banners.php?do=statistics";
eval(print_standard_redirect("You banner campaign has been created, but will not be active until staff approves it.", false, true));

$url = "http://www.webhostdebate.com/banners.php?do=statistics";
eval(print_standard_redirect("You campaign has been updated, but will not be active until staff approves it.", false, true));

These are the 3 I have all used for different actions. They were working before I added some things to the document, now they are all that don't properly work. The only thing that gets changed is the do= string in the url. What may cause this?

Cole2026
01-29-2006, 02:54 PM
I have my own vbulletin page and in it are several functions of which are different redirects depending on the action. However for some reason the do query string in the url ($url) is changing and I don't know why. it's causing permission error because it's redirecting to incorrect urls.
Some examples:$url = "http://www.webhostdebate.com/banners.php?do=add";
eval(print_standard_redirect("You campaign has been removed.", false, true));

$url = "http://www.webhostdebate.com/banners.php?do=statistics";
eval(print_standard_redirect("You banner campaign has been created, but will not be active until staff approves it.", false, true));

$url = "http://www.webhostdebate.com/banners.php?do=statistics";
eval(print_standard_redirect("You campaign has been updated, but will not be active until staff approves it.", false, true));

These are the 3 I have all used for different actions. They were working before I added some things to the document, now they are all that don't properly work. The only thing that gets changed is the do= string in the url. What may cause this?

I thought they depricated the $url variable in vBulletin 3.5?

Try:
$vbulletin->url = "http://www.webhostdebate.com/banners.php?" . $vbulletin->session->vars['sessionurl'] . "do=add";
eval(print_standard_redirect("You campaign has been removed.", false, true));

$vbulletin->url = "http://www.webhostdebate.com/banners.php?" . $vbulletin->session->vars['sessionurl'] . "do=statistics";
eval(print_standard_redirect("You banner campaign has been created, but will not be active until staff approves it.", false, true));

$vbulletin->url = "http://www.webhostdebate.com/banners.php?" . $vbulletin->session->vars['sessionurl'] . "do=statistics";
eval(print_standard_redirect("You campaign has been updated, but will not be active until staff approves it.", false, true));

Nullifi3d
01-29-2006, 03:13 PM
that works and is better code. thanks a bunch.