This is a direct port based on the work contributed in #536170: Port Phorum to Drupal 6.
It has not been thoroughly tested.
More or less a straight conversion of the 4.7.x code to 5.x.
The 4.7 compatible release of the phorum converter for migrating sites from Phorum into Drupal.