Thread: Show Thread Enhancements - Automatic Embedded Video (youtube, plus many more)
View Single Post
  #173  
Old 06-26-2007, 11:06 PM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dizzy100 View Post
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!)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01214 seconds
  • Memory Usage 1,775KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete