TODO:
phpbb2drupal.module should only import the data relevant to Drupal core (i.e. the data used by user.module, forum.module, poll.module, etc.). Even poll.module should be optional (not everyone wants it enabled by default on their Drupal site. I don't. I hate the drupal core poll.module).
All extraneous data should be imported by sister modules that can be optionally enabled. Those module would be kept in the same repository as phpbb2drupal.module, and packaged together with it, so it's easy for the maintainer to maintain, and easy for the user to download, but they should be different modules nonetheless.
The workflow should be as follows:
1) install and enable phpbb2drupal.module.
2) migrate the core compulsory data (tha used by user.module and forum.module).
3) populate in the process a table {phpdd2drupal_forum} {phpbb2drupal_user}, etc. which will keep the correspondance between the old phpbb data and the new drupal one (user IDs and forum thread IDs will change).
4) using those tables, the admin should have the possibility at anytime to migrate more data, e.g. the private messages, the polls, the user groups, etc.
1st example:
a- migrate core data to drupal.
b- enable a new module called phpbb2privatemsg.module (code to be extracted from main phpbb2drupal.module)
c- that module would require the contrib module privatemsg.module to be enabled.
d- migrate data, keeping a correspondence table in {phpbb2drupal_privatemsg} for future reference, if need be.
2nd example:
two news modules (which may be contributed by others than the new maintainer), called phpbb2og.module and phpbb2roles.module would give the choice to the admin to import that extra data using either of the corresponding 2 contrib modules.
from an email to the new maintainer:
> 2. Import groups. Not sure whether to target this towards Roles or
> Organic Groups.I don't know Roles. OG is a big module.
Don't do this, or at best make it optional with a strong warning.
People who use the module typically are new to Drupal and they don't
know those modules, what they do, and what using them implies.
They are creating their first Drupal web site out of their phpbb data.
One thing you don't want to do, is create unnecessary dependencies.
They might not want the mammoth that OG is, and all the complication
that implies (more modules to get, install, configure, update,
etc...)so:
- keep things simple.
- keep extra stuff optional with a clear warning.
- avoid as much as possible creating post-migration dependenciesThe best would be to create extra little modules, specializing in such
stuff: one module to import phpbb groups to og, one to import them to
Roles. Similarly, the private message import could be made into a
separate module. Thus, each of those separate modules would be
dependent on their relevant contrib modules (note that in the current
module, privatemsg.module is not required, but optional. It's
required only if you want to import PMs. This could be done in a
separate module, as I just said.)Thus, people could import phpbb into core Drupal and have a minimal
Drupal install. Later, should they decide to use OG, privatemsg or
anything else, they could enable that little extra module which would
specialize in importing the extra data.This would require that you keep within the Drupal site a table with
the correspondence between the phpBB data (users and topics) and the
Drupal data (users and nodes). This table already exists and is
currently used post-migration to redirect traffic from the old
location to the new.
extra note: migration is a tricky businees. Keep the big warnings telling admins to test first on a copy of the data. Don't let them try the migration straight away on live data!!!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | phpbb2privatemsg.module.txt | 4.98 KB | naheemsays |
Comments
Comment #1
naheemsays commentedAttached is my first attempt of breaking out the privatemsg import function into its own module It is totally untested so probably broken, but a quick look at how its done would be welcome - make sure I am going down the right path.
Secondly, I think that poll import should stay within the main module. Considering the code overlap with the topic import function it would probably be better if both were merged into one IMO - where topic import is the normal case but through if declarations, if a topic is a poll AND poll import is selected, at certain bits the function does its poll import bits.
Comment #2
naheemsays commentedIn the 6.x-1.0 release, privatemsg import was separated into its own module.
Poll import should IMO stay within the main module as in phpbb there is little difference between polls and topics (except for the poll itself), and both forum topics and polls are a part of the core of Drupal too. Those who do not want polls can disable the poll module after data import.