This MOD can be used to import messages (or posts) in a phpBB3 forum from an XML file. Therefore this will allow you to import messages from virtually any forum provided you have been able to save its content in XML.
Of course the input XML schema is predefined and it will be necessary to adapt your saved XML data to the expected input format. For that operation XSLT will be your friend.
The data managed by import_messages-V1.0 are:
- The topic title*
- The topic parent forum*
- The message texts*
- The message parent topic*
- The message titles (if absent uses topic title)
- The message date - many format accepted (if absent uses current import date)
- The message poster user name (if absent or unknown uses anonymous user)
- The message poster IP address
- Flags to indicate whether BBCODE, Smiley, URL must be converted and whether signature must be added (if absent configurable default value used)
import_messages-v1.0 has a preview mode to verify the data to be imported against the current forum content. It will allow you to know:
- which users are unknown (and will be replaced by anonymous user if not added in the forum before the actual importation)
- which forums are missing (and will cause the loss of child topics if not created before actual importation)
- which dates are incorrectly recognized (and will be replaced by current time if their format is not fixed before actual importation)
- a bunch of errors that would prevent the import operation
It is yet more recommended that you save all your database before doing any operation.
If you miss a lot of users, you may want to import them before importing the messages. This can be performed using the D¡cky's import users tool that I have provided an updated version here.
The message import operation is a long operation. Depending on the quantity of messages to import and on the maximum execution time of your PHP scripts, you may not be able to import all the messages at once. Even the preview may not be possible for all messages at once. This is the reason why import_messages-V1.0 will allow you to specify a range of topic to import. This will allow you to run the import of your data chunk by chunk. If you select a too large chunk at once the operation will stop before the end and show you which is the actual imported chunk.
Warning: If your topics are too big (more than 2s to import one) there is a risk that the operation fails inside a topic importation. This is an unrecoverable error that will let a incomplete topic in your forum. Therefore you should split too large topics in smaller parts or import them alone.
The installation of the import_messages-V0.1 module requires the following steps:
- Extract the files from the import_message-V1.0.zip file keeping the directory structure
- Upload the files in the root directory to your board root directory
- Navigate to the Navigate to: Administration Control Panel > System > Module Management > Administration Control Panel > Posting > Messages
- Select “Import Messages” from the Add Module drop-down menu and click “Add module”.
- Then click “Enable” on the Module.
After installation, the module can be used as follow:
- Format the data to import according to the schema provided in
includes\acp\import_messages.xsdor described in figure below
- Upload the XML file to import in the store directory
- Navigate to Administration Control Panel > Posting > Messages > Import Messages
- Fill at least the name of the file
- Click on preview button
- Fix any errors and resume at previous step
- If the preview is successful click on Submit button (5 time smaller range of topics is recommended at this step)