Skip to:
Content
Pages
Categories
Search
Top
Bottom

phpbb3 -> bbpress converter

  • hi !

    am working on moving my site from phpbb3 to bbpress, of course there is no converters out there for that purpose, so i decided to write my own.

    am still testing it and trying to improve the code a little bit. right now it can convert the following :

    1- forums

    2- topics, completely with topic types and status.. announcements and glopal announcements are stickied to front page.

    3- posts, all bbcode is converted into html, smiles are changed into img tags, so you might want to install allow images plugin.

    4- users, including permissions .. notice that bbpress doesn’t support per forum permissions as phpbb3, so it only convert users as following :

    founder -> key master

    inactive -> inactive

    banned -> blocked

    moderators and admins are converted into normal users, so you have to assign them again

    because phpbb3 doesn’t use md5 hashing anymore, the script copies passwords as it is. to solve that problem i modified the md5 insecurity for bbpress plugin to first check the passwords the phpbb3 way, if it matches, it will rehash it using bbpress functions.

    the script converts all the table rows at once, so it’s very heavy and consumes too much cpu depending on your forum size, i strongly suggest that you do the conversion on your own machine, not on a shared hosting account. you might also want to increase the php max execution time on your machine before starting the script cause it takes lots of time converting posts.

    here is the steps for converting your phpbb3 board :

    1- make a backup from your database and files.

    2- install bbpress anywhere, just use the same database of phpbb3. this is important cause the script assumes that all tables are in the same database.

    3- download the script from here. extract it, and you’ll get 2 files.

    4- copy the file phpbb3tobbpress.php to phpbb3 directory.

    5- copy the file _phpbb3_pass.php to bb-plugins directory.

    6- go to http://path-to-phpbb3/phpbb3tobbpress.php and start converting your board.

    7- voila .. all your data is converted to bbpress tables, go to your bbpress installation and login. don’t forget to visit admin->manage->recount to make sure your converted board is updated.

    i can’t stress enough on how consuming is the process of converting posts, my board has 25,000 posts, and it takes nearly 15 minutes to convert them on my local machine, so again : i don’t recommend using this converter on shared hosting.

    ciao !

