phpBB2CH to phpBB3

Converting phpBB2CH aka Ptifo to phpBB3

On my  installed board (still partially found on azure.m2tec.be/forum) I installed phpBB2CH (Categories Hierarchy)  also known as Ptifo.

Basically it adds sub-forums, forum links, advanced permissions, board announcements and many more features.
It broke support with most (or better said with almost all) mods for phpBB2. But had or has a pretty large community (ptifo.clanmckeen.com is offline at the moment of writing).

As phpBB3 came out and there was also build-in support for those features, I wished to upgrade. But because of the changes on phpBB2, the phpBB2 converters wasn’t converting half of my forum settings. So I needed to create a converter. As the basics where the same I could use the phpBB2 converter to start with.

Yesterday somebody contacted me, and said the converter wasn’t working any more. As my converter was basically made for phpBB 3.0.2 and the current version is phpBB 3.0.7-PL1, I can understand why.

I updated my converter to work with phpBB 3.0.7-PL1, and so here you can find the converter for phpbb2CH to phpBB 3.0.7-PL1.
It isn’t 100% testing on all functions, but most stuff is converted. The predefined permissions aren’t, as they are (almost) impossible to do.

A few thing you maybe want to know:

  • main admins will be admins with founder status
  • admins and main admins will both in the admin group.
  • attachments are converted

If you find any bugs, tell me, I’m happy to solve them.

[download id=”731″]

This Post Has 4 Comments

  1. Amr

    Thanks for helping people 🙂

    Just I don’t know if this converter will work correctly with my forum because I have around 5 million post and around 130.000 user.
    please let me know if this possible, I’ve tried the old converter but I always had time out error.

    Thanks Mate.

    1. Tom V

      Hi,

      If you get a timeout, first try to convert offline (like told in the knownledgedb of phpBB.com)

      If you get a SQL ran out of memory problem, I suggest to open functinos_phpbb2CH and find

      if ($convert->mysql_convert && $same_db)
      {
      $src_db->sql_query("SET NAMES 'binary'");
      }
      // Grab forum auth information from 2.0.xCH board, without the admin group
      $sql = "SELECT ug.user_id, g.group_single_user, g.group_user_id, a . *
      FROM {$convert->src_table_prefix}auths a
      LEFT JOIN {$convert->src_table_prefix}groups g ON g.group_id = a.group_id
      LEFT JOIN {$convert->src_table_prefix}forums f ON f.forum_id = a.obj_id
      LEFT JOIN {$convert->src_table_prefix}user_group ug ON g.group_id = ug.group_id
      WHERE a.obj_type = 'f'
      AND g.group_id <> " . GROUP_FOUNDER . "
      AND g.group_id <> " . GROUP_ADMIN;

      $result = $src_db->sql_query($sql);

      $usergroup_access = array();
      while ($row = $src_db->sql_fetchrow($result))
      {
      $usergroup_access[] = $row;
      }
      $src_db->sql_freeresult($result);

      and replace it with
      $usergroup_access = array();

      This will remove the convertion of all authentication, but as founder you can set it manualy.
      Next it’s suggested to do this as you can then use roles instead of manual permissions.

      If it still doesn’t work, you can mail me, then I’ll update the database for you.

  2. Amr

    Thanks a lot Tom. I am thinking to do that in April, so I will update you with the details.

    Thanks again.

  3. Tom V

    Just to report, from 8 till 17 April I’m at the USA so I won’t be able to check Internet (at most, I can just surf a bit)

Leave a Reply