vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help! Redirect to showthread from private.php (https://vborg.vbsupport.ru/showthread.php?t=205792)

fairydust 02-18-2009 01:04 PM

Help! Redirect to showthread from private.php
 
I am trying to write a mod to redirect to a particular thread i.e. showthread.php after I send a private message so using the private_insertpm_complete hook.

This does not work:
PHP Code:

$vbulletin->url 'showthread.php?t=2' $vbulletin->session->vars['sessionurl'];
eval(
print_standard_redirect('This is my message'falsetrue)); 

Yet I can view the thread when I manually paste the Url into the address bar of my website.

However

This redirect does work

PHP Code:

$vbulletin->url 'index.php' $vbulletin->session->vars['sessionurl'];
eval(
print_standard_redirect('This is my message'falsetrue)); 

Any suggestions as to why it does not redirect to the showthread.php URL??

Marco van Herwaarden 02-18-2009 02:05 PM

Try using the session URL as the first parameter in the URL.

fairydust 02-18-2009 02:30 PM

I changed:

PHP Code:

$vbulletin->url 'showthread.php?t=2' $vbulletin->session->vars['sessionurl']; 
eval(
print_standard_redirect('This is my message'falsetrue)); 

to


PHP Code:

$vbulletin->url $vbulletin->session->vars['sessionurl']."showthread.php?t=2";
eval(
print_standard_redirect('This is my message'falsetrue)); 

It still did not work, it takes ages redirecting and then I just get can IE error page: Internet explorer cannot display the page.

However the URL is correct: http://localhost/testvb/showthread.php?t=2

When I refresh the page manually the page appears.

Dismounted 02-19-2009 04:24 AM

PHP Code:

$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . 't=2'


fairydust 02-19-2009 09:06 AM

Still does not work. On the redirecting page, if I manually click "Click here if your browser does not automatically" it brings me to the correct page.

It just does not redirect me automatically to the showthread page

Any other suggestions would be appreciated.

fairydust 02-21-2009 10:56 AM

Anyone any suggested solutions?

Lynne 02-21-2009 03:23 PM

Have you looked at the page source of the page that says "Click here if your browser does not automatically" to see what is in the head for redirecting?


All times are GMT. The time now is 05:02 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
  • Page Generation 0.00992 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete