Quote:
Originally Posted by Disasterpiece
Funny that you mention that, I had exactly the same problem. We didn't use video tags, just the [youtube=title]videoid[/youtube] thingy which caused above mentioned problem.
I made a script for myself which changed all [youtube]...[/youtube] tags to full urls like
http://www.youtube.com/watch?v=*videoid*
to solve this problem. I attached it below.
USE AT YOUR OWN RISK!
Backup your database before running the query, disabling your forum might be a good idea, place it anywhere and delete it afterwards.
Edit the file before you run it with your database credentials and modify the table-prefix/name accordingly. Hit the "continue" link until the script doesn't make any more queries.
Oh and I had troubles with singlequotes in postings which messed up my query, so I simply escaped it. I didn't discover any problems with that, keep in mind that if your language makes excessive use of the ' character, you might want to find a way around that, I did not.
Will only work with old youtube tags in the form of:
Code:
[youtube]6mXM-oGggrM[/youtube]
and:
Code:
[youtube="hey check this out!"]6mXM-oGggrM[/youtube]
If you used a different tag, send me a PM and I try to help you out with the correct replacement.
|
Thanks partner ... appreciate that ...
Those two BBCodes are EXACTLY the ones that we used for years, so there's a LOT of old YouTube links with them.
So, I simply execute that PHP file you attached and it will go through our entire database, altering them to something else?
I have no database prefix .... it just shows in the config file for vBulletin as ' ' with no prefix in between the single quotes. Just leave it as two single quotes in your PHP file?
BTW, my language is English ..
Regards,
Doug