PDA

View Full Version : Redirect after sending PM


squishi
04-11-2009, 04:56 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, 05: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, 06:32 PM
Don't know what you want me to post.
It's just the regular vbulletin pm form.

<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, 06:47 PM
Try adding:
<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, 07: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.