PDA

View Full Version : vb3: print_standard_redirect-- Redirecting to URL, but no phrase shown?


Harlequin
02-11-2004, 07:02 PM
This is a little irking. :)


$url = "blahblah.php";
eval(print_standard_redirect('testing'));


and


$url = "blahblah.php";
eval(print_standard_redirect('redirect_testing'));


don't appear to work well with the following phrase:


Varname: testing
Phrase text: Testing testing 123

Group: Front-End Redirect Messages


The URL redirects, but the redirect page isn't shown at all.

I've tested this with the error side of this and it works (under the Front-End Error Message group, that is.) But unfortunately it doesn't redirect .. as is the desired result. ;)

Am I erroring in a bad way? >.>

NTLDR
02-11-2004, 07:10 PM
Make sure you have the phrase called testing in the front-end redirect messages group and then use redirect_testing in the PHP call.

Harlequin
02-11-2004, 09:21 PM
Crap. v.v;

I was doing everything you specified, NTLDR, and thank you for the attempt at trying. :) I redid everything just in case, making 100% sure that I was following the process correctly.. and sure enough I was, with the same noshow.

However - out of sheer curiosity, I put an echo ""; above the redirect just to even verify it was getting thus far. [See below]:


echo "... crap.";
eval(print_standard_redirect('redirect_testing'));


And it showed! :)

.. but taking the echo ""; out, it didn't show anymore. :( Either it's flying so fast past it in the code that I don't have time to load it in the browser at all.. or it's just not registering the function.. or something. x.x But the echo surely wouldn't make that much of a difference as to whether or not it was working.

I'm not losing my mind, am I?

NTLDR
02-11-2004, 09:27 PM
It shouldn't go past the print_standard_redirect() call as calling that ultimatly ends up in exit() being called so the script cannot get any further. Do you have redirection messages turned on in the options?

Harlequin
02-11-2004, 09:54 PM
I wasn't aware vb3 had such an option.

But I played with the setting a little and now it appears to be working. (x.x)

At first it didn't appear it was working too swell due to cache, but now it seems to be working fine. Thanks NTLDR, sorry for askin' the cruddy questions. :P

g-force2k2
02-12-2004, 12:25 AM
It shouldn't go past the print_standard_redirect() call as calling that ultimatly ends up in exit() being called so the script cannot get any further. Do you have redirection messages turned on in the options?

Yes it's a rather interesting feature of vb3, and I believe it is disabled as a default, but sometimes it doesn't seem that way because some redirects still work regardless.

Cheers,
g-force2k2

Harlequin
02-12-2004, 03:15 AM
Very true.

That's what was fooling me originally -- redirects appeared to be working. ;)

I'm fairly new to vb3 and I'm trying to get accustomed to it on the test board and making sure everything works okay before upgrading the main site. :)

NTLDR
02-12-2004, 01:29 PM
If you want to show a redirect in a certain situation, yet want it switched off on the whole add:

$_REQUEST['forceredirect'] = 1;

Before the redirect :)

Harlequin
02-12-2004, 04:31 PM
Neat. :) Thanks!