Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
SMF->FB Converter, Initial Implementation (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: SMF->FB Converter, Initial Implementation
#17275
SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
This is my initial attempt at implementing an SMF -> Converter. There are two files - a driver file that one runs via a webbrowser, and a library file that actually does all of the work.

I've tested this code on my local system and, in general, it works pretty good. I'm able to migrate SMF categories and boards, as well as messages and user information. I have not worked on other aspects of SMF such as groups and attachments as I don't personally use these features very much.

I'm happy to have some feedback, but please offer some suggestions about how to improve the code. You will want to take a look at the driver file and change the directory path to your installation of SMF.

[code:1]
// Set the path to SMF ( root of Joomla )
$conv->smf_directory = 'smf1'; // /var/www/html/joomla/smf1 as an example
[/code:1]

Otherwise, the code will automatically build the connection to both J! and SMF. I'm assuming that both files are placed in the J! root directory.

tcp

The original file has been removed and has been replaced with a new file in a later post.
http://www.bestofjoomla.com/component/option,com_fireboard/Itemid,38/func,view/catid,6/id,17528/#17528
tcp (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
GMITC Location: Bangkok, Thailand
Logged Logged
 
Last Edit: 2007/08/08 20:17 By tcp.
 
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
 
The administrator has disabled public write access.  
#17276
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
This file has been replaced.
tcp (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
GMITC Location: Bangkok, Thailand
Logged Logged
 
Last Edit: 2007/08/08 20:18 By tcp.
 
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
 
The administrator has disabled public write access.  
#17282
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
I'll give it a try in a little while. As soon as I get to work. Post results here.
whouse (Moderator)
FB Support Team
Moderator
Posts: 648
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Please mark all resolved threads as SOLVED.
If you start a thread and the original topic is resolved, please edit the subject title of the original thread with SOLVED: at the beginning please.
 
The administrator has disabled public write access.  
#17305
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
I tried it and for me it didnt work. But I have to say, before I did the smf->FB convert I converted from wbb to smf and got some user id problems. Dont know how to solve this.
SO your converter says "Could not find a matching id for the username 'Raid3n' ( 12 )" and so on, it lists all users.
The it also says "Migrated all SMF categories/Migrated all SMF boards/Migrated all SMF messages/Migrated all SMF members". But none of it was migrated.

FB says there are a total of 7 Sections. ALso the Database shows that all posts have been imported. But none is actually showing in FB.

As said, may be related to my wbb->smf conversion before, which seemed to work good but produces problems for convertes from smf->board X Y.

//edit: Ok, actually all categories are shown in the backend and I had to set access level to see them in FB. But still, no Forums and no Posts.
Friedl (User)
Senior Boarder
Posts: 131
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthdate: 1984-08-02
Logged Logged
 
Last Edit: 2007/08/07 17:05 By Friedl.
 
The administrator has disabled public write access.  
#17324
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
TCP,
I haven't had a chance to run the script today because of having actual WORK to do (sux to be me! ) but in re-reading your post, I have a question.
Are you requiring SMF to actually be installed for your files to run or do you simply require the data to be in the database?
whouse (Moderator)
FB Support Team
Moderator
Posts: 648
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Please mark all resolved threads as SOLVED.
If you start a thread and the original topic is resolved, please edit the subject title of the original thread with SOLVED: at the beginning please.
 
The administrator has disabled public write access.  
#17326
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
smf has to be installed as I can see out of the requierement to give the path to your smf installation. It also has to be installed in the Joomla directory.
Friedl (User)
Senior Boarder
Posts: 131
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthdate: 1984-08-02
Logged Logged
 
The administrator has disabled public write access.  
#17330
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
Yes, I read the Settings.php file for information about how to create the connection to the SMF database, and this file has to be located in a directory under Joomla. For me, my SMF database is in a separate database and SMF is installed under J!/smf1/ . It would be pretty easy to change the package to refer to a directory outside of J! or to provide explicit connection information ( host, username, passwd, dbname ) for the SMF connection.

The code that creates the SMF connection is located in smf2fb::init(). If you needed to do something different then this would be the best place to do it.

tcp
tcp (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
GMITC Location: Bangkok, Thailand
Logged Logged
 
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
 
The administrator has disabled public write access.  
#17331
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
@Friedl

Hmmm, no sure what to suggest here. I'm working from a pure SMF environment and tried my best to collapse SMF's threads/messages tables into FB's single messages table. FB uses a parent field to thread related messages together, the top-most message being the "thread start". In SMF, threads are completely distinct from posts. The logic that I used to mash everything together is in smf2fb::convertSMFMessageToFBMessage().

SMF also employs the ideas of categories ( the categories table ) and boards ( the boards table ). In SMF, a category can have many boards but in FB there are only categories. My solution was to convert an SMF category into a FB category and to give the newly created FB category an id of +1000. Thus, if your SMF category was #2, the FB category would be #1002. SMF boards are converted to FB categories but the ids are not changed, that is, SMF board #2 becomes FB category #2. This helps prevents collisions when converting SMF boards into FB categories - SMF frequently refers to a board id ( ID_BOARD ) and I would prefer to leave these references unaltered.

Converting SMF members to FB users - I don't do a lot of special logic here and I don't create users. Rather, I simply check if the username exists in the Joomla system and, if so, create an association between the SMF ID_MEMBER and the FB userid. I run SMF in a bridge mode so most SMF members are also Joomla users. My code doesn't create the user if they don't exist and this could be a useful improvement in the code if anyone would care to look into it.

tcp
tcp (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
GMITC Location: Bangkok, Thailand
Logged Logged
 
Last Edit: 2007/08/07 19:10 By tcp.
 
Author of Database Query and Logos Query Manager
Member of J! Development Workgroup
 
The administrator has disabled public write access.  
#17333
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
Hi tcp

No one told me I had to bridge smf with Joomla before converting it in any form...ouch...I feel sorry. Now Users are imported. The conversion gives no error. But I still dont understand how to get the posts and boards to be displayed...

FB still shows me 0 messages, 0 subjects, 7 sections and 0 categories...
Friedl (User)
Senior Boarder
Posts: 131
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthdate: 1984-08-02
Logged Logged
 
Last Edit: 2007/08/07 19:22 By Friedl.
 
The administrator has disabled public write access.  
#17337
Re:SMF->FB Converter, Initial Implementation 1 Year, 3 Months ago  
Hello,

I'm sorry, but i don't speak english very well !

I want to test your converter, but i have some question before to use it.

- 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 use the hack of joomlahacks.com in order to synchronyse joomla and SMF, Is it a problem ?
- I'm verry sorry, but i don't understand how to use the two file ??? Could you write a little method "step by step" ?

Thanks for this converter, there is a big problem with SMF->FB... without a converter, i think that i will stay in SMF.

Thanks !
kask (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top