Simple Machines Community Forum

SMF Support => Converting to SMF => YaBB/YaBB SE => Topic started by: HighAce on November 29, 2009, 06:20:50 AM

Title: Help With YaBB 2.2 Conversion
Post by: HighAce on November 29, 2009, 06:20:50 AM
Well i downgraded my latest YaBB forum software from 2.4 to 2.2 so i could convert it over to SMF however it ran into a few problems.

When doing the conversion it brought up quite a few errors however before i could note them all down it flashed up with the following message:

Recalculating forum statistics... Successful.

Notice: Undefined variable: to_prefix in /home/user/public_html/forumsmf/convert.php on line 1821
Unsuccessful!
This query:

    REPLACE INTO settings (variable, value)
    VALUES ('conversion_time', 1259492139),
    ('conversion_from', 'yabb22_to_smf.php');

Caused the error:

    No database selected


Now it still seems to have brought across everything ok as in number of posts and members, however i noticed that some of the boards are displayed a bit weird, like the usual layout seems to be First Column = the board Name & Description, Second Column =  the number of Posts & Topics and the Last Column = when the last post was made and who by.

Well some of the boards are displaying like this: Boards Name & Description, Last post & By Who and then the last one shows Number of Posts & Topics, however some are even showing as Board Name & Description, Last Post & By Who and the last Column is completely greyed out with no writing in it at all??

I did a 'Find & Repair Any Errors" and it came up with heaps!!! , they started at Topic #244 and went up to the last one which was 2223 and the error was:

Topic #243 has the wrong number of replies, 0.

It then showed up the following error as well:

The subject of topic #2 is currently not stored in the subject cache.

That went all the way up to Topic #2223 as well.

And one last problem is with the Private Messages, they are all there but the Subject and who they are From are the wrong way round, as in it says for example From: "1258905524" Subject: Chris.

Not to fussed if i cannot get the PM's sorted but the board display / structure is really annoying!

Any idea's or suggestions on how i can fix??

:)

Title: Re: Help With YaBB 2.2 Conversion
Post by: Norv on November 29, 2009, 02:17:45 PM
I'm sorry, I don't have Perl so I don't have YaBB installed either. In case you wish, I can try looking at your particular database and correct the converter accordingly, might be quicker, I'm afraid. Please let me in case you agree, I will PM you an account to use.

Alternatively:
About the layout problem, can you please make a screenshot or link to your forum, to show what happens? I'm sorry, I don't fully understand it.

About the errors "has the wrong number of replies": normally a 'find and repair' should be able to fix that, in case the rest of the information is there. It could be solved manually as well, or with a query, but again, if the rest of the information is correctly transfered over.
Eventually, please try (in phpmyadmin, on the converted database, not tested):

UPDATE smf_topics AS t SET numReplies =
  (SELECT count(ID_MSG) FROM smf_messages AS m WHERE m.ID_TOPIC = t.ID_TOPIC)


About the errors "the subject is currently not stored in the subject cache", these are really not important, and the 'find and repair' should be able to fix them anyway.

About the PMs: if you are certain that always the subject and the name of the user from which the message comes are messed up, then please try this: (yabb22_to_smf.php)
Code (find) Select

$row = array(
'fromName' => substr(htmlspecialchars($userData[$i][0]), 0, 255),
'subject' => substr($userData[$i][1], 0, 255),
'msgtime' => !empty($userData[$i][2]) ? (int) $userData[$i][2] : '0',
'body' => substr(!empty($userData[$i][3]) || empty($userData[$i][7]) ? $userData[$i][3] : $userData[$i][7], 0, 65534),
'ID_MEMBER_FROM' => 0,
'deletedBySender' => $is_outbox ? 0 : 1,
'temp' => htmlspecialchars(substr($entry, 0, -4)),
);


Code (replace) Select

$row = array(
'fromName' => substr($userData[$i][1], 0, 255),
'subject' => substr(htmlspecialchars($userData[$i][0]), 0, 255),
'msgtime' => !empty($userData[$i][2]) ? (int) $userData[$i][2] : '0',
'body' => substr(!empty($userData[$i][3]) || empty($userData[$i][7]) ? $userData[$i][3] : $userData[$i][7], 0, 65534),
'ID_MEMBER_FROM' => 0,
'deletedBySender' => $is_outbox ? 0 : 1,
'temp' => htmlspecialchars(substr($entry, 0, -4)),
);
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on November 29, 2009, 07:37:08 PM
Thanks for your reply and offer to help. :)

Firstly here is a link to a screen shot of what i mean about the boards display being messed up:



Some display ok with the first column showing the boards name & description, the second column showing number of topics & replies and the last column showing who made the last post and when, however as in the shot above some are round the wrong way and some have the last column completely greyed out.

If you want to look at my database then yes feel free to PM me what exactly you need.

Thanks again for your help, it's appreciated a lot.

Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on November 29, 2009, 08:43:04 PM
I just tried your suggestion for the PM's and it now displays correctly who it's from but the subject has taken on the unique 10 digit number of each YaBB message, like this for example - From: Chris    Subject: 1251229740 , it also shows every message as being sent on December the 31st 1969 at 6:00PM!

Also i did the Find & Repair option and it has now cleaned up all errors and there are no more errors being found, however the board display is still not right, as i mentioned before i'm not to worried if the PM's cannot be sorted out but i would really love to get the boards / categories sorted out so they are all looking the same. :)

Title: Re: Help With YaBB 2.2 Conversion
Post by: Norv on November 30, 2009, 03:15:15 PM
Please try eventually the attached file, if you want:
- PMs should be corrected
- full boards description imported, thus no more wierd layout issues

Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on December 01, 2009, 01:42:30 AM
Boards & posts are now all displaying properly  :) , however the PM's still have a slight issue, they now display the correct From and Subject fields however the PM's are all blank!

I have PM'ed you the rest of the info and details. :)

Title: Re: Help With YaBB 2.2 Conversion
Post by: Norv on December 08, 2009, 04:15:28 AM
Sorry for the delay! Please, find attached the converter data file for YaBB 2.4.
- PMs should be corrected
- polls should be corrected
- membergroups should be imported
- attachments should be imported
Attachments were not fully tested, though.
Also, it would be very appreciated if you could tell how it works, and check if all boards and categories are fully imported.
Title: Re: Help With YaBB 2.2 Conversion
Post by: Norv on December 17, 2009, 01:34:05 AM
I'm replacing the file in the previous post with the corrected one. (for other issues with polls as you mentioned)
Please, take a look, as far as I can tell polls should get converted properly now.
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on February 07, 2010, 10:50:37 PM
Just letting others know that the Poll issues, PM's and also the attachment problems seem to have been fixed in the last update to the converter file.

There is however a problem with the font size from YaBB, where by i noticed a line of text from the YaBB side was displaying in very big text on SMF, i couldn't work out why until today when i looked back over it and i noticed in YaBB they use the following size code:

[ size=7] Text [/size]

Where as in SMF it's like this:

[ size=7pt] Text [/size]

Basically YaBB don't use the same size format, omitting the 'pt',  which shows up differently in SMF.

The Membergroups are still not being imported properly either but i think Norv is working on that still, so a big thank you to Norv for all the hard work that's been put into this converter! :)



Title: Re: Help With YaBB 2.2 Conversion
Post by: Norv on February 09, 2010, 10:47:39 PM
Really sorry HighAce, for the delay. I am on a break because of work and other projects, and will be back on it, but unfortunately I am not able enough to say when, not at this point. I'm making sure that the new converter is available to the rest of the team too, in case someone else can pick it up meanwhile, and in any case I will too as soon as possible.
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on February 09, 2010, 11:18:44 PM
That's fine Norv, i understand your busy. :)

It's getting very close to being finished now so hopefully it won't require to much more of your time to get the last few little issues sorted out!
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on April 05, 2010, 01:18:02 AM
I understand Norv is very busy, but can any of the other SMF team please help me to fix this small issue of the font size when converting from YaBB??

This looks to be the only outstanding issue i have for doing a successful YaBB 2.4 to SMF conversion and i really would like to get it fixed so i can finally convert my YaBB forum over to SMF.

:)
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on April 26, 2010, 11:50:02 PM
Quote from: HighAce on April 05, 2010, 01:18:02 AM
I understand Norv is very busy, but can any of the other SMF team please help me to fix this small issue of the font size when converting from YaBB??

I guess not :(
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on May 10, 2010, 07:27:58 AM
Well a bit more of a break through with my issues.

After immersing myself in code for the last 3 or so hours i have now fixed another problem and thought i'd share it for those who may be having the same trouble.

My PM's while all being converted over ok from a YaBB 2.4 forum using the convert file in this thread, they always started off with the very last page & PM being shown first, regardless of if you set the option in PM settings to "Show most recent personal messages at top", below is the fix i found for it, though this is done after you have converted, i couldn't find how to add it to the actual convert script, well not yet!

Open your Sources folder, then find and open the file called PersonalMessage.php and look for the following code:

);

// They didn't pick one, use the forum default.
if (!isset($_GET['sort']) || !isset($sort_methods[$_GET['sort']]))
{
$context['sort_by'] = 'date';
$_GET['sort'] = 'pm.ID_PM';
$descending = false;
}



Replace with:

);

// They didn't pick one, use the forum default.
if (!isset($_GET['sort']) || !isset($sort_methods[$_GET['sort']]))
{
$context['sort_by'] = 'date';
$_GET['sort'] = 'pm.ID_PM';
$descending = true;
}



Or just edit the part that says: $descending = false; and change false to true, this has fixed that problem at least.

The following are the remaining issues (i have come across thus far) that are currently stopping me from finally converting my proper forum across:

Membergroups not converting across properly and all end up in the 1 group
Outbox in PM's does not show who PM was sent to, TO field is blank
Small text on YaBB still converts to HUGE text on SMF (see Reply #8)


Hopefully with a bit of patience, and a huge amount of luck, i just may be able to fix these as well, and if i do i will be sure to share them here as well.

Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on June 10, 2010, 02:26:13 AM
Please disregard my last post, the fix i found for the PM's did not work after all (for my situation at least), however i believe Norv is back on the case working on the converter again and will no doubt update here with any progress he has.

Regards.
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on October 17, 2010, 11:34:45 PM
Even though i'm now using PHPBB myself i am still looking at this converter issues for a friend when i get the time, which i managed to do today and have found a fix that has at least worked for me with the PM's not starting on the first page.

Once again open your Sources folder, then find and open the file called PersonalMessage.php and look for the following code:

// Otherwise use the defaults: ascending, by date.
    else
    {
        $context['sort_by'] = $_GET['sort'];
        $_GET['sort'] = $sort_methods[$_GET['sort']];
        $descending = isset($_GET['desc']);
    }

    if (!empty($options['view_newest_pm_first']))
        $descending = !$descending;


And replace with:

// Otherwise use the defaults: ascending, by date.
    else
    {
        $context['sort_by'] = $_GET['sort'];
        $_GET['sort'] = $sort_methods[$_GET['sort']];
        $descending = isset($_GET['desc']);
    }

    if (!empty($options['view_newest_pm_last']))
        $descending = !$descending;


More or less just change the "view_newest_pm_first" bit to "view_newest_pm_last" , this at least allowed the PM's to start on page 1 and works perfectly now.
Title: Re: Help With YaBB 2.2 Conversion
Post by: richerdjohn on April 15, 2011, 08:03:30 AM
Well i downgraded my latest YaBB forum software from 2.4 to 2.2 so i could convert it over to SMF however it ran into a few problems.
Title: Re: Help With YaBB 2.2 Conversion
Post by: HighAce on April 15, 2011, 09:27:56 AM
To be brutally honest, don't put yourself through the stress of trying to convert, I spent months and months, probably much longer, trying to get it working, in the end I gave up and went with PHPBB, and it was the best thing I ever did, a friend of mine converted all the forum posts into an archival web site so all old posts were not lost and can be read when ever by registered members of the new forum by using their forum login details.

Seriously I have never looked back and should have started from scratch long ago as it didn't take long to build up the new forum, actually much quicker than all the time I spent trying to convert YaBB to SMF!!, I would have went with SMF but just preferred PHPBB because of a few personal reasons, SMF is great and had I of been able to convert to it I would have stayed with it, I'm still dabbling with the SMF converter when time permits for a friend who really wants to use SMF but doesn't want to start again like I did, so if I ever get it working I will post here about it.

Hope this helps.