Reply to thread

If a post title contains partial BB Code like [PLAIN]"[S]"[/PLAIN] ("S" standing for "Suche" / "Searching" in a marketplace forum) then prepending the post title to the post message causes the whole message to be striked-through because XenForo auto-closes BB Code tags.


One possible solution could be to wrap the post title with the "PLAIN" BB Code:

[CODE=diff]diff --git a/src/addons/XFI/Import/Importer/vBulletin.php b/src/addons/XFI/Import/Importer/vBulletin.php

index 841205868..406f1a3e2 100644

--- a/src/addons/XFI/Import/Importer/vBulletin.php

+++ b/src/addons/XFI/Import/Importer/vBulletin.php

@@ -3918,6 +3918,10 @@ class vBulletin extends AbstractForumImporter

 

                 if ($title !== ($matches[1] . $matches[2] . $threadTitle))

                 {

+                    if (strpos($title, '[') !== false)

+                    {

+                        $title = '[PLAIN]' . $title . '[/PLAIN]';

+                    }

                     $message = "[b]{$title}[/b]\n\n" . ltrim($message);

                 }

             }[/CODE]


Back
Top Bottom