Quote:
Originally Posted by dizzy100
Just got around to testing this. I have found a plugin clash using the Youtube video embedding.
Posting
http://www.youtube.com/watch?v=m2OC5Z1Fii8
Gives me this
[YOUTUBEvid]m2OC5Z1Fii8[/youtubevid]
But doesn't actually embed. Obviously your mod is working but isn't showing.
Through the process of elimination however i tracked it down to a conflict with the Embed XHTML valid YouTube and Google Video into your posts plugin
https://vborg.vbsupport.ru/showthread.php?t=130868
If i disable his plugin and repost the same link, yours embeds as it should.
Whats bizarre is that viper uses the bbcode
[YOUTUBE]http://www.youtube.com/watch?v=m2OC5Z1Fii8[/YOUTUBE]
So its not touching your BBCODE at all. But i've now tried several times and the only way i can get your embed to work is by disabling his. Although thats an option, we do have many youtubes already embedded using his BBCODE.
Any ideas for a fixable solution ?
I tried with myspace videos and they parse and emded fine.
|
Fixable solution? Yeah, disable Viper's mod! I didn't have time to completely reverse engineer his mod, but I'll explain what I saw. He's going in to the bbcode parser and screwing around. The bad part is things like this:
Code:
// Everything that's left is invalid calls to the BBCode, so let's ditch it
// Not using an array since the pre-PHP5 replica function can't handle arrays
$text = str_ireplace('[YOUTUBE', '[INVALIDYOUTUBE', $text);
$text = str_ireplace('[/YOUTUBE]', '[/INVALIDYOUTUBE]', $text);
$text = str_ireplace('[GVIDEO', '[INVALIDGVIDEO', $text);
$text = str_ireplace('[/GVIDEO]', '[/INVALIDGVIDEO]', $text);
If you look closely, instead of checking for [YOUTUBE] (which is the tag he uses, also not a good choice to use the same name tag as everyone else might and to delete it if you uninstall the product...), he is checking for [youtube (without the ending bracket).
This basically means that he is looking for any other tag which starts with the word youtube, and trashing it. Since I chose youtubevid to try to be unique, his mod is killing my tag, which is why it isn't showing up until you disable his mod.
Be careful about uninstalling his mod though - it will delete the tags he uses as well, and any existing content you have won't be embedded after that. Disable it instead.
The only way you can fix this is to get him to update his mod to not kill off other people's bbcode, or disable it. If you do uninstall it, manually copy down the details of the bbcode for the existing tags, because you'll have to recreate them again afterwards.
What I can do however is make the next version of my mod refuse to install if it finds a mod like this one which conflicts. I know that's not the perfect solution, but short of changing tag names to get around this issue, there's nothing I can do (and I don't want to change tag names now that they are out there!)