Advertisement:

Author Topic: [SMF Converter] Fireboard 1.0.x  (Read 181467 times)

Offline shumisha

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] Fireboard 1.0.x
« Reply #20 on: March 19, 2008, 05:42:09 PM »
Hi Sleepy,

I just tried again. I had upgraded my source Joomla site from 1.0.13 to 1.0.15 before this second trial.

+ : I don't get any errors any more during the conversion process
- : I can't login with any of the users converted. User is recognized, but password is invalid
- : quotes are still escaped in posts and title

I'll try have smf send me a new password, that should work, but is not really a good solution ! I'll take a look at the sql for the conversion in that field

Thanks anyway, and best regards

Offline JazzMega

  • Newbie
  • *
  • Posts: 7
Re: [SMF Converter] Fireboard 1.0.x
« Reply #21 on: March 19, 2008, 07:37:51 PM »
I edit the fireboard_to_smf.sql file at lines 10:

Code: [Select]
---~ from_prefix: "`$mosConfig_db`.$mosConfig_dbprefix"
I edit:

$mosConfig_db = database name

$mosConfig_dbprefix = prefix(jos_)

And it convert successfully but with some errors:

The passwords dont work
Converting attachments with errors
Converting avatars  with errors.

The attachaments and avatars aren´t very important but the passwords...

Can you help me?

Thanksss!!

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,947
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Fireboard 1.0.x
« Reply #22 on: March 19, 2008, 10:44:01 PM »
shumisha,
Did you apply the password mod fix?

I was able to get joomla 1.5 installed and worked around the password issue on it. It appears to use even a bigger salt.. So I had to expand the SMF salt field again.. I gave it more than enough room for the salt this time.
To convert with joomla 1.5, you will need to create a configuration.php with this:
Code: [Select]
$mosConfig_db = 'database_name';
$mosConfig_dbprefix = 'prefix_';
And edit those variables to equal your database name and prefix. You can find this information in your joomla admin panel. The way Joomla 1.5 does its configuration file changed so this is the only work around for it at the moment.

Can I have the original contents of one of these posts? Use Fireboard to get these contents. I need to have a test post that these issues are occurring in so I can figure out where it is going wrong.

I thank you guys for the testing these out :) Its hard to get converters to convert everything just right when you have software that does things in their own little ways.
« Last Edit: March 19, 2008, 10:45:40 PM by SleePy »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline ChrisFBBS

  • Semi-Newbie
  • *
  • Posts: 60
Re: [SMF Converter] Fireboard 1.0.x
« Reply #23 on: March 19, 2008, 11:21:37 PM »


I thank you guys for the testing these out :) Its hard to get converters to convert everything just right when you have software that does things in their own little ways.
We appreciate all that you are doing as well!!

This latest file doesn't/can't find my SMF directory now.

Code: [Select]
This converter was unable to find SMF in the path you specified.

Please double check the path, and that it is already installed there.
www.freeblackberrystuff.com Blackberry neews plus... free blackberry themes free blackberry apps and free blackberry games

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,947
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Fireboard 1.0.x
« Reply #24 on: March 20, 2008, 12:29:55 AM »
sheik28,

Are you sure the path to the SMF forum is correct?
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline shumisha

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] Fireboard 1.0.x
« Reply #25 on: March 20, 2008, 03:05:42 AM »
Hi Sleepy,

Yes, I did apply the changes in your past post. And I am still on the 1.0.x branch. I upgraded to 1.0.15, not 1.5. Converter don't have any problem finding about the db name and prefix.

RE: passwords no tworking : i looked up the DB content. It seems the transfer is done correctly. For a given user, in jos_users if the password field contains xxxxxxxxxx:yyyyyyyyy, then the smf_members table contains xxxxxxxxx in the password column and yyyyyyyyy in the passwordSalt column. So it seems somehow it is smf that is not happy with these when verifying the password. Does that make sense ?

Re: post content : I have looked that up as well. Here is a sample from an sql dump:

Code: [Select]
(43, 'Hi Ptx_soccer,\r\n\r\nAre you familiar with phpMyadmin. I\\''d like to check something in your database. Can you give me access, or look yourself ?'),
It seems  in FB database, quotes are double-escaped, which surely prevents your converter to do its job properly. I am going to try simply do a text replace on the db table for now.

Regards

