Skip to:
Content
Pages
Categories
Search
Top
Bottom

Successful Reverse Integration Steps

Published on May 10th, 2009 by

Today I did the reverse integration of an existing WordPress blog (2.7.1) and BBPress forum (0.9.4). I described my plans here. With some help from bobbyh and a lot of digging into these forums, things worked out well.

Here are the steps (all but the final 2 are database operations, which I did using phpMyAdmin):

  1. I didn’t need to do backups because I was using a test site, but if you are trying this, don’t go any further without full backups of everything.
  2. Copied the “bb_users” and “bb_usermeta” tables from the BBPress database to the WordPress database. I was a bit worried that the row sizes weren’t exactly the same in the destination copy, but as it turns out, that wasn’t an issue.
  3. Added a “user_activation_key” field to the copy of “bb_users” to ensure that the schema matched my current “wp-users” table in the WordPress database.
  4. Renamed the “wp_users” and “wp_usermeta” tables to “wp_users_old” and “wp_usermeta_old” respectively.
  5. Renamed the new “bb_users” and “bb_usermeta” tables to “wp_users” and “wp_usermeta” respectively.
  6. Added WordPress admin rights and metadata to the new admin user. To do this I ran the following query:

    INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES (‘1’, ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;b:1;}’);

  7. Added WordPress user metadata for the rest of the users (since I’m using the BBPress user tables as the starting point they know nothing about WP capabilities). Here is the query:

    INSERT INTO wp_usermeta (user_id, meta_key, meta_value) SELECT user_id, ‘wp_capabilities’ AS meta_key, ‘a:1:{s:10:”subscriber”;b:1;}’ AS meta_value from wp_usermeta WHERE user_id NOT IN (SELECT user_id from wp_usermeta WHERE meta_key = ‘wp_capabilities’) GROUP BY user_id;

  8. Changed the user_id references in the “wp_posts” and “wp_comments” tables so that they pointed to the correct users (you need to do this because equivalent users don’t necessarily have the same ID in the previously separate WordPress and BBPress databases). Here are the queries I ran:

    UPDATE wp_posts SET post_author=NEW_ID WHERE post_author = OLD_ID

    UPDATE wp_comments SET user_id=NEW_ID WHERE user_id = OLD_ID

    NOTE that you need to think carefully about the order in which you do these changes. You don’t want to change a user’s ID to one that already exists in the WordPress table.

  9. Installed superann’s plugin to downgrade WP 2.7.1’s cookie handling for compatibility with BBP 0.9.4: http://superann.com/2009/02/26/wordpress-26-27-bbpress-09-cookie-integration-plugin/
  10. Told BBPress to find its user data in the new WordPress user tables. This is done in the BBPress admin page for WordPress integration: […]/bb-admin/options-wordpress.php. You need to follow the instructions carefully. In particular, note that the WordPress database secret should be copied from the current WordPress setting and not vice versa.

Some other notes:

  • This is not something to do in a rush. I checked the results of each step carefully before moving on. This included browsing the database and, later in the process, logging in to the blog and forum to check whether things were working as expected.
  • This worked for me. Your mileage may vary.

Additional Info on Lastest Discussions

Published on May 9th, 2009 by aquagrrl

I’m trying to come up with a way to show additional information on the lastest discussions on the front page. I want to show the topic author’s avatar, name, title, the date it was first posted, and the forum it is in. I found some author functions in the post.php, but I think I need to make them within a post loop calling only the firs post. I haven’t figured out how to do that or how the topics.php is doing it.

Here is what I’ve tried so far:

‘<?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?></p>

  • <?php post_author_avatar(); ?>
  • <?php post_author_link(); ?>
  • <?php post_author_title(); ?>
  • <?php printf( __(‘Posted %s ago’), bb_get_post_time() ); ?>
  • <p> <?php endforeach; ?>

    `

    How do I hide Tags ??

    Published on May 9th, 2009 by

    Hello

    How do I hide Tags ?

    bye

    WP/bbPress log in and log out

    Published on May 9th, 2009 by

    Hello!

    I use 2.6.3 version of WP and I just installed bbPress 0.9.

    I also use Freshly Baked Cookies plugin (https://bbpress.org/plugins/topic/freshly-baked-cookies/) to allow bbPress using WP cookies.

    What I get now is a strange situation: when I log into WP then I become logged out from bbPress and when I log into bbPress then I become logged out from WP, so I can never be logged in both of them. Everything else work fine.

    My WP works on http://www.subdomain.domain.com/ address and bbPress works on http://www.subdomain.domain.com/bbpress/ address. I have fulfilled all the integration instructions.

    What is also strange that when I log in WP then get these cookies:

    – wordpress_logged_in_[HASH 1]: admin%7C[HASH 2]

    – wordpress_test_cookie: WP+Cookie+check

    – wpfsession: [10 digits number]

    – wp-admin wordpress_[HASH 1]: admin%7C[HASH 3]

    – wp-content/plugins wordpress_[HASH 1]: admin%7C[HASH 3]

    …and when I log in bbPress then I get similar but [HASH 2] is the same as [HASH 3].

    What am I doing wrong?

    Thank you in advance!

    bbcode is showing but is not working

    Published on May 9th, 2009 by

    hello

    BBcode Buttons is showing but is not working !!

    and BBcode Lite for bbPress is not working !!

    I want bbcode

    Iam sorry i do not speak English well ..

    What do your posters see when their posts as flagged by Akismet?

    Published on May 9th, 2009 by

    I’m using bbPress 0.9.2. When my posters have their posts flagged as spam by Aksimet, they see the following error message:

    <h1>Not Found</h1>

    The requested URL /topic/ was not found on this server.

    <address>Apache/2.2.3 (CentOS) Server at [domainname] Port 80</address><address>

    </address>

    When my users see this, they assume that their posts didn’t go through and then they re-post their message again – and then get the same error message again. They usually repeat the re-posting from 2-10 times, before giving up…

    I’d greatly prefer it if these users got a nice little message that said something like, “Your post has been put into moderation. We will review it shortly!”

    Is giving an error message after an Akismet positive result standard behavior for bbPress?

    Oh Dear!
An invalid configuration file was found at bb-config.php


    Published on May 8th, 2009 by

    My bbpress forum was working just fine for about 1 year – then last week this message came up when i went to to my forum :

    Oh Dear!


    An invalid configuration file was found at bb-config.php
The installation cannot continue.

    Usually this is caused by one of the database connection settings being incorrect.

    Make sure that the specified user has appropriate permission to access the database.

    I did not set this forum up originally – a previous web designer did – who i can’t get a hold of –

    now i need to fix this problem and have no idea how to do it.

    I hope some one out there can help me.

    Thanks in advance,

    K

    URL without /bbpress at the end?

    Published on May 8th, 2009 by Hermiony

    Hi,

    I’ve installed bbpress, and my forum is now called www.mydomain.com/bbpress

    How can I make it so that it’s called www.mydomain.com/forums or something similar?

    Does anyone know?

    Always ..Unread

    Published on May 8th, 2009 by

    hi ! i’m using Unread Posts

    but there is some bug .. when i do this : “$unread_posts=true; “

    the colour of unread stay even if i read all the forum …

    and other things : the title of the page is <span class=”unreadlogin>…etc

    ps : i’m french .. bad english :p

    Username Issue

    Published on May 8th, 2009 by

    Hi guys

    My forum member’s usernames show their email addresses!?

    I did the integration correctly and the forum/wordpress database get’s updated accordingly when new people register.

    But what on earth can I do about the username issue?

    I want it to display their real usernames.

    Regards,

    Brad

    Skip to toolbar