Viewing 25 replies - 26 through 50 (of 142 total)

  • helgetry
    Member

    @helgetry

    I see now in the script that it checks

    if ($user_type == USER_FOUNDER)

    However, according to the table, USER_FOUNDER is not a user type. User Type is set with IDs. My user type is for instance 3…


    chrishajer
    Participant

    @chrishajer

    http://bbpress.org/plugins/topic/fix-admin-access/

    You would need to change the ID to 3 in your case I believe.


    helgetry
    Member

    @helgetry

    Hm, it still doesn’t work. I have even cheched in the database, and my user has

    meta_value: a:1:{s:9:”keymaster”;b:1;}

    meta_key: bbpress_capabilities

    Just as it’s supposed to.

    Even so, I don’t get the admin link when I’m logged in. And I’ve tried to use the plugin which you linked to.


    helgetry
    Member

    @helgetry

    …and just for your information; I’ve changed the script so that it looks for ID == 3 instead of ID == 1.


    chrishajer
    Participant

    @chrishajer

    Have you tried dumping all the cookies to be sure there is nothing left over fouling things up?


    helgetry
    Member

    @helgetry

    I figured it out. There were two records for my capabilitues in the database. I don’t know why. When I changed both of them to keymaster, I got admin rights.


    gadgets
    Member

    @gadgets

    It’s work good thank you.


    gavinj77
    Member

    @gavinj77

    When I tried to convert my forum, I got this error:

    General Error

    SQL ERROR [ mysqli ]

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s workouts logs)’, ’18′, ’2′, ’9′, ’162′)’ at line 1 [1064]

    SQL

    INSERT INTO bb_forums (forum_id , forum_name, forum_desc, forum_parent, forum_order, topics, posts) VALUES (’19′, ‘Workout Logs’, ‘Place to log the workouts you do, times, & weights used. (Please do not post on other people’s workouts logs)’, ’18′, ’2′, ’9′, ’162′)

    BACKTRACE

    FILE: includes/db/mysqli.php

    LINE: 163

    CALL: dbal->sql_error()

    FILE: phpbb3tobbpress.php

    LINE: 201

    CALL: dbal_mysqli->sql_query()

    Do you know what the problem might be? Maybe it’s an easy fix, but I’m a novice. Thank you.


    matiaspunx
    Member

    @matiaspunx

    yeah you need to use the addslash function to insert data in your db…

    I think you need to edit the phpbbtobbpress.php ;)


    gavinj77
    Member

    @gavinj77

    Okay….let’s imagine for a minute that I’m 10 years old.

    LOL Can you explain how I would do that? Where do I place addslashes? In phpbbtobbpress.php? If so where? I’m really not good at this. It’s completely Greek to me.


    matiaspunx
    Member

    @matiaspunx

    Ok, i will send you my edited file, use it under your own risk, it’s works like a charm but, nobody knows…

    Examine the file and see the changes made by me :)

    PD: PLEASE, back up your db first!

    DOWNLOAD: http://www.mediafire.com/?nmmymgg0z0j

    Hope this works for you!

    Best regards!


    gavinj77
    Member

    @gavinj77

    Thank you for the file. I used the file, (did not edit it at all because I have no idea what I’m doing). I get this error when I try to access the forum

    bbPress database error: [Table 'db279681361.bb_topicmeta' doesn't exist]

    SELECT meta_value FROM bb_topicmeta WHERE topic_id = 0 AND meta_key = ‘uri’

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/34/d279666578/htdocs/forums/bb-includes/db-mysql.php:130) in /homepages/34/d279666578/htdocs/forums/bb-includes/functions.php on line 2271

    Is this a simple error to fix? If not, I’m going to have resolve myself to using phpbb3, (which I don’t want to do of course). Thank you again. I appreciate it.


    chrishajer
    Participant

    @chrishajer

    Are you using bb_ as your bbPress table prefix? Maybe the bb_ table prefix is hard coded and it does not match up with your installation.


    gavinj77
    Member

    @gavinj77

    I checked via phpMyAdmin and all my bbPress files start with bb_ . I didn’t change any files from the install. The phpbb3 files all begin with phpbb_


    matiaspunx
    Member

    @matiaspunx

    oh! what version for bbpress are you trying to convert?

    this file just works with a new fresh install of “0.9.x”

    the converter finished without problems?


    gavinj77
    Member

    @gavinj77

    It worked! Thank you guys for your help! I realized I forgot to delete the bb_ files via phpMyAdmin, (from the first time I tried the conversion without the edited file from matiaspunx. I had removed the files via FTP only.

    Thanks again!

    matiaspunx I am receiving the same error as gavinj77, I tried to download your fix at http://www.mediafire.com/?nmmymgg0z0j but the file was no longer available. Could you kindly repost the updated file?

    Thanks,

    Russell

    Can someone please help me out with this, I’m willing to pay anyone who can solve my issue.

    Thanks,

    Russell


    jurasiks
    Participant

    @jurasiks

    bbpress 0.9.0.5 and phpbb 3.0.5 at localhost:

    when i click on “converting users data”

    i have:

    SQL ERROR [ mysqli ]

    Data too long for column ‘user_url’ at row 1 [1406]

    to small? how to fix and convers users data properly?

    updated: fixed!

    ALTER TABLE bb_users CHANGE user_url user_url VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL

    I got pretty close with wmnasef’s script, but I think I am having a problem similar to gavinj77′s.

    SQL ERROR [ mysql4 ]

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘opinions on current political questions.’, ’0′, ’2′, ’48′, ’235′)’ at line 1 [1064]

    I’m trying to convert an install of phpBB 3.0.4 to bbPress 0.9.0.5, a small amount of data did transfer over to bbPress before I received the error.

    I tried to download matiaspunx’s edited file and I was also unable to.

    Does anyone know exactly what I have to edit to “use the addslash function”, or happen to have a copy of this file they would be kind enough to share with me?

    I got it to work, the converter did a great job, thanks wmnasef!

    I was trying to do the conversion on fairly standard VPS with a typical LAMP stack, I’m not really sure why it didn’t work on there.

    But after that I tried the conversion on my Media Temple Grid Service account and it worked fine. (The forum is quite small, 7000 posts) So if someone else runs into a similar problem, try a different web host or a local web server, maybe you’ll have better luck too!

    Any word on whether this converter works for phpBB3 v3.0.5 and bbpress v1.0? (asking before trying!)

    Thanks,

    ~Andrew~

    Andrew, I just converted a test install of phpBB 3.05 to bbPress 1.0.1 without any problems.


    MrPresident
    Member

    @mrpresident

    Just done this myself on a live phpBB3 forum, worked like a dream, no issues. Thanks very much! =)


    michele83
    Member

    @michele83

    I have this problem on the second step:

    SQL ERROR [ mysqli ]

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘uso, critiche e suggerimenti’, ‘Aiutaci a migliorare la community!’, ’142′, ’11” at line 1 [1064]

    SQL

    INSERT INTO bb_forums (forum_id , forum_name, forum_desc, forum_parent, forum_order, topics, posts) VALUES (’2′, ‘istruzioni per l’uso, critiche e suggerimenti’, ‘Aiutaci a migliorare la community!’, ’142′, ’11′, ’47′, ’1129′)

    BACKTRACE

    FILE: includes/db/mysqli.php

    LINE: 163

    CALL: dbal->sql_error()

    FILE: phpbb3tobbpress.php

    LINE: 201

    CALL: dbal_mysqli->sql_query()

Viewing 25 replies - 26 through 50 (of 142 total)

You must be logged in to reply to this topic.