Skip to:

Import from SMF and strange tags in text.

  • mag07


    Hello, I have imported my forms from SMF, all went great, except one thing. Parts of text in all forum posts are wrapped in strange <tt> tags.

    That results in different font on the front end –

    And when looking at the posts from WP admin, text editor I see this:

    <b>Frostmourne</b> is an established guild (<b>level 25</b>) that has existed on the realm as both social and raiding venue for nearly 8 years.<tt><tt>We’re looking for mature, fun, yet dedicated people that will not only contribute to our progress but to the strong social aspect of our guild.<tt><tt>We have a fairly non strict age requirement of 18+.</tt></tt></tt></tt>

    Removing them manually sorts the issue but that’s a lot of work hours to go through each topic and reply :S

    I’ve tried a localhost import to the default WP theme, same thing 🙁

    Would be grateful for any insight on what may be causing it, as I’d rather not spend the next two days going through them manually :p


Viewing 7 replies - 1 through 7 (of 7 total)
  • The code /includes/admin/converters/SMF.php#L717 is replacing [tt] and [/tt] respectively with <tt> and </tt> and a quick lookup of the “teletype” HTML tag shows we should not really be using it all 😉

    Can you post the HTML raw source of the post from SMF for me, this will allow me to see if it is currently doing it correctly, which I think it is per the details and screenshot below.

    SMF Source: [sup]superscript[/sup]<br />[sub]subscript[/sub]<br />[tt]teletype[/tt]
    bbPress Converted Source: <sup>superscript</sup><br><sub>subscript</sub><br><tt>teletype</tt>

    We probably should rather than converting them <tt> / </tt> convert them to a span and/or p HTML elements:


    <span style="font-family: monospace;">
    This is a sample.



    Thank you for taking the time to reply. Was away for a couple of days.

    Anyhow, the same topic in the smf install is here: – you should be able to view page source.

    It’s just using bbcodes for formatting, not sure how SMF handles this from the backend.

    [b]Frostmourne[/b] is (...)
    Apply [url=;n=2]HERE[/url].
    If you have any questions or concerns, please feel free to contact any of our staff members.
    	[li][url=;u=33]Shadowk[/url], [/li]
    	[li][url=;u=43]Krybaybee (kirstykins)[/url],[/li]
    	[li][url=;u=19]Auraguardian (Taichihamsta)[/url],[/li]
    Forum Admins
    	[li][url=;u=27]Tranquilrage[/url], [/li]
    	[li][url=;u=71]Starwatcher (Worganic)[/url][/li]

    Thanks again, appreciate your help 🙂

    As noted in your other topic, your replies here were marked as spam, I’ve unmarked them all as spam and deleted the duplicates.

    Testing that same BBCode you have in your reply above (the one I left published) it does look like there is an error/conflict, I’ll take a look at this during the week and get back to you.

    Again, apologies for your replies being caught by our spam filter. 🙂



    I just did an import of an SMF forum to bbPress, and my posts have <tt><tt> where all my paragraph breaks were.

    I don’t have any of these though, as shown by the other poster: </tt>

    But I do have some individual <tt>’s

    Any links in the posts also have [ class=”bbcode_url” ] attached to the end of the link.
    eg: <tt>Australian Electoral Commission<tt><a href="" class="bbcode_url"></a><tt>Enrolled etc




    I am not entirely sure, but you might need to install a find and repplace plugin to remove unwanted characters in posts.

    @abcdiamond A good DB search and replace plugin is

    The class="bbcode_url" could most likely be ignored as it’s only a CSS style

    Strange that you have <tt> and not </tt>, I’ll take a another look at these.

    A quick look at the <tt> issue:

    We’re doing this:

    // Replace '[tt]' with '<tt>'
    $SMF_markup = preg_replace( '/\[tt\]/',   '<tt>',  $SMF_markup );
    // Replace '[/tt]' with '</tt>'
    $SMF_markup = preg_replace( '/\[\/tt\]/', '</tt>', $SMF_markup );

    I’m wondering if your SMF forums used custom BBCode’s here? It looks like it was for URL’s where class="bbcode_url" was being added to links, maybe also a custom BBCode for [tt] was being used where no closing [/tt] BBCode was required?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar