vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Redirect after sending PM (https://vborg.vbsupport.ru/showthread.php?t=210938)

squishi 04-11-2009 03:56 PM

Redirect after sending PM
 
I have created a template and matching php file to show the PM editor on a single page.
The form on this template submits to private.php from vbulletin.
When you click send, a PM is sent and you get redirected to the inbox.

What I would like to do is to not redirect to the inbox after submission but to another page.
How can I do that?

Mr-Moo 04-11-2009 04:38 PM

Please paste the code and a link to this so we have the ability to check out the style. However if it is what I think it is, you should just be able to alter the redirect in the form settings. If you are calling the same core-files that Vbulletin uses, you will be altering it board-wide, not just for that page.

If you wanted it to work both ways, you would have to put a IF/ELSE statement in there doing a verify on the URL. But I don't want to get off-topic here.

Please post the code and we will go from there :)

squishi 04-11-2009 05:32 PM

Don't know what you want me to post.
It's just the regular vbulletin pm form.

PHP Code:

<form action="private.php?do=insertpm&amp;pmid=$pm[pmid]method="post" name="vbform"<if condition="!is_browser('webtv')"onsubmit="return vB_Editor['$editorid'].prepare_submit(this.title.value, 0)"</if>>

<<<
editor here>>>

</
form

After submission, I would like it to redirect to a specific page (and not the PM inbox).

Mr-Moo 04-11-2009 05:47 PM

Try adding:
Code:

<input type="hidden" name="redirect" value="URLHERE">
Into your code.

Now, are you talking about the page that says "YOUR MESSAGE SENT SUCCESSFULLY CLICK HERE TO GO OR WAIT" prompt?

Other then that you would need to modify the private.php :)

squishi 04-11-2009 06:06 PM

I tried it out and added it to the form.
But it still redirects to the inbox. :(

I don't mean the "your message..." redirect message. I did not get such a message, anyway.


All times are GMT. The time now is 01:03 PM.

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.01889 seconds
  • Memory Usage 1,715KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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