|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
|
That suggests to me that the smf categories did not transfer over.
Were you running a SMF board previously, ie, in production?
I should also point out that Joomla will indicate a query succeeded when in fact that it did not, so even if the smf2fb bridge reports "All X Migrated", it may have not. For sure, a true converter will have better error checking than I do at the moment.
Here is a good query to try if you're curious.
On the Joomla DB
[code:1]
select id, parent, thread, catid, subject from jos_fb_messages;
[/code:1]
On the SMF DB
[code:1]
select ID_MSG, ID_TOPIC, ID_BOARD, subject from smf_messages;
[/code:1]
id = ID_MSG
parent = another fb id
thread = something specific to SMF
catid = ID_BOARD
subject = subject
Let's say that you have a SMF Topic #1000. From my own SMF DB, here is my search.
[code:1]
mysql> select ID_MSG, ID_TOPIC, ID_BOARD, subject from smf_messages where ID_TOPIC = 1000;
+--------+----------+----------+------------------------------------------------------------+
| ID_MSG | ID_TOPIC | ID_BOARD | subject |
+--------+----------+----------+------------------------------------------------------------+
| 4363 | 1000 | 10 | pass variables from 'Query Result Variable' DBQ result |
| 4365 | 1000 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4366 | 1000 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4368 | 1000 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4372 | 1000 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4374 | 1000 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
+--------+----------+----------+------------------------------------------------------------+
6 rows in set (0.44 sec)
mysql>
[/code:1]
In the FB db, I can try to verify that these messages exist.
[code:1]
mysql> select id, parent, thread, catid, subject from jos_fb_messages where id in ( 4363, 4365, 4366, 4368, 4372, 4374 );
+------+--------+--------+-------+------------------------------------------------------------+
| id | parent | thread | catid | subject |
+------+--------+--------+-------+------------------------------------------------------------+
| 4363 | 0 | 4363 | 10 | pass variables from 'Query Result Variable' DBQ result |
| 4365 | 4363 | 4363 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4366 | 4365 | 4363 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4368 | 4366 | 4363 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4372 | 4368 | 4363 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
| 4374 | 4372 | 4363 | 10 | Re: pass variables from 'Query Result Variable' DBQ result |
+------+--------+--------+-------+------------------------------------------------------------+
6 rows in set (0.49 sec)
mysql>
[/code:1]
In this example, we can see that all of the messages have been transfered over and now belong to category 10, which we'll see below.
[code:1]
mysql> select id, parent, name from jos_fb_categories where id = 10;
+----+--------+------------------+
| id | parent | name |
+----+--------+------------------+
| 10 | 1002 | DBQ Professional |
+----+--------+------------------+
1 row in set (0.00 sec)
mysql>
[/code:1]
This matches the information in SMF.
[code:1]
mysql> select ID_BOARD, ID_CAT, ID_PARENT, name from smf_boards where ID_BOARD = 10;
+----------+--------+-----------+------------------+
| ID_BOARD | ID_CAT | ID_PARENT | name |
+----------+--------+-----------+------------------+
| 10 | 2 | 0 | DBQ Professional |
+----------+--------+-----------+------------------+
1 row in set (0.45 sec)
mysql>
[/code:1]
Note that the parent category in FB is 1002 because I add 1000 to the category while converting an SMF category into a FB category.
Anyways, I just wanted to share the thought-process that I used while trying to reverse engineer everything. I'm not sure if I can help debug your particular conversion but I hope that this gives you some information that you can use.
tcp
|
|
|
Logged
|
|
|
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
kask wrote:
Hello,
- Can i use this converter in a site in activity ? I just want to do a test, but i want that the old SMF forum could be ok after the test.
I don't alter any tables other than the FB tables - you should be able to test on a live site. That being said, I think testing on a live site is a bad idea.
- I use the hack of joomlahacks.com in order to synchronyse joomla and SMF, Is it a problem ?
I'm not sure. If the J! username is the same as the SMF username ( aka memberName ), there shouldn't be a problem. However, at the moment this script does not create the user if the user does not exist.
- I'm verry sorry, but i don't understand how to use the two file ??? Could you write a little method "step by step" ?
Then I would recommend you wait.  I'm currently seeking feedback from other developers who may know the internals of these two applications better than I do.
tcp
|
|
|
Logged
|
|
|
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
|
Ok I checked the DB with your querys. There are no messages existant in FB.
The converter from SMF to Joomlaboard does work though. Hmmm...
I wonder that you have no problems.
Would be helpful inserting mysql errors, so we could check what exactly went wrong.
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
|
Ok, thanks !
I will do a mirror of my site. Then i post here result !
Thanks for your reactivity !
|
|
kask (User)
Fresh Boarder
Posts: 10
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
Attaching a new zip file with some updates.
I've tested this file using J 1.0.13. Env is Apache/2.2.3 (Unix) Zend Core/2.0.0 PHP/5.2.1 mod_ssl/2.2.3 OpenSSL/0.9.8d .
Few updates:
1) logs debug messages, warnings, and errors;
2) bit of error checking;
3) categories are created with default pub_access and admin_access settings;
4) driver correctly reports whether or not all entities have been migrated;
tcp File Attachment: File Name: smf2fb.zipFile Size: 5301
|
|
|
Logged
|
|
|
Last Edit: 2007/08/08 20:27 By tcp.
|
|
|
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
|
Looking at the #__fb_attachments table, I'm noticing that the filename is stored as an absolute path.
[code:1]
mysql> select * from jos_fb_attachments;
+-------+------------------------------------------------------------------+
| mesid | filelocation |
+-------+------------------------------------------------------------------+
| 6972 | /var/www/domains/gmitc-test/html/images/fbfiles/images/boy.gif |
| 6974 | /var/www/domains/gmitc-test/html/images/fbfiles/files/readme.txt |
+-------+------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql>
[/code:1]
For many reasons this is a bad idea, the most notable of which is that an absolute filename will cause problems when migrating at database from development to production. Also, often times one will simply move J! to a different directory. Finally, the current location
A better approach would be to store the actual filename. The upload paths are defined in FB already.
[code:1]
apsara:com_fireboard $ grep fbfiles *
class.fireboard.php:define('FB_ABSUPLOADEDPATH', JB_JABSPATH . '/images/fbfiles');
class.fireboard.php:define('FB_LIVEUPLOADEDPATH', JB_JLIVEURL . '/images/fbfiles');
apsara:com_fireboard $
[/code:1]
Is there a reason why FB does this? Where is the filename stored in the db?
I would suggest that the filename itself is stored. For backward compatibility, when the file is accessed on the frontend, perhaps we can use PHP's basename() function to determine the filename ( either /../file.ext or just file.ext ), and then use JB_JLIVEURL to create the link.
tcp
|
|
|
Logged
|
|
|
Last Edit: 2007/08/09 09:06 By tcp.
|
|
|
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
|
thanks for your hard work tcp! any updates on the latest fix of smf->fb converter?
i'm currently using smf 1.1.3 along with joomla 1.1.11, jsmf2.0.2 from joomlahacks, and community builder. so does this smf->fb converter keeps them in tact?
thanks again!
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
|
you are using mysqli, is there another method to instantiate a new db connection?
$this->smf = new mysqli($db_server, $db_user, $db_passwd, $db_name);
i don't have mysqli installed.
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago
|
|
|
Well, I happen to like PHP5 and the OO style of programming, so I used the mysqli interface. J!'s database connections does this as well and supports both the mysql and the mysqli interfaces. Now that I look at the SMF code, it looks like SMF is strictly mysql ( ie, PHP4 ), so this is the problem.
If I could find where SMF creates the db connection, perhaps I could include that file and steal the resource, then use it in the converter.
tcp
|
|
|
Logged
|
|
|
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
|
|
|
The administrator has disabled public write access.
|
|
|