To be more concrete here is what I propose to do to forums:
- Modify template::util::url_to_file (used in include tag lookups) so that if you specify an absolute path it no longer assumes it is absolute from the server root, instead if there is a connection it first checks from the current packages www directory, then it's lib directory, then from the root of packages and only then from the server root.
- Write ad_include_contract which has similar functionality to ad_page_contract but validates variables passed to an include instead of those passed in form variables.
- Go through every page in forums www and factor includable chunks that ui packages would want to use, put them in forums/lib and update the current forum ui pages in www to use them.
- Forums doesn't have any apm callbacks but if it did I would make sure they were factored into functions that a ui package could use.
- Make the package a singleton.
- Rename the package to forums-core.
- Make a new non-singleton package called forums which depends on forums-core.
- Move the www directory from forums-core to forums.
- Write upgrade scripts for forums which install forums-core.
- Write up the conventions used in creating the includes in forums-core/lib.
Comments?