Skip to content

Instantly share code, notes, and snippets.

@MildlyInterested
Last active January 6, 2023 12:47
Show Gist options
  • Save MildlyInterested/c8245c00dbaf4304f90113de4d52c5e4 to your computer and use it in GitHub Desktop.
Save MildlyInterested/c8245c00dbaf4304f90113de4d52c5e4 to your computer and use it in GitHub Desktop.
Merge IPB4 into MyBB: a descent into madness

Gonna use Cloudpanel to run our MySQL(improved) database and also provide direct access to the database via phpMyAdmin. We are importing vom IPB4 version Invision Community Version 4.6.12.1.

  1. Upload your ipb4 database to your /tmp directory.

  2. In Cloudpanel create an additional database for your site, note down user, password and db name. I've called my database "invision".
    image

  3. Now import your uploaded database.sql into your newly created database. Running this command may take a few minutes.
    image

  4. Change the mode of your SQL database to not strict. image

  5. Upload merge folder to your forum directory (download it from my fork which contains fixes an error I encountered)
    image

  6. Make sure your website is running on PHP 74. wit all the correct (PHP) plugins and (PHP) settings.

  7. Go to forum.example.com/admin and login, then go to forum.example.com/merge

  8. Follow the official MyBB merge guide and upload loginconvert.php from your merge folder to your forums "inc" folder. E.g. home/linuxuser/htdocs/forum.example.com/inc

  9. Type in the database details of the invision database, table prefix is ipb. image

  10. Now if you simply continue the merge you'll run into this issue and others. So before importing anything else read through this whole guide. DO NOT IMPORT FORUM PERMISSIONS, it will break forum permission on MyBB. image

  11. Basically IPB4 uses -1 to represent some permission but MyBB only accepts positive integers (0 and up). To fix this go into phpMyAdmin and connect to your invision database.

  12. In phpMyAdmin search for the correct table with this SQL query:

SELECT table_name, table_schema
FROM INFORMATION_SCHEMA.COLUMNS
WHERE column_name='g_max_messages'

image

  1. Now that you've found your correct table change all occurences of -1 to 0 in the following columns: g_max_messages, g_use_pm, g_max_mass_pm, make sure to check ALL rows (amount of rows should be roughly equal to amount of groups you have in ipb4). image image

  2. Next we'll need to change the encoding of one speficic table in the invision database. Click on ipbcore_members table, then on operations and should see the following screen, change collation, tick "change all column..." and click go. image

  3. You'll need to change it to match the collation of the following MyBB table. image

  4. In my case that meant changing utf8mb4_unicode_ci to utf8mb3_general_ci.

  5. Now you can import whatever you want. DO NOT IMPORT FORUM PERMISSION, it will break your MyBB forum permissions.

  6. A screenshot of the import report to prove its possible: image

Final thoughts: Maybe along with forcing USB-C on all battery powered devices forum providers should be forced to stick to one standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment