[SMF Converter] bbPress 0.8.3

Started by JayBachatero, March 12, 2008, 03:50:05 AM

Previous topic - Next topic

JayBachatero

Software: bbPress
Version: 0.8.3.x

This is the official support topic for bbPress converter.  Use this topic to ask for support for this converter.

Notes
In order for the converter to work you need to modify the config.php file.

Code (find) Select

$bb_table_prefix = 'bbpress_'; // Only letters, numbers and underscores please!

Code (add after) Select

return;


This will break the current install of bbPress.  The other option is to create a config.php file and place it in the SMF directory.  Then when the converter asks to enter the path for bbPress you enter the same path as SMF.  This is the content of the config.php file.  Make the appropriate changes to reflect your install.

Code (config.php) Select

<?php
define
('BBDB_NAME', 'bbpress'); // Database bame
$bb_table_prefix = 'bbpress_'; // Database prefix
?>


Changelog
! Initial import

convert.php
Use this convert.php with the .sql file attached in this topic.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

pimwiz

Hi Jay, I'm confused - the converter is nowhere to be found. Not in the list of converters, nor in the converter request page!

ThorstenE

you need the bbpress_to_smf.sql (attachment in Jay's post) and the convert.php  (attachment in the first post)

The guide: Converting to SMF


bdanielsson

#3
What needs to be changed in this script to be able to conver bbPress 0.9.0.2 to SMF instead of 0.8.3? (I've already upgraded bbPress and don't know how to downgrade.)

edit: nevermind. Changed config.php to bb-config.php in the sql file. Worked fine. One thing... I had to login to the database and change the ID_Group to 1 to give myself administrator again.

Guldstrand

I´m using the latest version of bbPress, which is 0.9.0.4.
Is there any good (working) converter from latest bbPress => SMF?

ThorstenE

Guldstrand,
have you tried the above converter? any errors during the conversion? please post your errors.

Guldstrand

#6
Quote from: TE on February 13, 2009, 02:34:26 AM
Guldstrand,
have you tried the above converter? any errors during the conversion? please post your errors.
No, i haven´t tried this converter since it was made for a earlier release of bbPress.

Can you or someone else confirm that this converter WILL work for the latest version of bbPress?

EDIT: It worked great. (I did what "bdanielsson" suggested.)

ThorstenE


smith_13

Success. From bbPress 1.0 alpha6 to SMF2RC1.2 with few mods to convert.php and *.sql file:
> change camelcased to underline-spaced ones like: dateRegistered->date_registered

Thank you very much to JayBachatero for the php and sql file, cheers!  :)

samh

Quote from: smith_13 on August 01, 2009, 10:46:44 AM
Success. From bbPress 1.0 alpha6 to SMF2RC1.2 with few mods to convert.php and *.sql file:
> change camelcased to underline-spaced ones like: dateRegistered->date_registered

Is that that only mod that you made? I'm going to give this a try and if it's successful I've managed a WPMU + bbpress set up bridge to a WPMU + SMF setup :) (that's userbase and content)

Norv

samh: if you are looking to convert bbPress to SMF 2.0 RC1.2 please try using the attached files.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

tfbpa

I am trying to convert bbpress alpha 1.06 to SMF rc2 and am having some troubles.

I am using the converter from here http://download.simplemachines.org/?converters;software=bbpress

I understand that it is meant for bbpress 0.8.3, but since smith_13 successfully done it and it seems that the converter files already use "_", I am giving it a try.

To make things more complicated, my bbpress is installed inside WPMU...

So that means that sometimes the converter should use the bbpress database prefix and sometimes the one of WPMU.

So far the following is converted:

- Members (with WPMU prefix)
- Boards (with bbpress prefix)

Only when trying to convert topics, I get this error

- Converting topics...Wrong value type sent to the database. Integer expected. (id_first_msg)

Does anybody know what this means and how I can correct it so I can try to further convert it?

Thanks.

Norv

Please try: (bbpress_to_smf.sql, for RC2)
Code (find) Select

MIN(p.post_id) AS id_first_msg, MAX(p.post_id) AS id_last_msg,

Code (replace) Select

IFNULL(MIN(p.post_id), 0) AS id_first_msg, IFNULL(MAX(p.post_id), 0) AS id_last_msg,

To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

tfbpa

Thanks Norv, that did the trick!

Since my bbpress is installed inside WPMU, I did have to make some additional changes. This is what I have done, which is different than I said before.

- Export table "wp_users", change all instances of "wp_users" to "bb_users" and upload that file so it creates a new table "bb_users"
- Export table "wp_usermeta", change all instances of "wp_usermeta" to "bb_usermeta" and upload that file so it creates a new table "bb_usermeta"
- Created a new config.php file as described by JayBachatero with table prefix "bb_"

The good part is that all members, boards, topics and posts and converted and are good to go on my new SMF! :D

Only since I had quite a few bbpress addons, I am still not ready yet and also some parts of the usermeta has not been converted, such as number of posts made per users, but that is not my main concern now.

My main concern however is making sure all uploaded image attachments are converted to SMF, since many posts have images and it would be a tremendous shame if they got lost.

The addon is bbpress attachments, see hxxp:bbpress.org/plugins/topic/bb-attachments/ [nonactive]

Does anybody perhaps know how I can convert all attachments (only images) so it will continue to show them in SMF?

Thanks again,
Paul

tfbpa

Here is a sample of how the database structure looks like

-- phpMyAdmin SQL Dump
-- version 3.1.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 24, 2009 at 10:44 AM
-- Server version: 5.0.67
-- PHP Version: 5.2.8

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `xxxxxxxxx`
--

-- --------------------------------------------------------

--
-- Table structure for table `bb_attachments`
--

CREATE TABLE IF NOT EXISTS `bb_attachments` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `time` int(10) unsigned NOT NULL default '0',
  `post_id` int(10) unsigned NOT NULL default '0',
  `user_id` int(10) unsigned NOT NULL default '0',
  `user_ip` int(10) unsigned NOT NULL default '0',
  `status` tinyint(10) unsigned NOT NULL default '0',
  `downloads` int(10) unsigned NOT NULL default '0',
  `size` int(10) unsigned NOT NULL default '0',
  `ext` varchar(255) NOT NULL default '',
  `mime` varchar(255) NOT NULL default '',
  `filename` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `post_id` (`post_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9851 ;

--
-- Dumping data for table `bb_attachments`
--

INSERT INTO `bb_attachments` (`id`, `time`, `post_id`, `user_id`, `user_ip`, `status`, `downloads`, `size`, `ext`, `mime`, `filename`) VALUES
(1, 1240451772, 22, 5, 1023906071, 0, 1, 2567, 'jpg', 'image/jpeg', 'avatar.jpg'),

Norv

I will look into it as soon as possible, and add attachments to the converter.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

tfbpa

First off: Happy New Year! :D

I was wondering if you already found the time to look into the attachment converter.

Thanks.

biggerbyfar

Trying to convert BBpress v1.0.2 to SMF 2.0 RC2.

I tried using http://download.simplemachines.org/index.php?thanks;filename=smf_2-0-rc2_bbpress_converter.zip

After changing config.php to bb-settings.php in the .sql file, it converted fine. However I've found that all of the quote marks in the posts are now rendered as \" instead of "


biggerbyfar

Further details:

example in a post from bbpress's bb_post table, the post_text field contains "<p>In reply to James's comment: ........."

After conversion, In SMF's smf_messages table, the body field contains:

"In reply to James\'s comment: "

Seems to happen all-over inc. the forums description text


biggerbyfar

I modified bbpress_to_smf.sql from line 96 onwards, which seemed to wort it out. I'm replacing </p> with <br /><br /> and converting single and double quotes to their entities. I also added blockquote to bbc code equivalent too  :

Note you may want to re-add the two 'code' tags that break this post if left in.

$row['body'] = preg_replace(
array(
"~'~",
'~"~',
'~<p>~',
'~</p>~',
'~<a\s*href="(.+?)">(.+?)</a>~',
'~<strong>~',
'~</strong>~',
'~<em>~',
'~</em>~',
'~<(?:ul|ol)>~',
'~</(?:ul|ol)>~',
'~<li>~',
'~</li>~',
'~<pre>~',
'~</pre>~',
'~<blockquote>~',
'~</blockquote>~',
),
array(
'&#039;',
'&quot;',
'',
'<br /><br />',
'[url=$1]$2[/url]',
'[b]',
'[/b]',
'[i]',
'[/i]',
'[list]',
'[/list]',
'[li]',
'[/li]',
'',
'',
'[quote]',
'[/quote]',
),


Advertisement: