My Idea: The coding of MTF
Ok, So MTF, the idea, is almost perfect for OOP, mostly because OOP alows extending and « plugining in » (and MTF is based off that). I’ve been thinking about it and here is my idea for the « recoding » of MTF.
There is a class for MTF base. This class defines the basic functions that every forum type would need. This calss also sets up public functions that will be overwritten like a function for forum display, showthread, etc.
Then we have another class for every addon. Every addons class extends the base class and overwrites the public functions that are custom for this forum type.
Finally in say global_start something like:
[PHP]
if ($forumid AND in_array(THIS_SCRIPT, array(‘showthread’, ‘forumdisplay’,etc)
{
$forumtype = //use forumcache to get the forum type
include(‘mtf/class_’ . $forumtype);
$ft = new $forumtype($forumid);
}
[/PHP]
Then hooks like showthread something like:
$ft->showthread();
would be ran.
This method also allows a very simple product and only really one file upload.
