Quote:
Originally Posted by mfyvie
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.
|
Yikes yes that does seem like sloppy code. I'll have to look at a workable solution.
Disabling vipers code won't work as his bbcode fails to function then. I can only assume hes parsing as its displayed to alter the {param} tag as he presents his bbcode as
Code:
<object width="425" height="340" type="application/x-shockwave-flash" data="http://www.youtube.com/v/{param}">
<param name="movie" value="http://www.youtube.com/v/{param}" />
<param name="wmode" value="transparent" />
<em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>
</object>
But we posted in the youtube videos using the url link
http://www.youtube.com/watch?v=1eKifSDgU48
So this results in quite a messed up
Code:
<object width="425" height="340" type="application/x-shockwave-flash" data="http://www.youtube.com/v/http://www.youtube.com/watch?v=1eKifSDgU48">
<param name="movie" value="http://www.youtube.com/v/http://www.youtube.com/watch?v=1eKifSDgU48" />
<param name="wmode" value="transparent" />
<em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>
</object>
The only workable option i've so far found is to remove vipers code completely and manually edit each youtube embedded video replacing his tags with your tags and removing the front line url so
[YOUTUBE]http://www.youtube.com/watch?v=1eKifSDgU48[/YOUTUBE]
becomes
[YOUTUBEvid]1eKifSDgU48{/YOUTUBEvid]
That works effectively but will require some work to track down each post that has his tags embedded.
Thankfully there is a solution to this using phpmyadmin.
Just enter into your database and type in the following mysql in the SQL tag to show you all your posts that have referance to youtube tags (note on a big board this could be many]
Code:
SELECT *
FROM `post`
WHERE `pagetext` LIKE '%[youtube]%'
LIMIT 0 , 30
The you just have to edit the tags from
[YOUTUBE]
http://www.youtube.com/watch?v=VZBxfntDq3M[/YOUTUBE]
to
[YOUTUBEvid]VZBxfntDq3M[/YOUTUBEvid]
removing referance to the url and adding this new embedded bbcode.
Its a cludge but if you only have around 50 or so linked youtube videos is likely the best course of action to get this mod working and remove vipers.