Advertisement:

Author Topic: Conversion from PhpBB-3.0.8 to SMF-2.0 stable - problem with fonts size in posts  (Read 6330 times)

Offline boogi

  • Newbie
  • *
  • Posts: 2
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
Code: [Select]
[size=50]sample text[/size]to
Code: [Select]
[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])

Code: [Select]
[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
Code: [Select]
[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:
Code: [Select]
(text) got converted to
Code: [Select]
( 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:
Code: [Select]
Don't converted to
Code: [Select]
Don\'t
5. In signature:
Code: [Select]
[size=92]text[/size] converted to
Code: [Select]
[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:
Code: [Select]
sample text :) converted to
Code: [Select]
sample text \":)\" (and also true for other emoticons in signatures; emoticons in posts are OK)

7. In signature:
Code: [Select]
[quote="Username"]sample text[/quote] converted to
Code: [Select]
[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!
« Last Edit: June 12, 2011, 06:38:51 PM by boogi »

Offline AllanD

  • Sr. Member
  • ****
  • Posts: 718
  • Gender: Male
  • It's All Good
    • KnD Hosting
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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,421
    • XPtsp.com Community
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:
Code: [Select]
[size=In the official version (at least, I'm thinking it's THE official one  :P) of the converter, it reads like this:
Code: [Select]
'[size=$1px]',Replace this line with the following:
Code: [Select]
'[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:
Code: [Select]
'before' => '<span style="font-size: $1;" class="bbc_size">',
'after' => '</span>',
),
and add this after it:
Code: [Select]
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!!!
« Last Edit: May 28, 2013, 08:42:33 PM by dougiefresh »
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!