Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Problem with the target after form post

steamsteam - #1 foro planes amigo
edited November 2015 in Vanilla 2.0 - 2.8

I have a problem with the target after form post.
From a comment I want to send a private message through popup window.

I have created url like:
echo anchor .... url('/messages/add/'.$Args['Author']->Name.'?Target='.urlencode('/discussion/pmessage'), true), 'PM Popup', ...

I see two ways:

1 - After submit form, I try to redirect to my custom method to show message and do nothing.
public function DiscussionController_pmessage_Create($Sender) { $Sender->informMessage("Your private message is sent."); }
but vanilla can not find it. I prefer this solution, but it does not work.

2 - Another solution is redirect back
If I redirect with self Target='.urlencode($Sender->SelfUrl)
It redirects me to start of the discussion losing the position of message.

I have to put url as / discussion / comment / 93 / # Comment_93 or is there another way? Then would have to find how display the message to the user.

Thanks in advance.



Sign In or Register to comment.