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