Changes are made at your own risk and are not guaranteed to work. Always make backups of the database and files prior to implementing hacks. Make a special backup of the file and/or template you are modifying so that you can roll back quickly.
Hacks are dangerous and can cause your site to stop working. They make later updates to ExpressionEngine more difficult; you should track your hacks for post-update re-implementation.
Most hacks are unnecessary, please review the Development Documentation for information on expanding ExpressionEngine via Modules, Extensions, and Plugins.
Hacks are never officially supported.
Overview
This is a work in progress. Many people are interested in importing PHPBB data and users into the EE forums. Documentation for this process will be added here as time is available to post it. Some of the information will be useful info pulled from the EE forums. Other information will be a step by step walk through.
Current active thread in the EE forum on this topic: http://expressionengine.com/forums/viewthread/24311/ - Read This as it has some scripts to help.
Warning: Importing data should be done with advanced knowledge of both database structures and database manipulations - this is not for someone with no database knowledge. There is no official technical support for a data import gone wrong, so please make sure you have backups.
Disclaimer
The information presented here is from hobbyists and other interested parties. This information is not from developers or anyone from the professional developer network. The authors do not pretend to be experts of the subject matter and certainly some of it could be wrong. If you see any problems in this data please notify us via the above mentioned forum thread for this effort. Use this information at your own risk. Make sure you back up all data before attempting to perform any actions discussed here.
Primer on using spreadsheet and PHPMyAdmin for converting data
What you need to do is use PHPMyAdmin to export the data in a CSV format. When you do this you will have many options. I have since ditched Excel in favor of Open Office 2.0 and I don’t have alot of time for a good example so here it goes and good luck :) I will get a better example and explanation later. To use this example I suggest you create a test database possibly by exporting the data from your current database and importing that data into another database.
----
1. Find a table such as “users” in your forum database in PHPBB or whatever you want to use. Make sure there is actually some information in that table, in PHPMyAdmin click on the table and click browse if you are not sure.
2. Click on the export tab at the top and select CSV as the option.
: Note : Notice you have many different types of CSV. The MS version works great for MS Excel but for my example I am using Open Office. I selected the regular CSV option and stuck with the default options. If you select the regular CSV you will notice things like “terminated by” and “enclosed by.” Basically PHPMyAdmin uses the characters specified by these options to format the exported data in a way that the spreadsheet program can use to know how to separate the data into individual cells.
3. Click the go button and on the next screen you should get the output of the data in the format you opted for. Again notice the data is separated by whatever characters you entered in the previous step. In this case we should have just used the default.
4. Now you should be able to copy all that data and paste it into a text editor, then save it with a .CSV extension. Alternatively you can use the “save as file” option.
5. Start up your spreadsheet program.
6. Import the CSV data into your spreadsheet program.
: Note : In my case with OO 2.0 I was able to use the open file option to open the CSV file. I was then given a dialogue box with separator options. In my case I selected semicolon because my data fields from the CSV file are separated by semicolons.
7. When I clicked OK on the dialogue box I was then presented with a spreadsheet with the data nicely separated into individual cells for each item. Notice that all the separator characters have been removed by the spreadsheet program. I am now able to change, add, or remove data at will. I could even go through this same process with another database table and do a copy/paste transfer of data between the two tables.
8. When I am done I can save the file (in my case I can save but you may need to export) as a CSV file.
: Note : If I were to open the newly saved CSV file and compare it with the original file I will see they are both in the same format. If they are not I did something wrong.
9. I can now go back to PHPMyAdmin and import the newly created CSV file.
: Note : For this example you need the table you will be importing data into to already exist. This may be different from the process you will ultimately use for doing a forum conversion, but at this point I am only showing you how to play with CSV files. Since you previously exported data from one of your tables, you could use this same table for the test. In my case I simply deleted all rows from the table in question and reimported the data after taking the data through the above steps.
10. To import the data I clicked on the table in question and selected the “insert data from a text file into the table” option. Again I kept the default settings and clicked submit.
11. All the data is now in the table again! Browse through to make sure. Check to see the data has arrived in the correct format and changes you made show up here.
The above process is very general. There are many variables you may run into that may cause you problems such as different versions of the software, problem data that does not play nice with the default settings I described above, or any number of other things. If you don’t undertstand or you run into problems let me know. I wrote this very late at night so for all I know the above could be written in complete Greek and I would have no clue at this point. Just give it a shot and let me know how it turns out.
Just to give you more details what I did for this example… I used a simple database from my World Of Warcraft guild site that has a roster of users. I used the current roster database to export the users list for the data. I then used the initial SQL setup script to create another test database to import data into. I exported the users table using PHPMyadmin to a CSV file and then opened that file in the Open Office spreadsheet. I was now able to make whatever changes and save it again as a CSV file. I then used PHPMyAdmin to import that CSV file into the empty users table in the test database which worked fine.
Category:Import Category:Hacks Category:Forums
