Skip to:
Content
Pages
Categories
Search
Top
Bottom

Import from SMF and strange tags in text.


  • mag07
    Participant

    @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 – http://levelonetwinks.com/?topic=about-frostmourne

    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

    Cheers!

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 😉

    http://www.w3.org/wiki/HTML/Elements/tt

    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>

    https://i.cloudup.com/jnMQwRKTXA.png

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

    e.g.

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

    mag07
    Participant

    @mag07

    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: http://frostmourne.co.uk/index.php?topic=16.0 – 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=http://frostmourne.co.uk/index.php?action=form;n=2]HERE[/url].
    
    If you have any questions or concerns, please feel free to contact any of our staff members.
    [hr]
    
    GM
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=16]Mafist[/url][/li]
    [/list]Officers
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=33]Shadowk[/url], [/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=43]Krybaybee (kirstykins)[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=19]Auraguardian (Taichihamsta)[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Moondo[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Tranquilrage[/url][/li]
    [/list]
    [hr]
    Forum Admins
    [list]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Moondo[/url],[/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=27]Tranquilrage[/url], [/li]
    	[li][url=http://frostmourne.co.uk/index.php?action=profile;u=71]Starwatcher (Worganic)[/url][/li]
    [/list]

    Thanks again, appreciate your help 🙂


    Stephen Edgar
    Keymaster

    @netweb

    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. 🙂


    ABCDiamond
    Participant

    @abcdiamond

    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="http://www.aec.gov.au/" class="bbcode_url">http://www.aec.gov.au/</a><tt>Enrolled etc


    Robkk
    Moderator

    @robkk

    @abcdiamond

    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 https://wordpress.org/plugins/better-search-replace/

    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