Thanks Posey, sorry I did not explain it too well.
Here is the code in the listener.php with the unnecessary stuff omitted :-
Code: Select all
public function button_action($event)
{
// 'button_reason' is set by clicking the button which then triggers the event
$button_reason = $this->request->variable('button_reason', '', true);
if ($button_reason != "This")
{
// It was not my inserted button that was clicked so get out
return;
}
$post_id = $event['post_id'];
$forum_id = $event['forum_id'];
// This is where the relevant code is to perform the required actions when my button is clicked
// This is the current code to control the subsequent redirect on return to posting.php
$event['topic_id'] = $topic_id;
$event['post_id'] = $next_post_id;
$event['cancel'] = true;
}
Can I replace those last three lines with the redirect I want and not return at all to posting.php or will that cause problms ?