PDA

View Full Version : [videos] vs. [youtube]


TomBayer
04-16-2010, 06:32 PM
I searched for a good while but found nothing I was able to use for what I am looking for so please bear with me if I overlooked a valid entry. The members of our Forum have made heavy use of a custom youtube bb code in the past. After upgrading to 4.0.3, I fear to run an SQL query to replace the old tags with the new one because I have read a few postings where people had problems. So for now, I have added this custom bb code in the BB Code Manager:

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>

It works as long as people ONLY posted the end of the video link. If they included the full URL, I only see a white page. So for example NUx66ZEDjnQ works and the video from the old posting is displayed but http://www.youtube.com/watch?v=NUx66ZEDjnQ doesn't. Is there any way that both ways of providing the video URL are supported with a Custom BB code? I would love to see all old posts work again and to encourage people to use the new [video] tag from now now. But I am not that good in coding so I need a Dumbo solution lol. Thanks in advance for your help.