Broken BBCode after conversion from PHPBB3

Started by blueJ, November 02, 2012, 11:48:50 PM

Previous topic - Next topic

blueJ

Hello! I'm new here, I searched for the appropiate place to post this, so if it isn't right, I'm sorry..

I've had a few issues after converting my PHPBB3 to SMF. For example images wouldn't display properly and I got that fixed with SQL querys I found online from other people who went through the same! Problem was that it was coded wrong and we had to replace what was wrong with : and . in the URLs.

I have another problem. I had a Youtube BBCode on my old PHPBB3 and now that I've converted I'm left with those tags around the Youtube links, so maeba doesn't auto-embed the old posts. Is there any way to do a SQL query to remove from the message contents the Youtube tag? The tag appears like this:

[youtube:1lostyzk]youtube link[/youtube:1lostyzk]

The problem here would be that the numbers and letters in the code are different for each post.  :( So I don't know if a SQL query could be made?

Thank you. :)

MrPhil

Maybe it would have been better to ask in the PHPBB converter board on this forum. You can click on "Report to moderator" and ask that it be moved there, if you want.

I think there is a YouTube mod for SMF, or you might be able to use Aeva to handle YouTube. If you want to go ahead and remove or modify the existing link as you gave above, what do you want to end up with? Do you want the entire thing removed, or just the two BBCode tags? It might be done directly in phpMyAdmin, assuming SQL can handle some sort of regular expression. If it can't, worst case you would have to write a PHP script to read in each message (post), use regex to detect such a tag:
preg_replace('~\[youtube:[^\]]+\][^\]]+\[/youtube:[^\]]+\]~i', '', $post)
or something close to that, and when found, snip it out and write back the record.

It would be possible to grab the YouTube ID and put it into an SMF YouTube tag to replace that one.

Advertisement: