I was coding this last night for a project of my own and it ocurred to me, with the amount of you tube links that get posted on this forum, why doesn't the forum support it natively?
I didn't see it discussed anywhere (I looked, sorry if I missed it), so I thought i'd suggest it.
Also, seeing a I coded it last night, I thought i'd throw in the code to do it too:
This takes the vid of the you tube parameter between a [youtube] tag and then embeds it without a subdomain for maximum compatibility with mobile devices.
I didn't see it discussed anywhere (I looked, sorry if I missed it), so I thought i'd suggest it.
Also, seeing a I coded it last night, I thought i'd throw in the code to do it too:
preg_replace(
'/\[youtube\](.*)\[\/youtube\]/i'
,"<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"http://youtube.com/v/$1\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://youtube.com/v/$1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>"
)
This takes the vid of the you tube parameter between a [youtube] tag and then embeds it without a subdomain for maximum compatibility with mobile devices.