XF 2.2 Query to replace Twitter bbcode


Well-known member
I'm trying to convert all Twitter bbcode posts into simple links before disabling it.

This is how it parses out by default the code after the full link is added

This is the query I'm attempting to use
UPDATE xf_post SET message = REPLACE(message, '[MEDIA=twitter]', 'https://twitter.com/i/web/status/[URL]');
UPDATE xf_post SET message = REPLACE(message, '[/MEDIA]', '[/URL]');

This is what it looks like after I run the query, notice the only part that is launchable is the number, I'm obviously missing something here but it feels close.
Greenshot 2022-11-29 16.41.31.png
I would be willing to pay for this if someone is inclined to help. The bottom line is I want to disable the Twitter bbcode but when I do it, it removes it from all existing posts.
Top Bottom