In 006.php, in the function resume(), you will find a few occurnces of the following line (or similar):
PHP Code:
$try->set_value('mandatory', 'parentid', '-1');
You will need to replace '-1' with $forum['forum_parent']. But you will need to be carefull, not every place where 'parentid' is set needs to be updated. Some placves handle categories and will most likely don't need changing. I can't give you exact intructions without test data.