Offline shumisha

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] Fireboard 1.0.x
« Reply #26 on: March 20, 2008, 04:05:18 AM »
Hi,

I was able to go past this single/double quote issue by modifying fireboard_to_smf.sql like so :

Code: [Select]
/******************************************************************************/
--- Converting posts (this may take some time)...
/******************************************************************************/

TRUNCATE {$to_prefix}messages;
TRUNCATE {$to_prefix}attachments;

---* {$to_prefix}messages 200
---{
$row['body'] = preg_replace('~\[file name=.+?\]http.+?\[/file\]~i', '', $row['body']);
$row['body'] = preg_replace('~\[img size=(\d+)\]~i', '[img width=$1]', $row['body']);
$row['body'] = str_replace('\\\'', '\'', $row['body']);
$row['subject'] = str_replace('\\\'', '\'', $row['subject']);
$row['body'] = str_replace('\\"', '"', $row['body']);
$row['subject'] = str_replace('\\"', '"', $row['subject']);
---}
SELECT
        m.id AS ID_MSG, m.thread AS ID_TOPIC, m.time AS posterTime,
        SUBSTRING(m.subject, 1, 255) AS subject, m.userid AS ID_MEMBER,
        SUBSTRING(m.name, 1, 255) AS posterName,
        SUBSTRING(m.email, 1, 255) AS posterEmail,
        SUBSTRING(m.ip, 1, 255) AS posterIP, m.catid AS ID_BOARD,
        SUBSTRING(mt.message, 1, 65534) AS body, '' AS modifiedName, 'xx' AS icon
FROM ({$from_prefix}fb_messages AS m, {$from_prefix}fb_messages_text AS mt)
WHERE mt.mesid = m.id;
---*
I am not sure if this will apply to all fireboards, or if it is specific to FB 1.0.0 that I am using. Does anyone have this quote problem with another version of FB ?

Now I just have the password issue to solve before being able to make the switch !

Regards

Offline shumisha

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] Fireboard 1.0.x
« Reply #27 on: March 20, 2008, 06:12:59 AM »
Hi,

I got it now. I checked the login procedure in Joomla, and it only takes a small change to Sources/LogInOut.php to make it work.

Code: [Select]
// Maybe they are using a hash from before the password fix.
                $other_passwords[] = md5($_POST['passwrd']);  // Joomla pre-1.0.13 passwords style
                $other_passwords[] = md5($_POST['passwrd'].$user_settings['passwordSalt']); // Joomla 1.0.13 and up (in the 1.0.x branch)
As you can see, J! from 1.0.13 on simply does md5(password+salt);

I was able to login using my J! password as soon as I did that.

Don't know how it can be easily integrated though, this will still require a hack to work !

Regards

Offline shumisha

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] Fireboard 1.0.x
« Reply #28 on: March 20, 2008, 06:20:31 AM »
Hi again,

Last fix : to retain admin or super admin status while converting, fireboard_to_smf.sql should be change as follow (this is line 33) :
from
Code: [Select]
IF(m.usertype = 'superadministrator' OR m.usertype = 'administrator', 1, 0) AS ID_GROUP,to
Code: [Select]
IF(m.usertype = 'Super Administrator' OR m.usertype = 'Administrator', 1, 0) AS ID_GROUP,Strange enough, there is a table to define user types, but the jos_users table does not use them for its usertype field. Instead, there is a litteral in that field

Regards

Offline JazzMega

  • Newbie
  • *
  • Posts: 7
Re: [SMF Converter] Fireboard 1.0.x
« Reply #29 on: March 20, 2008, 08:03:32 AM »
Yeaaaah!!!

Its work on joomla 1.5, the passwords and all!! oooooohh!!

Thanks you a lot.... thanks!! gracias tiooo!!


The best community.... SMF
« Last Edit: March 20, 2008, 08:11:07 AM by JazzMega »

Offline forepro

  • Semi-Newbie
  • *
  • Posts: 32
Re: [SMF Converter] Fireboard 1.0.x
« Reply #30 on: March 20, 2008, 11:26:11 AM »
Hi folks,

I just tried the converter on my host server. Seems like I am getting another problem..

Unable to find the settings for Fireboard 1.0. Please double check the path and try again.


Path to SMF:
/home/myid/domains/mysite.org/public_html/testsite/smf

Path to Fireboard 1.0:
/home/myid/domains/mysite.org/public_html/components/com_fireboard

Pretty strange to me since I can run this conversion on my local server without seeing this error.. Any ideas?

Good Job, guys!


Offline JazzMega

  • Newbie
  • *
  • Posts: 7
Re: [SMF Converter] Fireboard 1.0.x
« Reply #31 on: March 20, 2008, 11:39:48 AM »
forepro, change:

Path to Fireboard 1.0:
/home/myid/domains/mysite.org/public_html/components/com_fireboard

for:

Path to Fireboard 1.0:
/home/myid/domains/mysite.org/public_html/

Offline forepro

  • Semi-Newbie
  • *
  • Posts: 32
Re: [SMF Converter] Fireboard 1.0.x
« Reply #32 on: March 20, 2008, 12:07:13 PM »
Yes! That did the trick. Thanks a lot JazzMega!  :D

There are still other glitches (like: category arrangement, avatars/attachments not transferred) but I am very happy now.  ;D

Just to post the warning I had:
Quote
Warning: copy(/home/myid/domains/mysite.org/public_html/components/com_fireboard/uploaded/images/Picture1.jpg)

[function.copy]: failed to open stream: No such file or directory in

/home/myid/domains/mysite.org/public_html/testsite/smf/convert.php(1075) : eval()'d code on line 4


As for FB 1.0.4 I think they change the path to
/public_html/images/fbfiles/images/
Just FYI.

The utf-8 conversion was not successful. i couldn't read the posts. But I will looking into another UTF-8 thread and do some research. BTW the single/double quote become \' and \". I can live with that though.

SMF is a great community! Thanks for the support!

forepro

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,947
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Fireboard 1.0.x
« Reply #33 on: March 20, 2008, 05:06:47 PM »
Hi,

I got it now. I checked the login procedure in Joomla, and it only takes a small change to Sources/LogInOut.php to make it work.

Code: [Select]
// Maybe they are using a hash from before the password fix.
                $other_passwords[] = md5($_POST['passwrd']);  // Joomla pre-1.0.13 passwords style
                $other_passwords[] = md5($_POST['passwrd'].$user_settings['passwordSalt']); // Joomla 1.0.13 and up (in the 1.0.x branch)
As you can see, J! from 1.0.13 on simply does md5(password+salt);

I was able to login using my J! password as soon as I did that.

Don't know how it can be easily integrated though, this will still require a hack to work !

Regards

yea, but those who have not logged in since the upgrade will need the old login method. I updated the package to include both fixes last night.
Thanks for the post, I was able to get that straighten out and fixed the   issue that was occurring. I will update the main post when forepro tests this converter to see how things go :)

forepro,
Try the attached one. I did the wrong path to avatars.

edit,
As well read this on UTF-8 Conversions http://www.simplemachines.org/community/index.php?topic=140917.0
« Last Edit: March 20, 2008, 05:08:20 PM by SleePy »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline shumisha

  • Newbie
  • *
  • Posts: 9
Re: [SMF Converter] Fireboard 1.0.x
« Reply #34 on: March 20, 2008, 05:18:38 PM »
Hi,

Quote
yea, but those who have not logged in since the upgrade will need the old login method.
Yes, I thought that is taken care of by
Code: [Select]
$other_passwords[] = md5($_POST['passwrd']);  // Joomla pre-1.0.13 passwords styleBut actually I think that is not even needed, because in that case, there will be no salt in the Joomla users table, and the LogInOut.php code will be in another branch (there is a test on whether the salt is empty or not). In that other branch, there is already a
Code: [Select]
$other_passwords[] = md5($_POST['passwrd']);Untested yet, though

Regards

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,947
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Fireboard 1.0.x
« Reply #35 on: March 20, 2008, 05:51:06 PM »
I use both now in the mod package:

Code: [Select]
        // New Joomla login method?
        $other_passwords[] = md5($_REQUEST['passwrd'] . $user_settings['passwordSalt']);
        // The old Joomla login method?
        $other_passwords[] = md5($_REQUEST['passwrd']);
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline ChrisFBBS

  • Semi-Newbie
  • *
  • Posts: 60
Re: [SMF Converter] Fireboard 1.0.x
« Reply #36 on: March 20, 2008, 10:03:27 PM »
I am obviously missing something so just to confirm the steps that are needed to do this.
1. Upload convert.php, fireboard to smf file  and configuration.php (Joomla 1.5 users only need configuration.php) to your SMF directory.
2. Run convert.php.
 That is all that is needed to get convert to work correct?
www.freeblackberrystuff.com Blackberry neews plus... free blackberry themes free blackberry apps and free blackberry games

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,947
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Fireboard 1.0.x
« Reply #37 on: March 21, 2008, 12:23:11 AM »
make sure the configuration file has the database and database prefix correctly in it.

Edit,
Actually. This would work as well. Using your joomla 1.5 configuration.php. Open the file up. Just after the <?php add a return then these lines of code:
Code: [Select]
$config = new JConfig();
$mosConfig_db = $config->db;
$mosConfig_dbprefix = $config->dbprefix;

That will have it emulate the old joomla settings that the converter script needs.
« Last Edit: March 21, 2008, 12:31:53 AM by SleePy »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline ChrisFBBS

  • Semi-Newbie
  • *
  • Posts: 60
Re: [SMF Converter] Fireboard 1.0.x
« Reply #38 on: March 21, 2008, 01:19:47 PM »
Still get this error
Code: [Select]
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /homepages/10/d116192141/htdocs/fbb/f/convert.php on line 780

Notice: Undefined property: db186974532 in /homepages/10/d116192141/htdocs/fbb/configuration.php on line 3

Notice: Undefined property: jos_ in /homepages/10/d116192141/htdocs/fbb/configuration.php on line 4
No Database Selected

www.freeblackberrystuff.com Blackberry neews plus... free blackberry themes free blackberry apps and free blackberry games

Offline forepro

  • Semi-Newbie
  • *
  • Posts: 32
Re: [SMF Converter] Fireboard 1.0.x
« Reply #39 on: March 21, 2008, 02:04:29 PM »
Hello folks,

Many thanks to your help. Now things are almost there.

I followed the flow of this is the post except that I used the convert.php of this FB thread rather than UTF-8 Converter
http://www.simplemachines.org/community/index.php?topic=140917.msg1348511#msg1348511

Here is what I did,

1. fresh install SMF with default settings (Do not select UTF-8 on the install page)

2. use covert.php for FB and latest fireboard_to_smf.sql from SleePY to convert FB 1.0.4 to SMF 1.1.4. use default option: Set SMF's default character set to ISO 8859-1)

3. After this conversion, all my Chinese topics and messages became alien language but I can fix them by switching the character encoding of browser from Western(ISO 8859-1) to Unicode(UTF-8).

4. Downloaded SMF Chinese language pack UTF-8, uploaded it to the server, and set it as default through admin -> "server setting".

Up to this point, I was able to read all Chinese posts without any issues on two testing servers. But on one of them I observed that the search results by using Chinese was very poor. I tried to search certain Chinese keywords, and I can see many articles containing those keywords have escaped from search.

5. Therefore, I went to "Forum Maintenance" -> "Convert the database and data to UTF-8", use default settings to run the conversion. After that, the search results of the poor one improves dramatically! I couldn't be happier.  :D
 
My system info:
Joomla 1.0.12
FB 1.0.4 (upgraded from 1.0.1)
MySQL 5.0.41
PHP 4.4.8

Hope this would help some others who also have the same problems.

The only issue left is that: attachments(both img and file) and avatars are not transferred. No error messages for avatars but for attachments:

Code: [Select]
Warning: copy(/home/mysite.org/public_html/components/com_fireboard/uploaded/images/Picture1.jpg) [function.copy]: failed

to open stream: No such file or directory in /home/mysite.org/public_html/smf/convert.php(1075) : eval()'d code on line 4

Warning: copy(/home/mysite.org/public_html/components/com_fireboard/uploaded/files/Notes.pdf) [function.copy]: failed to

open stream: No such file or directory in /home/mysite.org/public_html/smf/convert.php(1075) : eval()'d code on line 4

Warning: copy(/home/mysite.org/public_html/images/fbfiles/files/Muss.jpg) [function.copy]: failed to open stream: No such

file or directory in /home/mysite.org/public_html/smf/convert.php (1075) : eval()'d code on line 4


For those files, although it seems like they should be placed in components/com_fireboard/_fbfiles_dist/avatars, or files, or images.
But I can see in FB 1.0.4 the actual avatars user uploaded are stored in joomla image folder: public_html/images/fbfiles/avatars/
and same as attachments -> public_html/images/fbfiles/files or images

Hope this helps!

cheers,
forepro