vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Issues with youtube bbcode (https://vborg.vbsupport.ru/showthread.php?t=266369)

Vcize 07-06-2011 01:07 PM

Issues with youtube bbcode
 
I have the following bbcode replacement for users to use when inserting a youtube video into a post:

HTML Code:

<iframe width="560" height="349" src="http://www.youtube.com/embed/{param}" frameborder="0" allowfullscreen></iframe>
This works great when the user uses the tag correctly and inserts only the video ID. However, if the user pastes in the entire URL, which they often do by mistake, it causes the entire thread to be redirected to youtube any time someone opens it.

Is there a way to handle the user putting in a full URL rather than just the video ID and fail gracefully?

kh99 07-06-2011 01:21 PM

You could use this mod: https://vborg.vbsupport.ru/showthread.php?t=261296

Vcize 07-06-2011 01:27 PM

Quote:

Originally Posted by kh99 (Post 2217419)

Thanks, I'd still prefer that users be able to post them as links when they want to though, and not auto-embed them all.

Also, I'm not sure this would actually solve the problem of when a user puts a link inside a BBcode tag.

There's got to be a solution for this out there, tons of people use custom bbcode's for youtube embeds and they can't all just be letting their forum redirect whenever anyone puts a full URL in there...

--------------- Added [DATE]1310015826[/DATE] at [TIME]1310015826[/TIME] ---------------

Anyone? This just started happening recently too. Did youtube change their embed code or something?

GavoTrav 07-08-2011 08:13 PM

Quote:

Originally Posted by Vcize (Post 2217420)
Thanks, I'd still prefer that users be able to post them as links when they want to though, and not auto-embed them all.

Also, I'm not sure this would actually solve the problem of when a user puts a link inside a BBcode tag.

There's got to be a solution for this out there, tons of people use custom bbcode's for youtube embeds and they can't all just be letting their forum redirect whenever anyone puts a full URL in there...

--------------- Added [DATE]1310015826[/DATE] at [TIME]1310015826[/TIME] ---------------

Anyone? This just started happening recently too. Did youtube change their embed code or something?


If you want auto embed and tell users if they want to just use links they can use [noparse]


All times are GMT. The time now is 11:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01972 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete