After a lot of testing and googling, I've finally come up with this:
Code: Select all
public function posting_modify_template_vars(event $event)
$data = $event->get_data();
$data['page_data']['S_POST_ACTION'] .= '&c=' . $this->request->variable('c', '') . '&';
public function submit_post_modify_sql_data($event)
$sql_data = $event['sql_data'];
$comment_mode = $this->request->variable('c', '');
$sql_data[POSTS_TABLE]['sql'] = array_merge($sql_data[POSTS_TABLE]['sql'], array(
'parent_id' => $comment_mode == 1 ? $event['data']['parent_id'] : 0,
$event['sql_data'] = $sql_data;
And it works great. I tried appending to $event['s_action'], but functions use $event['page_data']['S_POST_ACTION'] instead. Appending to $event['page_data']['S_POST_ACTION'] itself didn't seem to work either.
Thanks for the help everyone! Hopefully this solution won't be denied
3Di I'll make a github when I have something to show for all of this work, haha
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!