Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2004, 07:02 PM
Harlequin's Avatar
Harlequin Harlequin is offline
 
Join Date: Aug 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vb3: print_standard_redirect-- Redirecting to URL, but no phrase shown?

This is a little irking.

PHP Code:
$url "blahblah.php";
eval(
print_standard_redirect('testing')); 
and

PHP Code:
$url "blahblah.php";
eval(
print_standard_redirect('redirect_testing')); 
don't appear to work well with the following phrase:

Quote:
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? >.>
Reply With Quote
  #2  
Old 02-11-2004, 07:10 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure you have the phrase called testing in the front-end redirect messages group and then use redirect_testing in the PHP call.
Reply With Quote
  #3  
Old 02-11-2004, 09:21 PM
Harlequin's Avatar
Harlequin Harlequin is offline
 
Join Date: Aug 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]:

PHP Code:
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?
Reply With Quote
  #4  
Old 02-11-2004, 09:27 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 02-11-2004, 09:54 PM
Harlequin's Avatar
Harlequin Harlequin is offline
 
Join Date: Aug 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 02-12-2004, 12:25 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NTLDR
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
Reply With Quote
  #7  
Old 02-12-2004, 03:15 AM
Harlequin's Avatar
Harlequin Harlequin is offline
 
Join Date: Aug 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 02-12-2004, 01:29 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to show a redirect in a certain situation, yet want it switched off on the whole add:

PHP Code:
$_REQUEST['forceredirect'] = 1
Before the redirect
Reply With Quote
  #9  
Old 02-12-2004, 04:31 PM
Harlequin's Avatar
Harlequin Harlequin is offline
 
Join Date: Aug 2003
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neat. Thanks!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04501 seconds
  • Memory Usage 2,249KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete