Conversion from PhpBB-3.0.8 to SMF-2.0 stable - problem with fonts size in posts

Started by boogi, June 12, 2011, 06:30:01 PM

Previous topic - Next topic

boogi

Hi everyone. First of all - thank you for great software. Second: sorry about my English ;)

Now on the topic: I have a forum in PhpBB-3.0.8, and I want to convert it to SMF-2.0. On my test machine I converted it - conversion went fine. Forum is in polish language, but no problem with that - always utf8 (utf8_general_ci in mysql db). In my new forum - SMF now, I had encountered this problems with conversion of posts:

1. tag "size" was translated from[size=50]sample text[/size]to[size=99px]sample text[/size]; there were no other tags in that post

2. second example with nested tags, and with not valid close tags ([.size][.i][./size][./i])

[quote="Username"][size=100]Sample text [b]bold text[/b]
More sample text

http://example.com/index.html
[i]Long text (more than 500 characters)[/size][/i]
[/quote]
have been converted to
[quote author="Username"][size=99px]Sample text [b]bold text[/b]
More sample text

<!-- m -->[url=http://example.com/index.html]http://example.com/index.html[/url]<!-- m -->
[i]Long text (more than 500 characters)[/size][/i]
[/quote]
and again we have 99px font size.

3. In signature: (text) got converted to ( text ) (please note aditional spaces between brackets and word); also i seen many more spaces in some other signatures, but it's late by now and I don't want to count spaces :)

4. In signature: Don't converted to Don\'t

5. In signature: [size=92]text[/size] converted to [size=92]text[/size] which means that in original phpbb3 the text was displayed smaller (as tag was parsed), and after conversion in SMF, I can see this whole text "[.size]..." in user signature.

6. In signature: sample text :) converted to sample text \":)\" (and also true for other emoticons in signatures; emoticons in posts are OK)

7. In signature: [quote="Username"]sample text[/quote] converted to [quote="\"Username\""]sample text[/quote]


I can manage those little things with some mysql commands, but I can't tell if I'm the only one with problems like that, or if these are common problems. If this is common, then maybe someone could fix the "convert.php" script.

If you want me to provide some other information, then please ask, I'll do my best.

Cheers!

AllanD

I had the same problems when i converted.I think it's was because phpbb uses different bbcode commands for list and font size.
Check out this great sites.
KnD Hosting

dougiefresh

I know I'm kinda late to this topic :P, but I've come up with my own solution to the #1 problem and a partial fix to #2 problem after a day of searching for an answer and not finding one....

In phpbb3_to_smf.sql, search for this phrase:
[size=
In the official version (at least, I'm thinking it's THE official one  :P) of the converter, it reads like this:
'[size=$1px]',
Replace this line with the following:
'[size=$1]',
This changes the default "translation" of the size bbcode back to what it is in the phpBB board.....

There is a problem with doing this, as SMF doesn't recognize this usage of the size bbcode.  So, we have to add a little something to the Subs.php file in the Sources folder.  Find this:
'before' => '<span style="font-size: $1;" class="bbc_size">',
'after' => '</span>',
),

and add this after it:
array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '([1-9][0-9]|[1-9][0-9][0-9])\]',
'before' => '<span style="font-size: $1%;" class="bbc_size">',
'after' => '</span>',
),

This adds the necessary information to the bbcode array so that [size={some number between 10 and 999}] is handled correctly....  We can't include 0-9 as some of those numbers are included in another part of the array....

Hope this helps ya!

Edit: BTW, I've submitted this code alteration as a mod today......  So once it is approved, I'll link to it here.....

EDIT2: YAY!!!  My phpBB-style Font Size BBCode mod was approved!!!

Advertisement: